Skip to main content

Ledger Class

Provides a series attributes and methods of the native contract GasToken, which hash is0xda65b600f7124ce6c79950c1772a36403104f2be.

Namespace:Neo.SmartContract.Framework.Native

Assembly: Neo.SmartContract.Framework

Syntax#

public class Ledger

Properties#

NameDescription
HashGets the contract hash.
CurrentHashGets hash of the latest block
CurrentIndexGets latest block height in current blockchain
Block height = Block index = Block count - 1

Methods#

NameDescription
GetBlock()Gets block by the block hash or index
GetTransaction(UInt256 hash)Gets transaction by transaction ID
GetTransactionFromBlock()Gets the specified transaction by the block and transaction indexes
GetTransactionHeight(UInt256 hash)Gets the block height where the transaction occurs by the transaction hash