Smart contracts are programs stored on a blockchain that run when predetermined conditions are met. However, designing and implementing a smart contract is not trivial since upon deployment on a blockchain, it is no longer possible to modify it (neither for improving nor for bug fixing). It is only possible by deploying a new version of the smart contract which is costly (deployment cost for the new contract and destruction cost for the old contract). To this end, there are many solutions for testing the smart contracts before their deployment. Since realizing bug-free smart contracts increase the reliability, as well as reduce the cost, testing is an essential activity. In this paper, we group the existing solutions that attempt to tackle smart contract testing into following categories: public test networks, security analysis tools, blockchain emulators and blockchain simulators. Then, we analyze these solutions, categorize them and show what their pros and cons are.
翻译:智能合同是一种在事先确定的条件得到满足时运行的链条上的程序。然而,设计和实施智能合同并非微不足道,因为一旦在链条上部署,就不再可能修改它(既不是为了改进也不是为了纠正错误 ) 。 只有通过部署成本高昂的智能合同新版本(新合同的部署成本和旧合同的销毁成本) 才有可能。 为此,在部署之前测试智能合同有许多解决方案。 由于实现无虫智能合同提高了可靠性并降低了成本,测试是一项基本活动。 在本文中,我们把试图解决智能合同测试的现有解决方案分为以下类别:公共测试网络、安全分析工具、铁链模拟器和铁链模拟器。 然后,我们分析这些解决方案,将其分类并展示其利弊。