bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 37쪽 중 10쪽
antle-v2-tectonic" id="mantle-v2-tectonic"></a>
This release includes several important functionalities such as using MNT as the native token, implementing Mantle DA as the DA layer, and complement of migration tool for Mantle upgrade.
It's forked from the Optimism release v1.1.0.
* Uses MNT as the Native Token and Gas Token, replacing Ether [#2](https://github.com/mantlenetworkio/mantle-v2/pull/2) [#11](https://github.com/mantlenetworkio/mantle-v2/pull/11)
* Adds Mantle DA as the DA layer [#4](https://github.com/mantlenetworkio/mantle-v2/pull/4) [#9](https://github.com/mantlenetworkio/mantle-v2/pull/9) [#29](https://github.com/mantlenetworkio/mantle-v2/pull/29)
* Enhances the Migration Tool to facilitate network upgrades of Mantle OVM versions [#19](https://github.com/mantlenetworkio/mantle-v2/pull/19) [#20](https://github.com/mantlenetworkio/mantle-v2/pull/20)
* Introduces the gas-oracle module to record the ETH/MNT ratio, utilized for fee calculation and collection [#41](https://github.com/mantlenetworkio/mantle-v2/pull/41)
* Supports the use of HSM (Hardware Security Module) for custody of crucial accounts in modules like `op-proposer`, `op-batcher`, etc. [#43](https://github.com/mantlenetworkio/mantle-v2/pull/43) [#55](https://github.com/mantlenetworkio/mantle-v2/pull/55)
* Improves end-to-end testing and code unit test coverage [#18](https://github.com/mantlenetworkio/mantle-v2/pull/18) [#38](https://github.com/mantlenetworkio/mantle-v2/pull/38) [#39](https://github.com/mantlenetworkio/mantle-v2/pull/39)
## op-geth[](https://docs-v2.mantle.xyz/nodes/changelogs/v0.5.0#op-geth) <a href="#op-geth" id="op-geth"></a>
This release includes several important functionalities such as using MNT as the native token, optimizing fee estimation, and enabling meta-transactions. This release is forked from the Release version v1.101105.3 and additionally integrates the latest go-ethereum release v1.11.5.
* Use MNT as the Native Token and Gas Token instead of Ether. [#1](https://github.com/mantlenetworkio/op-geth/pull/1)
* Support Meta Transactions at the protocol level for gas fee delegation services in various scenarios. [#2](https://github.com/mantlenetworkio/op-geth/pull/2)
* Optimize the `estimateGas` function to return fees inclusive of both layer1 and layer2 when estimating transaction fees. [#6](https://github.com/mantlenetworkio/op-geth/pull/6)
<br>
# FAQs
### How big is the current testnet state?[](https://docs-v2.mantle.xyz/nodes/faqs#how-big-is-the-current-testnet-state) <a href="#how-big-is-the-current-testnet-state" id="how-big-is-the-current-testnet-state"></a>
You can find details on this subject here: [Deploying a Rollup Verifier/Replica Node From Docker](/network/for-node-operators/deployment-guides/mainnet-v1.5.4/deploying-a-rollup-verifier-replica-node-from-docker#approximate-disk-usage)
### What does the error "foundryup can't find command" mean when installing Foundry on my server?[](https://docs-v2.mantle.xyz/nodes/faqs#what-does-the-error-foundryup-cant-find-command-mean-when-installing-foundry-on-my-server) <a href="#what-does-the-error-foundryup-cant-find-command-mean-when-installing-foundry-on-my-server" id="what-does-the-error-foundryup-cant-find-command-mean-when-installing-foundry-on-my-server"></a>
This error occurs when the foundryup script cannot locate the necessary system commands required to complete the installation process. One common solution is to upgrade the version of GNU C Library (glibc) installed on your server to version 2.29 or higher.
# Quick Access
## Network Details[](https://docs-v2.mantle.xyz/devs/dev-guides/quick#network-details) <a href="#network-details" id="network-details"></a>
{% tabs %}
{% tab title="Mainnet" %}
| Name | Description |
| ----------------- | ------------------------------------------------- |
| **RPC URL** | [https://rpc.mantle.xyz](https://rpc.mantle.xyz/) |
| **WebSocket URL** | wss\://rpc.mantle.xyz |
| **Chain ID** | 5000 |
| **Token Symbol** | MNT |
| **Explorer** | <https://mantlescan.xyz/> |
| {% endtab %} | |
{% tab title="Testnet (Sepolia)" %}
| Name | Description |
| ----------------- | ----------------------------------------------------------------- |
| **RPC URL** | [https://rpc.sepolia.mantle.xyz](https://rpc.sepolia.mantle.xyz/) |
| **WebSocket URL** | N/A |
| **Chain ID** | 5003 |
| **Token Symbol** | MNT |
| **Explorer** | <https://sepolia.mantlescan.xyz/> |
| {% endtab %} | |
| {% endtabs %} | |
{% 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](/network/for-developers/resources-and-tooling/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](/network/for-developers/resources-and-tooling/node-endpoints-and-providers).
{% endhint %}
## Onboarding Tools[](https://docs-v2.mantle.xyz/devs/dev-guides/quick#onboarding-tools) <a href="#onboarding-tools" id="onboarding-tools"></a>
Here are some useful tools for developers' onboarding.
{% tabs %}
{% tab title="Mainnet" %}
| Name | URL |
| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| **Faucet** | N/A |
| **Bridge** | <https://app.mantle.xyz/bridge> |
| **Recommended Solidity Compiler Version** | [v0.8.23](https://github.com/ethereum/solidity/releases/tag/v0.8.23) or below |
| **Wrapped MNT Address** | [0x78c1b0C915c4FAA5FffA6CAbf0219DA63d7f4cb8](https://explorer.mantle.xyz/token/0x78c1b0C915c4FAA5FffA6CAbf0219DA63d7f4cb8) |
| {% endtab %} | |
{% tab title="Testnet (Sepolia)" %}
<table><thead><tr><th width="306">Name</th><th>URL</th></tr></thead><tbody><tr><td><strong>Faucet</strong></td><td><a href="https://faucet.sepolia.mantle.xyz/">https://faucet.sepolia.mantle.xyz/</a></td></tr><tr><td><strong>Third-party Faucet</strong><em>*</em></td><td>- <a href="https://faucet.quicknode.com/mantle/sepolia">https://faucet.quicknode.com/mantle/sepolia</a><br>- <a href="https://thirdweb.com/mantle-sepolia-testnet/faucet">https://thirdweb.com/mantle-sepolia-testnet/faucet</a></td></tr><tr><td><strong>Bridge</strong></td><td><a href="https://app.mantle.xyz/bridge?network=sepolia">https://app.mantle.xyz/bridge?network=sepolia</a></td></tr><tr><td><strong>Recommended Solidity Compiler Version</strong></td><td><a href="https://github.com/ethereum/solidity/releases/tag/v0.8.23">v0.8.23</a> or below</td></tr><tr><td><strong>Wrapped MNT Address</strong></td><td><a href="https://explorer.sepolia.mantle.xyz/address/0x19f5557E23e9914A18239990f6C70D68FDF0deD5">0x19f5557E23e9914A18239990f6C70D68FDF0deD5</a></td></tr></tbody></table>
*\** You can get MNT tokens directly on the Mantle Sepolia network and no longer need to bridge from Ethereum Sepolia. However, there is a limit to the number of MNT tokens that can be acquired.
{% endtab %}
{% endtabs %}
## Contract Address[](https://docs-v2.mantle.xyz/devs/dev-guides/quick#contract-address) <a href="#contract-address" id="contract-address"></a>
Mantle as an Rollup system of Ethereum, scales Ethereum by deploying L1 contracts and L2 contracts. The most updated list of addresses of the contracts deployed on Ethereum and Mantle Network is available as follows:
* [L1 Contracts](/network/system-information/on-chain-system/key-l1-contract-address)
* [L2 Contracts](/network/system-information/off-chain-system/key-l2-contract-address)
## Token List[](https://docs-v2.mantle.xyz/devs/dev-guides/quick#token-list) <a href="#token-list" id="token-list"></a>
The [Mantle Bridge](https://bridge.mantle.xyz/) allows a one-to-many mapping between layer 1 (L1) and layer 2 (L2) tokens, meaning that there can be multiple Mantle implementations of an L1 token.
However, there is always a one-to-one mapping between L1 and L2 tokens listed on the [Mantle token list](https://token-list.mantle.xyz/mantle.tokenlist.json). The token list is used as the source of truth for the Mantle Bridge which is the main portal for moving assets between L1 and L2.
{% hint style="info" %}
If you want to support your token on the Mantle Bridge, we strongly recommend using [this template](https://github.com/mantle-xyz/bridge-token-contracts) for token deployment in order to authorize bridge contracts
{% endhint %}
### Adding a Token to the List[](https://docs-v2.mantle.xyz/devs/dev-guides/quick#adding-a-token-to-the-list) <a href="#adding-a-token-to-the-list" id="adding-a-token-to-the-list"></a>
If you want to have your token added to the token list, you'll need to make a pull request against the [Mantle token list repository](https://github.com/mantlenetworkio/mantle-token-lists). You'll need the addresses for both the L1 and L2 tokens, as well as a logo for the token.
{% hint style="info" %}
For reference, take a look at [this simple pull request](https://github.com/mantlenetworkio/mantle-token-lists#adding-a-token-to-the-list) that adds a token to the token list.
{% endhint %}
## Tools for Developers
<table data-view="cards" data-full-width="false"><thead><tr><th></th><th data-hidden></th><th data-hidden></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Endpoints</strong></td><td></td><td></td><td><a href="/network/for-developers/resources-and-tooling/node-endpoints-and-providers">Node Endpoints and Providers</a></td></tr><tr><td><strong>Mantle API</strong></td><td></td><td></td><td><a href="/network/for-developers/resources-and-tooling/mantle-api">Mantle API</a></td></tr><tr><td><strong>Oracles</strong></td><td></td><td></td><td><a href="/network/for-developers/resources-and-tooling/oracles">Oracles</a></td></tr><tr><td><strong>Monitors</strong></td><td></td><td></td><td><a href="/network/for-developers/resources-and-tooling/monitoring">Monitoring</a></td></tr><tr><td><strong>Indexers</strong></td><td></td><td></td><td><a href="/network/for-developers/resources-and-tooling/indexing">Indexing</a></td></tr><tr><td><strong>Development Frameworks</strong></td><td></td><td></td><td><a href="/network/for-developers/resources-and-tooling/development-framework">Development Framework</a></td></tr><tr><td><strong>Account Abstraction</strong></td><td></td><td></td><td><a href="/network/for-developers/resources-and-tooling/account-abstraction">Account Abstraction</a></td></tr><tr><td><strong>Wallets</strong></td><td></td><td></td><td><a href="/network/for-developers/resources-and-tooling/wallet">Wallet</a></td></tr></tbody></table>
# The Differences between Mantle, OP Stack, and Ethereum
Mantle is developed based on the OP Stack architecture. While it shares many design similarities with Ethereum, there are differences when transitioning from Ethereum to Mantle.
## Key Differences[](https://docs-v2.mantle.xyz/devs/dev-guides/diffs#key-differences) with Ethereum <a href="#key-differences" id="key-differences"></a>
### Opcodes[](https://docs-v2.mantle.xyz/devs/dev-guides/diffs#opcodes) <a href="#opcodes" id="opcodes"></a>
While Mantle aims for Ethereum compatibility, there may be differences in supported opcode sets or their specific implementations. Developers transitioning from Ethereum should review and adjust their smart contracts accordingly. Refer to the table below for detailed information:
<table><thead><tr><th width="193">Opcode</th><th width="230">Solidity equivalent</th><th>Behavior</th></tr></thead><tbody><tr><td><code>COINBASE</code></td><td><code>block.coinbase</code></td><td>In mantle-V2 Tectonic, block coinbase is the <code>SequencerFeeVault</code>, which address is <code>0x4200000000000000000000000000000000000011</code></td></tr><tr><td><code>DIFFICULTY</code></td><td><code>block.difficulty</code></td><td>Random value. As this value is set by the sequencer, it is not as reliably random as the L1 equivalent.</td></tr><tr><td><code>NUMBER</code></td><td><code>block.number</code></td><td>L2 block number</td></tr><tr><td><code>TIMESTAMP</code></td><td><code>block.timestamp</code></td><td>Timestamp of the L2 block</td></tr><tr><td><code>ORIGIN</code></td><td><code>tx.origin</code></td><td>If the transaction is an L1 ⇒ L2 transaction, then <code>tx.origin</code> is set to the <a href="https://community.optimism.io/docs/developers/build/differences/#address-aliasing">aliased address</a> of the address that triggered the L1 ⇒ L2 transaction. Otherwise, this opcode behaves normally.</td></tr><tr><td><code>CALLER</code></td><td><code>msg.sender</code></td><td>If the transaction is an L1 ⇒ L2 transaction, and this is the initial call (rather than an internal transaction from one contract to another), the same <a href="https://community.optimism.io/docs/developers/build/differences/#address-aliasing">address aliasing</a> behavior applies.</td></tr></tbody></table>
### Blocks[](https://docs-v2.mantle.xyz/devs/dev-guides/diffs#blocks) <a href="#blocks" id="blocks"></a>
As a rollup, Mantle's block structure may differ from Ethereum, including block construction time, block size, and more. Developers should familiarize themselves with Mantle's block specifications for optimal integration. Refer to [this](https://community.optimism.io/docs/developers/build/differences/#blocks) for more details.
### Network Specifications[](https://docs-v2.mantle.xyz/devs/dev-guides/diffs#network-specifications) <a href="#network-specifications" id="network-specifications"></a>
Mantle has distinct network specifications compared to Ethereum, particularly in JSON-RPC differences. Understanding these variances is crucial for a smooth transition to Mantle. Refer to [this](https://community.optimism.io/docs/developers/build/differences/#network-specifications) for more details.
### Transaction Costs[](https://docs-v2.mantle.xyz/devs/dev-guides/diffs#transaction-costs) <a href="#transaction-costs" id="transaction-costs"></a>
As a rollup on Ethereum, Mantle's transaction cost composition differs from L1. Developers should understand Mantle's fee structure to optimize their applications' performance on Mantle Network. Refer to [this](/network/system-information/fee-mechanism) for more details.
### Solidity Support[](https://docs-v2.mantle.xyz/devs/dev-guides/diffs#solidity-support) <a href="#solidity-support" id="solidity-support"></a>
Currently Mantle supports [the latest version](https://github.com/ethereum/solidity/releases) of the Solidity. Please make sure that your evm environment version is before (and including) Shanghai.
## Key Differences[](https://docs-v2.mantle.xyz/devs/dev-guides/diffs#key-differences) with OP Stack <a href="#key-differences" id="key-differences"></a>
### Independent Data Availability (DA)[](https://docs-v2.mantle.xyz/intro/whats-new-in-mantle-v2#independent-data-availability-da) <a href="#independent-data-availability-da" id="independent-data-availability-da"></a>
Considering Ethereum's current limited number of blobs and the large throughput associated with future Mantle performance enhancements, Mantle chose to use EigenDA as the DA Layer. This significantly reduces transaction fees while making minimal compromises on security guarantees. For more details, please check [here](broken://pages/n2tk77lxhcut6QDAf40l).
### Migration of Native Tokens in Rollup[](https://docs-v2.mantle.xyz/intro/whats-new-in-mantle-v2#migration-of-native-tokens-in-l2) <a href="#migration-of-native-tokens-in-l2" id="migration-of-native-tokens-in-l2"></a>
In Mantle v2 Tectonic, we introduce a highly anticipated feature — the migration of native tokens in Rollup. In Mantle v2 Tectonic, the flow of MNT tokens in Rollup will no longer use the ERC-20 contract. Instead, MNT will be a native Mantle Network Rollup asset, instead of a bridged version of its Ethereum ERC-20 counterpart. For more details, please check [here](#migration-of-native-tokens-in-l2).
### Fee Optimization Strategy[](https://docs-v2.mantle.xyz/intro/whats-new-in-mantle-v2#fee-optimization-strategy) <a href="#fee-optimization-strategy" id="fee-optimization-strategy"></a>
Mantle v2 Tectonic implements a fee optimization strategy using the tokenRatio parameter to adjust the impact of using $MNT as transaction fees. Additionally, we have optimized the `estimateGas` function to directly provide an estimate of the total cost of a transaction. For more details, please check [here](/network/system-information/fee-mechanism).
# Optimize Your Transaction Fees
This section will help you to reduce the transaction fees on Mantle v2 Tectonic. Mantle v2 Tectonic introduces a new fee collection mechanism, including EIP-1559 and some native token optimizations, if you want to know more details about our fee collection mechanism, please refer to [this document](/network/system-information/fee-mechanism).
In Mantle v2 Tectonic, with the introduction of the EIP-1559 mechanism, users need to configure the network's `basefee` (the minimum basefee currently set `0.02 gwei`) and `priorityfee` (recommend to set it to 0) configurations in order to optimize the transaction fees. We explain the different development components to optimize the user experience.
## MetaMask[](https://docs-v2.mantle.xyz/devs/dev-guides/decrease-fee#metamask) <a href="#metamask" id="metamask"></a>
If you are a user of MetaMask for trading or contract deployment and interaction (e.g. using [Remix](/network/for-developers/how-to-guides/how-to-deploy-smart-contracts/use-remix-to-deploy-smart-contracts)), you can set up `basefee` and `priorityfee` in MetaMask to be able to send transactions at a lowest fee. Details can be found [here](/network/for-users/how-to-guides/connecting-wallet-to-mantle-network#configure-your-wallet).
## Hardhat[](https://docs-v2.mantle.xyz/devs/dev-guides/decrease-fee#hardhat) <a href="#hardhat" id="hardhat"></a>
If you are using [Hardhat](/network/for-developers/how-to-guides/how-to-deploy-smart-contracts/use-hardhat-to-deploy-smart-contracts) for contract deployment and interaction, you can use the default configuration in `hardhat.config.ts` or specify `gasPrice` as the network minimum basefee:
```javascript
const config: HardhatUserConfig = {
solidity: '0.8.19', // solidity version
defaultNetwork: 'mantleSepolia', // chosen by default when network isn't specified while running Hardhat
networks: {
mantle: {
url: 'https://rpc.mantle.xyz', //mainnet
accounts: [process.env.ACCOUNT_PRIVATE_KEY ?? ''],
// Use the default configuration
},
mantleSepolia: {
url: 'https://rpc.sepolia.mantle.xyz', // Sepolia Testnet
accounts: [process.env.ACCOUNT_PRIVATE_KEY ?? ''],
gasPrice: 20000000, // specify the network's minimum basefee as the gas price
},
},
};
```
## Foundry[](https://docs-v2.mantle.xyz/devs/dev-guides/decrease-fee#foundry) <a href="#foundry" id="foundry"></a>
If you are using [Foundry](/network/for-developers/how-to-guides/how-to-deploy-smart-contracts/use-foundry-to-deploy-smart-contracts) for contract deployment and interaction, you need to set it up on the corresponding command line:
### Contracts Deployment[](https://docs-v2.mantle.xyz/devs/dev-guides/decrease-fee#contracts-deployment) <a href="#contracts-deployment" id="contracts-deployment"></a>
{% hint style="warning" %}
Currently, for users deploying contracts using `forge create`, we strongly recommend using the **legacy** transaction type.
Make sure you are using [the latest version](https://github.com/foundry-rs/foundry/releases) of Foundry, if you are using a version lower than [`2024-07-31`](https://github.com/foundry-rs/foundry/releases/tag/nightly-26a7559758c192911dd39ce7d621a18ef0d419e6), please add `-skip-simulation` to your command line to ensure successful execution!
{% endhint %}
{% tabs %}
{% tab title="Use forge script" %}
When you use the `forge script` for contract deploym프로젝트로 돌아가기