diff --git a/packages/types/src/interfaces/eth/definitions.ts b/packages/types/src/interfaces/eth/definitions.ts index 16d9114418..144e2f898f 100644 --- a/packages/types/src/interfaces/eth/definitions.ts +++ b/packages/types/src/interfaces/eth/definitions.ts @@ -24,7 +24,7 @@ const V0: DefinitionsTypes = { action: 'EthTransactionAction', value: 'U256', input: 'Bytes', - signature: 'EthTransactionSignature' + signature: 'EthLegacyTransactionSignature' }, TransactionV0: 'LegacyTransaction' }; @@ -44,9 +44,7 @@ const V1: DefinitionsTypes = { value: 'U256', input: 'Bytes', accessList: 'EthAccessList', - oddYParity: 'bool', - r: 'H256', - s: 'H256' + signature: 'EthTransactionSignature' }, TransactionV1: { _enum: { @@ -72,9 +70,7 @@ const V2: DefinitionsTypes = { value: 'U256', input: 'Bytes', accessList: 'EthAccessList', - oddYParity: 'bool', - r: 'H256', - s: 'H256' + signature: 'EthTransactionSignature' }, TransactionV2: { _enum: { @@ -85,10 +81,40 @@ const V2: DefinitionsTypes = { } }; +const V3: DefinitionsTypes = { + BlockV3: { + header: 'EthHeader', + transactions: 'Vec', + ommers: 'Vec' + }, + EIP7702Transaction: { + chainId: 'u64', + nonce: 'U256', + maxPriorityFeePerGas: 'U256', + maxFeePerGas: 'U256', + gasLimit: 'U256', + destination: 'EthTransactionAction', + value: 'U256', + data: 'Bytes', + accessList: 'EthAccessList', + authorizationList: 'EthAuthorizationList', + signature: 'EthTransactionSignature' + }, + TransactionV3: { + _enum: { + Legacy: 'LegacyTransaction', + EIP2930: 'EIP2930Transaction', + EIP1559: 'EIP1559Transaction', + EIP7702: 'EIP7702Transaction' + } + } +}; + const types: DefinitionsTypes = { ...V0, ...V1, ...V2, + ...V3, EthereumAccountId: 'GenericEthereumAccountId', EthereumAddress: 'GenericEthereumAccountId', EthereumLookupSource: 'GenericEthereumLookupSource', @@ -98,6 +124,18 @@ const types: DefinitionsTypes = { slots: 'Vec' }, EthAccessList: 'Vec', + EthAuthorizationList: 'Vec', + EthAuthorizationListItem: { + chainId: 'u64', + address: 'H160', + nonce: 'U256', + signature: 'EthAuthorizationSignature' + }, + EthAuthorizationSignature: { + oddYParity: 'bool', + r: 'H256', + s: 'H256' + }, EthAccount: { address: 'EthAddress', balance: 'U256', @@ -261,6 +299,7 @@ const types: DefinitionsTypes = { // not convinced, however the original commit matches, so... (maybe V3 is incorrect?) EthReceiptV0: 'EthReceipt', EthReceiptV3: 'EthReceipt', + EthReceiptV4: 'EthReceipt', EthStorageProof: { key: 'U256', value: 'U256', @@ -321,11 +360,16 @@ const types: DefinitionsTypes = { accessList: 'Option>', transactionType: 'Option' }, - EthTransactionSignature: { + EthLegacyTransactionSignature: { v: 'u64', r: 'H256', s: 'H256' }, + EthTransactionSignature: { + oddYParity: 'bool', + r: 'H256', + s: 'H256' + }, EthTransactionAction: { _enum: { Call: 'H160', diff --git a/packages/types/src/interfaces/eth/runtime.ts b/packages/types/src/interfaces/eth/runtime.ts index 361fec1b54..6ab69f7dee 100644 --- a/packages/types/src/interfaces/eth/runtime.ts +++ b/packages/types/src/interfaces/eth/runtime.ts @@ -285,6 +285,21 @@ export const runtime: DefinitionsCall = { } }, version: 2 + }, + { + methods: { + convert_transaction: { + description: 'Converts an Ethereum-style transaction to Extrinsic', + params: [ + { + name: 'transaction', + type: 'TransactionV3' + } + ], + type: 'Extrinsic' + } + }, + version: 3 } ], DebugRuntimeApi: [