Show / Hide Table of Contents

Blockchain Class

This class provides a set of methods for accessing blockchain data.

Namespace: Neo.SmartContract.Framework.Services.Neo

Assembly: Neo.SmartContract.Framework

Syntax

public static class Blockchain

Methods

NameDescription
GetAccount(byte[]) Returns an account (address) from the given scripthash
GetAsset(byte[]) Returns an asset from the given asset ID
GetBlock(byte[]) Returns a block from the given block hash
GetBlock(uint) Returns a block from the given block height
GetContract(byte[]) Returns the contract contents from the given contract hash
GetHeader(byte[]) Returns a block header from the given block hash
GetHeader(uint) Returns a block header from the given block height
GetHeight() Returns the current block height
GetTransaction(byte[]) Returns a transaction from the given transaction ID
GetValidators() Returns the public keys of the validators

Constructor

The BlockChain class is a static class and does not require a constructor.