clean up from rebase

This commit is contained in:
Eric 2023-10-20 17:35:06 +11:00
parent f16ec78a61
commit 5d83ca4178
No known key found for this signature in database
2 changed files with 2 additions and 16 deletions

View File

@ -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)

View File

@ -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);
}
}