EVM on IOTA Smart Contracts has been integrated in a way that the existing EVM tooling is compatible and can be used directly with an IOTA Smart Contracts chain running EVM as long as you take a couple of things into account.
- Please make sure you use the correct JSON-RPC endpoint URL in your tooling for your chain. You can find the JSON-RPC
endpoint URL in the Wasp dashboard (
- Please ensure you use the correct
Chain IDconfigured while starting the JSON-RPC service. If you did not explicitly define this while starting the service, the default Chain ID will be
- Fees are being handled on the IOTA Smart Contracts chain level, not the EVM level. Because of this, you can simply use a gas price of 0 on the EVM level at this time.
Re-using an existing Chain ID is not recommended and can be a security risk. For serious usage, register a unique Chain ID on Chainlist and use that instead of the default. It is not possible to changed the EVM chain ID after deployment.
The Wasp CLI has some basic functionalities to manage an EVM chain. Given the compatibility with existing tooling, only the basics are covered to get started with IOTA Smart Contracts and EVM.
The JSON-RPC endpoint automatically starts with Wasp, and you can use the CLI tools to deploy a new chain that spawns up a new EVM chain automatically and to deposit tokens to an EVM chain address. The following example allows you to deposit your network's base token (IOTA on the IOTA network, SMR on the Shimmer network) to an EVM address. For example, the EVM address can be a Metamask generated address.
wasp-cli chain deposit <0xEthAddress> base:1000000
After this, you will have the balance on your Ethereum account available to pay for gas fees, for example, with Metamask.
MetaMask is a popular EVM compatible wallet which runs in a browser extension that allows you to let your wallet interact with web applications utilizing an EVM chain (dApps).
To use your EVM chain with MetaMask, simply open up MetaMask and click on the network drop-down list at the very top. At
the bottom of this list, you will see the option
Add network. On the new page you will see a list of popular network with the option
Add a network manually.
For example this would be the config to add the Public Testnet:
- Network Name:
- New RPC URL:
- Chain ID:
- Currency Symbol:
- Block Explorer URL:
Ensure that your
RPC Url and
Chain ID are set correctly and match the dashboard values. The
Network Name can be
whatever you see fit. Click "Save" to add the Public Testnet to MetaMask.
If you wish to use additional EVM chains with Metamask, you can add more Custom RPC networks, as long as they have a
Chain ID and
RPC Url. Once you have done this, you can start using MetaMask to manage your EVM wallet or
issue/sign transactions with any dApp running on that network.
If you also want to use the Remix IDE to deploy any regular Solidity Smart Contract, you should set the environment as Injected Web3, which should then connect with your MetaMask wallet.
Click on the Deploy & Run transactions button in the menu on the left and select
Injected Web3 from
Metamask will ask to connect to Remix, and once connected, it will set the
Injected Web3 with
Custom (1074) network.
Hardhat is a command line toolbox that allows you to deploy, test, verify, and interact with
Solidity smart contracts on an EVM chain. EVM chains running on IOTA Smart Contracts are compatible with Hardhat; simply
make sure you add the correct network parameters to your
hardhat.config.js, for example:
Currently, there is no validation service available for EVM/Solidity smart contracts on IOTA Smart Contracts, which is often offered through block explorer APIs.
If you input the correct configuration parameters for the JSON-RPC endpoint to talk to, Ethers.js and Web3.js are also compatible with EVM chains on IOTA Smart Contracts. Alternatively, you can let both interact through MetaMask instead so that it uses the network configured in MetaMask. For more information on this, read their documentation.
Most tools available will be compatible if you enter the correct
Chain ID and