erc7730.convert.calldata.v1.abi module
Conversion of a function ABI to an ABI tree.
An ABI tree is a tree representation of the ABI of a function inputs, enriched with some metadata to ease crafting paths to access values in the serialized calldata.
- pydantic model erc7730.convert.calldata.v1.abi.ABIDynamicArray[source]View on GitHub
Bases:
ABINode
ABI node representing an array with dynamic size.
- Fields:
- field type: Literal['dynamic_array'] = 'dynamic_array'
- property is_dynamic: boolView on GitHub
- property size: intView on GitHub
- pydantic model erc7730.convert.calldata.v1.abi.ABIDynamicLeaf[source]View on GitHub
Bases:
ABILeafNode
ABI node representing a scalar type with dynamic size.
- Fields:
- field type: Literal['dynamic_leaf'] = 'dynamic_leaf'
- property is_dynamic: boolView on GitHub
- property size: intView on GitHub
- pydantic model erc7730.convert.calldata.v1.abi.ABILeafNode[source]View on GitHub
-
Represents a leaf node in the tree defined by a function ABI.
- Fields:
- field type_family: CalldataDescriptorTypeFamily [Required]
- pydantic model erc7730.convert.calldata.v1.abi.ABINode[source]View on GitHub
-
Represents a node in the tree defined by a function ABI.
- abstract property is_dynamic: boolView on GitHub
- abstract property size: intView on GitHub
- pydantic model erc7730.convert.calldata.v1.abi.ABIStaticArray[source]View on GitHub
Bases:
ABINode
ABI node representing an array with static size.
- Fields:
- field dimension: int [Required]
- Constraints:
ge = 0
- field type: Literal['static_array'] = 'static_array'
- property is_dynamic: boolView on GitHub
- property size: intView on GitHub
- pydantic model erc7730.convert.calldata.v1.abi.ABIStaticLeaf[source]View on GitHub
Bases:
ABILeafNode
ABI node representing a scalar type with static size.
- Fields:
- field type: Literal['static_leaf'] = 'static_leaf'
- property is_dynamic: boolView on GitHub
- property size: intView on GitHub
- pydantic model erc7730.convert.calldata.v1.abi.ABIStruct[source]View on GitHub
Bases:
ABINode
ABI node representing a function or a tuple.
- Fields:
- field type: Literal['struct'] = 'struct'
- property is_dynamic: boolView on GitHub
- property size: intView on GitHub
- erc7730.convert.calldata.v1.abi.function_to_abi_tree(function: Function) Annotated[ABIStruct | ABIStaticArray | ABIDynamicArray | ABIStaticLeaf | ABIDynamicLeaf, FieldInfo(annotation=NoneType, required=True, discriminator='type')] [source]View on GitHub
Convert a function ABI to an ABI tree.
An ABI tree is a tree representation of the ABI of a function inputs, enriched with some metadata to ease crafting paths to access values in the serialized calldata.
@param function: function ABI @return: