mirror of
https://github.com/logos-storage/nim-ethers.git
synced 2026-01-09 09:03:08 +00:00
clean up from rebase
This commit is contained in:
parent
f16ec78a61
commit
5d83ca4178
@ -96,14 +96,5 @@ suite "Testing helpers - contracts":
|
||||
discard await provider.send("evm_revert", @[snapshot])
|
||||
await provider.close()
|
||||
|
||||
test "revert reason can be retrieved when transaction fails":
|
||||
let txResp = helpersContract.doRevert(
|
||||
revertReason,
|
||||
# override gasLimit to skip estimating gas
|
||||
TransactionOverrides(gasLimit: some 10000000.u256)
|
||||
)
|
||||
check await txResp.confirm(1).reverts(revertReason)
|
||||
|
||||
test "revert reason can be retrieved when estimate gas fails":
|
||||
let txResp = helpersContract.doRevert(revertReason)
|
||||
check await txResp.reverts(revertReason)
|
||||
test "revert works with provider":
|
||||
check await helpersContract.doRevert(revertReason).reverts(revertReason)
|
||||
|
||||
@ -21,9 +21,4 @@ contract TestToken is ERC20 {
|
||||
function myBalance() public view returns (uint256) {
|
||||
return balanceOf(msg.sender);
|
||||
}
|
||||
|
||||
function doRevert(string memory reason) public {
|
||||
// Revert every tx with given reason
|
||||
require(false, reason);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user