Get Receipt
Just like regular real-world transactions, when a transaction is processed on a blockchain network a receipt is generated. This receipt lists pieces of information that can be helpful in debugging contracts, as well as vital information such as a contract's block hash and contract address. The Maven CLI does not automatically retrieve the receipt after a transaction has been sent.
Return a transaction receipt: mvn aion4j:get-receipt
After you have deployed a contract, you can get the transaction receipt by running:
For example:
This function returns a large amount of JSON data. The contract address of the contract you deployed is in the field contractAddress.
Automatic Responses
When requesting a transaction receipt, you can include -Dtail and -Dsilent to get back a cleaner response from the kernel.
| Argument | Description |
|---|---|
-Dtail |
Keep requesting the receipt every 10 seconds until it is received. |
-Dsilent |
Removes unimportant logs. |
For example: