core: add commerce-payments v1 canonical addresses + drop SKALE#121
core: add commerce-payments v1 canonical addresses + drop SKALE#121A1igator wants to merge 3 commits into
Conversation
base/commerce-payments@v1.0.0 redeployed at canonical CREATE2 addresses via CreateX permissionless salts. Adds three top-level address constants + a `commercePaymentsAddresses` bundle: AuthCaptureEscrow: 0xF8211868187974a7Fb9d99b8fFB171AD70665Dc6 ERC3009PaymentCollector: 0x7561DC178D9aD5bc5fb103C01f448A510d2A36D0 Permit2PaymentCollector: 0xD8490609d2da0ee626b0e676941b225cbc1A8C08 Same address on every chain in `x402rChains`. The chain registry is the source of truth for both commerce-payments primitives and (eventually) the x402r-authored contracts; both deploy to the same set going forward. Currently live on: Base, Optimism, Arbitrum One, Polygon, Celo, Avalanche C-Chain, Linea, plus Base Sepolia, Ethereum Sepolia, Arbitrum Sepolia. Ethereum mainnet and Monad remain in the registry pending an imminent primitives deploy. SKALE Base (1187947933) dropped — Shanghai EVM is incompatible with the Cancun-locked toolchain used for the canonical bytecode. Existing legacy CREATE3 constants (`authCaptureEscrow`, `tokenCollector`, `factories`, etc.) are unchanged in this PR and will be retired in the follow-up that deploys the x402r-authored contracts at CREATE2. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Docs PR opened: BackTrackCo/docs#33 Added a commerce-payments v1 primitives section with the new CREATE2 addresses and |
Ethereum mainnet (1) deploy completed at 0.95 gwei effective. All 12 chains in x402rChains now have the commerce-payments v1 primitives live at canonical addresses. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
| } from './config/index.js' | ||
| export { | ||
| authCaptureEscrow, | ||
| commercePaymentsAddresses, |
There was a problem hiding this comment.
Do we need to remove certain things as well
There was a problem hiding this comment.
yeah but later. this is just addresses. you can build on top of it if you want
Both chains have the commerce-payments v1 primitives deployed at the canonical CREATE2 addresses. - BSC (56): USDC at 0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d (Binance-Peg USD Coin) - Tempo (4217): pathUSD at 0x20c0000000000000000000000000000000000000 (TIP-20 predeploy; native USDC not yet issued on Tempo) Tempo deploys required `--gas-estimate-multiplier 1000` because TIP-1000 charges 5-10x more gas for contract deployments to deter state-growth attacks. Forge's standard estimate undershoots by an order of magnitude. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ored) Replaces the legacy CREATE3 addresses in `packages/core/src/config/index.ts` with the canonical CREATE2 deployment (BackTrackCo/x402r-contracts#34, salt namespaces `commerce-payments::v1::*` and `x402r-canonical-v1::*`). - `authCaptureEscrow`, `tokenCollector`, `protocolFeeConfig`, `receiverRefundCollector`, `factories.*`, `conditions.*` updated. - New `commercePayments*` exports surface the three primitives (escrow, ERC3009 collector, Permit2 collector) — supersedes #121. - `hooks.paymentIndexHook` set to `zeroAddress`: the canonical deploy script does not include a chain-singleton `PaymentIndexHook`. Consumers pass an instance via `paymentIndexHookAddress` on the preset. - `hookCombinatorCodehash` recomputed from the new HookCombinator runtime bytecode (`0x99360a2e...`). Owner / fee recipient on `ProtocolFeeConfig` is `0x773dBcB5BDb3Df8359ba4e42D7Ce7AE3fC9Ee235`; protocol-fee calculator is unset, so `getProtocolFeeBps()` returns `0`. Tests: - `presets.test.ts` `makeDeliveryProtectionOptions` defaults `paymentIndexHookAddress` to a non-zero fixture so the HookCombinator path is exercised; the explicit-`zeroAddress` test still overrides. - `erc3009.test.ts` updated to expect the canonical ERC3009 collector address (`0x7561DC17...`) instead of the legacy CREATE3 one. 198/198 unit tests passing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Superseded by #122 — the canonical CREATE2 addresses landed there alongside the x402r-authored contracts (BackTrackCo/x402r-contracts#34) in a single migration. The three primitive constants ( Live deployment status (canonical CREATE2 verified live as of this commit):
Pending (in registry, not yet live): Arbitrum One (42161 — partial deploy, deployer needs gas top-up), Polygon (137 — needs MATIC), Ethereum (1) and Monad (143) — both blocked on the upstream commerce-payments primitives landing on those chains first. |
Summary
base/commerce-payments@v1.0.0primitives, redeployed via CreateX permissionless salts.x402rChains— Shanghai EVM is incompatible with the Cancun-locked canonical bytecode.New addresses (same on every chain via permissionless CREATE2)
AuthCaptureEscrow0xF8211868187974a7Fb9d99b8fFB171AD70665Dc6ERC3009PaymentCollector(escrow, multicall3)0x7561DC178D9aD5bc5fb103C01f448A510d2A36D0Permit2PaymentCollector(escrow, permit2, multicall3)0xD8490609d2da0ee626b0e676941b225cbc1A8C08Salt namespace:
commerce-payments::v1::<ContractName>.Currently live
10 chains verified on-chain via direct
eth_getCodechecks:Pending deploys (in registry, addresses not yet live on these chains): Ethereum (1), Monad (143).
Surface
The existing legacy CREATE3 constants (
authCaptureEscrow,tokenCollector,factories,conditions,recorders,usdcTvlLimit,protocolFeeConfig,receiverRefundCollector,recorderCombinatorCodehash) are unchanged in this PR. They'll be retired in the follow-up that ships the x402r-authored contracts at CREATE2 addresses.Test plan
pnpm tsc --noEmitcleanpnpm vitest run tests/config.test.ts— 25/25 passingforge script script/PredictAddresses.s.sol -vvvinx402r-contractsreproduces the same three addresses🤖 Generated with Claude Code