Skip to content

feat(template): add daily wage worker payment template with overtime support - #491

Open
BrozG wants to merge 2 commits into
accordproject:mainfrom
BrozG:BrozG/daily-wage-workers
Open

feat(template): add daily wage worker payment template with overtime support#491
BrozG wants to merge 2 commits into
accordproject:mainfrom
BrozG:BrozG/daily-wage-workers

Conversation

@BrozG

@BrozG BrozG commented Mar 27, 2026

Copy link
Copy Markdown

Closes #490

Summary

This PR introduces a new smart legal contract template for calculating payments for daily wage workers, including support for overtime compensation.

The template enables structured and automated calculation of total payment based on days worked and overtime hours, aligned with Accord Project standards.

Changes

  • Added new template: daily-wage-workers
  • Implemented contract logic for:
    • Base pay (days worked × daily rate)
    • Overtime pay (hours × overtime rate)
  • Defined data model for employer, worker, and payment parameters
  • Added README with contract description, parameters, and example usage

Example

For:

  • Daily rate: 150.00 USD
  • Days worked: 5
  • Overtime rate: 25.00 USD
  • Overtime hours: 4

Total payment = (5 × 150) + (4 × 25) = 850.00 USD

Flags

  • Initial implementation of the template
  • Open to feedback and improvements from maintainers

Author Checklist

  • DCO sign-off included
  • Tests added and passing
  • Commit messages follow Accord Project format
  • Documentation added (README)
  • PR created from fork branch

BrozG added 2 commits March 27, 2026 22:45
Adds a new template for calculating daily wage worker payments
including support for overtime hours at a higher rate.

Features:
- Base pay calculation from days worked
- Overtime pay calculation from hours worked
- Clear contract structure with employer/worker parties

Author: Brojen Gurung <brojengurung3@gmail.com>
Signed-off-by: Brojen Gurung <brojengurung3@gmail.com>
Signed-off-by: Brojen Gurung <brojengurung3@gmail.com>
@BrozG

BrozG commented Mar 27, 2026

Copy link
Copy Markdown
Author

Hi!
This is my first contribution to the Accord Project, and I really enjoyed working on this template and understanding how smart legal contracts are structured and executed. I’m currently exploring the project as a potential contributor for GSoC, and I’m excited to learn more and contribute further. I would really appreciate any feedback or suggestions for improvement. Thanks for your time! I’m also planning to contribute more templates and improvements based on feedback.

@mttrbrts

Copy link
Copy Markdown
Member

Thanks for this contribution! This looks like a well-structured new template.

One thing to note: #484 is in progress to migrate all templates to Cicero 0.25 with TypeScript. Once that lands, this template will need to follow the same pattern (TypeScript logic instead of Ergo).

Could you check if the template structure aligns with the approach in #484? That will make integration smoother.


This comment was generated by AI on behalf of @mttrbrts.

@github-actions github-actions Bot added the maintainer-engaged A maintainer has commented or reviewed this item label May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer-engaged A maintainer has commented or reviewed this item

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add daily-wage-workers payment template

2 participants