EIP2930Transaction
Composite 335 v393ethereum::transaction::eip2930::EIP2930Transaction
About This Type
Structured type: EIP2930Transaction.
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 (9)
| # | Name | Type |
|---|---|---|
| 0 | chain_id | u64 |
| 1 | nonce | U256 |
| 2 | gas_price | U256 |
| 3 | gas_limit | U256 |
| 4 | action | TransactionAction |
| 5 | value | U256 |
| 6 | input | Vec<u8> |
| 7 | access_list | Vec<AccessListItem> |
| 8 | signature | TransactionSignature |
SCALE Encoding
- Rule
- 9 fields encoded consecutively in declaration order. No field names or delimiters.
- Size
- sum of field sizes
Examples
Struct with 9 fields = chain_id: u64, nonce: U256, gas_price: U256, gas_limit: U256, action: TransactionAction, value: U256, input: Vec<u8>, access_list: Vec<AccessListItem>, signature: TransactionSignature
0x<field0><field1><field2><field3><field4><field5><field6><field7><field8>field 0 chain_id: u64field 1 nonce: U256field 2 gas_price: U256field 3 gas_limit: U256field 4 action: TransactionActionfield 5 value: U256field 6 input: Vec<u8>field 7 access_list: Vec<AccessListItem>field 8 signature: TransactionSignatureCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode EIP2930Transaction
const value = registry.createType("EIP2930Transaction", {
chain_id: 1_000_000_000n,
nonce: 0,
gas_price: 0,
gas_limit: 0,
action: 0,
value: 0,
input: 0,
access_list: 0,
signature: 0
});
console.log("Hex:", value.toHex());Referenced By (1)
Type Information
- Type ID
- 335
- Kind
- Composite
- Path
- ethereum::transaction::eip2930::EIP2930Transaction
- Runtime
- v393