-
Notifications
You must be signed in to change notification settings - Fork 71
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
部署 univ3 #118
base: main
Are you sure you want to change the base?
部署 univ3 #118
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
demo-contract/Pool contract deploy
Outdated
@@ -0,0 +1,72 @@ | |||
# Uniswap V3 pool 合约部署 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
应该是新建一个 T002_UniswapV3Deploy 这样的目录,单独放进去。然后再仓库的 readme 中添加对应的链接。算是一个独立的文档。
demo-contract/Pool contract deploy
Outdated
|
||
一、使用Foundry部署合约 | ||
|
||
1、安装Foundry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没用 markdown 的语法吗?代码应该用 ``` 包起来
demo-contract/Pool contract deploy
Outdated
|
||
二、克隆合约代码仓库 git clone https://github.com/Uniswap/v3-core.git | ||
|
||
1、添加 .env 文件 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.env 应该写成 .env
会好一点。
demo-contract/Pool contract deploy
Outdated
PRIVATE_KEY=0xadef625bf2530e93c80873d633fef9daa9adae04ca5f690663136c2c45033dd7 | ||
ETHERSCAN_API_KEY=6R9K4BAA2RHMRD5NXQB5YKKCNGQ8URW5Y8 | ||
|
||
2、添加foundry.toml 文件 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
除了具体的步骤以外,要做一些说明和解释,每个文件是干嘛的,每个配置大概是干嘛,整体的逻辑大概是什么样的
@@ -0,0 +1,76 @@ | |||
# Uniswap V3 pool 合约部署 | |||
|
|||
UniswapV3Factory 合约主要用来创建不同代币对的流动性池子合约,合约的 createPool 函数new UniswapV3Pool 部署新池子合约。所以通过部署UniswapV3Factory来创建Pool合约池子 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 去掉开头不必要的空格
- createPool 这样的内容加上 `
- 中英文直接放一个空格
|
||
一、使用Foundry部署合约 | ||
|
||
1、安装Foundry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以简单介绍一下 Foundry
|
||
1、安装Foundry | ||
|
||
curl -L https://foundry.paradigm.xyz | bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
代码要用 ``` 框起来
|
||
最后运行命令进行部署 : | ||
|
||
forge script src/deploy.sol:Deploy --rpc-url $SEPOLIA_RPC_URL --private-key $PRIVATE_KEY --broadcast --verifier etherscan $ETHERSCAN_API_KEY -vvvv --verify // 部署Factory 上链交易 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
整体内容还是太单薄了,要多一些解释
Foundry部署 univ3