ledger¶
- class Ledger¶
Bases:
object
A class used to represent the Ledger native contract
- classmethod get_block(index_or_hash: Union[int, boa3.builtin.type.UInt256]) → boa3.builtin.interop.blockchain.block.Block¶
Gets the block with the given index or hash.
- classmethod get_current_index() → int¶
Gets the index of the current block.
- Returns
the index of the current block
- Return type
- classmethod get_transaction(hash_: boa3.builtin.type.UInt256) → boa3.builtin.interop.blockchain.transaction.Transaction¶
Gets a transaction with the given hash.
- Parameters
hash (UInt256) – hash identifier of the transaction
- Returns
the Transaction, if exists. None otherwise
- classmethod get_transaction_from_block(block_hash_or_height: Union[boa3.builtin.type.UInt256, int], tx_index: int) → boa3.builtin.interop.blockchain.transaction.Transaction¶
Gets a transaction from a block.
- classmethod get_transaction_height(hash_: boa3.builtin.type.UInt256) → int¶
Gets the height of a transaction.
- Parameters
hash (UInt256) – hash identifier of the transaction
- Returns
height of the transaction
- classmethod get_transaction_signers(hash_: boa3.builtin.type.UInt256) → List[boa3.builtin.interop.blockchain.signer.Signer]¶
Gets the VM state of a transaction.
- Parameters
hash (UInt256) – hash identifier of the transaction
- Returns
VM state of the transaction
- classmethod get_transaction_vm_state(hash_: boa3.builtin.type.UInt256) → boa3.internal.neo3.vm.vmstate.VMState¶
Gets the VM state of a transaction.
- Parameters
hash (UInt256) – hash identifier of the transaction
- Returns
VM state of the transaction