Gin*_*hon 8 truffle rsk hardhat
我打算在Hardhat中开发我的智能合约,并在 RSK regtest 本地节点上测试它们。我找到了Truffle regtest 配置。
development: {
host: "127.0.0.1",
port: 4444,
network_id: "*"
},
Run Code Online (Sandbox Code Playgroud)
hardhat.config.js在 RSK regtest 上运行测试需要什么配置?
要在 RSK regtest 上部署和测试您的智能合约,您hardhat.config.js应该如下所示:
/**
* @type import('hardhat/config').HardhatUserConfig
*/
require("@nomiclabs/hardhat-waffle");
module.exports = {
solidity: "0.7.3",
defaultNetwork: "rskregtest",
networks: {
rskregtest: {
url: "http://localhost:4444/",
},
},
};
Run Code Online (Sandbox Code Playgroud)
然后您就可以通过在终端中输入来运行测试
% npx hardhat test
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
316 次 |
| 最近记录: |