Daml model

Contracts that make payroll authoritative

Sotto 0.2.2 moves payment authority into PayrollState. The web app prepares inputs, but the Daml choice validates live contracts before it creates any run or receipt.

Core templates

TemplateSignatoryPurpose
PayrollStateOperator and employerSerializes payroll and remembers completed periods.
EmployeeProfileEmployerStores employee status and employer-approved monthly net pay.
AuditGrantEmployerCreates forward-only auditor visibility.
PayrollRunEmployerRecords period, total, headcount, and audit scope.
SalaryReceiptEmployerPrivate pay record observed by the employee and active auditors.

Settlement choice

Rendering diagram...

The choice consumes the current PayrollState. A stale state contract, duplicate period, invalid profile, revoked grant, duplicate recipient, empty treasury, or insufficient funds fails before the replacement state is created.