关于智能合约
如果我将合同部署在测试网中,它将保留在测试网中,还是必须一遍又一遍地通过测试网部署它才能测试合同?
我所做的是,我将合同部署在测试网中,并且可以一遍又一遍地部署它,它并不显示任何警告或“合同已经存在”之类的东西。那就是为什么我感到困惑,还可以吗?一遍又一遍地通过测试网部署合同?
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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这取决于您的测试脚本是如何编写的。但通常的方法是在模拟器上测试合约(例如 Ganache 或 Hardhat) - 不是公共测试网,并在每个测试用例之前重新部署合约。
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.