Ethereum 测试大米

Ethereum 测试大米,ethereum,solidity,truffle,Ethereum,Solidity,Truffle,我玩的是能够设置一个事务可以广播接受的最大价格的功能。检查以下各项: require(tx.gasprice <= gasPriceLimit * 1000000000); 预期的失败没有发生,因为ganache使用了默认的tx.gasprice。。我怎样才能确保我的测试用的是gasprice 谢谢 A.与此同时,我在truffle.js中设置了一个gasprice,然后玩gasPriceLimit来解决这个问题 await contract.mint({gasprice: txnGas

我玩的是能够设置一个事务可以广播接受的最大价格的功能。检查以下各项:

require(tx.gasprice <= gasPriceLimit * 1000000000);
预期的失败没有发生,因为ganache使用了默认的tx.gasprice。。我怎样才能确保我的测试用的是gasprice

谢谢
A.

与此同时,我在truffle.js中设置了一个gasprice,然后玩gasPriceLimit来解决这个问题

await contract.mint({gasprice: txnGasPrice});