neo3.contracts.abi
NEP-14 Application Binary Interface classes.
ContractABI— The smart contract application binary interface describes the callable events and contracts for a given smart contract.ContractEventDescriptor— A description for an event that a contract can broadcast.ContractMethodDescriptor— A description of a callable method on a contract.ContractParameterDefinition— A parameter description for a contract Method or Event.
neo3.contracts.abi.ContractABI(methods, events)
The smart contract application binary interface describes the callable events and contracts for a given smart contract.
get_method(name,parameter_count)(Optional) — Return the ContractMethodDescriptor matching the name (and optional parameter count) orNoneotherwise.to_json()(dict) — Convert object into JSON representation.from_json(json)(ContractABI) — Parse object out of JSON data.
from_json(json) → ContractABI
Parse object out of JSON data.
json(dict) — a dictionary.
KeyError— if the data supplied does not contain the necessary keys.ValueError— if the contract has no methods.
get_method(name, parameter_count) → Optional
Return the ContractMethodDescriptor matching the name (and optional parameter count) or None otherwise.
name— the name of the method to return.parameter_count(int) — the expected number of parameters teh method has.
to_json() → dict
Convert object into JSON representation.
neo3.contracts.abi.ContractEventDescriptor(name, parameters)
A description for an event that a contract can broadcast.
from_json(json) → ContractEventDescriptor
Parse object out of JSON data.
json(dict) — a dictionary.
KeyError— if the data supplied does not contain the necessary key.ValueError— if thenameproperty has an incorrect format.
to_json() → dict
Convert object into JSON representation.
neo3.contracts.abi.ContractMethodDescriptor(name, offset, parameters, return_type, safe)
A description of a callable method on a contract.
from_json(json) → ContractMethodDescriptor
Parse object out of JSON data.
json(dict) — a dictionary.
KeyError— if the data supplied does not contain the necessary keys.ValueError— if the manifest name property has an incorrect format.ValueError— if the offset is negative.
to_json() → dict
Convert object into JSON representation.
neo3.contracts.abi.ContractParameterDefinition(name, type)
A parameter description for a contract Method or Event.
from_json(json) → ContractParameterDefinition
Parse object out of JSON data.
json(dict) — a dictionary.
KeyError— if the data supplied does not contain the necessary keys.ValueError— if the manifest name property has an incorrect format.ValueError— if the type is VOID.
to_json() → dict
Convert object into JSON representation.
neo3.contracts.abi.ContractParameterType()
Type information for a contract method parameter.
ANY(int) — 0x0ARRAY(int) — 0x20BOOLEAN(int) — 0x10BYTEARRAY(int) — 0x12HASH160(int) — 0x14HASH256(int) — 0x15INTEGER(int) — 0x11INTEROPINTERFACE(int) — 0x30MAP(int) — 0x22PUBLICKEY(int) — 0x16SIGNATURE(int) — 0x17STRING(int) — 0x13VOID(int) — 0xff