# zksync2.0 测试网部署合约 **Published by:** [taiyiyi](https://paragraph.com/@taiyiyi/) **Published on:** 2022-11-20 **URL:** https://paragraph.com/@taiyiyi/zksync2-0 ## Content 为了增强地址与 zksync 交互的 链上动作多样性,在测试网上部署合约是一个相对没有那么卷的行为 以下为部署教程具体操作 测试网部署合约需要账户有 Goerli 测试币 复制私钥是高风险操作,请确保自己电脑环境安全,建议不要用自己的主号进行操作: 声明:如果出现被盗事件请不要找我 https://replit.com/@kekeOuyang/fenghua1121 打开上面网站后,点击 Fork Repl (没登录的先登录) 修改 deploy/deploy.ts 文件的 12 行,将 wallet-private-key 改为自己的 eth 地址密钥 右侧栏选择 Shell 编辑框,里面执行 yarn hardhat deploy-zksync 出现提示输入 n, 然后等待 3-5分钟 (注意:这个时候把刚才填入的私钥删除以免此时有人 Fork 了你的代码会看到你的私钥) 成功后会显示 部署的合约地址 合约地址可以到区块浏览器中 https://goerli.explorer.zksync.io/ 查询 也可以选择下载到本地运行: ## Publication Information - [taiyiyi](https://paragraph.com/@taiyiyi/): Publication homepage - [All Posts](https://paragraph.com/@taiyiyi/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@taiyiyi): Subscribe to updates - [Twitter](https://twitter.com/ouyangkeke): Follow on Twitter