Tools & Automation RivETH v1.7.4
Debugging with Hardhat
While RivETH provides the interactive browser UI, the terminal running your local Hardhat node is your primary source of truth. Whenever a transaction reverts, the terminal prints the full stack trace and exact revert reason.
Access-Based Debugging
Permission checks are one of the most common causes of transaction reverts. When testing
multi-role contracts (such as those using Ownable), switching signers in RivETH
and watching the Hardhat logs exposes identity mismatches immediately.
AccessControl.sol
// Tab 1: Deploy as the first signer (0xf39F...2266)
contract Protected {
address public owner;
constructor() {
owner = msg.sender;
}
function secureAction() external {
// Reverts if called by a different signer (e.g. 0x7099...79C8)
require(msg.sender == owner, "Caller is not owner");
}
}Each transaction initiated in RivETH prints a detailed trace in the node terminal:
- Transaction Hash: The unique identifier for the mined or reverted call.
- From / To: The active
msg.sendersigner and target contract address. - Revert Reason: String messages such as
"Caller is not owner", custom Solidity errors, or failingassertconditions.
Gas Estimation Failures
If a transaction fails during Gas Estimation, RivETH blocks the broadcast before it
reaches the chain. In that case, your terminal logs an
eth_estimateGas error rather
than a mined transaction trace—inspect your function parameters and active signer to see why the
EVM expects a revert.The JSON-RPC Handshake
Every interaction in the RivETH dashboard maps directly to a JSON-RPC request in your local Hardhat terminal:
| RPC Method | RivETH Trigger |
|---|---|
| eth_call | Triggered by blue read-only (view / pure) buttons |
| eth_sendTransaction | Triggered by orange and red state-changing buttons |
| eth_getBalance | Triggered when switching or refreshing accounts |