erc7730.generate.schema_tree module
- pydantic model erc7730.generate.schema_tree.SchemaArray[source]View on GitHub
Bases:
SchemaNode
Schema node representing an array.
- pydantic model erc7730.generate.schema_tree.SchemaLeaf[source]View on GitHub
Bases:
SchemaNode
Schema node representing a scalar type.
- pydantic model erc7730.generate.schema_tree.SchemaNode[source]View on GitHub
-
Represents a node in the tree defined by a function ABI / EIP-712 schema.
- pydantic model erc7730.generate.schema_tree.SchemaStruct[source]View on GitHub
Bases:
SchemaNode
Schema node representing a function or a tuple.
- erc7730.generate.schema_tree.abi_function_to_tree(function: Function) SchemaStruct | SchemaArray | SchemaLeaf [source]View on GitHub
Convert a function ABI to a schema tree.
A schema 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.
- Parameters:
function – function ABI
- Returns:
Schema tree
- erc7730.generate.schema_tree.eip712_schema_to_tree(schema: EIP712Schema) SchemaStruct | SchemaArray | SchemaLeaf [source]View on GitHub
Convert an EIP-712 schema to a schema tree.
A schema tree is a tree representation of the EIP-712 schema, enriched with some metadata to ease crafting paths to access values in the message.
- Parameters:
schema – EIP-712 schema
- Returns:
Schema tree