From d97ae4cbc1630dfda006b07bc355c4ef414b2594 Mon Sep 17 00:00:00 2001 From: Lucas Tortora Date: Thu, 29 Feb 2024 13:10:23 -0300 Subject: [PATCH 1/5] first draft, exchange guide for ShimmerEVM --- .../docs/how-tos/integrate-your-exchange.mdx | 164 ++++++++++++++++++ docs/build/wasp-evm/v1.0.0-rc.6/sidebars.js | 1 + 2 files changed, 165 insertions(+) create mode 100644 docs/build/wasp-evm/v1.0.0-rc.6/docs/how-tos/integrate-your-exchange.mdx diff --git a/docs/build/wasp-evm/v1.0.0-rc.6/docs/how-tos/integrate-your-exchange.mdx b/docs/build/wasp-evm/v1.0.0-rc.6/docs/how-tos/integrate-your-exchange.mdx new file mode 100644 index 00000000000..18a2451874b --- /dev/null +++ b/docs/build/wasp-evm/v1.0.0-rc.6/docs/how-tos/integrate-your-exchange.mdx @@ -0,0 +1,164 @@ +--- +tags: [Build, maintain, wasp, shimmerEVM, exchange ] +description: Learn how to integrate ShimmerEVM to your exchange. +sidebar_label: Integrate Your Exchange +--- +import { AddToMetaMaskButton, EVMNetworks } from '@theme/AddToMetaMaskButton'; +import { ChainId } from '@theme/ChainId'; + +# ShimmerEVM Exchange Integration + +If you already support EVM, then you probably are already familiar with what you'll need to integrate ShimmerEVM. As +with most networks, you should be able to use the same API as [go-ethereum](https://geth.ethereum.org/) taking into account the +[compatibility and limitations](../getting-started/compatibility.md), use the ShimmerEVM RPC +URL (https://json-rpc.evm.shimmer.network) and ChainId (), and run +our [Hornet](/hornet/welcome/) node with the [Wasp](/wasp/running-a-node/) INX-plugin. + +## ShimmerEVM Network Information + + + +| Base Token | Protocol | Chain ID | RPC URL | Explorer | +|---------------------|-----------|-------------------------------------------------------|-------------------------------------------------------------------------------|--------------------------------------| +| Shimmer Token (SMR) | ISC / EVM | | https://json-rpc.evm.shimmer.network or wss://ws.json-rpc.evm.shimmer.network | https://explorer.evm.shimmer.network | + +#### Additional Info + +| Chain Address | Alias ID | +|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------| +| [smr1prxvwqvwf7nru5q5xvh5thwg54zsm2y4wfnk6yk56hj3exxkg92mx20wl3s](https://explorer.shimmer.network/shimmer/addr/smr1prxvwqvwf7nru5q5xvh5thwg54zsm2y4wfnk6yk56hj3exxkg92mx20wl3s) | 0xccc7018e4fa63e5014332f45ddc8a5450da89572676d12d4d5e51c98d64155b3 | + +## Running a Hornet Node with Wasp + +### Install Hornet + +The easiest way to get your [Hornet](/hornet/welcome/) node up and running is using the +provided [Docker image](/hornet/how_tos/using_docker/) which already includes the [Wasp](/wasp/running-a-node/) +INX-plugin. + +### Post-Install Tasks + +After you have [installed your node](#install-hornet), you should make sure you: + +* [Configure Hornet's HTTP REST API](/hornet/how_tos/post_installation/#configuring-http-rest-api) to operate securely. +* Review the configuration options for both +[Hornet](/hornet/references/configuration/) and [Wasp](/wasp/configuration/). +* [Add peers to your node](/hornet/references/peering/). + +### Interact with the ShimmerEVM Chain + +You can use [`wasp-cli`](/wasp-cli/how-tos/wasp-cli/) to safely interact with +and [manage](wasp-cli/how-tos/chain-management/) your Wasp instance. + +## Creating Transactions + +ShimmerEVM handles transactions in the same way as standard EVM transaction with minor exceptions: + +- They must be signed with ShimmerEVM's ChainID (). +- The used EVM gas is converted to ISC gas before being charged to the sender. +- EVM contracts can't receive on-ledger requests. + +:::warning Compatibility + +Please make sure that you review +the [EVM Compatibility in IOTA Smart Contracts guide](../getting-started/compatibility.md#on-ledger-requests). + +::: + +### Determining Finality + +[Block times are variable in ShimmerEVM](../getting-started/compatibility.md#no-enforced-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 is 2.8 seconds. + +## Tooling + +ShimmerEVM is [compatible with most wallet and tools](../getting-started/compatible-tools.md) used +in EVM, such as [Metamask](../getting-started/compatible-tools.md#metamask), [Remix](../getting-started/compatible-tools.md#remix), +[Hardhat](../getting-started/compatible-tools.md#hardhat) and [Ethers.js](../getting-started/compatible-tools.md#ethersjsweb3js). + +:::info ShimmerEVM Testnet + +The [ShimmerEVM Testnet](/build/networks-endpoints/#testnet-evm) is a great way to develop and test your integration +without incurring in any risks or costs. + +::: + +## On-Chain Data + +ShimmerEVM support any standard way of consuming on-chain data you use for any other EVM network. + +## Oracle Support + +The ShimmerEVM network supports [Oracles](/build/oracles/) to retrieve data from outside the contract's sandbox, such as +[Pyth](/build/oracles#pyth) and [Supra](/build/oracles#supra). + +## FAQs + +### What is the GitHub Address For the Network? + +SMR is the native gas token on ShimmerEVM and therefore has no GitHub repository. You can +find [Hornet](https://github.com/iotaledger/hornet) and [Wasp](https://github.com/iotaledger/wasp) in +the [IOTA Ledger GitHub](https://github.com/iotaledger/). + +### What Are the Hardware Requirements for Running a Node? + +You can find a detailed list of requirements in +the [Hornet documentation](/hornet/getting_started/#recommended-requirements). + +### What's the Precision of Each Transaction (i.g 0.0001)? + +ShimmerEVM has the standard 18 decimals. + +### How Can I Customize RPC Port and the Directory of Block Data? + +The JSON RPC will be available by default on +`/wasp/api/v1/chains/smr1prxvwqvwf7nru5q5xvh5thwg54zsm2y4wfnk6yk56hj3exxkg92mx20wl3s/evm` + +You can route it however you wish using a proxy or any other stander tool for the task. + +### What is the RPC/SDK API? + +ShimmerEVM's RPC implements standard rpc API from [go-ethereum](https://geth.ethereum.org/). + +### How can I Access the Balance of an Account? + +You can use the standard EVM way using the RPC. + +### How can I Recover an Account? + +You can use any standard approach, as with Metamask for example. + +### Which Wallets are Officially Recognized? + +You can use any standard EVM compatible wallet such as [Metamask](https://metamask.io/), +or [Firefly](/get-started/wallets/firefly/) and [Bloom](/get-started/wallets/bloom/). + +### Do the Nodes Use PoW? + +No, Hornet and Wasp nodes use + +### Is There a Timeout Mechanism for a Transaction in TX Pool? How Long Does It Take? + +Yes, 15min + +### Are There Any Rent or Reservation Costs? + +Though there are no fixed costs, you should consider that you may have to +use [storage deposits](/learn/protocols/stardust/core-concepts/storage-deposit/). + +### Is the Network Ready To Receive Transfers? If Not, When Will it Be? + +The [Shimmer MainNet](/build/networks-endpoints/#shimmer) started on September 28, 2022. + +### Does the Wallet Node Need to Expose Its Port? If So, if the Machine With Nat IP Is Ok? + +You need to expose at least one peering port to be reachable from the outside; everything else can be closed. + +### Do the Addresses Follow a Particular Ruleset? + +Shimmer EVM can use the standard EVM account address (0x...). + +### Is It Necessary to Add Our Node IP Into Your Whitelist When Synchronizing? + +Yes, we need your IP to pair the nodes. diff --git a/docs/build/wasp-evm/v1.0.0-rc.6/sidebars.js b/docs/build/wasp-evm/v1.0.0-rc.6/sidebars.js index c47ea7f167c..35b70ae957b 100644 --- a/docs/build/wasp-evm/v1.0.0-rc.6/sidebars.js +++ b/docs/build/wasp-evm/v1.0.0-rc.6/sidebars.js @@ -117,6 +117,7 @@ module.exports = { }, ], }, + 'how-tos/integrate-your-exchange', ], }, { From ce8b888cd45ccb99d8b1e3c00c7e5984491e9117 Mon Sep 17 00:00:00 2001 From: Lucas Tortora <85233773+lucas-tortora@users.noreply.github.com> Date: Fri, 1 Mar 2024 10:10:10 -0300 Subject: [PATCH 2/5] Update docs/build/wasp-evm/v1.0.0-rc.6/docs/how-tos/integrate-your-exchange.mdx Co-authored-by: Jeroen van den Hout --- .../v1.0.0-rc.6/docs/how-tos/integrate-your-exchange.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/build/wasp-evm/v1.0.0-rc.6/docs/how-tos/integrate-your-exchange.mdx b/docs/build/wasp-evm/v1.0.0-rc.6/docs/how-tos/integrate-your-exchange.mdx index 18a2451874b..1c8ccff570f 100644 --- a/docs/build/wasp-evm/v1.0.0-rc.6/docs/how-tos/integrate-your-exchange.mdx +++ b/docs/build/wasp-evm/v1.0.0-rc.6/docs/how-tos/integrate-your-exchange.mdx @@ -9,7 +9,7 @@ import { ChainId } from '@theme/ChainId'; # ShimmerEVM Exchange Integration If you already support EVM, then you probably are already familiar with what you'll need to integrate ShimmerEVM. As -with most networks, you should be able to use the same API as [go-ethereum](https://geth.ethereum.org/) taking into account the +with most networks, you should be able to use the same [JSON RPC API](https://wiki.iota.org/wasp-evm/reference/json-rpc-spec/) or clients, like [go-ethereum](https://geth.ethereum.org/), taking into account the [compatibility and limitations](../getting-started/compatibility.md), use the ShimmerEVM RPC URL (https://json-rpc.evm.shimmer.network) and ChainId (), and run our [Hornet](/hornet/welcome/) node with the [Wasp](/wasp/running-a-node/) INX-plugin. From 39dcafb7d592a2a5fe9eb47573a7f5f72eed256c Mon Sep 17 00:00:00 2001 From: Lucas Tortora <85233773+lucas-tortora@users.noreply.github.com> Date: Fri, 1 Mar 2024 10:15:16 -0300 Subject: [PATCH 3/5] Update docs/build/wasp-evm/v1.0.0-rc.6/docs/how-tos/integrate-your-exchange.mdx --- .../v1.0.0-rc.6/docs/how-tos/integrate-your-exchange.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/build/wasp-evm/v1.0.0-rc.6/docs/how-tos/integrate-your-exchange.mdx b/docs/build/wasp-evm/v1.0.0-rc.6/docs/how-tos/integrate-your-exchange.mdx index 1c8ccff570f..d71a4373145 100644 --- a/docs/build/wasp-evm/v1.0.0-rc.6/docs/how-tos/integrate-your-exchange.mdx +++ b/docs/build/wasp-evm/v1.0.0-rc.6/docs/how-tos/integrate-your-exchange.mdx @@ -119,7 +119,7 @@ You can route it however you wish using a proxy or any other stander tool for th ### What is the RPC/SDK API? -ShimmerEVM's RPC implements standard rpc API from [go-ethereum](https://geth.ethereum.org/). +ShimmerEVM's RPC implements standard [JSON RPC API](../reference/json-rpc-spec.md). ### How can I Access the Balance of an Account? From 43c6cad61fdcb61119fe685f10fa467f5634df78 Mon Sep 17 00:00:00 2001 From: Lucas Tortora <85233773+lucas-tortora@users.noreply.github.com> Date: Fri, 1 Mar 2024 10:35:31 -0300 Subject: [PATCH 4/5] Update docs/build/wasp-evm/v1.0.0-rc.6/docs/how-tos/integrate-your-exchange.mdx Co-authored-by: Jeroen van den Hout --- .../v1.0.0-rc.6/docs/how-tos/integrate-your-exchange.mdx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/build/wasp-evm/v1.0.0-rc.6/docs/how-tos/integrate-your-exchange.mdx b/docs/build/wasp-evm/v1.0.0-rc.6/docs/how-tos/integrate-your-exchange.mdx index d71a4373145..2b58882c432 100644 --- a/docs/build/wasp-evm/v1.0.0-rc.6/docs/how-tos/integrate-your-exchange.mdx +++ b/docs/build/wasp-evm/v1.0.0-rc.6/docs/how-tos/integrate-your-exchange.mdx @@ -11,9 +11,7 @@ import { ChainId } from '@theme/ChainId'; If you already support EVM, then you probably are already familiar with what you'll need to integrate ShimmerEVM. As with most networks, you should be able to use the same [JSON RPC API](https://wiki.iota.org/wasp-evm/reference/json-rpc-spec/) or clients, like [go-ethereum](https://geth.ethereum.org/), taking into account the [compatibility and limitations](../getting-started/compatibility.md), use the ShimmerEVM RPC -URL (https://json-rpc.evm.shimmer.network) and ChainId (), and run -our [Hornet](/hornet/welcome/) node with the [Wasp](/wasp/running-a-node/) INX-plugin. - +URL (https://json-rpc.evm.shimmer.network) and ChainId (), or set up your own [Hornet](/hornet/welcome/) node with the [Wasp](/wasp/running-a-node/) INX-plugin and get peered with the existing ShimmerEVM network. ## ShimmerEVM Network Information From c00187fe1b576bf9d986cc25527400c8e9d6ab7c Mon Sep 17 00:00:00 2001 From: Lucas Tortora <85233773+lucas-tortora@users.noreply.github.com> Date: Mon, 4 Mar 2024 10:14:29 -0300 Subject: [PATCH 5/5] Update docs/build/wasp-evm/v1.0.0-rc.6/docs/how-tos/integrate-your-exchange.mdx Co-authored-by: Jorge Silva --- .../v1.0.0-rc.6/docs/how-tos/integrate-your-exchange.mdx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/build/wasp-evm/v1.0.0-rc.6/docs/how-tos/integrate-your-exchange.mdx b/docs/build/wasp-evm/v1.0.0-rc.6/docs/how-tos/integrate-your-exchange.mdx index 2b58882c432..cab0ed53853 100644 --- a/docs/build/wasp-evm/v1.0.0-rc.6/docs/how-tos/integrate-your-exchange.mdx +++ b/docs/build/wasp-evm/v1.0.0-rc.6/docs/how-tos/integrate-your-exchange.mdx @@ -88,8 +88,7 @@ ShimmerEVM support any standard way of consuming on-chain data you use for any o ## Oracle Support -The ShimmerEVM network supports [Oracles](/build/oracles/) to retrieve data from outside the contract's sandbox, such as -[Pyth](/build/oracles#pyth) and [Supra](/build/oracles#supra). +You can use [Pyth](/build/oracles#pyth) or [Supra](/build/oracles#supra) [Oracles](/build/oracles/) to retrieve data from outside the chain. ## FAQs