Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Network Information #1541

Merged
merged 17 commits into from
May 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
added IOTA EVM to networks-endpoints.mdx
added IOTA EVM explorer and toolkit to getting-started/sidebars.ts
renamed ShimmerEVM testnet to EVM testnet
added IOTA EVM to NetworkInfo/index.tsx
added IOTA EVM to NetworkInfo/types.d.ts
added IOTA EVM to getting-started/compatibility.md
added IOTA EVM to isc/getting-started/networks-and-chains.mdx
added IOTA EVM to send-funds-from-L1-to-L2.mdx
added IOTA EVM to isc/getting-started/tools.mdx
added IOTA EVM to how-tos
  • Loading branch information
lucas-tortora committed Apr 1, 2024
commit 4da7c081aba5ea9b1f3e73a42398f6cb8f1d5e28
18 changes: 15 additions & 3 deletions docs/build/getting-started/networks-endpoints.mdx
Original file line number Diff line number Diff line change
@@ -39,6 +39,18 @@ This network runs under a [Coordinator PoA scheme](/learn/protocols/coordinator/

<NetworkInfo.IOTA />

### IOTA EVM

[IOTA EVM](https://iota-evm.blockscout.com) is the L2 EVM running on top of the IOTA network.

<AddToMetaMaskButton cfg={EVMNetworks['iotaevm']} />

<NetworkInfo.IOTAEVM />

#### Additional Info

<NetworkInfo.IOTAEVMAdditional />

## Shimmer

[Shimmer](https://explorer.iota.org/shimmer) is the staging network for new protocol versions before they hit IOTA
@@ -68,11 +80,11 @@ This network is subject to occasional resets (no data retention) which are usual

<NetworkInfo.Testnet />

### ShimmerEVM Testnet
### EVM Testnet

<AddToMetaMaskButton cfg={EVMNetworks['shimmerevm-testnet']} />
<AddToMetaMaskButton cfg={EVMNetworks['evm-testnet']} />

[The ShimmerEVM Testnet](https://explorer.evm.testnet.shimmer.network/) runs as a layer 2 on top
[The EVM Testnet](https://explorer.evm.testnet.shimmer.network/) runs as a layer 2 on top
of the Public Testnet. This network uses ISC to facilitate an Ethereum Virtual Machine and has an
enshrined bridge to layer 1.

14 changes: 12 additions & 2 deletions docs/build/getting-started/sidebars.ts
Original file line number Diff line number Diff line change
@@ -40,6 +40,16 @@ module.exports = {
type: 'link',
href: 'https://explorer.shimmer.network',
},
{
label: 'IOTA EVM Explorer',
type: 'link',
href: 'https://iota-evm.blockscout.com/',
},
{
label: 'IOTA EVM Toolkit',
type: 'link',
href: 'https://evm-toolkit.evm.iotaledger.net/',
},
{
label: 'Shimmer EVM Explorer',
type: 'link',
@@ -51,12 +61,12 @@ module.exports = {
href: 'https://evm-toolkit.evm.shimmer.network/',
},
{
label: 'Shimmer EVM Testnet Toolkit & Faucet',
label: 'EVM Testnet Toolkit & Faucet',
type: 'link',
href: 'https://evm-toolkit.evm.testnet.shimmer.network/',
},
{
label: 'Oracles for Shimmer EVM',
label: 'Oracles for IOTA EVM and ShimmerEVM',
type: 'doc',
id: 'oracles',
},
Original file line number Diff line number Diff line change
@@ -35,7 +35,8 @@ Here are some of the most important properties and limitations of EVM support in

There is no guaranteed _block time_. A new EVM "block" will be created only when an ISC block is created, and ISC does
not enforce an average block time. This means that block times are variable; a new block will be created as soon as needed.
The average block time on [ShimmerEVM](/build/networks-endpoints#shimmerevm) is 2.8 seconds.
The average block time on [IOTA EVM](/build/networks-endpoints#iotaevm) and [ShimmerEVM](/build/networks-endpoints#shimmerevm)
is 2.8 seconds.

### The Magic Contract

Original file line number Diff line number Diff line change
@@ -13,6 +13,18 @@ import NetworkInfo from '@theme/NetworkInfo';

# Networks & Chains

## IOTA EVM

[IOTA EVM](https://iota-evm.blockscout.com) is the L2 EVM running on top of the IOTA network.

<AddToMetaMaskButton cfg={EVMNetworks['iotaevm']} />

<NetworkInfo.IOTAEVM />

### Additional Info

<NetworkInfo.IOTAEVMAdditional />

## ShimmerEVM

[ShimmerEVM](https://explorer.evm.shimmer.network/) is the L2 EVM running on top of the Shimmer network.
@@ -21,11 +33,11 @@ import NetworkInfo from '@theme/NetworkInfo';

<NetworkInfo.ShimmerEVM />

## ShimmerEVM Testnet
## EVM Testnet

<AddToMetaMaskButton cfg={EVMNetworks['shimmerevm-testnet']} />
<AddToMetaMaskButton cfg={EVMNetworks['evm-testnet']} />

[The ShimmerEVM Testnet](https://explorer.evm.testnet.shimmer.network/) runs as a layer 2 on top
[The EVM Testnet](https://explorer.evm.testnet.shimmer.network/) runs as a layer 2 on top
of the [Public Testnet](/build/networks-endpoints/#public-testnet). This network uses ISC to facilitate
an Ethereum Virtual Machine and has an enshrined bridge to layer 1.

@@ -45,6 +57,6 @@ The other values (network name and currency symbol) can be whatever value you li

## Core Contracts

Both [ShimmerEVM](#shimmerEVM) and the [TestnetEVM](#testnetEVM) networks have 7
[IOTA EVM](#iotaEVM), [ShimmerEVM](#shimmerEVM) and the [TestnetEVM](#testnetEVM) networks have 7
[core contracts](../reference/core-contracts/overview.md) deployed, as well as the
[Magic Contract](../reference/magic-contract/introduction.md).
12 changes: 6 additions & 6 deletions docs/build/isc/v1.0.0-rc.6/docs/getting-started/quick-start.mdx
Original file line number Diff line number Diff line change
@@ -15,9 +15,9 @@ tags:

import { AddToMetaMaskButton, EVMNetworks } from '@theme/AddToMetaMaskButton';

# ShimmerEVM Testnet Quickstart Guide
# EVM Testnet Quickstart Guide

This guide will help you quickly get started with the [ShimmerEVM Testnet](/build/networks-endpoints/#shimmerevm-testnet), where you can deploy and interact with EVM-compatible smart contracts.
This guide will help you quickly get started with the [EVM Testnet](/build/networks-endpoints/#evm-testnet), where you can deploy and interact with EVM-compatible smart contracts.

## Prerequisites

@@ -27,7 +27,7 @@ This guide will help you quickly get started with the [ShimmerEVM Testnet](/buil

Click this button:

<AddToMetaMaskButton cfg={EVMNetworks['shimmerevm-testnet']} />
<AddToMetaMaskButton cfg={EVMNetworks['evm-testnet']} />

:::tip

@@ -39,11 +39,11 @@ Please read [the MetaMask section in the tools guide](tools.mdx#metamask) for a

:::tip ShimmerEVM

If you want to fund your ShimmerEVM account, please refer to our [How To Get Funds guide](../how-tos/send-funds-from-L1-to-L2.mdx).
If you want to fund your IOTA EVM or ShimmerEVM accounts, please refer to our [How To Get Funds guide](../how-tos/send-funds-from-L1-to-L2.mdx).

:::

1. Go to the [ShimmerEVM Testnet Toolkit](https://evm-toolkit.evm.testnet.shimmer.network/).
1. Go to the [EVM Testnet Toolkit](https://evm-toolkit.evm.testnet.shimmer.network/).
2. Connect your MetaMask wallet by clicking "Connect Wallet" or paste an EVM address.
3. Select the account you want to receive testnet SMR tokens.
4. Click "Send funds" to get testnet SMR tokens.
@@ -71,4 +71,4 @@ Visit the [Public Testnet Block Explorer](https://explorer.evm.testnet.shimmer.n
- [ERC20 simulated token faucet](https://evm-faucet.testnet.shimmer.network)
- [Firefly Shimmer](https://firefly.iota.org)

With this quickstart guide, you should now be able to set up and start exploring the [ShimmerEVM Testnet](/build/networks-endpoints/#shimmerevm-testnet). As you begin to deploy and interact with smart contracts, remember to provide feedback on any issues or improvements you discover to help make the ShimmerEVM even better. Happy developing!
With this quickstart guide, you should now be able to set up and start exploring the [EVM Testnet](/build/networks-endpoints/#evm-testnet). As you begin to deploy and interact with smart contracts, remember to provide feedback on any issues or improvements you discover to help make the IOTA EVM and ShimmerEVM even better. Happy developing!
43 changes: 32 additions & 11 deletions docs/build/isc/v1.0.0-rc.6/docs/getting-started/tools.mdx
Original file line number Diff line number Diff line change
@@ -32,7 +32,8 @@ directly with an IOTA Smart Contracts chain running EVM as long as you take a co

1. Please make sure you use the correct JSON-RPC endpoint URL in your tooling for your chain. If you're running your own chain, you can find the JSON-RPC
endpoint URL in the Wasp dashboard (`[URL]/wasp/dashboard` when using `node-docker-setup`).
2. Please ensure you use the correct `Chain ID` configured while starting the JSON-RPC service. If you did not explicitly define this while starting the service, the default Chain ID will be <ChainId url='https://json-rpc.evm.shimmer.network'/>
2. Please ensure you use the correct `Chain ID` configured while starting the JSON-RPC service. If you did not explicitly define this while starting the service, the default Chain ID will be <ChainId url='https://json-rpc.evm.iotaledger.net'/>
for IOTA EVM, <ChainId url='https://json-rpc.evm.shimmer.network'/>
for ShimmerEVM or <ChainId url='https://json-rpc.evm.testnet.shimmer.network' /> for the EVM Testnet.
3. Fees are handled on the IOTA Smart Contracts chain level, not the EVM level. The chain will reject any requests with a different gas price than specified by the chain.

@@ -52,13 +53,17 @@ interact with EVM chains and their applications (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 [ShimmerEVM](/build/networks-endpoints/#shimmerevm) and
the [ShimmerEVM Testnet](/build/networks-endpoints/#shimmerevm-testnet):
the [EVM Testnet](/build/networks-endpoints/#evm-testnet):

<Tabs>
<TabItem value='testnet' label='Public Testnet'>
<AddToMetaMaskButton cfg={EVMNetworks['shimmerevm-testnet']}/>
<TabItem value='testnet' label='EVM Testnet'>
<AddToMetaMaskButton cfg={EVMNetworks['evm-testnet']}/>
<NetworkInfo.TestnetEVM />
</TabItem>
<TabItem value='iotaEVM' label='IOTA EVM'>
<AddToMetaMaskButton cfg={EVMNetworks['iotaevm']}/>
<NetworkInfo.IOTAEVM />
</TabItem>
<TabItem value='shimmerEVM' label='ShimmerEVM'>
<AddToMetaMaskButton cfg={EVMNetworks['shimmerevm']}/>
<NetworkInfo.ShimmerEVM />
@@ -85,7 +90,9 @@ the `Environment` dropdown.
<DeployAdmonition/>

Metamask will ask to connect to Remix, and once connected, it will set the `Environment` to `Injected Web3` with
the "Custom (<ChainId url='https://json-rpc.evm.shimmer.network'/>) network" or "Custom (<ChainId url='https://json-rpc.evm.testnet.shimmer.network'/>) network".
the "Custom (<ChainId url='https://json-rpc.evm.iotaledger.net'/>) network",
"Custom (<ChainId url='https://json-rpc.evm.shimmer.network'/>) network" or
"Custom (<ChainId url='https://json-rpc.evm.testnet.shimmer.network'/>) network".

![Environment will be set to Injected Web3](/img/evm/remix-injected-provider-set.png)]

@@ -98,16 +105,30 @@ make sure you add the correct network parameters to your `hardhat.config.js`, fo
<Tabs>
<TabItem value='testnet' label='Public Testnet'>

```javascript
networks: {
'evm-testnet': {
url: 'https://json-rpc.evm.testnet.shimmer.network',
chainId: CHAIN_ID,
accounts: [YOUR PRIVATE KEY],
},
},
```
***** Where `CHAIN_ID`= <ChainId url='https://json-rpc.evm.testnet.shimmer.network'/>

</TabItem>
<TabItem value='iotaEVM' label='IOTA EVM'>

```javascript
networks: {
'shimmerevm-testnet': {
url: 'https://json-rpc.evm.testnet.shimmer.network',
chainId: CHAIN_ID,
accounts: [YOUR PRIVATE KEY],
},
'iotaEVM': {
url: 'https://json-rpc.evm.iotaledger.net',
chainId: CHAIN_ID,
accounts: [YOUR PRIVATE KEY],
},
},
```
***** Where `CHAIN_ID`= <ChainId url='https://json-rpc.evm.testnet.shimmer.network'/>
***** Where `CHAIN_ID`= <ChainId url='https://json-rpc.evm.iotaledger.net'/>

</TabItem>
<TabItem value='shimmerEVM' label='ShimmerEVM'>
5 changes: 3 additions & 2 deletions docs/build/isc/v1.0.0-rc.6/docs/how-tos/ERC20.md
Original file line number Diff line number Diff line change
@@ -74,8 +74,9 @@ Once you have deployed your contract, you can add your new custom token to your

1. Open Metamask, and click on the transaction that created the contract. From there, you can simply click
on `View on block explorer` to visit the transaction details. Alternatively, you can copy the transaction ID and
visit the [ShimmerEVM Explorer](https://explorer.evm.testnet.shimmer.network/)
or [ShimmerEVM Testnet Explorer](https://explorer.evm.testnet.shimmer.network/) and use the search bar to find transaction.
visit the [IOTA EVM Explorer](https://iota-evm.blockscout.com/),
[ShimmerEVM Explorer](https://explorer.evm.testnet.shimmer.network/)
or [EVM Testnet Explorer](https://explorer.evm.testnet.shimmer.network/) and use the search bar to find transaction.

!['View on block explorer](/img/evm/how-tos/ERC20/metamask-get-transaction-or-go-to-block-explorer.png)

18 changes: 10 additions & 8 deletions docs/build/isc/v1.0.0-rc.6/docs/how-tos/ERC721.md
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ your smart contracts.

## Create the Smart Contract

The following is an example NFT Smart Contract called "ShimmerEVMSampleNFT".
The following is an example NFT Smart Contract called "IOTAEVMSampleNFT".

```solidity
// SPDX-License-Identifier: MIT
@@ -51,11 +51,11 @@ pragma solidity ^0.8.20;
import "@openzeppelin/contracts@5.0.1/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts@5.0.1/access/Ownable.sol";

contract ShimmerEVMSampleNFT is ERC721, Ownable {
contract IOTAEVMSampleNFT is ERC721, Ownable {
uint256 private _nextTokenId;

constructor(address initialOwner)
ERC721("ShimmerEVMSampleNFT", "SSNFT")
ERC721("IOTAEVMSampleNFT", "SSNFT")
Ownable(initialOwner)
{}

@@ -73,9 +73,9 @@ contract ShimmerEVMSampleNFT is ERC721, Ownable {
As you can see above, the contract uses standard methods for the most part. You should pay attention to the following:

- `pragma solidity ^0.8.20;`: This line means the contract uses solidity compiler version `0.8.20` or above.
- `contract ShimmerEVMSampleNFT is ERC721, ERC721URIStorage, Ownable`: This line defines the contract's name, and what
- `contract IOTAEVMSampleNFT is ERC721, ERC721URIStorage, Ownable`: This line defines the contract's name, and what
other contracts it implements.
- `ERC721("ShimmerEVMSampleNFT", "SNFT") {}`: This line defines the token name and symbol. You can name it
- `ERC721("IOTAEVMSampleNFT", "SNFT") {}`: This line defines the token name and symbol. You can name it
whatever you want. We recommend using the same name for the token and the contract.
- `return "https://example.com/nft/";`: You should define the base URI of your NFTs. That means the URL you provide here
will be used for all your tokens. Since this contract uses auto-incremental token IDs, your token URI will look
@@ -101,7 +101,7 @@ directly.

:::note Set the Initial Owner

Before you can deploy this contract, you will need to set the `Initial Owner` address; this can be your own ShimmerEVM address.
Before you can deploy this contract, you will need to set the `Initial Owner` address; this can be your own IOTA EVM address.

!["Set the initial owner" img.png](/img/evm/how-tos/ERC721/set-initial-owner.png)

@@ -115,13 +115,15 @@ So far, you have [created](#create-the-smart-contract) and deployed the contract
To do, you should:

1. Open the contract (listed under `Deployed Contracts`).
2. Insert your target ShimmerEVM in beside the `safeMint` button and then click the button.
2. Insert your target IOTA EVM in beside the `safeMint` button and then click the button.

![Safe mint](/img/evm/how-tos/ERC721/safe-mint.png)

3. Confirm the transaction on Metamask.

![Confirm in metamask](/img/evm/how-tos/ERC721/confirm-in-metamask.png)

If you visit your address in the [ShimmerEVM Explorer](https://explorer.evm.testnet.shimmer.network/) or [ShimmerEVM Testnet Explorer](https://explorer.evm.testnet.shimmer.network/)
If you visit your address in the visit the [IOTA EVM Explorer](https://iota-evm.blockscout.com/),
[ShimmerEVM Explorer](https://explorer.evm.testnet.shimmer.network/) or [EVM Testnet Explorer](https://explorer.evm.testnet.shimmer.network/)
you should see your NFTs listed under `Tokens`.

Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ import AboutAccounts from '../../../_admonitions/_about-accounts.md';

:::info

ShimmerEVM has 18 decimal places, while Shimmer has 6. This means that any decimals beyond the 6th will be ignored by Shimmer, even though you can see them on ShimmerEVM. Please keep this in mind while sending your tokens to L1.
IOTA EVM and ShimmerEVM have 18 decimal places, while IOTA and Shimmer have 6. This means that any decimals beyond the 6th will be ignored by IOTA and Shimmer, even though you can see them on IOTA EVM and ShimmerEVM. Please keep this in mind while sending your tokens to L1.

:::

Original file line number Diff line number Diff line change
@@ -43,9 +43,14 @@ You can check the connection details in the [Networks & Endpoints section](/buil
:::

<Tabs>
<TabItem value='testnet' label='ShimmerEVM Testnet'>
<AddToMetaMaskButton cfg={EVMNetworks['shimmerevm-testnet']}/>
<TabItem value='testnet' label='EVM Testnet'>
<AddToMetaMaskButton cfg={EVMNetworks['evm-testnet']}/>
</TabItem>

<TabItem value='IOTAEVM' label='IOTA EVM'>
<AddToMetaMaskButton cfg={EVMNetworks['iotaevm']}/>
</TabItem>

<TabItem value='shimmerEVM' label='Shimmer EVM'>
<AddToMetaMaskButton cfg={EVMNetworks['shimmerevm']}/>
</TabItem>
@@ -153,18 +158,32 @@ project. Here's a step-by-step guide:
1. Add your preferred network parameters to the `hardhat.config.js`, for example:

<Tabs>
<TabItem value='testnet' label='ShimmerEVM Testnet'>
<TabItem value='testnet' label='EVM Testnet'>

```javascript
networks: {
'shimmerevm-testnet': {
'evm-testnet': {
url: 'https://json-rpc.evm.testnet.shimmer.network',
chainId:1073,
accounts: ['YOUR PRIVATE KEY'],
},
}
```

</TabItem>
<TabItem value='iotaEVM' label='IOTA EVM'>

```javascript
networks: {
'iotaEVM': {
url: 'https://json-rpc.evm.iotaledger.net',
chainId: CHAIN_ID,
accounts: [YOUR PRIVATE KEY],
},
},
```
***** Where `CHAIN_ID`= <ChainId url='https://json-rpc.evm.iotaledger.net'/>

</TabItem>
<TabItem value='shimmerEVM' label='Shimmer EVM'>

@@ -197,7 +216,7 @@ often offered through block explorer APIs.
3. If you have no compilation errors, you can deploy your contract by running the following command:

```bash
npx hardhat run scripts/deploy.js --network shimmerevm-testnet
npx hardhat run scripts/deploy.js --network evm-testnet
```

**Expected output**:
@@ -208,7 +227,7 @@ often offered through block explorer APIs.
***** `0x123456789ABCDEFGHIJK123456789ABCDEFGHIJK` is the contract unlock address.

4. You can verify your contract by visiting
the [ShimmerEVM Testnet Explorer](https://explorer.evm.testnet.shimmer.network/),
the [EVM Testnet Explorer](https://explorer.evm.testnet.shimmer.network/),
and searching for the address from the previous step. If you access the `Contract` tab, you should be able to see
your code and interact with your contract.

Loading