Skip to content

Commit

Permalink
doc: tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
ericlee42 committed Dec 31, 2023
1 parent 9130d96 commit 645bef0
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 49 deletions.
51 changes: 2 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,53 +24,6 @@ npx hardhat --network metis-sepolia deploy
npx hardhat --network metis-sepolia etherscan-verify
```

# How to migrate your dapp from Ethereum
## More

1. Most of solidity opcodes are the same

| Sodlity notion | Differences |
| ---------------- | -------------------------------------------------------------------------- |
| block.difficulty | always zero |
| block.coinbase | always 0x4200000000000000000000000000000000000011 |
| block.basefee | NOT SUPPORTED |
| block.timestamp | it is not equal with current unix timestamp, and it has maximum 60s delay. |

NOTE: you should always set `evmVersion` to `berlin`, Metis doesn't support `shanghai` hardfork yet.

non-EIP155 txs is disabled for now

you should always use EIP155 to build and sign your transactions.

We will enable non-eip155 txs in next hardfork.

2. Native token and wrapped

Metis is a native token but also an ERC20 compatible token on Layer 2.

It is a built-in feature, so there is no need to create a wrapped Metis token, and the source code is [here](https://github.com/MetisProtocol/mvm/blob/develop/packages/contracts/contracts/MVM/MVM_Coinbase.sol).

Sushiswap team deployed a wMetis, it's the same with WETH9, and the contract address is [0x75cb093E4D61d2A2e65D8e0BBb01DE8d89b53481](https://andromeda-explorer.metis.io/address/0x75cb093E4D61d2A2e65D8e0BBb01DE8d89b53481/contracts)

ETH is an ERC20 token on Metis, its addresss is `0x420000000000000000000000000000000000000A`

2. RPC methods

It's the same with Ethereum.

Check out [our documentation](https://docs.metis.io/dev/get-started/metis-connection-details) for rpc endpoints

3. Gas fee

It's the same with Ethereum.

4. Block timestamp

As said before. timestamp is not the same with current unix time, because Metis is an layer 2 chain, it depends on Ethereum layer 1 to get the timestamp.

internally, Metis refreshes the timestamp once 1 minute for Andromeda. so you can see that many blocks have the same time on explorer or rpc.

by the way, blocks are not generated at a constant time, a transaction will be confirmed immediately.

# Faucet

https://sepolia.faucet.metisdevops.link/
See the [migration guide](./migration.md)
46 changes: 46 additions & 0 deletions migration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# How to migrate your dapp from Ethereum

1. Most of solidity opcodes are the same

| Sodlity notion | Differences |
| ---------------- | -------------------------------------------------------------------------- |
| block.difficulty | always zero |
| block.coinbase | always 0x4200000000000000000000000000000000000011 |
| block.basefee | NOT SUPPORTED |
| block.timestamp | it is not equal with current unix timestamp, and it has maximum 60s delay. |

NOTE: you should always set `evmVersion` to `berlin`, Metis doesn't support `shanghai` hardfork yet.

non-EIP155 txs is disabled for now

you should always use EIP155 to build and sign your transactions.

We will enable non-eip155 txs in next hardfork.

2. Native token and wrapped

Metis is a native token but also an ERC20 compatible token on Layer 2.

It is a built-in feature, so there is no need to create a wrapped Metis token, and the source code is [here](https://github.com/MetisProtocol/mvm/blob/develop/packages/contracts/contracts/MVM/MVM_Coinbase.sol).

Sushiswap team deployed a wMetis, it's the same with WETH9, and the contract address is [0x75cb093E4D61d2A2e65D8e0BBb01DE8d89b53481](https://andromeda-explorer.metis.io/address/0x75cb093E4D61d2A2e65D8e0BBb01DE8d89b53481/contracts)

ETH is an ERC20 token on Metis, its addresss is `0x420000000000000000000000000000000000000A`

2. RPC methods

It's the same with Ethereum.

Check out [our documentation](https://docs.metis.io/dev/get-started/metis-connection-details) for rpc endpoints

3. Gas fee

It's the same with Ethereum.

4. Block timestamp

As said before. timestamp is not the same with current unix time, because Metis is an layer 2 chain, it depends on Ethereum layer 1 to get the timestamp.

internally, Metis refreshes the timestamp once 1 minute for Andromeda. so you can see that many blocks have the same time on explorer or rpc.

by the way, blocks are not generated at a constant time, a transaction will be confirmed immediately.

0 comments on commit 645bef0

Please sign in to comment.