Interacting with the contract

If no artifact has been uploaded for the contract, a message will invite you to do so. Artifacts are uploaded through the CLI for Truffle projects or a plugin for Hardhat projects.
Once it's been done, you'll have access to three sections:

Call Options

These parameters will be used when calling any of the read and write functions. If you set them globally in the settings, they will be set here too.

Read Methods

This section will show all read methods, they won't consume any gas when calling them, won't change the state of the chain, and won't generate a transaction.
The result (or the error) will be displayed above the "Query" button.
Ethernal attempts to automatically format the result based on the return type and its content. You can switch between raw/formatted values by clicking the button next to it:
  • uint256 are not formatted by default, but if you format them, they will be converted as gwei to ether
  • addresses are made clickable and the name of the contract is displayed instead of the hash when applicable
  • strings are formatted depending of their content:
    • http(s) & ipfs links are made clickable
    • json & strings starting with data:application/json;base64 are formatted nicely
    • svg & strings starting with data:img are displayed in an img tag (note that svg are automatically resized to 200x200)
Feel free to ask for support for more formats in the Discord!
This formatting is used across the web app, so it applies for variable displayed in emitted events on transaction pages for example.

Write Methods

This section will show all write methods, they might change the state of the chain and will generate a transaction.
If the transaction succeeds, a link will be displayed above the "Query button", if it fails the error message will be displayed instead.
If you send a transaction to a node that supports the debug_traceTransaction method, it will be used to display more info about interactions of this transaction with other contracts. See the Transactions page for more details on how it works.