EIP7702Transaction
Composite 340 v393ethereum::transaction::eip7702::EIP7702Transaction
About This Type
Structured type: EIP7702Transaction.
A struct-like type where each field is encoded in declaration order.
Encoding: Fields encoded consecutively in declaration order, no field names or separators.
Fields (11)
| # | Name | Type |
|---|---|---|
| 0 | chain_id | u64 |
| 1 | nonce | U256 |
| 2 | max_priority_fee_per_gas | U256 |
| 3 | max_fee_per_gas | U256 |
| 4 | gas_limit | U256 |
| 5 | destination | TransactionAction |
| 6 | value | U256 |
| 7 | data | Vec<u8> |
| 8 | access_list | Vec<AccessListItem> |
| 9 | authorization_list | Vec<AuthorizationListItem> |
| 10 | signature | TransactionSignature |
SCALE Encoding
- Rule
- 11 fields encoded consecutively in declaration order. No field names or delimiters.
- Size
- sum of field sizes
Examples
Struct with 11 fields = chain_id: u64, nonce: U256, max_priority_fee_per_gas: U256, max_fee_per_gas: U256, gas_limit: U256, destination: TransactionAction, value: U256, data: Vec<u8>, access_list: Vec<AccessListItem>, authorization_list: Vec<AuthorizationListItem>, signature: TransactionSignature
0x<field0><field1><field2><field3><field4><field5><field6><field7><field8><field9><field10>field 0 chain_id: u64field 1 nonce: U256field 2 max_priority_fee_per_gas: U256field 3 max_fee_per_gas: U256field 4 gas_limit: U256field 5 destination: TransactionActionfield 6 value: U256field 7 data: Vec<u8>field 8 access_list: Vec<AccessListItem>field 9 authorization_list: Vec<AuthorizationListItem>field 10 signature: TransactionSignatureCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode EIP7702Transaction
const value = registry.createType("EIP7702Transaction", {
chain_id: 1_000_000_000n,
nonce: 0,
max_priority_fee_per_gas: 0,
max_fee_per_gas: 0,
gas_limit: 0,
destination: 0,
value: 0,
data: 0,
access_list: 0,
authorization_list: 0,
signature: 0
});
console.log("Hex:", value.toHex());Referenced By (1)
Type Information
- Type ID
- 340
- Kind
- Composite
- Path
- ethereum::transaction::eip7702::EIP7702Transaction
- Runtime
- v393