Skip to content

Feature/meta transactions and claims#24

Open
yongqjn wants to merge 9 commits into
erc-8183:mainfrom
okx:feature/meta-transactions-and-claims
Open

Feature/meta transactions and claims#24
yongqjn wants to merge 9 commits into
erc-8183:mainfrom
okx:feature/meta-transactions-and-claims

Conversation

@yongqjn
Copy link
Copy Markdown

@yongqjn yongqjn commented May 26, 2026

Summary

This PR adds meta-transaction support and claim-based partial settlement flows for ERC-8183.

Meta-transactions

  • Adds ERC8183WithAuthorization, an EIP-712 authorization wrapper around ERC-8183 lifecycle actions.
  • Supports relayed execution for:
    • createJob
    • setProvider
    • setBudget
    • fund
    • submit
    • complete
    • reject
    • submitClaim
    • approveClaim
    • rejectClaim
  • Uses packed authorization nonces scoped by signer: bytes20(signer) || uint72 nonce.
  • Supports ERC-1271 contract-wallet signatures via OpenZeppelin SignatureChecker.
  • Reserves authorization nonces before signature validation to avoid ERC-1271 reentrancy/replay edge cases.

Claims / partial settlement

  • Adds claim-based incremental settlement while a job remains Funded.
  • Supports two claim styles:
    • direct submitClaim, called by the client without voucher signatures
    • submitClaimWithAuthorization, relayed using the client’s EIP-712 signature
  • If deliverable == bytes32(0), the claim settles immediately.
  • If deliverable != bytes32(0), the claim records a pending hash and requires approval or rejection.
  • Adds approveClaim / rejectClaim and authorization-backed equivalents.
  • Tracks settledAmount so complete, reject, and claimRefund only operate on remaining escrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants