ledger getBlock <number>
Command to get a block by number.
Parameters:
- number: Block number
Examples:
ledger getBlock 123
ledger getTransactionCount <address>
Command to get the number of transactions of a particular address.
Parameters:
- address: Ethereum address
Examples:
ledger getTransactionCount 0x2fCbc96c55e57bed5ae8BC533EF77b977Dc482d7
ledger getChainId
Command to get the chain id of the network.
Examples:
ledger getChainId
ledger getTransaction <id>
Command to get a transaction by its ID.
Parameters:
- id: Transaction ID
Examples:
ledger getTransaction 0x2fCb...82d7
ledger getTransactionReceipt <id>
Command to get the receipt of a particular transaction. It also displays the revert reason for failed transactions.
Parameters:
- id: Transaction ID
Examples:
ledger getTransactionReceipt 0x2fCb...482d7
ledger sendTransaction <signedTransaction>
Command to send transactions to the blockchain.
Parameters:
- signedTransaction: signed transaction in raw format.
Examples:
ledger sendTransaction 0x2fCb...482d7 0x123456
ledger get <address> <abi> <readMethod> <param0> <param1> ...
Command to get data from a smart contract. This command is useful to read data from custom contracts deployed in the Trusted Contracts Registry.
Parameters:
- address: Address of the smart contract
- abi: ABI of the smart contract
- readMethod: Name of the read function
- param0, param1, etc.: Parameters for the function
Examples:
abi: load path-to-abi.json
ledger get 0x69e48d89bf5e09588E858D757323b4abBBB3f814 abi readMethod param0 param1
ledger send <address> <abi> <writeMethod> <param0> <param1> ...
Command to send transactions to a smart contract. This command is useful to send transactions to custom contracts deployed in the Trusted Contracts Registry. It requires an access token with the ledger_invoke scope (see the Interact with the contract tutorial for more details).
Parameters:
- address: Address of the smart contract
- abi: ABI of the smart contract
- writeMethod: Name of the write function
- param0, param1, etc.: Parameters for the function
Examples:
abi: load path-to-abi.json
ledger send 0x69e48d89bf5e09588E858D757323b4abBBB3f814 abi writeMethod param0 param1
proxyledger <...>
The command proxyledger has the same commands as ledger with the difference that it will call the blockchain directly without going through Ledger API. It can also be used to interact with the smart contracts directly. To enable this feature set the corresponding provider in TEST_BESU_PROVIDER or PILOT_BESU_PROVIDER in the env variables. This command should not be used by externals.
Examples:
proxyledger timestamp timestampHashes
proxyledger timestamp build-timestampHashes
proxyledger tir insertIssuer did:ebsi:zkqR9GCLrLYbkubAjuqQZAz {"institution":"eu"}
proxyledger getTransactionReceipt 0x2fCb...482d7