Skip to content

Document EIP-3009 and Permit2 policy patterns - #751

Draft
andrewkmin wants to merge 2 commits into
mainfrom
andrew/eip712-policy-examples
Draft

Document EIP-3009 and Permit2 policy patterns#751
andrewkmin wants to merge 2 commits into
mainfrom
andrew/eip712-policy-examples

Conversation

@andrewkmin

Copy link
Copy Markdown
Contributor

Summary

  • harden the Permit2 policy examples by pinning the EIP-712 encoding, chain, verifying contract, primary type, spender, and token constraints
  • replace the incompatible numeric range example with decimal-string equality that matches normal Ethers and bigint-based Viem serialization
  • document that standard Permit2 signature-transfer payloads do not commit the eventual recipient
  • expand the EIP-3009 example to pin the complete USDC domain, signer, recipient, and exact amount
  • list Permit2 in the Ethers and Viem example catalog

Why

The previous examples matched only the domain name and primary type, which left important domain and message fields unconstrained. The previous Permit2 amount-cap example also compared a serialized decimal string as a number, so it did not model the current policy evaluator behavior.

These examples make the enforceable boundary explicit and call out the recipient, nonce-history, relative-time, and cumulative-limit behavior that must be enforced elsewhere.

Validation

  • parsed all JSON code blocks in features/policies/examples/ethereum.mdx
  • validated the primary Permit2 and EIP-3009 conditions with mono's ConditionValidator
  • git diff --check

@mintlify

mintlify Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
turnkey-docs 🟢 Ready View Preview Jul 31, 2026, 4:51 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@mintlify

mintlify Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
turnkey-docs 🟡 Building Jul 31, 2026, 4:49 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

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