Mantle 백서

Mantle

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 37쪽 중 29쪽

endhint %} 4. Check logs to see status # Testnet v0.4.0 This network update brings about the following changes: * Rebranding of the native $BIT token to $MNT * Adds fraud proof features * Enables delegation for fraud proof and TSS modules * Opens up the Mantle DA network for external parties For more details on how the aforementioned features were included to the codebase, follow the links below to navigate to the Mantle GitHub repo. #### GitHub Links * Full changelog: <https://github.com/mantlenetworkio/mantle/releases> * Relevant pull requests:&#x20; * Fraud proof features: <https://github.com/mantlenetworkio/mantle/pull/814> * Delegation for fraud proof and TSS modules: <https://github.com/mantlenetworkio/mantle/pull/826> * $BIT -> $MNT token rebranding: <https://github.com/mantlenetworkio/mantle/pull/942> * Mantle DA integration: <https://github.com/mantlenetworkio/mantle/pull/896> ## Instructions for Node Operators The testnet update is planned to go online at block height **11,000,000.** Node operators need to update their node software before that block height to avoid unexpected node behavior. You can update your node version to v0.4.0 using Docker. The image tags are as follows: * **For L2 nodes** - `l2geth:v0.4.0-1` * **For DTL service** - `dtl:v0.4.0` You can also find the updated Docker images here: {% embed url="<https://hub.docker.com/r/mantlenetworkio/>" %} {% hint style="info" %} If your node continues to sync normally after the node version update, you're good to go! Please [get in touch with us](https://discord.com/invite/0xMantle) if you encounter any issues during the process. {% endhint %} # Testnet v0.3.2 This network update brings about the following changes: * Reduces the amount of data published to L1 Ethereum using EigenLayer * Lower transactions fees on L2 For more details on how the aforementioned features were included to the codebase, follow the links below to navigate to the Mantle GitHub repo. #### GitHub Links 1. Changelog: <https://github.com/mantlenetworkio/mantle/releases> 2. Pull request with upgrades: <https://github.com/mantlenetworkio/networks/pull/7> ## Instructions for Node Operators This update includes changes that will effect take once you sync your node using the updated Docker image. Follow the steps below to proceed. #### 1. Modify the DTL configuration in `docker-compose.yaml` * Update the image. You can do this by either adding `DOCKER_TAG_DATA_TRANSPORT_LAYER = 0.3.2` in `goerli/env/dtl.env`, or updating `image` to `mantlenetworkio/data-transport-layer: 0.3.2` * Add the following attributes: `DATA_TRANSPORT_LAYER__EIGEN_UPGRADE_ENABLE: true` and `DATA_TRANSPORT_LAYER__SYNC_TO_DA: false` * Add a new element as shown below. ```docker volume: volumes: - ./data/db:/db ``` #### 2. Modify the `verifer` or `replica` setting in `docker-compose.yaml` * Set image version to `image: mantlenetworkio/l2geth: 0.3.2` * Add the following attribute: `ROLLUP_EIGEN_DA_BLOCK: "8280000"` #### 3. Check node height If your current node height happens to be higher than 8280000, which is the block height for this update, you'll need to download the backup data from the previous day and extract it, and then use it to replace your node's `chaindata`. For instance, if you're performing this action on 2023-05-25, you download the data from 2023-05-24 using the following link: {% code overflow="wrap" %} ```url https://s3.ap-southeast-1.amazonaws.com/static.testnet.mantle.xyz/20230524-testnet-chaindata.tar ``` {% endcode %} {% hint style="warning" %} Make sure to update the date in the URL based on your current date before starting the download. Also, the data directory depends on your local configuration. It should be of the form `./data/verifier/chaindata` {% endhint %} #### 4. Sync node Run the following command and wait for your node to complete the sync. ```bash docker-compose up --force-recreate -d ``` ## Deploying a New Node Instance If you encounter issues updating your node version with the process described above, you'll need to use the previous day's snapshot and deploy a new node instance. Follow the steps below to do that. #### 1. Configure DTL If you're going to run a new node instance, you can just use Mantle's public DTL service to sync chain data. Use the `docker-compose.replica.yml` file from this [pull request](https://github.com/mantlenetworkio/networks/pull/7/files). #### 2. Check node height You'll still need to download the backup data from the previous day, extract it, and then use it to replace your node's `chaindata`. For instance, if you're performing this action on 2023-05-25, you download the data from 2023-05-24 using the following link: {% code overflow="wrap" %} ```url https://s3.ap-southeast-1.amazonaws.com/static.testnet.mantle.xyz/20230524-testnet-chaindata.tar ``` {% endcode %} {% hint style="warning" %} Make sure to update the date in the URL based on your current date before starting the download. Also, the data directory depends on your local configuration. It should be of the form `./data/verifier/chaindata` {% endhint %} #### 3. Run node You'll need to download the `docker-compose.replica.yml` file to spin your new node instance. Once you've download the file from [here](https://github.com/mantlenetworkio/networks/pull/7/files), run the following command to start your node and sync it. ```bash docker-compose -f docker-compose.replica.yml up -d ``` # Developing on Mantle {% hint style="danger" %} Mantle v2 Tectonic has been released, please move to the new [documentation](https://docs-v2.mantle.xyz/)! {% endhint %} {% hint style="info" %} Check out our repository of Mantle-specific tutorials on the [Mantle GitHub](https://github.com/mantlenetworkio/mantle-tutorial/)! {% endhint %} ## Network Details <table><thead><tr><th width="177.33333333333331" align="center">Name</th><th width="244" align="center">Mainnet</th><th align="center">Testnet</th></tr></thead><tbody><tr><td align="center"><strong>RPC URL</strong></td><td align="center"><a href="https://rpc.mantle.xyz">https://rpc.mantle.xyz</a></td><td align="center"><a href="https://rpc.testnet.mantle.xyz/">https://rpc.testnet.mantle.xyz</a></td></tr><tr><td align="center"><strong>WebSocket URL</strong></td><td align="center">wss://wss.mantle.xyz</td><td align="center">wss://ws.testnet.mantle.xyz</td></tr><tr><td align="center"><strong>Chain ID</strong></td><td align="center">5000</td><td align="center">5001</td></tr><tr><td align="center"><strong>Explorer</strong></td><td align="center"><a href="https://explorer.mantle.xyz/">​​https://explorer.mantle.xyz</a></td><td align="center"><a href="https://explorer.testnet.mantle.xyz">https://explorer.testnet.mantle.xyz</a></td></tr><tr><td align="center"><strong>DTL service URL</strong></td><td align="center"><a href="https://dtl.mantle.xyz">https://dtl.mantle.xyz</a></td><td align="center"><a href="https://dtl.testnet.mantle.xyz">https://dtl.testnet.mantle.xyz</a></td></tr><tr><td align="center"><strong>Faucet</strong></td><td align="center">N/A</td><td align="center"><a href="https://faucet.testnet.mantle.xyz/">https://faucet.testnet.mantle.xyz/</a></td></tr></tbody></table> {% hint style="info" %} The official Mantle RPC employs rate limiting to ensure stability during traffic spikes. If your particular use case involves calling the Mantle API frequently, you might run into issues that arise due to rate limiting. For such use cases, consider connecting to third-party RPCs instead. You can find the list of available RPC providers here: [Node RPC Providers](/network/network/for-devs/resources-and-tooling/node-rpc-providers) {% endhint %} ## Contract Addresses The most updated list of addresses of the contracts deployed on Ethereum and Mantle Network are available on Github. Follow the links below to navigate to the respective address repos. * [Mainnet Contracts](https://github.com/mantlenetworkio/networks/blob/main/mainnet/info/mainnet-info.yaml) * [Testnet Contracts](https://github.com/mantlenetworkio/networks/blob/main/goerli/info/testnet-info.yaml) {% hint style="warning" %} Please note that there are some common ERC20 contract operations currently inactive for the native $MNT token, namely: * `transfer()` * `approve()` * `transferFrom()` * `increaseAllowance()` * `decreaseAllowance()` If your dApps use any of the above operations, we recommend using the wrapped token $WMNT instead. The L2 Mainnet contract address for $WMNT is [`0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8`](https://explorer.mantle.xyz/address/0x78c1b0C915c4FAA5FffA6CAbf0219DA63d7f4cb8)&#x20; {% endhint %} ## Connecting to Mantle Testnet Use the info listed in the [#network-details](#network-details "mention") table above to connect your wallets and apps to Mantle testnet. ## **Test $MNT Faucets** * <https://www.incepthink.com/mantle/faucet> ***(Drips on L2)*** * <https://fusionx.finance/faucet> ***(Drips on L2)*** * <https://faucet.testnet.mantle.xyz/> ***(Drips on Goerli - requires bridging)*** {% hint style="info" %} The official Mantle Network faucet is deployed on **Goerli**, and so you'll need to [bridge](https://bridge.testnet.mantle.xyz/) the minted $MNT if you want to use it on L2. \ \ Also, make sure you have sufficient test Goerli $ETH in your wallet before minting tokens. You can use the [Paradigm](https://faucet.paradigm.xyz/) or [Alchemy](https://goerlifaucet.com/) faucet to acquire test $ETH on Goerli. {% endhint %} ## GitHub Our [GitHub](https://github.com/mantlenetworkio/mantle) is a good place to familiarize yourself with the Mantle tech stack and find tools and usage examples for reference that'll help you set up a local development environment, integrate our SDK, invoke node RPC endpoints, and more. ## Tooling Quick Access {% hint style="info" %} Find the complete list of tools that will help you develop and deploy your dApps on Mantle Network here: [Resources and Tooling](/network/network/for-devs/resources-and-tooling) {% endhint %} <table><thead><tr><th width="201">Category</th><th>Tools and Links</th></tr></thead><tbody><tr><td><strong>SDK</strong></td><td><ul><li><a href="https://sdk.mantle.xyz/">Official SDK</a></li><li><a data-mention href="/network/network/for-devs/resources-and-tooling/thirdweb-sdk">Thirdweb SDK</a></li><li><p>Tutorials</p><ul><li><a href="https://medium.com/0xmantle/building-an-nft-gating-dapp-using-thirdweb-sdk-73399e813962">Building an NFT Gating dApp Using Thirdweb SDK</a></li><li><a href="https://medium.com/0xmantle/connect-rainbowkit-with-mantle-testnet-ad483a289d93">Connect RainbowKit Wallet SDK With Mantle Testnet</a></li></ul></li></ul></td></tr><tr><td><strong>RPCs</strong></td><td><ul><li>Ankr: <a href="https://mantle.public-rpc.com/">https://mantle.public-rpc.com/</a></li><li>Allnodes: <a href="https://mantle.publicnode.com/">https://mantle.publicnode.com/</a></li><li>Blast API: <a href="https://blastapi.io/public-api/mantle">https://blastapi.io/public-api/mantle</a></li><li>DRPC: <a href="https://mantle.drpc.org">https://mantle.drpc.org</a> | <a href="https://docs.drpc.org/gettingstarted/createaccount">Docs link</a></li></ul></td></tr><tr><td><strong>Multisig Wallet</strong></td><td><ul><li>Safe{Wallet}: <a href="https://multisig.mantle.xyz/">https://multisig.mantle.xyz/</a></li></ul></td></tr><tr><td><strong>Chain Data and Monitoring</strong></td><td><ul><li><p>Covalent: <a href="https://www.covalenthq.com/docs/networks/mantle/">https://www.covalenthq.com/docs/networks/mantle/</a></p><ul><li>Guide: <a data-mention href="/network/network/for-devs/resources-and-tooling/covalent-data-indexing-api">Covalent Data Indexing API</a></li></ul></li><li>Unmarshal: <a href="https://docs.unmarshal.io/reference/introduction">https://docs.unmarshal.io/reference/introduction</a></li><li>DefiLlama: <a href="https://defillama.com/chain/Mantle">https://defillama.com/chain/Mantle</a></li><li>SubQuery: <a href="https://academy.subquery.network/quickstart/quickstart_chains/mantle.html">https://academy.subquery.network/quickstart/quickstart_chains/mantle.html</a></li><li>DEXTools: <a href="https://www.dextools.io/app/en/pairs">https://www.dextools.io/app/en/pairs</a></li><li>DEX Screener: <a href="https://dexscreener.com/">https://dexscreener.com/</a></li><li>DeBank: <a href="https://debank.com/">https://debank.com/</a></li></ul></td></tr><tr><td><strong>Cross-chain Messaging</strong></td><td><ul><li>LayerZero integration: <a data-mention href="/network/network/for-devs/resources-and-tooling/cross-chain-messaging#layerzero">Cross-chain Messaging</a></li><li>Axelar integration: <a data-mention href="/network/network/for-devs/resources-and-tooling/cross-chain-messaging#axelar">Cross-chain Messaging</a></li></ul></td></tr><tr><td><strong>Price Feed Oracles</strong></td><td><ul><li>Pyth: <a href="https://docs.pyth.network/documentation/pythnet-price-feeds/evm">https://docs.pyth.network/documentation/pythnet-price-feeds/evm</a></li><li>RedStone: <a href="https://docs.redstone.finance/docs/introduction">https://docs.redstone.finance/docs/introduction</a></li><li>SupraOracles: <a href="https://supraoracles.com/docs/overview">https://supraoracles.com/docs/overview</a> <em>(testnet)</em></li></ul></td></tr><tr><td><strong>Explorer API</strong></td><td><ul><li><a href="https://explorer.mantle.xyz/api-docs">https://explorer.mantle.xyz/api-docs</a></li></ul></td></tr></tbody></table> ## **Mantle SDK** You can learn more about the Mantle SDK in [Mantle Client SDK](/network/network/for-devs/resources-and-tooling/mantle-client-sdk). The SDK provides support for the following: * Inter-network message-passing * Token deposit and withdrawal between Layer 1 (L1) and Layer 2 (L2) networks * Creation of ERC-20 tokens on L2 mapping to L1 token * Monitoring of contract calls, emit messages, etc. By combining SDK modules, Mantle network can be easily connected to wallets, exchanges, and other application scenarios. Use the link below to navigate to our SDK docs. {% embed url="<https://sdk.mantle.xyz>" %} ## Thirdweb SDK The [thirdweb](https://portal.thirdweb.com/sdk) web3 development framework supports deploying apps to Mantle Network. Learn more about how to use the thirdweb CLI to deploy contracts, and the thirdweb SDK to build your applications connecting to Mantle Network on the [Thirdweb SDK](/network/network/for-devs/resources-and-tooling/thirdweb-sdk) page. ## Using Mantle Node API dApps need access to nodes to fetch block data and send transactions. Mantle network supports Ethereum's JSON-RPC API implementation with some added custom methods and can be connected to using HTTPS and WebSocket. Find out more on the [Mantle Node API](/network/network/for-devs/resources-and-tooling/mantle-node-api) page. ## Tutorials <table><thead><tr><th width="204">Type</th><th>Links</th></tr></thead><tbody><tr><td><strong>Basics</strong></td><td><ul><li><a data-mention href="/network/network/for-devs/tutorials/estimating-transaction-fees">Estimating Transaction Fees</a></li><li><a data-mention href="/network/network/for-devs/tutorials/viewing-transactions-between-layers">Viewing Transactions between Layers</a></li><li><a data-mention href="/network/network/for-devs/tutorials/migrating-usdbit-to-usdmnt-on-goerli">Migrating $BIT to $MNT on Goerli</a></li></ul></td></tr><tr><td><strong>Smart Contracts</strong></td><td><ul><li><a data-mention href="/network/network/for-devs/tutorials/deploying-contracts">Deploying Contracts</a></li><li><a data-mention href="/network/network/for-devs/tutorials/verifying-contracts">Verifying Contracts</a></li><li><a href="https://github.com/mantlenetworkio/mantle-tutorial/tree/main/mantle-hardhat-starter-kit">Mantle Hardhat Starter Kit</a></li></ul></td></tr><tr><td><strong>Bridging</strong></td><td><ul><li><a data-mention href="/network/network/for-devs/tutorials/bridging-usdmnt-using-mantle-sdk">Bridging $MNT using Mantle SDK</a></li><li><a href="https://mantlenetworkio.github.io/mantle-tutorial/cross-dom-bridge-erc20/">Bridging Existing ERC20 Tokens Using Mantle SDK</a></li><li><a href="https://mantlenetworkio.github.io/mantle-tutorial/cross-dom-bridge-eth/">Bridging $ETH Using Mantle SDK</a></li><li><a href="https://github.com/mantlenetworkio/mantle-tutorial/tree/feature/standard-bridge-custom-token/standard-bridge-standard-token#readme">Bridging Standard ERC20 Tokens Using Standard Bridge</a></li><li><a data-mention href="/network/network/for-devs/tutorials/bridging-custom-erc20-tokens-using-standard-bridge">Bridging Custom ERC20 Tokens Using Standard Bridge</a></li></ul></td></tr><tr><td><strong>Inter-layer Message Passing</strong></td><td><ul><li><a href="https://github.com/mantlenetworkio/mantle-tutorial/tree/feature/standard-bridge-custom-token/cross-dom-comm#communication-between-contracts-on-l1-and-l2">Communication Between Contracts on L1 and L2</a></li></ul></td></tr></tbody></table> {% hint style="info" %} You can find the tutorials Github repo here: <https://mantlenetworkio.github.io/mantle-tutorial/> {% endhint %} ## Graph Node <table><thead><tr><th width="174" align="center"></th><th width="340">Testnet</th><th>Mainnet</th></tr></thead><tbody><tr><td align="center">Deploy endpoint</td><td><a href="https://graph.testnet.mantle.xyz/deploy">https://graph.testnet.mantle.xyz/deploy</a></td><td>in works</td></tr><tr><td align="center">Query subgraph using name</td><td><a href="https://graph.testnet.mantle.xyz/subgraphs/name/<name>">https://graph.testnet.mantle.xyz/subgraphs/name/&#x3C;name></a></td><td>in works</td></tr><tr><td align="center">Query subgraph using ID</td><td><a href=" https://graph.testnet.mantle.xyz/subgraphs/id/<ID>">https://graph.testnet.mantle.xyz/subgraphs/id/&#x3C;ID></a></td><td>in works</td></tr><tr><td align="center">Check subgraph status</td><td><a href="https://graph.testnet.mantle.xyz/graphql">https://graph.testnet.mantle.xyz/graphql</a></td><td>in works</td></tr><tr><td align="center">IPFS server</td><td><a href="https://ipfs.testnet.mantle.xyz/">https://ipfs.testnet.mantle.xyz/</a></td><td>in works</td></tr><tr><td align="center">Network parameter</td><td><code>testnet</code></td><td>in works</td></tr></tbody></table> ## Opcode Differences Between EVM and Mantle VM ### 0x40 range - ‘`BASEFEE`’ Introduced in [EIP1559](https://eips.ethereum.org/EIPS/eip-1559) | EVM | Mantle VM | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | <p>// 0x40 range - block operations. </p><p></p><p>const ( </p><p> BLOCKHASH OpCode = 0x40 </p><p> COINBASE OpCode = 0x41 </p><p> TIMESTAMP OpCode = 0x42 </p><p> NUMBER OpCode = 0x43 </p><p> DIFFICULTY OpCode = 0x44 </p><p> RANDOM OpCode = 0x44 // Same as DIFFICULTY </p><p> GASLIMIT OpCode = 0x45 </p><p> CHAINID OpCode = 0x46 </p><p> SELFBALANCE OpCode = 0x47 </p><p> <mark style="color:red;">BASEFEE OpCode = 0x48</mark> </p><p>)</p> | <p>const ( </p><p> BLOCKHASH OpCode = 0x40 + iota</p><p> COINBASE </p><p> TIMESTAMP </p><p> NUMBER </p><p> DIFFICULTY </p><p> GASLIMIT </p><p> CHAINID = 0x46 </p><p> SELFBALANCE = 0x47</p><p></p><p> <mark style="color:red;">L1BLOCKNUMBER = 0x4B</mark> </p><p>)</p> | ### 0x50 range - ‘`PUSH0`’ Introduced in [EIP3855](https://eips.ethereum.org/EIPS/eip-3855) | EVM | Mantle VM | | -----------------------
프로젝트로 돌아가기