> For the complete documentation index, see [llms.txt](https://docs.eniac.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.eniac.network/build/smart-contracts/evm-cli.md). Agents can also search and read this documentation through its [MCP server](https://docs.eniac.network/~gitbook/mcp).

# EVM (CLI)

## Interacting with the EVM on ENI via CLI

Once the `enid` command is installed (see Installing enid), you can easily query or send transactions to ENI through the CLI.

### Querying

If the machine running these commands is not running a node on the network, you need to append `--node http://url-to-eni-cosmos-rpc` to the commands. Refer to the Tools and Resources page for a list of RPC endpoints.

* `enid q evm eni-addr [some EVM address]`: Retrieves the associated ENI address for the queried EVM address (if it exists on-chain).
* `enid q evm evm-addr [some ENI address]`: Retrieves the associated EVM address for the queried ENI address (if it exists on-chain).
* `enid q evm erc20 [erc20 address] [method] [args...]`: Queries the ERC20 contract at the specified address using the given method and arguments.
* `enid q evm payload [abi file path] [method] [args...]`: Generates a hexadecimal payload for a method call based on the provided ABI.
* `enid q evm pointer [type] [pointee]`: Retrieves the pointer contract for the requested pointee. The `type` parameter can be one of "NATIVE", "CW20", "CW721", "ERC20", or "ERC721", and `pointee` is the target contract address. For the "NATIVE" type, `pointee` will be the native token denomination.

### Transactions

Sending transactions via the CLI requires you to add a key using `enid keys add`. You can then specify the key to use by appending `--from=[key name]` to the commands.

If the machine running these commands is not a node on the network, you need to append `--evm-rpc http://url-to-eni-evm-rpc` to the commands. Refer to the Tools and Resources page for a list of RPC endpoints.

* `enid tx evm send [target EVM address] [amount in wei]`: Sends native tokens to the target EVM address.
* `enid tx evm deploy [binary file path]`: Deploys the EVM contract specified in `path_to_binary`.
* `enid tx evm call-contract [address] [payload hex]`: Sends a transaction to call the contract at the target address with the provided payload.
* `enid tx evm erc20-send [address] [receiver] [amount]`: Sends ERC20 tokens from the contract at `address` to the target receiver.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.eniac.network/build/smart-contracts/evm-cli.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
