要连接到以太坊测试网,配置hardhat.config.js如下:
networks: {
ropsten: {
url: `https://eth-ropsten.alchemyapi.io/v2/${ALCHEMY_API_KEY}`,
accounts: [`${ROPSTEN_PRIVATE_KEY}`]
}
}
Run Code Online (Sandbox Code Playgroud)
(取自此处:https://hardhat.org/tutorial/deploying-to-a-live-network.html)
如何为 RSK 测试网添加网络配置?
(请注意,我使用种子短语而不是原始私钥)
我需要知道如何为我在 RSK 网络上的交易设置合适的天然气价格。我熟悉eth_gasPrice以太坊的方法:
$ curl https://public-node.testnet.rsk.co -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":1}'
{"jsonrpc":"2.0","id":1,"result":"0x3938700"}
Run Code Online (Sandbox Code Playgroud)
以上是否也推荐用于 RSK?