erc7730.model.calldata package

Subpackages

Submodules

Module contents

Data model for Ledger specific calldata descriptor (also referred to as “generic parser” descriptor).

See documentation in https://github.com/LedgerHQ/app-ethereum for specifications of this protocol

This data model is exposed in the public API and used by client applications to interact with the Ethereum application using the generic parser protocol.

pydantic model erc7730.model.calldata.CalldataDescriptorBase[source]View on GitHub

Bases: Model, ABC

A clear signing descriptor for a smart contract function calldata.

Note a calldata descriptor is bound to a single deployment (single chain id/contract address) and a single function.

Also referred to as a “generic parser descriptor”.

Fields:
field address: validate, json_schema_input_type=PydanticUndefined)] [Required]

The contract deployment address.

Constraints:
  • min_length = 42

  • max_length = 42

  • pattern = ^0x[a-f0-9]+$

  • func = <function ErrorTypeLabel._validator.<locals>.validate at 0x7fa6e3239260>

  • json_schema_input_type = PydanticUndefined

field chain_id: ChainId [Required]

The contract deployment EIP-155 chain id.

field network: validate, json_schema_input_type=PydanticUndefined)] [Required]

The Ledger network this descriptor applies to.

Constraints:
  • min_length = 1

  • func = <function ErrorTypeLabel._validator.<locals>.validate at 0x7fa6e79c4fe0>

  • json_schema_input_type = PydanticUndefined

field selector: validate, json_schema_input_type=PydanticUndefined)] [Required]

The 4-bytes function selector this descriptor applies to.

Constraints:
  • min_length = 10

  • max_length = 10

  • pattern = ^0x[a-z0-9]+$

  • func = <function ErrorTypeLabel._validator.<locals>.validate at 0x7fa6e3239300>

  • json_schema_input_type = PydanticUndefined

field source: HttpUrl | None = None

The URL of the source of the descriptor (typically in clear-signing-erc7730-registry).

field type: Literal['calldata'] = 'calldata'

Type of the descriptor

class erc7730.model.calldata.CalldataDescriptorVersion(*values)[source]View on GitHub

Bases: StrEnum

Version of the calldata descriptor.

v1 = 'v1'