erc7730.model.calldata.v1.instruction module
Data model for calldata descriptor instructions.
These model classes represent the exact same data fields that are serialized into TLV structs. See documentation in https://github.com/LedgerHQ/app-ethereum for specifications of this protocol
- pydantic model erc7730.model.calldata.v1.instruction.CalldataDescriptorInstructionBaseV1[source]View on GitHub
Bases:
CalldataDescriptorStructV1
,ABC
Base class for calldata descriptor instructions.
- Fields:
- pydantic model erc7730.model.calldata.v1.instruction.CalldataDescriptorInstructionEnumValueV1[source]View on GitHub
Bases:
CalldataDescriptorInstructionBaseV1
Instruction descriptor for the ENUM_VALUE struct.
- 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 enum_id: str [Required]
Source identifier of the enum (to differentiate multiple enums in one contract)
- field id: int [Required]
Identifier of the enum (to differentiate multiple enums in one contract)
- Constraints:
ge = 0
le = 255
- field name: str [Required]
Enum display name (ASCII)
- Constraints:
min_length = 1
max_length = 32
- 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 value: int [Required]
Identifier of this specific entry (ordinal of the entry, type agnostic)
- Constraints:
ge = 0
le = 32
- field version: Literal[1] = 1
Version of the ENUM struct
- property descriptor: ', metadata=[MinLen(min_length=8), MaxLen(max_length=32768)])]View on GitHub
- pydantic model erc7730.model.calldata.v1.instruction.CalldataDescriptorInstructionFieldV1[source]View on GitHub
Bases:
CalldataDescriptorInstructionBaseV1
Instruction descriptor for the FIELD struct.
- Fields:
- field name: str [Required]
Field display name (ASCII)
- Constraints:
min_length = 1
max_length = 32
- field param: Annotated[CalldataDescriptorParamRawV1 | CalldataDescriptorParamAmountV1 | CalldataDescriptorParamTokenAmountV1 | CalldataDescriptorParamNFTV1 | CalldataDescriptorParamDatetimeV1 | CalldataDescriptorParamDurationV1 | CalldataDescriptorParamUnitV1 | CalldataDescriptorParamEnumV1 | CalldataDescriptorParamTrustedNameV1, FieldInfo(annotation=NoneType, required=True, title='Field parameter', description='Format specific parameters for a calldata descriptor field.', discriminator='type')] [Required]
Parameter of the field
- field version: Literal[1] = 1
Version of the FIELD struct
- property descriptor: ', metadata=[MinLen(min_length=8), MaxLen(max_length=32768)])]View on GitHub
- pydantic model erc7730.model.calldata.v1.instruction.CalldataDescriptorInstructionTransactionInfoV1[source]View on GitHub
Bases:
CalldataDescriptorInstructionBaseV1
Instruction descriptor for the TRANSACTION_INFO struct.
- 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 contract_name: str | None = None
Displayed in review first screens
- Constraints:
min_length = 1
max_length = 32
- field creator_legal_name: str | None = None
Displayed in review first screens
- Constraints:
min_length = 1
max_length = 32
- field creator_name: str | None = None
Displayed in review first screens
- Constraints:
min_length = 1
max_length = 32
- field creator_url: HttpUrl | None = None
Displayed in review first screens
- Constraints:
min_length = 1
max_length = 256
- field hash: str [Required]
Hash of all the FIELD structs
- Constraints:
min_length = 64
max_length = 64
pattern = ^[a-f0-9]+$
- field operation_type: str [Required]
Displayed in review first screens
- Constraints:
min_length = 1
max_length = 32
- 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 version: Literal[1] = 1
Version of the TRANSACTION_INFO struct
- property descriptor: ', metadata=[MinLen(min_length=8), MaxLen(max_length=32768)])]View on GitHub