Contracts - Add settle_commitment alias matching backend method name for compatibility
Description
The backend src/lib/backend/services/contracts.ts invokes settle_commitment, but the contract exposes release. Add a settle_commitment(commitment_id, caller) entrypoint in contracts/escrow/src/lib.rs that performs the matured release, aligning the on-chain ABI with the backend's expectations.
Requirements and context
- Must be secure, tested, and documented
- Should be efficient and easy to review
- Add
settle_commitment delegating to the release logic
- Return a settlement result shape the backend can parse
- Keep
release for permissionless matured settlement
- Add tests in
contracts/escrow/src/test.rs for the alias
Suggested execution
- Fork the repo and create a branch
git checkout -b feature/settle-commitment-alias
- Implement changes
- Add
settle_commitment in contracts/escrow/src/lib.rs
- Add tests in
contracts/escrow/src/test.rs
- Document the ABI alignment in
contracts/README.md
- Add cross-reference comments to the backend method
- Test and commit
- Run tests, cover edge cases
- Include test output and notes
Example commit message
feat: add settle_commitment entrypoint matching backend ABI
Guidelines
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 96 hours
Contracts - Add settle_commitment alias matching backend method name for compatibility
Description
The backend
src/lib/backend/services/contracts.tsinvokessettle_commitment, but the contract exposesrelease. Add asettle_commitment(commitment_id, caller)entrypoint incontracts/escrow/src/lib.rsthat performs the matured release, aligning the on-chain ABI with the backend's expectations.Requirements and context
settle_commitmentdelegating to the release logicreleasefor permissionless matured settlementcontracts/escrow/src/test.rsfor the aliasSuggested execution
git checkout -b feature/settle-commitment-aliassettle_commitmentincontracts/escrow/src/lib.rscontracts/escrow/src/test.rscontracts/README.mdExample commit message
feat: add settle_commitment entrypoint matching backend ABIGuidelines