# 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](/getting-started/cli.md#watching-contracts-artifacts-truffle-projects-only) for Truffle projects or a [plugin](/getting-started/hardhat-project-setup.md) 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!

{% hint style="info" %}
This formatting is used across the web app, so it applies for variable displayed in emitted events on transaction pages for example.
{% endhint %}

### 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](/dashboard-pages/transactions.md#trace) page for more details on how it works.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.tryethernal.com/dashboard-pages/contracts/interacting-with-the-contract.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
