Skip to content


Classes to interact with the network such as a specialised RPC Client for NEO Node RPC API and a facade for interacting with smart contracts over RPC.



NEO RPC Node client and response classes.



Convenience wrappers for calling smart contracts via RPC.

The most specific wrappers in this module are for NEOs native contracts NeoToken, GasToken, PolicyContract and RoleManagement. The ContractManagement and Ledger contracts are not wrapped. See the FAQ for the reasons.

One step up are wrappers for contracts following the NEP-17 Token standard (NEP17Contract) and NEP-11 NFT standard (NEP11DivisibleContract & NEP11NonDivisibleContract). As last resort there is the GenericContract which can be used for calling arbitrary functions on arbitrary contracts.

Obtaining the execution results of the functions on the wrapped contracts is done through one of 3 methods on the ChainFacade class

  1. test_invoke() - does not persist to chain. Costs no gas.
  2. invoke() - does persist to chain. Requires signing and costs gas.
  3. estimate_gas() - does not persist to chain. Costs no gas.

facade = ChainFacade.node_provider_mainnet()

neo = NeoToken()

result = await facade.test_invoke(neo.candidates_registered())

  • Candidate Container for holding consensus candidate voting results.
  • ChainFacade The gateway to the network.
  • ContractMethodResult A helper class around the script (VM opcodes) to be executed which allows to forward the annotated return type(ContractMethodResult[T]) of the annotated function f to a consumer function, without having to actually return an instance of T in the implementation of f.
  • GasToken Wrapped GAS token contract.
  • GenericContract Generic class to call arbitrary methods on a smart contract.
  • InvokeReceipt Transaction submission results.
  • NEP11DivisibleContract Base class for divisible NFTs.
  • NEP11NonDivisibleContract Base class for non-divisible NFTs.
  • NEP17Contract Base class for calling NEP-17 compliant smart contracts.
  • NeoToken Wrapped NEO token contract.
  • PolicyContract Wrapper around the native contract that manages system policies.
  • RoleContract Wrapper around the native Role management contract.