关于智能合约

发布于 2025-01-18 11:24:54 字数 153 浏览 2 评论 0原文

如果我将合同部署在测试网中,它将保留在测试网中,还是必须一遍又一遍地通过测试网部署它才能测试合同?

我所做的是,我将合同部署在测试网中,并且可以一遍又一遍地部署它,它并不显示任何警告或“合同已经存在”之类的东西。那就是为什么我感到困惑,还可以吗?一遍又一遍地通过测试网部署合同?

If I deploy a contract in Test Net , Will it remain in the Test Net or I have to Deploy it VIA Test Net over and over to test The contract?

What I did, I deployed the contract In the Test Net and I can do deploy it over and over and it doesnot show any warning or something like "The Contract already exists". That is why I am confused, is it okay? To deploy the contract via Test Net over and over?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

稚然 2025-01-25 11:24:54

这取决于您的测试脚本是如何编写的。但通常的方法是在模拟器上测试合约(例如 GanacheHardhat) - 不是公共测试网,并在每个测试用例之前重新部署合约。

It depends on how your test script is written. But a usual approach is to test contracts on an emulator (e.g. Ganache or Hardhat) - not a public testnet, and redeploy the contract before each test case.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文