Skip to content

Commit

Permalink
Unify network infos and add IOTA EVM testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr-Electron authored Apr 30, 2024
1 parent 4f5e396 commit 0a51d5e
Show file tree
Hide file tree
Showing 10 changed files with 244 additions and 165 deletions.
16 changes: 16 additions & 0 deletions docs/build/_partials/_metamask_buttons.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { AddToMetaMaskButton } from '@theme/AddToMetaMaskButton';
import { Networks } from '@theme/constant';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs groupId='network'>
<TabItem value='iota_testnet' label='IOTA EVM Testnet'>
<AddToMetaMaskButton {...Networks['iota_testnet']}/>
</TabItem>
<TabItem value='shimmer' label='ShimmerEVM'>
<AddToMetaMaskButton {...Networks['shimmer']}/>
</TabItem>
<TabItem value='shimmer_testnet' label='ShimmerEVM Testnet'>
<AddToMetaMaskButton {...Networks['shimmer_testnet']}/>
</TabItem>
</Tabs>
44 changes: 36 additions & 8 deletions docs/build/getting-started/networks-endpoints.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ If you are developing a production level application for IOTA, consider setting
have more control and to not run into any limits.
:::

## IOTA Mainnet
## IOTA

[The IOTA Mainnet](https://explorer.iota.org/mainnet) is the production network within the IOTA ecosystem using the IOTA
token.
Expand All @@ -40,6 +40,34 @@ This network runs under a [Coordinator PoA scheme](/learn/protocols/coordinator/

<NetworkInfo.L1 {...Networks['iota']}/>

## IOTA Testnet

[The IOTA Testnet](https://explorer.iota.org/iota-testnet) acts as a test bed for builders without any real world value.

:::info
This network is subject to occasional resets (no data retention) which are usually announced with a one-week grace period.
:::

<NetworkInfo.L1 {...Networks['iota_testnet']} />

### IOTA EVM Testnet

[IOTA EVM Testnet](https://explorer.evm.testnet.iotaledger.net) is the L2 EVM running on top of the IOTA Testnet network.

:::info

This network is subject to occasional resets (no data retention) which are usually announced with a one-week grace period.

:::

<AddToMetaMaskButton {...Networks['iota_testnet']} />

<NetworkInfo.Evm {...Networks['iota_testnet']}/>

#### Additional Info

<NetworkInfo.EvmCustom {...Networks['iota_testnet']}/>

## Shimmer

[Shimmer](https://explorer.iota.org/shimmer) is the staging network for new protocol versions before they hit IOTA
Expand All @@ -59,22 +87,22 @@ Mainnet.

<NetworkInfo.EvmCustom {...Networks['shimmer']} />

## Public Testnet
## Shimmer Testnet

[The Public Testnet](https://explorer.iota.org/testnet) acts as a test bed for builders without any real world value.
[The Shimmer Testnet](https://explorer.shimmer.network/shimmer-testnet) acts as a test bed for builders without any real world value.

:::info
This network is subject to occasional resets (no data retention) which are usually announced with a one-week grace period.
:::

<NetworkInfo.L1 {...Networks['testnet']} />
<NetworkInfo.L1 {...Networks['shimmer_testnet']} />

### ShimmerEVM Testnet

<AddToMetaMaskButton {...Networks['testnet']} />
<AddToMetaMaskButton {...Networks['shimmer_testnet']} />

[The ShimmerEVM 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
of the Shimmer Testnet. This network uses ISC to facilitate an Ethereum Virtual Machine and has an
enshrined bridge to layer 1.

:::info
Expand All @@ -83,8 +111,8 @@ This network is subject to occasional resets (no data retention) which are usual

:::

<NetworkInfo.Evm {...Networks['testnet']} />
<NetworkInfo.Evm {...Networks['shimmer_testnet']} />

#### Additional Info

<NetworkInfo.EvmCustom {...Networks['testnet']} />
<NetworkInfo.EvmCustom {...Networks['shimmer_testnet']} />
52 changes: 52 additions & 0 deletions docs/build/isc/v1.0.0-rc.6/docs/_partials/_hardhat_config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import CodeBlock from '@theme/CodeBlock';
import { Networks } from '@theme/constant';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs groupId='network'>
<TabItem value='shimmer_testnet' label='ShimmerEVM Testnet'>

<CodeBlock language="js">
{`
networks: {
'shimmerevm-testnet': {
url: '${Networks['shimmer_testnet'].evm.rpcUrls[0]}',
chainId: ${parseInt(Networks['shimmer_testnet'].evm.chainId)},
accounts: [YOUR PRIVATE KEY],
},
}
`}
</CodeBlock>

</TabItem>
<TabItem value='iota_testnet' label='IOTA EVM Testnet'>

<CodeBlock language="js">
{`
networks: {
'iotaevm-testnet': {
url: '${Networks['iota_testnet'].evm.rpcUrls[0]}',
chainId: ${parseInt(Networks['iota_testnet'].evm.chainId)},
accounts: [YOUR PRIVATE KEY],
},
}
`}
</CodeBlock>

</TabItem>
<TabItem value='shimmer' label='ShimmerEVM'>

<CodeBlock language="js">
{`
networks: {
'shimmerevm': {
url: '${Networks['shimmer'].evm.rpcUrls[0]}',
chainId: ${parseInt(Networks['shimmer'].evm.chainId)},
accounts: [YOUR PRIVATE KEY],
},
}
`}
</CodeBlock>

</TabItem>
</Tabs>
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,27 @@ import { Networks } from '@theme/constant';
import NetworkInfo from '@theme/NetworkInfo';

# Networks & Chains
## IOTA EVM Testnet

<AddToMetaMaskButton {...Networks['shimmer_testnet']} />

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

:::info

This network is subject to occasional resets (no data retention) which are usually announced with a one-week grace period.

:::

<NetworkInfo.Evm {...Networks['shimmer_testnet']} />

:::note

The other values (network name and currency symbol) can be whatever value you like.

:::

## ShimmerEVM

Expand All @@ -24,10 +45,10 @@ import NetworkInfo from '@theme/NetworkInfo';

## ShimmerEVM Testnet

<AddToMetaMaskButton {...Networks['testnet']} />
<AddToMetaMaskButton {...Networks['shimmer_testnet']} />

[The ShimmerEVM 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
of the [Shimmer Testnet](/build/networks-endpoints#shimmer-testnet). This network uses ISC to facilitate
an Ethereum Virtual Machine and has an enshrined bridge to layer 1.

:::info
Expand All @@ -36,7 +57,7 @@ This network is subject to occasional resets (no data retention) which are usual

:::

<NetworkInfo.Evm {...Networks['shimmer']} />
<NetworkInfo.Evm {...Networks['shimmer_testnet']} />

:::note

Expand All @@ -46,6 +67,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
[ShimmerEVM](#shimmerEVM) and the testnet networks have 7
[core contracts](../reference/core-contracts/overview.md) deployed, as well as the
[Magic Contract](../reference/magic-contract/introduction.md).
49 changes: 33 additions & 16 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
Expand Up @@ -13,12 +13,16 @@ tags:
- RPC
---

import { AddToMetaMaskButton } from '@theme/AddToMetaMaskButton';
import MetamaskButtons from '../../../../_partials/_metamask_buttons.mdx';
import NetworkInfo from '@theme/NetworkInfo';
import { Networks } from '@theme/constant';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import Link from '@docusaurus/Link';

# ShimmerEVM Testnet Quickstart Guide
# EVM Testnets 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 our [EVM Testnets](/build/networks-endpoints), where you can deploy and interact with EVM-compatible smart contracts.

## Prerequisites

Expand All @@ -28,29 +32,35 @@ This guide will help you quickly get started with the [ShimmerEVM Testnet](/buil

Click this button:

<AddToMetaMaskButton {...Networks['testnet']} />
<MetamaskButtons/>

:::tip

Please read [the MetaMask section in the tools guide](tools.mdx#metamask) for a detailed guide.

:::

## Get Testnet SMR Tokens
## Get Testnet Tokens

:::tip ShimmerEVM
:::tip Fund your testnet account

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 EVM testnet account, 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 [IOTA EVM](https://evm-toolkit.evm.testnet.iotaledger.net) or [ShimmerEVM](https://evm-toolkit.evm.testnet.shimmer.network/) Testnet Toolkit.
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.
3. Select the account you want to receive testnet tokens.
4. Click "Send funds" to get testnet tokens.

## Get Simulated Bridged Tokens

:::info ShimmerEVM Testnet

The simulated bridged tokens are currently only available on the ShimmerEVM Testnet.

:::

1. Go to the [ERC20 Simulated Token Faucet](https://evm-faucet.testnet.shimmer.network/).
2. Connect your MetaMask wallet by clicking "Connect Wallet".
3. Select the account you want to receive simulated bridged tokens.
Expand All @@ -59,17 +69,24 @@ If you want to fund your ShimmerEVM account, please refer to our [How To Get Fun

## Deploy and Interact with Smart Contracts

You can now use your testnet SMR tokens and simulated bridged tokens to deploy and interact with smart contracts on the [Public Testnet](/build/networks-endpoints/#public-testnet). Utilize popular development tools and frameworks, such as [Hardhat](https://hardhat.org/), or [Remix](https://remix.ethereum.org/), to build, test, and deploy your smart contracts.
You can now use your testnet tokens and simulated bridged tokens to deploy and interact with smart contracts on the testnets. Utilize popular development tools and frameworks, such as [Hardhat](https://hardhat.org/), or [Remix](https://remix.ethereum.org/), to build, test, and deploy your smart contracts.

## Explore the Public Testnet

Visit the [Public Testnet Block Explorer](https://explorer.evm.testnet.shimmer.network/) to monitor the chain, track transactions, and explore deployed smart contracts.
Visit the corresponding Testnet Block Explorer to monitor the chain, track transactions, and explore deployed smart contracts.

<Tabs groupId='network'>
<TabItem value='iotaEVMTestnet' label='IOTA EVM Testnet'>
<Link to={Networks['iota_testnet'].evm.blockExplorerUrls[0]}>Explorer</Link>
</TabItem>
<TabItem value='shimmerEVMTestnet' label='ShimmerEVM Testnet'>
<Link to={Networks['shimmer_testnet'].evm.blockExplorerUrls[0]}>Explorer</Link>
</TabItem>
</Tabs>

## Additional Resources

- [GitHub issues page for Wasp](https://github.com/iotaledger/wasp/issues)
- [EVM toolkit](https://evm-toolkit.evm.testnet.shimmer.network/)
- [ERC20 simulated token faucet](https://evm-faucet.testnet.shimmer.network)
- [Firefly Shimmer](https://firefly.iota.org)
- [Firefly](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 [Testnet](/build/networks-endpoints). As you begin to deploy and interact with smart contracts, remember to provide feedback on any issues or improvements you discover to help make our EVM even better. Happy developing!
51 changes: 13 additions & 38 deletions docs/build/isc/v1.0.0-rc.6/docs/getting-started/tools.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ tags:
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import {AddToMetaMaskButton } from '@theme/AddToMetaMaskButton';
import HardhatConfig from '../_partials/_hardhat_config.md';
import { Networks } from '@theme/constant';
import DeployAdmonition from '../_admonitions/_deploy_a_smart_contract.md';
import { ChainId } from '@theme/ChainId';
Expand Down Expand Up @@ -52,22 +53,25 @@ 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):
For example this would be the configs to add our different [EVM chains](/build/networks-endpoints):

<Tabs>
<TabItem value='testnet' label='Public Testnet'>
<AddToMetaMaskButton {...Networks['testnet']}/>
<NetworkInfo.Evm {...Networks['testnet']}/>
<Tabs groupId='network'>
<TabItem value='iotaEVMTestnet' label='IOTA EVM Testnet'>
<AddToMetaMaskButton {...Networks['iota_testnet']}/>
<NetworkInfo.Evm {...Networks['iota_testnet']}/>
</TabItem>
<TabItem value='shimmerEVM' label='ShimmerEVM'>
<AddToMetaMaskButton {...Networks['shimmer']}/>
<NetworkInfo.Evm {...Networks['shimmer']}/>
</TabItem>
<TabItem value='shimmerEVMTestnet' label='ShimmerEVM Testnet'>
<AddToMetaMaskButton {...Networks['shimmer_testnet']}/>
<NetworkInfo.Evm {...Networks['shimmer_testnet']}/>
</TabItem>
</Tabs>

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](/build/networks-endpoints/#public-testnet) to MetaMask.
whatever you see fit. Click "Save" to add the chain 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
unique `Chain ID` and `RPC Url`. Once you have done this, you can start using MetaMask to manage your EVM wallet or
Expand All @@ -86,7 +90,7 @@ 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 (Chain ID) network".

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

Expand All @@ -96,36 +100,7 @@ the "Custom (<ChainId url='https://json-rpc.evm.shimmer.network'/>) network" or
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:

<Tabs>
<TabItem value='testnet' label='Public Testnet'>

```javascript
networks: {
'shimmerevm-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='shimmerEVM' label='ShimmerEVM'>

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

</TabItem>
</Tabs>
<HardhatConfig/>

<DeployAdmonition/>

Expand Down
Loading

0 comments on commit 0a51d5e

Please sign in to comment.