Skip to content
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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

部署 univ3 #118

wants to merge 7 commits into from

Conversation

gpteth
Copy link

@gpteth gpteth commented Sep 4, 2024

Foundry部署 univ3

Copy link

vercel bot commented Sep 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
wtf-dapp ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 7, 2024 6:52am

@@ -0,0 +1,72 @@
# Uniswap V3 pool 合约部署
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应该是新建一个 T002_UniswapV3Deploy 这样的目录,单独放进去。然后再仓库的 readme 中添加对应的链接。算是一个独立的文档。


一、使用Foundry部署合约

1、安装Foundry
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没用 markdown 的语法吗?代码应该用 ``` 包起来


二、克隆合约代码仓库 git clone https://github.com/Uniswap/v3-core.git

1、添加 .env 文件
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.env 应该写成 .env 会好一点。

PRIVATE_KEY=0xadef625bf2530e93c80873d633fef9daa9adae04ca5f690663136c2c45033dd7
ETHERSCAN_API_KEY=6R9K4BAA2RHMRD5NXQB5YKKCNGQ8URW5Y8

2、添加foundry.toml 文件
Copy link
Collaborator

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合约池子
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 去掉开头不必要的空格
  • createPool 这样的内容加上 `
  • 中英文直接放一个空格


一、使用Foundry部署合约

1、安装Foundry
Copy link
Collaborator

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
Copy link
Collaborator

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 上链交易
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

整体内容还是太单薄了,要多一些解释

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants