# 如何在zksync 2.0测试网上部署合约并拿到gitpoap **Published by:** [Newbee740](https://paragraph.com/@newbee740/) **Published on:** 2023-02-14 **URL:** https://paragraph.com/@newbee740/zksync-2-0-gitpoap ## Content 首先介绍一下基础环境,默认各位看官都拥有一个github账号并且熟悉基础git操作,和一个有goerli水的钱包地址及对应私钥.基础问题自行谷歌解决 打开L2研讨会项目的github地址. https://github.com/matter-labs/l2-intro-pre-ethdenver 下载代码 第一步,右上角点击fork,分叉该项目到自己的github仓库中 完成后会跳转到分叉后的项目中.在如下位置复制git仓库地址 clone到本地 git clone +复制的地址复制到本地(本地需安装好git环境,可自行谷歌解决) 部署合约 使用熟悉的代码编辑器打开项目文件夹,并做如下修改,私钥不需要0x开头 安装hardhat(需要npm环境和yarn管理包,自行谷歌解决) 编译项目 部署合约到测试网(会存在网络问题,多试几次),记住构造参数和合约地址 验证合约 在2.0测试网中搜索自己的合约地址 https://goerli.explorer.zksync.io/ 选择contract,会出现一个verify的按钮,点击它(忘截图了) 然后填好如下信息 源代码在Greeter.sol文件里 版本信息在hardhat.config.ts文件里 点击verify,验证成功后可以看到如下界面,可以连上自己钱包做几笔tx 申请gitpoap 合约做好后,在Deployments.md文件中按照格式添加一行 \合约地址\ 保存之后git三连,上传到git仓库里 git add. git commit -m “update“ git push 然后打开原项目方的仓库地址 https://github.com/matter-labs/l2-intro-pre-ethdenver 创建一个pr 点击Create pull request 继续 完成,等待审核 领取gitpoap 在该网站连接自己想领取gitpoap的钱包地址,然后连接刚刚使用的github地址 https://www.gitpoap.io/ 点击检查,需要等审核过后 结尾 点个关注,点个爱心,谢谢家人们了 https://twitter.com/newbee740 ## Publication Information - [Newbee740](https://paragraph.com/@newbee740/): Publication homepage - [All Posts](https://paragraph.com/@newbee740/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@newbee740): Subscribe to updates - [Twitter](https://twitter.com/Newbee740): Follow on Twitter