[Interop] Neo Blockchain

The items below are used for gathering state data contained within the blockchain. Because all items below are implemented in the Neo Virtual Machine, their source is not available here. Please see the neo-python project if you want to know more about their exact implementation.

Blockchain

boa.interop.Neo.Blockchain.GetAccount(script_hash)[source]
Parameters:script_hash
boa.interop.Neo.Blockchain.GetAsset(asset_id)[source]
Parameters:asset_id
boa.interop.Neo.Blockchain.GetBlock(height_or_hash)[source]
Parameters:height_or_hash
boa.interop.Neo.Blockchain.GetContract(script_hash)[source]
Parameters:script_hash
boa.interop.Neo.Blockchain.GetHeader(height_or_hash)[source]
Parameters:height_or_hash
boa.interop.Neo.Blockchain.GetHeight()[source]
boa.interop.Neo.Blockchain.GetTransaction(hash)[source]
Parameters:hash
boa.interop.Neo.Blockchain.GetValidators()[source]

Block

A Block object contains the transaction data for a block.

boa.interop.Neo.Block.GetTransaction(block, index)[source]

Get the transaction specified in a block

Parameters:
  • block – the block to get the transaction from
  • index – the index of the transaction within the block
boa.interop.Neo.Block.GetTransactionCount(block)[source]

Get the number of transactions in a block

Returns:the number of transactions in a block
boa.interop.Neo.Block.GetTransactions(block)[source]

Get all transactions in a block

Returns:a list of transactions contained in a block

Account

The Account object represents an address on the blockchain.

boa.interop.Neo.Account.GetBalance(account, asset_id)[source]
Parameters:
  • account
  • asset_id
boa.interop.Neo.Account.GetScriptHash(account)[source]
Parameters:account
boa.interop.Neo.Account.GetVotes(account)[source]
Parameters:account
boa.interop.Neo.Account.SetVotes(account, votes)[source]
Parameters:
  • account
  • votes

Action

An Action object is used to register an action/event listener on the blockchain.

boa.interop.Neo.Action.RegisterAction(event_name, *args)[source]
Parameters:
  • event_name
  • args

App

An App object used to call other contracts on the blockchain.

boa.interop.Neo.App.DynamicAppCall(smart_contract_hash, *args)[source]
Parameters:
  • smart_contract_hash
  • args
boa.interop.Neo.App.RegisterAppCall(smart_contract_hash, *args)[source]
Parameters:
  • smart_contract_hash
  • args

Asset

An Asset object is used to look up information about native assets such as NEO or Gas.

boa.interop.Neo.Asset.Create(asset_type, name, amount, precision, owner, admin, issuer)[source]
Parameters:
  • asset_type
  • name
  • amount
  • precision
  • owner
  • admin
  • issuer
boa.interop.Neo.Asset.GetAdmin(asset)[source]
Parameters:asset
boa.interop.Neo.Asset.GetAmount(asset)[source]
Parameters:asset
boa.interop.Neo.Asset.GetAssetId(asset)[source]
Parameters:asset
boa.interop.Neo.Asset.GetAssetType(asset)[source]
Parameters:asset
boa.interop.Neo.Asset.GetAvailable(asset)[source]
Parameters:asset
boa.interop.Neo.Asset.GetIssuer(asset)[source]
Parameters:asset
boa.interop.Neo.Asset.GetOwner(asset)[source]
Parameters:asset
boa.interop.Neo.Asset.GetPrecision(asset)[source]
Parameters:asset
boa.interop.Neo.Asset.Renew(asset, years)[source]
Parameters:
  • asset
  • years