Skip to content

feat: Implement ERC-2771#21

Merged
boris merged 2 commits intomainfrom
feat/erc-2771
Feb 26, 2026
Merged

feat: Implement ERC-2771#21
boris merged 2 commits intomainfrom
feat/erc-2771

Conversation

@boris
Copy link
Copy Markdown
Collaborator

@boris boris commented Feb 26, 2026

This pull request introduces support for meta-transactions (ERC-2771) in the ClaimCLPc contract, updates deployment documentation with new contract addresses and flow explanations, and enhances the Makefile with new claim and meta-transaction commands. The most important changes are grouped below:

Smart contract: ERC-2771 meta-transaction support and refactoring

  • Added trustedForwarder support in ClaimCLPc, including storage, setter (setTrustedForwarder), getter (isTrustedForwarder), and an internal _msgSender() that extracts the original sender from calldata if called via the trusted forwarder. This enables meta-transaction compatibility. [1] [2] [3]
  • Refactored admin checks and claim logic to use _msgSender() for proper sender resolution (including meta-tx), and added an event for forwarder updates. [1] [2] [3]

Makefile: Claim and meta-transaction operations

  • Added new Makefile targets for claim operations (check-claim, claim-direct, grant-claim-minter, etc.) and meta-transaction configuration (set-forwarder, check-forwarder, etc.), supporting easier contract interaction and admin tasks.
  • Introduced new environment variables in the Makefile for MINTER, FORWARDER, and USER_PK to support these new operations.

Documentation: Deployment and usage updates

  • Updated contract addresses for ClaimCLPc and added the new Forwarder address across deployment and smoke-test documentation, ensuring all references are current. [1] [2] [3]
  • Expanded deployment docs with a detailed step-by-step explanation of the claim mint flow, checks for claim eligibility, and instructions for using meta-transactions with the trusted forwarder. Also added commands for checking supply and minting limits.

These changes collectively enable gasless claims via meta-transactions, improve contract maintainability, and make it easier for developers and admins to interact with and verify the system.

@boris boris merged commit 865d64f into main Feb 26, 2026
1 check passed
@boris boris deleted the feat/erc-2771 branch February 26, 2026 15:36
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.

1 participant