Documentation
¶
Overview ¶
Package abi decodes the non-indexed data section of specific Ethereum event logs the juno node consumes.
Index ¶
Constants ¶
View Source
const WordSize = 32
WordSize is the size of a single ABI-encoded word: a uint256.
Variables ¶
This section is empty.
Functions ¶
func UnpackLogMessageToL2 ¶
UnpackLogMessageToL2 decodes the data section of the Starknet core contract's LogMessageToL2 event into its three non-indexed fields.
Event ABI:
LogMessageToL2(address indexed fromAddress,
uint256 indexed toAddress,
uint256 indexed selector,
uint256[] payload,
uint256 nonce,
uint256 fee)
The indexed fields are carried in log topics, not the data buffer, and are extracted by the caller. The data section encodes the remaining (uint256[], uint256, uint256) tuple per the Solidity ABI:
head[0] (32 bytes): offset to payload tail head[1] (32 bytes): nonce head[2] (32 bytes): fee tail at head[0]: length (32 bytes), then length × 32 bytes of elements
Types ¶
Click to show internal directories.
Click to hide internal directories.