Skip to content

Commit c2d1602

Browse files
committedFeb 27, 2024
initialization
0 parents  commit c2d1602

35 files changed

+5433
-0
lines changed
 

‎.eslintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "next/core-web-vitals"
3+
}

‎.gitignore

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
.yarn/install-state.gz
8+
9+
# testing
10+
/coverage
11+
12+
# next.js
13+
/.next/
14+
/out/
15+
16+
# production
17+
/build
18+
19+
# misc
20+
.DS_Store
21+
*.pem
22+
23+
# debug
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
27+
28+
# local env files
29+
.env*.local
30+
31+
# vercel
32+
.vercel
33+
34+
# typescript
35+
*.tsbuildinfo
36+
next-env.d.ts

‎LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Shu Ding
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

‎README.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Mint Blockchain Docs
2+
Welcome to the Github for the Mint Dev Docs. If you'd like to contribute, simply open a PR with your changes and we'll review it as soon as possible.
3+
4+
Install
5+
To install and start the docs locally, run the following command:
6+
7+
```bash
8+
yarn install
9+
yarn dev
10+
```

‎components/switch-network-button.tsx

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
export default function SwitchNetworkButton() {
2+
const onClick = async () => {
3+
// @ts-ignore
4+
if (window.ethereum) {
5+
const params = {
6+
chainId: "0x696",
7+
chainName: "Mint Testnet Public",
8+
nativeCurrency: {
9+
name: "Sepolia Ether",
10+
symbol: "ETH",
11+
decimals: 18,
12+
},
13+
rpcUrls: ["https://testnet-rpc.mintchain.io"],
14+
blockExplorerUrls: ["https://testnet-explorer.mintchain.io"],
15+
};
16+
17+
// @ts-ignore
18+
await window.ethereum.request({
19+
method: "wallet_addEthereumChain",
20+
params: [params],
21+
});
22+
}
23+
};
24+
25+
return (
26+
<button
27+
style={{
28+
fontSize: "16px",
29+
padding: "12px 24px",
30+
color: "#ebf5ed",
31+
fontWeight: "bold",
32+
background: "#30BF54",
33+
borderRadius: "24px",
34+
}}
35+
onClick={onClick}
36+
>
37+
Add Network
38+
</button>
39+
);
40+
}

‎next.config.mjs

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import nextra from 'nextra'
2+
3+
const withNextra = nextra({
4+
theme: 'nextra-theme-docs',
5+
themeConfig: './theme.config.jsx'
6+
})
7+
8+
export default withNextra()

‎package.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "mint-docs",
3+
"version": "0.1.0",
4+
"private": true,
5+
"type": "module",
6+
"scripts": {
7+
"dev": "next dev",
8+
"build": "next build",
9+
"start": "next start",
10+
"lint": "next lint"
11+
},
12+
"dependencies": {
13+
"next": "14.1.0",
14+
"nextra": "^2.13.3",
15+
"nextra-theme-docs": "^2.13.3",
16+
"react": "^18",
17+
"react-dom": "^18"
18+
},
19+
"devDependencies": {
20+
"@types/node": "^20",
21+
"@types/react": "^18",
22+
"@types/react-dom": "^18",
23+
"autoprefixer": "^10.0.1",
24+
"eslint": "^8",
25+
"eslint-config-next": "14.1.0",
26+
"typescript": "^5"
27+
}
28+
}

‎pages/_meta.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"index": "Introduction",
3+
"build": {
4+
"title": "Build On Mint"
5+
},
6+
"using-mint": "Using Mint",
7+
"tools": {
8+
"title": "Tools"
9+
},
10+
"deploy": {
11+
"title": "Deploy Your APP"
12+
}
13+
}

‎pages/build/_meta.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"network": "Network Information",
3+
"fees": "Fees",
4+
"diffrences": "Differences between Ethereum and Mint"
5+
}

‎pages/build/diffrences.mdx

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Mint is built on the [Bedrock](https://stack.optimism.io/docs/releases/bedrock/explainer/) release of the [OP Stack](https://stack.optimism.io/), which is designed from the ground up to be as close to Ethereum as possible. Because of this, there are very little differences when it comes to building on Mint and Ethereum.
2+
3+
However, there are still some minor discrepancies between the behavior of Mint and Ethereum that you should be aware of when building apps on top of Mint.
4+
5+
These minor differences include:
6+
7+
- [Opcodes](https://stack.optimism.io/docs/releases/bedrock/differences/#opcode-differences)
8+
- [Blocks](https://stack.optimism.io/docs/releases/bedrock/differences/#blocks)
9+
- [Network specifications](https://stack.optimism.io/docs/releases/bedrock/differences/#network-specifications)
10+
- [Transaction costs](https://stack.optimism.io/docs/releases/bedrock/differences/#transaction-costs)

‎pages/build/fees.mdx

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## How do network fees on Mint work?
2+
3+
Every Mint transaction consists of two costs: an L2 (execution) fee and an L1 (security) fee. The L2 fee is the cost to execute your transaction on the L2, and the L1 fee is the estimated cost to publish the transaction on the L1. Typically, the L1 security fee is higher than the L2 execution fee.
4+
5+
In advance, Mint Blockchain uses Celestia as the DA (Data Availability) layer to lower gas fees for users. Celestia employs cutting-edge data availability sampling techniques—two-dimensional Reed-Solomon coding and Namespaced Merkle Trees (NMTs)—to address L2 data availability concerns in a trust-minimized manner. By using Celestia, Mint Blockchain can significantly reduce transaction costs for users.
6+
7+
For more information about Celestia, you can refer to https://docs.celestia.org/learn/how-celestia-works/overview.

‎pages/build/network.mdx

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## Mint Testnet (Sepolia)
2+
3+
| Name | Value |
4+
| :-------------- | :-----------------------------------------------------------------------------------: |
5+
| Name | Mint Testnet |
6+
| Description | The public testnet for Mint |
7+
| Chain ID | 1686 |
8+
| RPC Endpoint | https://testnet-rpc.mintchain.io <br /> (Rate limited and not for production systems) |
9+
| Block Explorer | https://testnet-explorer.mintchain.io |
10+
| Currency Symbol | ETH |
11+
12+
## Mint Mainnet
13+
14+
Mint Mainnet will be online soon. We'll be revealing more details about the mainnet launch on our [Twitter](https://twitter.com/Mint_Blockchain).
15+
16+
| Name | Value |
17+
| :-------------- | :-------------------------: |
18+
| Name | Mint Mainnet |
19+
| Description | The public mainnet for Mint |
20+
| Chain ID | |
21+
| RPC Endpoint | |
22+
| Block Explorer | |
23+
| Currency Symbol | ETH |

‎pages/deploy/_meta.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"contracts": "Mint Contracts",
3+
"use-hardhat": "Use Hardhat",
4+
"use-foundry": "Use Foundry",
5+
"use-remix": "Use Remix"
6+
}

‎pages/deploy/contracts.mdx

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
## L2 Contract Addresses
2+
3+
### Mint Testnet (Sepolia)
4+
5+
| Contract Name | Address |
6+
| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
7+
| WETH9 | [0x4200000000000000000000000000000000000006](https://testnet-explorer.mintchain.io/address/0x4200000000000000000000000000000000000006) |
8+
| L2CrossDomainMessenger | [0x4200000000000000000000000000000000000007](https://testnet-explorer.mintchain.io/address/0x4200000000000000000000000000000000000007) |
9+
| L2StandardBridge | [0x4200000000000000000000000000000000000010](https://testnet-explorer.mintchain.io/address/0x4200000000000000000000000000000000000010) |
10+
| SequencerFeeVault | [0x4200000000000000000000000000000000000011](https://testnet-explorer.mintchain.io/address/0x4200000000000000000000000000000000000011) |
11+
| GasPriceOracle | [0x420000000000000000000000000000000000000F](https://testnet-explorer.mintchain.io/address/0x420000000000000000000000000000000000000F) |
12+
| L1Block | [0x4200000000000000000000000000000000000015](https://testnet-explorer.mintchain.io/address/0x4200000000000000000000000000000000000015) |
13+
| L2ToL1MessagePasser | [0x4200000000000000000000000000000000000016](https://testnet-explorer.mintchain.io/address/0x4200000000000000000000000000000000000016) |
14+
| L2ERC721Bridge | [0x4200000000000000000000000000000000000014](https://testnet-explorer.mintchain.io/address/0x4200000000000000000000000000000000000014) |
15+
| OptimismMintableERC721Factory | [0x4200000000000000000000000000000000000017](https://testnet-explorer.mintchain.io/address/0x4200000000000000000000000000000000000017) |
16+
| ProxyAdmin | [0x4200000000000000000000000000000000000018](https://testnet-explorer.mintchain.io/address/0x4200000000000000000000000000000000018) |
17+
| BaseFeeVault | [0x4200000000000000000000000000000000000019](https://testnet-explorer.mintchain.io/address/0x4200000000000000000000000000000000000019) |
18+
| L1FeeVault | [0x420000000000000000000000000000000000001a](https://testnet-explorer.mintchain.io/address/0x420000000000000000000000000000000000001a) |
19+
20+
## L1 Contract Addresses
21+
22+
### Ethereum Testnet (Sepolia)
23+
24+
| Contract Name | Address |
25+
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
26+
| AddressManager | [0x655dE4A3E29DDC37eE1Aeed921a30b30c575e79b](https://sepolia.etherscan.io/address/0x655dE4A3E29DDC37eE1Aeed921a30b30c575e79b) |
27+
| L1CrossDomainMessenger | [0x3dd96530a9fa466bc7A7Fd14e8B8A12DdfeeDBA1](https://sepolia.etherscan.io/address/0x3dd96530a9fa466bc7A7Fd14e8B8A12DdfeeDBA1) |
28+
| L1StandardBridge | [0xd9d4b3ad7EDB8F852AB75afA66c1456C46fef210](https://sepolia.etherscan.io/address/0xd9d4b3ad7EDB8F852AB75afA66c1456C46fef210) |
29+
| OptimismPortal | [0xB5b00FB561326C40F4F07ec29D7F25b2121e45bA](https://sepolia.etherscan.io/address/0xB5b00FB561326C40F4F07ec29D7F25b2121e45bA) |
30+
| L2OutputOracle | [0x81762363845E2992aFa48914Ea4DE5aCDC7C3d9B](https://sepolia.etherscan.io/address/0x81762363845E2992aFa48914Ea4DE5aCDC7C3d9B) |
31+
| System Config | [0xd911cae380775931ba303fdf14e19ffd27c25b4c](https://sepolia.etherscan.io/address/0xd911cae380775931ba303fdf14e19ffd27c25b4c) |
32+
| OptimismMintableERC20 Factory | [0x81762363845E2992aFa48914Ea4DE5aCDC7C3d9B](https://sepolia.etherscan.io/address/0x81762363845E2992aFa48914Ea4DE5aCDC7C3d9B) |
33+
| Optimism Portal | [0xB5b00FB561326C40F4F07ec29D7F25b2121e45bA](https://sepolia.etherscan.io/address/0xB5b00FB561326C40F4F07ec29D7F25b2121e45bA) |
34+
35+
## Mint Admin Addresses
36+
37+
### Mint Testnet (Sepolia)
38+
39+
| Contract Role | Address |
40+
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
41+
| Admin Address | [0x9eE91f27D36303495cc0dc2f2Cc0CBBF6628B7d1](https://sepolia.etherscan.io/address/0x9eE91f27D36303495cc0dc2f2Cc0CBBF6628B7d1) |
42+
| Batcher Address | [0x09f9ced4b5f841e4a6255cbbe06f9aa726897ee8](https://sepolia.etherscan.io/address/0x09f9ced4b5f841e4a6255cbbe06f9aa726897ee8) |
43+
| Batch Inbox | [0xbcad34ad7207db9088e1fcc4cb9382d3dc85355c](https://sepolia.etherscan.io/address/0xbcad34ad7207db9088e1fcc4cb9382d3dc85355c) |
44+
| Proposer Address | [0x81762363845E2992aFa48914Ea4DE5aCDC7C3d9B](https://sepolia.etherscan.io/address/0x81762363845E2992aFa48914Ea4DE5aCDC7C3d9B) |
45+
| Proxy Admin | [0x9eE91f27D36303495cc0dc2f2Cc0CBBF6628B7d1](https://sepolia.etherscan.io/address/0x9eE91f27D36303495cc0dc2f2Cc0CBBF6628B7d1) |
46+
| Proxy Admin Owner | [0x12ee26aD74d50a1f6BDD90811387d1e0f3e7C76A](https://sepolia.etherscan.io/address/0x12ee26aD74d50a1f6BDD90811387d1e0f3e7C76A) |
47+
| System Config Owner | [0x92a5675d54a2a081e398908df9774d1e4d85b897](https://sepolia.etherscan.io/address/0x92a5675d54a2a081e398908df9774d1e4d85b897) |

‎pages/deploy/use-foundry.mdx

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Foundry
2+
3+
[Foundry](https://github.com/foundry-rs/foundry) is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
4+
5+
Foundry consists of:
6+
7+
[Forge](https://github.com/foundry-rs/foundry/blob/master/crates/forge): Ethereum testing framework (like Truffle, Hardhat and DappTools).
8+
[Cast](https://github.com/foundry-rs/foundry/blob/master/crates/cast): Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data.
9+
[Anvil](https://github.com/foundry-rs/foundry/blob/master/crates/anvil): Local Ethereum node, akin to Ganache, Hardhat Network.
10+
[Chisel](https://github.com/foundry-rs/foundry/blob/master/crates/chisel): Fast, utilitarian, and verbose solidity REPL.
11+
12+
13+
## Testnet
14+
15+
### Deploying a smart contract
16+
17+
```bash
18+
forge create ... --rpc-url=https://testnet-rpc.mintchain.io
19+
```
20+
21+
### Verifying a smart contract
22+
23+
```bash
24+
forge verify-contract ... --chain-id 1686
25+
```

‎pages/deploy/use-hardhat.mdx

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Hardhat
2+
3+
[Hardhat](https://hardhat.org/) is an Ethereum development environment. Compile your contracts and run them on a development network. Get Solidity stack traces, console.log and more.
4+
5+
You can use Hardhat to edit, compile, debug, and deploy your smart contracts to Mint.
6+
7+
---
8+
9+
# Using Hardhat with Mint
10+
11+
To configure [Hardhat](https://hardhat.org/) to deploy smart contracts to Mint, update your project’s `hardhat.config.ts` file by adding Mint as a network:
12+
13+
```typescript
14+
networks: {
15+
// for mainnet
16+
"mint-mainnet": {
17+
url: "Coming Soon",
18+
accounts: [process.env.PRIVATE_KEY as string],
19+
gasPrice: 1000000000,
20+
},
21+
// for Sepolia testnet
22+
"mint-sepolia": {
23+
url: "https://testnet-rpc.mintchain.io",
24+
accounts: [process.env.PRIVATE_KEY as string]
25+
gasPrice: 1000000000,
26+
},
27+
// for local dev environment
28+
"mint-local": {
29+
url: "http://localhost:8545",
30+
accounts: [process.env.PRIVATE_KEY as string],
31+
gasPrice: 1000000000,
32+
},
33+
},
34+
defaultNetwork: "mint-local",
35+
```

‎pages/deploy/use-remix.mdx

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Remix
2+
3+
import { Callout } from "nextra/components";
4+
5+
<Callout type="warning">
6+
If you are using Remix to deploy your contracts to Mint Testnet, please set
7+
your solidity compiler version to less than 0.8.20.
8+
</Callout>
9+
10+
[The Remix Project](https://remix-project.org/) is a rich toolset that can be used for the entire journey of contract development by users of any knowledge level, and as a learning lab for teaching and experimenting with Ethereum.
11+
12+
## Testnet
13+
14+
In case you haven't added Mint Network to your wallet yet, click on the icon next to the <img style={{display: 'inline-block'}} src="/assets/remix-env.jpg" alt="Remix button" /> label. This will take you to Chainlist's website where you can look up Mint Mainnet and Testnet settings and add them to your wallet.
15+
16+
<br />
17+
<div style={{ textAlign: "center", borderRadius: 4, overflow: "hidden" }}>
18+
<img src="/assets/remix-1.jpg" alt="Use remix" />
19+
</div>

0 commit comments

Comments
 (0)