Skip to content

Commit 5de3a56

Browse files
A1igatorclaude
andcommitted
authCapture: fix three review nits
- Drop the "deployed-chain list and" phrase from the cross-reference to the Canonical Addresses appendix; the chain table was removed in 916bd37 so the link target no longer carries that. - Broaden the invalid_deadline_ordering error description to cover all three legs of step 6, not just the refundDeadline < captureDeadline leg. The facilitator surfaces this for any of the three failure modes. - Step 11 amount check phrasing was EIP-3009-leaning; spell out both authorization.value (EIP-3009) and permit2Authorization.permitted.amount (Permit2) so it's unambiguous. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e85f243 commit 5de3a56

1 file changed

Lines changed: 22 additions & 22 deletions

File tree

specs/schemes/authCapture/scheme_authCapture_evm.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ AuthCapture-accepting servers advertise with scheme `authCapture`:
6868
| `PERMIT2_TOKEN_COLLECTOR_ADDRESS` | `0xD8490609d2da0ee626b0e676941b225cbc1A8C08` |
6969
| `PERMIT2_ADDRESS` (Uniswap canonical) | `0x000000000022D473030F116dDEE9F6B43aC78BA3` |
7070

71-
See [Canonical Addresses](#canonical-addresses) for the deployed-chain list and the salt scheme.
71+
See [Canonical Addresses](#canonical-addresses) for the salt scheme.
7272

7373
### Spec → on-chain field name mapping
7474

@@ -185,7 +185,7 @@ The facilitator performs these checks in order:
185185
8. **Spender / collector match**: `payload.to === EIP3009_TOKEN_COLLECTOR_ADDRESS` (EIP-3009) or `payload.spender === PERMIT2_TOKEN_COLLECTOR_ADDRESS` (Permit2).
186186
9. **Token match**: `payload.permitted.token === requirements.asset` (Permit2 only — EIP-3009 binds via signing domain).
187187
10. **Signature verify**: Recover signer from EIP-712 (`ReceiveWithAuthorization` or `PermitTransferFrom`); must match `payer`.
188-
11. **Amount**: Authorization value matches `requirements.amount`.
188+
11. **Amount**: `authorization.value` (EIP-3009) or `permit2Authorization.permitted.amount` (Permit2) matches `requirements.amount`.
189189
12. **Nonce match**: Reconstruct `PaymentInfo` from extra + payload.salt + payer + requirements; recompute payer-agnostic hash; assert it matches the wire nonce.
190190
13. **Simulate** `AUTH_CAPTURE_ESCROW.authorize(...)` or `.charge(...)` to ensure success.
191191

@@ -209,26 +209,26 @@ The authCapture scheme uses the standard x402 error codes plus these scheme-spec
209209

210210
### Verification Errors
211211

212-
| Error Code | Description |
213-
| :---------------------------------- | :----------------------------------------------------------------------- |
214-
| `invalid_payload_format` | Payload doesn't match `Eip3009Payload` or `Permit2Payload`. |
215-
| `unsupported_scheme` | Scheme is not `authCapture`. |
216-
| `network_mismatch` | Payload network doesn't match requirements. |
217-
| `invalid_network` | Network format is not `eip155:<chainId>`. |
218-
| `invalid_authCapture_extra` | Extra is missing required fields. |
219-
| `unsupported_asset_transfer_method` | `assetTransferMethod` is not `"eip3009"` or `"permit2"`. |
220-
| `payload_method_mismatch` | Payload shape doesn't match `assetTransferMethod`. |
221-
| `capture_deadline_expired` | `captureDeadline <= now + 6s`. |
222-
| `invalid_deadline_ordering` | `refundDeadline < captureDeadline`. |
223-
| `authorization_expired` | EIP-3009 `validBefore` (or Permit2 `deadline`) `<= now + 6s`. |
224-
| `authorization_not_yet_valid` | EIP-3009 `validAfter > now`. |
225-
| `invalid_authCapture_signature` | Signature verification failed. |
226-
| `amount_mismatch` | Authorization value doesn't match `requirements.amount`. |
227-
| `token_collector_mismatch` | `to` / `spender` doesn't match the canonical collector for the method. |
228-
| `token_mismatch` | Permit2 `permitted.token` doesn't match `requirements.asset`. |
229-
| `nonce_mismatch` | Wire nonce doesn't match the recomputed payer-agnostic PaymentInfo hash. |
230-
| `insufficient_balance` | Payer balance is less than required amount. |
231-
| `simulation_failed` | Settlement simulation reverted with an unmapped error. |
212+
| Error Code | Description |
213+
| :---------------------------------- | :-------------------------------------------------------------------------------- |
214+
| `invalid_payload_format` | Payload doesn't match `Eip3009Payload` or `Permit2Payload`. |
215+
| `unsupported_scheme` | Scheme is not `authCapture`. |
216+
| `network_mismatch` | Payload network doesn't match requirements. |
217+
| `invalid_network` | Network format is not `eip155:<chainId>`. |
218+
| `invalid_authCapture_extra` | Extra is missing required fields. |
219+
| `unsupported_asset_transfer_method` | `assetTransferMethod` is not `"eip3009"` or `"permit2"`. |
220+
| `payload_method_mismatch` | Payload shape doesn't match `assetTransferMethod`. |
221+
| `capture_deadline_expired` | `captureDeadline <= now + 6s`. |
222+
| `invalid_deadline_ordering` | Deadlines violate `now + maxTimeoutSeconds <= captureDeadline <= refundDeadline`. |
223+
| `authorization_expired` | EIP-3009 `validBefore` (or Permit2 `deadline`) `<= now + 6s`. |
224+
| `authorization_not_yet_valid` | EIP-3009 `validAfter > now`. |
225+
| `invalid_authCapture_signature` | Signature verification failed. |
226+
| `amount_mismatch` | Authorization value doesn't match `requirements.amount`. |
227+
| `token_collector_mismatch` | `to` / `spender` doesn't match the canonical collector for the method. |
228+
| `token_mismatch` | Permit2 `permitted.token` doesn't match `requirements.asset`. |
229+
| `nonce_mismatch` | Wire nonce doesn't match the recomputed payer-agnostic PaymentInfo hash. |
230+
| `insufficient_balance` | Payer balance is less than required amount. |
231+
| `simulation_failed` | Settlement simulation reverted with an unmapped error. |
232232

233233
### Typed simulation reverts
234234

0 commit comments

Comments
 (0)