Created
March 19, 2022 19:11
-
-
Save PatrickAlphaC/df8697070357b653717cc8a2235c7026 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.7; | |
error TooLowValue(); | |
// https://rinkeby.etherscan.io/tx/0x7cb53c1814638d217d8030d24141dd64f97fe557480e9b60b7bcd28af5d87014 | |
// Deploy Cost: 113,341 | |
contract Test { | |
// https://rinkeby.etherscan.io/tx/0x0a4ea95262492b62f83a81970a709c62291d5c575cf522dcb48b9e8e5b399006 | |
// Failed: 21,473 | |
// https://rinkeby.etherscan.io/tx/0xb0122a3dc0d6b68bd8f7a0f7a931c61cf6cac5adb52d672a5f9805c89e5223ff | |
// Succeeded: 21,184 | |
function doStuff() public payable { | |
require(msg.value > 0, "Too Low Value"); | |
} | |
} | |
// https://rinkeby.etherscan.io/tx/0xd491fa2df760179e24c7f03bd8e2ccd5b2bba8ed54a8f087eb1cded8fbfd60ac | |
// Deploy Cost: 86,369 | |
contract Test2 { | |
// https://rinkeby.etherscan.io/tx/0x7d1e51e8dfcb5bec496a17836cc748a067d233ca8efe436505d6b266b7e70569 | |
// Failed: 21,219 | |
// https://rinkeby.etherscan.io/tx/0x48700738dd8138f470cadc2e8e32ccbe1f4172ea18d2068b880e545ce2812733 | |
// Succeeded: 21,184 | |
function doOtherStuff() public payable{ | |
if(msg.value <= 0) { | |
revert TooLowValue(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment