我打算在 Hardhat 中开发我的智能合约,并在 RSK regtest 本地节点上对其进行测试。我能够找到一个 Truffle regtest 配置。
development: {
host: "127.0.0.1",
port: 4444,
network_id: "*"
},
在 RSK regtest 上运行测试需要什么hardhat.config.js
配置?
要在 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/",
},
},
};
然后你就可以通过在终端中输入来运行你的测试了
% npx hardhat test