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

ISC - Exchange Guide for ShimmerEVM #1502

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -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
lucas-tortora marked this conversation as resolved.
Show resolved Hide resolved
[compatibility and limitations](../getting-started/compatibility.md), use the ShimmerEVM RPC
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this page linked is full of wrong/irrelevant info:
https://iota-wiki-9wsx0rnpl-iota1.vercel.app/wasp-evm/getting-started/compatibility/#properties-and-limitations

  • why do we talk about "on-ledger" requests on "EVM limitations"? that's not part of the EVM...
  • "Wrapped Calls to the JSON-RPC" ??? why does this even matter? it's just an implementation detail.
  • "Contract ID Source", "WASM Root Contract List", wtf...
  • "EVM state resides in a raw form to prevent the duplication of efforts undertaken by the ISC layer" - what?

that entire page should be scrapped.

please just keep:

  • No Enforced Block Time - use the "shimmerEVM" avg block time instead
  • The Magic Contract - use "Layer 1 tokens" ,instead of ISC tokens , remove "generally avail"
  • Gas Fees - rewrite and simply state that "the gas price is set by the chain"

URL (https://json-rpc.evm.shimmer.network) and ChainId (<ChainId url='https://json-rpc.evm.shimmer.network'/>), and run
our [Hornet](/hornet/welcome/) node with the [Wasp](/wasp/running-a-node/) INX-plugin.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
URL (https://json-rpc.evm.shimmer.network) and ChainId (<ChainId url='https://json-rpc.evm.shimmer.network'/>), 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 (<ChainId url='https://json-rpc.evm.shimmer.network'/>), 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.

If you use the public endpoint, you don't need to run your own node cluster right? So either connect to the public endpoint, or use your own cluster of Hornet and Wasp nodes. However, in the latter case, there is a procedure to be followed to actually get peered to the existing network of ShimmerEVM Wasp nodes right?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, which isn't documented yet tho 🤔 So we should extent it once it is. SoonTM

## ShimmerEVM Network Information

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

| Base Token | Protocol | Chain ID | RPC URL | Explorer |
|---------------------|-----------|-------------------------------------------------------|-------------------------------------------------------------------------------|--------------------------------------|
| Shimmer Token (SMR) | ISC / EVM | <ChainId url='https://json-rpc.evm.shimmer.network'/> | 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
lucas-tortora marked this conversation as resolved.
Show resolved Hide resolved

### 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.

lucas-tortora marked this conversation as resolved.
Show resolved Hide resolved
## Creating Transactions

ShimmerEVM handles transactions in the same way as standard EVM transaction with minor exceptions:

- They must be signed with ShimmerEVM's ChainID (<ChainId url='https://json-rpc.evm.shimmer.network'/>).
- 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.
lucas-tortora marked this conversation as resolved.
Show resolved Hide resolved

## 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.
lucas-tortora marked this conversation as resolved.
Show resolved Hide resolved

## Oracle Support

The ShimmerEVM network supports [Oracles](/build/oracles/) to retrieve data from outside the contract's sandbox, such as
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"outside the contract's sandbox"?
what does this even mean lol

[Pyth](/build/oracles#pyth) and [Supra](/build/oracles#supra).
lucas-tortora marked this conversation as resolved.
Show resolved Hide resolved

## FAQs
lucas-tortora marked this conversation as resolved.
Show resolved Hide resolved

### What is the GitHub Address For the Network?
lucas-tortora marked this conversation as resolved.
Show resolved Hide resolved

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/).
lucas-tortora marked this conversation as resolved.
Show resolved Hide resolved

### 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
`<NODE_HOST>/wasp/api/v1/chains/smr1prxvwqvwf7nru5q5xvh5thwg54zsm2y4wfnk6yk56hj3exxkg92mx20wl3s/evm`

You can route it however you wish using a proxy or any other stander tool for the task.
lucas-tortora marked this conversation as resolved.
Show resolved Hide resolved

### What is the RPC/SDK API?

ShimmerEVM's RPC implements standard rpc API from [go-ethereum](https://geth.ethereum.org/).
lucas-tortora marked this conversation as resolved.
Show resolved Hide resolved

### 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/).

lucas-tortora marked this conversation as resolved.
Show resolved Hide resolved
### 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.
lucas-tortora marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions docs/build/wasp-evm/v1.0.0-rc.6/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ module.exports = {
},
],
},
'how-tos/integrate-your-exchange',
],
},
{
Expand Down
Loading