test(core/ethereum): adjust EIP-7702 test vectors
What changed, and why it matters
This commit only updates test data files for Ethereum EIP-7702 (account abstraction) signing. It renames a test field, adds more test cases, updates expected error messages, and adds mainnet transaction test vectors. There are no changes to the actual firmware or production code, so it does not introduce or fix a security vulnerability in the shipped product.
No security action required; treat as routine test-maintenance commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies three JSON fixture files under common/tests/fixtures/ethereum. Changes are purely test-vector maintenance: renaming ‘nonce’ to ‘tuple_nonce’ to avoid ambiguity with transaction nonce, setting to_address to a derivation-path-derived address, adding error cases for payment requests, non-zero value, non-empty calldata, and empty destination, updating expected chain_id 0 error text, and adding a new sign_tx_eip7702_mainnet.json fixture with real mainnet authorize/revoke vectors. No source code, parsing logic, or validation rules are changed.
Changed components
common/tests/fixtures/ethereum/sign_auth_eip7702.jsoncommon/tests/fixtures/ethereum/sign_auth_eip7702_errors.jsoncommon/tests/fixtures/ethereum/sign_tx_eip7702_mainnet.jsonInspect captured patch +169 / −26
### common/tests/fixtures/ethereum/sign_auth_eip7702.json
@@ -9,7 +9,7 @@
"parameters": {
"path": "m/44'/60'/0'/0/0",
"delegate": "0x5A7FC11397E9a8AD41BF10bf13F22B0a63f96f6d",
- "nonce": 1,
+ "tuple_nonce": 1,
"chain_id": 1
},
"result": {
@@ -23,7 +23,7 @@
"parameters": {
"path": "m/44'/60'/0'/0/0",
"delegate": "0x63c0c19a282a1b52b07dd5a65b58948a07dae32b",
- "nonce": 1,
+ "tuple_nonce": 1,
"chain_id": 1
},
"result": {
@@ -37,7 +37,7 @@
"parameters": {
"path": "m/44'/60'/0'/0/0",
"delegate": "0x5A7FC11397E9a8AD41BF10bf13F22B0a63f96f6d",
- "nonce": 3,
+ "tuple_nonce": 3,
"chain_id": 8453
},
"result": {
@@ -51,7 +51,7 @@
"parameters": {
"path": "m/44'/60'/0'/0/0",
"delegate": "0x5A7FC11397E9a8AD41BF10bf13F22B0a63f96f6d",
- "nonce": 2,
+ "tuple_nonce": 2,
"chain_id": 42161
},
"result": {
@@ -65,7 +65,7 @@
"parameters": {
"path": "m/44'/60'/0'/0/0",
"delegate": "0x5A7FC11397E9a8AD41BF10bf13F22B0a63f96f6d",
- "nonce": 2,
+ "tuple_nonce": 2,
"chain_id": 100
},
"result": {
@@ -79,7 +79,7 @@
"parameters": {
"path": "m/44'/60'/0'/0/0",
"delegate": "0x0000000000000000000000000000000000000000",
- "nonce": 123456,
+ "tuple_nonce": 123456,
"chain_id": 1
},
"result": {
@@ -93,7 +93,7 @@
"parameters": {
"path": "m/44'/60'/0'/0/0",
"delegate": "0x0000000000000000000000000000000000000000",
- "nonce": 123456,
+ "tuple_nonce": 123456,
"chain_id": 8453
},
"result": {
@@ -107,7 +107,7 @@
"parameters": {
"path": "m/44'/60'/0'/0/0",
"delegate": "0x0000000000000000000000000000000000000000",
- "nonce": 123456,
+ "tuple_nonce": 123456,
"chain_id": 42161
},
"result": {
@@ -121,7 +121,7 @@
"parameters": {
"path": "m/44'/60'/0'/0/0",
"delegate": "0x0000000000000000000000000000000000000000",
- "nonce": 67,
+ "tuple_nonce": 67,
"chain_id": 123456789
},
"result": {
### common/tests/fixtures/ethereum/sign_auth_eip7702_errors.json
@@ -9,44 +9,56 @@
"parameters": {
"path": "m/44'/60'/0'/0/0",
"delegate": "0x5A7FC11397E9a8AD41BF10bf13F22B0a63f96f6d",
- "nonce": 1,
- "chain_id": 0
+ "tuple_nonce": 1,
+ "chain_id": 0,
+ "to_address": "0x73d0385F4d8E00C5e6504C6030F47BF6212736A8",
+ "value": 0,
+ "data": ""
},
"result": {
- "error": "DataError: chain_id 0 not supported"
+ "error": "DataError: Chain ID out of bounds"
}
},
{
"name": "metamask_nonce_1_chainid_0_all_networks",
"parameters": {
"path": "m/44'/60'/0'/0/0",
"delegate": "0x63c0c19a282a1b52b07dd5a65b58948a07dae32b",
- "nonce": 1,
- "chain_id": 0
+ "tuple_nonce": 1,
+ "chain_id": 0,
+ "to_address": "0x73d0385F4d8E00C5e6504C6030F47BF6212736A8",
+ "value": 0,
+ "data": ""
},
"result": {
- "error": "DataError: chain_id 0 not supported"
+ "error": "DataError: Chain ID out of bounds"
}
},
{
"name": "revoke_nonce_123456_chainid_0_all_networks",
"parameters": {
"path": "m/44'/60'/0'/0/0",
"delegate": "0x0000000000000000000000000000000000000000",
- "nonce": 123456,
- "chain_id": 0
+ "tuple_nonce": 123456,
+ "chain_id": 0,
+ "to_address": "0x73d0385F4d8E00C5e6504C6030F47BF6212736A8",
+ "value": 0,
+ "data": ""
},
"result": {
- "error": "DataError: chain_id 0 not supported"
+ "error": "DataError: Chain ID out of bounds"
}
},
{
"name": "unknown_nonce_123456_chainid_1_mainnet",
"parameters": {
"path": "m/44'/60'/0'/0/0",
"delegate": "0x4Cd241E8d1510e30b2076397afc7508Ae59C66c9",
- "nonce": 123456,
- "chain_id": 1
+ "tuple_nonce": 123456,
+ "chain_id": 1,
+ "to_address": "0x73d0385F4d8E00C5e6504C6030F47BF6212736A8",
+ "value": 0,
+ "data": ""
},
"result": {
"error": "DataError: Unknown EIP-7702 delegate address"
@@ -57,23 +69,90 @@
"parameters": {
"path": "m/44'/60'/0'/0/0",
"delegate": "0x63c0c19a282a1b52b07dd5a65b58948a07dae32b",
- "nonce": 1,
- "chain_id": 200901
+ "tuple_nonce": 1,
+ "chain_id": 200901,
+ "to_address": "0x73d0385F4d8E00C5e6504C6030F47BF6212736A8",
+ "value": 0,
+ "data": ""
},
"result": {
- "error": "DataError: Unknown network"
+ "error": "DataError: EIP-7702: unknown network"
}
},
{
"name": "metamask_invalid_nonce_chainid_1_mainnet",
"parameters": {
"path": "m/44'/60'/0'/0/0",
"delegate": "0x63c0c19a282a1b52b07dd5a65b58948a07dae32b",
- "nonce": 18446744073709551615,
- "chain_id": 1
+ "tuple_nonce": 18446744073709551615,
+ "chain_id": 1,
+ "to_address": "0x73d0385F4d8E00C5e6504C6030F47BF6212736A8",
+ "value": 0,
+ "data": ""
},
"result": {
- "error": "DataError: Invalid nonce"
+ "error": "DataError: EIP-7702: invalid nonce"
+ }
+ },
+ {
+ "name": "metamask_payment_request_chainid_1_mainnet",
+ "parameters": {
+ "path": "m/44'/60'/0'/0/0",
+ "delegate": "0x63c0c19a282a1b52b07dd5a65b58948a07dae32b",
+ "tuple_nonce": 1,
+ "chain_id": 1,
+ "to_address": "0x73d0385F4d8E00C5e6504C6030F47BF6212736A8",
+ "value": 0,
+ "data": "",
+ "payment_req": true
+ },
+ "result": {
+ "error": "DataError: EIP-7702: unsupported payment request"
+ }
+ },
+ {
+ "name": "metamask_nonzero_value_chainid_1_mainnet",
+ "parameters": {
+ "path": "m/44'/60'/0'/0/0",
+ "delegate": "0x63c0c19a282a1b52b07dd5a65b58948a07dae32b",
+ "tuple_nonce": 1,
+ "chain_id": 1,
+ "to_address": "0x73d0385F4d8E00C5e6504C6030F47BF6212736A8",
+ "value": 6789,
+ "data": ""
+ },
+ "result": {
+ "error": "DataError: EIP-7702: non-zero value"
+ }
+ },
+ {
+ "name": "metamask_nonempty_data_chainid_1_mainnet",
+ "parameters": {
+ "path": "m/44'/60'/0'/0/0",
+ "delegate": "0x63c0c19a282a1b52b07dd5a65b58948a07dae32b",
+ "tuple_nonce": 1,
+ "chain_id": 1,
+ "to_address": "0x73d0385F4d8E00C5e6504C6030F47BF6212736A8",
+ "value": 0,
+ "data": "12345678"
+ },
+ "result": {
+ "error": "DataError: EIP-7702: non-empty calldata"
+ }
+ },
+ {
+ "name": "metamask_empty_dest_chainid_1_mainnet",
+ "parameters": {
+ "path": "m/44'/60'/0'/0/0",
+ "delegate": "0x63c0c19a282a1b52b07dd5a65b58948a07dae32b",
+ "tuple_nonce": 1,
+ "chain_id": 1,
+ "to_address": "",
+ "value": 0,
+ "data": "12345678"
+ },
+ "result": {
+ "error": "DataError: EIP-7702: empty destination"
}
}
]
### common/tests/fixtures/ethereum/sign_tx_eip7702_mainnet.json
@@ -0,0 +1,64 @@
+{
+ "setup": {
+ "mnemonic": "sudden conduct build spoil sight stairs corn congress enjoy plastic online leader",
+ "passphrase": ""
+ },
+ "tests": [
+ {
+ "name": "metamask_authorize",
+ "parameters": {
+ "comment": "txid=0x876aaa1c0ebd442b54e3d5aa1b789fae6257d6b425e0bccba3d8de7aa0027bd7",
+ "path": "m/44'/60'/0'/0/0",
+ "delegate": "0x63c0c19a282a1b52b07dd5a65b58948a07dae32b",
+ "chain_id": 1,
+ "to_address": "0x14495E5EF84823170B62176913d798B26a1a1A69",
+ "nonce": 0,
+ "value": 0,
+ "gas_limit": 69573,
+ "max_gas_fee": 132809059,
+ "max_priority_fee": 100000
+ },
+ "result": {
+ "auth7702_list_hex": [
+ [
+ "01",
+ "63c0c19a282a1b52b07dd5a65b58948a07dae32b",
+ "01",
+ "01",
+ "d426d296c73c62e5d5528e1cea701dd55060cc34264f33412ef2ea7c5007d380",
+ "7f83c40c1080483ecb8ba26a91f1408a2d3186f2577c4f563c2b95b467f78ed7"
+ ]
+ ],
+ "tx_bytes_hex": "04f8c80180830186a08407ea816383010fc59414495e5ef84823170b62176913d798b26a1a1a698080c0f85cf85a019463c0c19a282a1b52b07dd5a65b58948a07dae32b0101a0d426d296c73c62e5d5528e1cea701dd55060cc34264f33412ef2ea7c5007d380a07f83c40c1080483ecb8ba26a91f1408a2d3186f2577c4f563c2b95b467f78ed780a00ebf86aed4ee9b2a9fc8c1e39d91ebcb19a8cf54449a5f823d63c3cfc428ffada028c2eb4d75d2d78844a8521bbbffc26fdcab7e670ad768b28031532b9e488022"
+ }
+ },
+ {
+ "name": "metamask_revoke",
+ "parameters": {
+ "comment": "txid=0x592a79f5a8404da6dea891f11f42d884585ad5180ca8647c2c076090b97084d5",
+ "path": "m/44'/60'/0'/0/0",
+ "delegate": "0x0000000000000000000000000000000000000000",
+ "chain_id": 1,
+ "to_address": "0x14495E5EF84823170B62176913d798B26a1a1A69",
+ "nonce": 2,
+ "value": 0,
+ "gas_limit": 69655,
+ "max_gas_fee": 129853037,
+ "max_priority_fee": 100000
+ },
+ "result": {
+ "auth7702_list_hex": [
+ [
+ "01",
+ "0000000000000000000000000000000000000000",
+ "03",
+ "01",
+ "3a4f2e8e70d2174356396d914ead9c0efa97fdbfee50baa3f6776d7e27b334c3",
+ "663d78fbc752214d6f6c58d1d6ea837de7edbca815060170aff07d4f8f3c6471"
+ ]
+ ],
+ "tx_bytes_hex": "04f8c80102830186a08407bd666d830110179414495e5ef84823170b62176913d798b26a1a1a698080c0f85cf85a019400000000000000000000000000000000000000000301a03a4f2e8e70d2174356396d914ead9c0efa97fdbfee50baa3f6776d7e27b334c3a0663d78fbc752214d6f6c58d1d6ea837de7edbca815060170aff07d4f8f3c647180a0b99bf4d14da2a4be21296f7a630247e2df1cfe92e2378d7953d6b6891e9d0d69a04092b5ef8655d6f92df283195c9e5195dff96b48bea65f98e6a4d0ae6253593b"
+ }
+ }
+ ]
+}Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.