package
neo3.contracts
Core components for handling smart contracts. Contains the Manifest, Neo Executable Format (NEF) and utilities for obtaining a contract hash, extracting public keys etc.
module
neo3.contracts.abi
NEP-14 Application Binary Interface classes.
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.
module
neo3.contracts.contract
Smart contract and account contract classes. Contains a list of all native contracts.
Attributes
CONTRACT_HASHES
— List of Neo's native contract hashes.
Classes
Contract
— Generic contract.ContractState
— Smart contract chain state container.
module
neo3.contracts.manifest
NEP-15 contract manifest classes for describing smart contract access control.
Classes
ContractGroup
— Describes a set of mutually trusted contracts.ContractManifest
— A description of a smart contract's abilities (callable methods & events) as well as a set of restrictionsdescribing what external contracts and methods are allowed to be called.ContractPermission
— Describes a single set of outgoing call restrictions for aSystem.Contract.Call
SYSCALL.It describes what other smart contracts the executing contract is allowed to call and what exact methods on the other contract are allowed to be called. This is enforced during runtime.ContractPermissionDescriptor
— A restriction object that limits the smart contract's calling abilities. Enforced at runtime.WildcardContainer
— An internal helper class for ContractManifest attributes.
module
neo3.contracts.nef
Neo Executable Format.
Classes
MethodToken
— An interface like class supporting NEO's network serialization protocol.NEF
— Neo Executable Format container.
module
neo3.contracts.utils
Contract utilities for determing the contract hash, contract types, extracting public keys and signing treshold and more.
Functions
create_multisig_redeemscript
(
m
,public_keys
)
(bytes) — Create a multi-signature redeem script requiringm
signatures from the listpublic_keys
.create_signature_redeemscript
(
public_key
)
(bytes) — Create a single signature redeem script.get_contract_hash
(
sender
,nef_checksum
,contract_name
)
(UInt160) — Return the calculated contract hash.is_multisig_contract
(
script
)
(bool) — Test if the provided script is a multi-signature contract.is_signature_contract
(
script
)
(bool) — Test if the provided script is a (single) signature contract.parse_as_multisig_contract
(
script
)
(bool) — Try to parse script as multisig contract and extract related data.validate_type
(
obj
,type_
)
— Helper function to validate ABI type information.