How to Test Your DApp
This guide provides instructions on testing your deployed DApp using command-line tools. It covers retrieving message status, inspecting arguments of emitted events by the Endpoint, and more. If you have not deployed your custom protocol yet, refer to the Getting Started guide before proceeding.
Retrieving Account Balance
To get the balance of any account on an EVM-compatible network, execute the command below. It will print the specified account balance.
Fetching Block Data
To retrieve block details from an EVM-compatible network, execute the command below. It will output the block number, block hash, and creation timestamp.
Extracting Transaction Details
To obtain details of a specific transaction, execute the command below. It will output the sender address, the receiver address, msg.value, payload, and block number.
Printing Proposal Data
If a proposal was sent to the Endpoint, parse the emitted event by executing the below command. It will output the destination chain ID, msg.value, selector slot, agent parameters, sender address, destination address, encoded payload.
Parsing Destination Data
To retrieve the payload of a message for execution on the destination chain, execute the command below. It will output the encoded payload.
Retrieving Proposal and Message Hash
To find the message hash associated with a transaction hash from the source network, execute the command below. If a proposal is found in the transaction receipt, it will be reconstructed, and the corresponding message hashes will be displayed.
Checking Message Status by Hash
To determine the current status of a sent message, execute the below command. If the transaction is found, the output will display its current status along with information from the initial proposal.
Status Codes
Advanced Interaction Using cast
For advanced debugging, you can interact directly with the MessageData contract.
Retrieve the full message, including status, nonce, and initial proposal:
Retrieve only the initial proposal and source chain data:
Retrieve message status:
Retrieve source/destination chain ID:
Retrieve initial msg.value:
UIP Specific Commands
Checking Message Execution on Endpoint
Status Codes
Last updated
Was this helpful?