Overview
ETH Balance
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Multichain Info
No addresses found
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0xcb16addadde824a0f9349756a353c7e51596ca60dd62e8e12c31259c8c80f395 | - | (pending) | 6 days ago | IN | 0.000029 ETH | (Pending) | |||
On Chain GM | 14228544 | 6 mins ago | IN | 0.000029 ETH | 0.00000293 | ||||
On Chain GM | 14228172 | 39 mins ago | IN | 0.000029 ETH | 0.00000249 | ||||
On Chain GM | 14227972 | 1 hr ago | IN | 0.000029 ETH | 0.00000289 | ||||
On Chain GM | 14227574 | 1 hr ago | IN | 0.000029 ETH | 0.00000413 | ||||
On Chain GM | 14227181 | 2 hrs ago | IN | 0.000029 ETH | 0.00000241 | ||||
On Chain GM | 14227072 | 2 hrs ago | IN | 0.000029 ETH | 0.00000253 | ||||
On Chain GM | 14226885 | 2 hrs ago | IN | 0.000029 ETH | 0.00000246 | ||||
On Chain GM | 14226731 | 2 hrs ago | IN | 0.000029 ETH | 0.00000235 | ||||
On Chain GM | 14224855 | 4 hrs ago | IN | 0.000029 ETH | 0.00000351 | ||||
On Chain GM | 14224557 | 5 hrs ago | IN | 0.000029 ETH | 0.00000192 | ||||
On Chain GM | 14223872 | 5 hrs ago | IN | 0.000029 ETH | 0.00000351 | ||||
On Chain GM | 14223715 | 6 hrs ago | IN | 0.000029 ETH | 0.00000283 | ||||
On Chain GM | 14223565 | 6 hrs ago | IN | 0.000029 ETH | 0.00000243 | ||||
On Chain GM | 14223276 | 6 hrs ago | IN | 0.000029 ETH | 0.00000254 | ||||
On Chain GM | 14222987 | 7 hrs ago | IN | 0.000029 ETH | 0.00000242 | ||||
On Chain GM | 14221620 | 8 hrs ago | IN | 0.000029 ETH | 0.00000205 | ||||
On Chain GM | 14221608 | 8 hrs ago | IN | 0.000029 ETH | 0.00000215 | ||||
On Chain GM | 14220653 | 9 hrs ago | IN | 0.000029 ETH | 0.00000172 | ||||
On Chain GM | 14220106 | 10 hrs ago | IN | 0.000029 ETH | 0.00001654 | ||||
On Chain GM | 14220088 | 10 hrs ago | IN | 0.000029 ETH | 0.0000017 | ||||
On Chain GM | 14219929 | 10 hrs ago | IN | 0.000029 ETH | 0.00000231 | ||||
On Chain GM | 14217164 | 14 hrs ago | IN | 0.000029 ETH | 0.00000163 | ||||
On Chain GM | 14216485 | 15 hrs ago | IN | 0.000029 ETH | 0.00000296 | ||||
On Chain GM | 14215827 | 15 hrs ago | IN | 0.000029 ETH | 0.00000175 |
Latest 25 internal transactions (View All)
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
14228544 | 6 mins ago | 0.000029 ETH | ||||
14228172 | 39 mins ago | 0.000029 ETH | ||||
14227972 | 1 hr ago | 0.000029 ETH | ||||
14227574 | 1 hr ago | 0.000029 ETH | ||||
14227181 | 2 hrs ago | 0.000029 ETH | ||||
14227072 | 2 hrs ago | 0.000029 ETH | ||||
14226885 | 2 hrs ago | 0.000029 ETH | ||||
14226731 | 2 hrs ago | 0.000029 ETH | ||||
14224855 | 4 hrs ago | 0.000029 ETH | ||||
14224557 | 5 hrs ago | 0.000029 ETH | ||||
14223872 | 5 hrs ago | 0.000029 ETH | ||||
14223715 | 6 hrs ago | 0.000029 ETH | ||||
14223565 | 6 hrs ago | 0.000029 ETH | ||||
14223276 | 6 hrs ago | 0.000029 ETH | ||||
14222987 | 7 hrs ago | 0.000029 ETH | ||||
14221620 | 8 hrs ago | 0.000029 ETH | ||||
14221608 | 8 hrs ago | 0.000029 ETH | ||||
14220653 | 9 hrs ago | 0.000029 ETH | ||||
14220106 | 10 hrs ago | 0.000029 ETH | ||||
14220088 | 10 hrs ago | 0.000029 ETH | ||||
14219929 | 10 hrs ago | 0.000029 ETH | ||||
14217164 | 14 hrs ago | 0.000029 ETH | ||||
14216485 | 15 hrs ago | 0.000029 ETH | ||||
14215827 | 15 hrs ago | 0.000029 ETH | ||||
14215022 | 16 hrs ago | 0.000029 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
OnChainGM
Compiler Version
v0.8.28+commit.7893614a
Contract Source Code (Solidity)
/** *Submitted for verification at scrollscan.com on 2025-03-02 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.28; contract OnChainGM { // Immutable variables don't use storage slots address public immutable feeRecipient; uint256 public immutable GM_FEE; uint256 public constant TIME_LIMIT = 24 hours; // Mapping to store last GM timestamp for each user mapping(address => uint256) public lastGMTimestamp; // Event for tracking GMs event OnChainGMEvent(address indexed sender); constructor() { feeRecipient = 0x7500A83DF2aF99B2755c47B6B321a8217d876a85; GM_FEE = 0.000029 ether; } // Gas optimized GM function with timestamp check function onChainGM() external payable { if (msg.value != GM_FEE) { revert("Incorrect ETH fee"); } // Check if 24 hours have passed since last GM if (!(block.timestamp >= lastGMTimestamp[msg.sender] + TIME_LIMIT || lastGMTimestamp[msg.sender] == 0)) { revert("Wait 24 hours"); } // Update last GM timestamp lastGMTimestamp[msg.sender] = block.timestamp; // Transfer fee after all checks (bool success,) = feeRecipient.call{value: msg.value}(""); if (!success) { revert("Fee transfer failed"); } emit OnChainGMEvent(msg.sender); } // View function to check remaining time function timeUntilNextGM(address user) external view returns (uint256) { if (lastGMTimestamp[user] == 0) return 0; uint256 timePassed = block.timestamp - lastGMTimestamp[user]; if (timePassed >= TIME_LIMIT) return 0; return TIME_LIMIT - timePassed; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"OnChainGMEvent","type":"event"},{"inputs":[],"name":"GM_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TIME_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastGMTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"onChainGM","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"timeUntilNextGM","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60c0604052348015600e575f5ffd5b50737500a83df2af99b2755c47b6b321a8217d876a85608052651a6016b2d00060a05260805160a05161050561005f5f395f818161014d015261017101525f8181607801526102c401526105055ff3fe608060405260043610610063575f3560e01c80636bb6979f116100415780636bb6979f146100f25780638928a1d614610111578063e3ea4c4d1461013c575f5ffd5b806346904840146100675780635011b71c146100c4578063698224ae146100ce575b5f5ffd5b348015610072575f5ffd5b5061009a7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6100cc61016f565b005b3480156100d9575f5ffd5b506100e46201518081565b6040519081526020016100bb565b3480156100fd575f5ffd5b506100e461010c366004610443565b6103ba565b34801561011c575f5ffd5b506100e461012b366004610443565b5f6020819052908152604090205481565b348015610147575f5ffd5b506100e47f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000034146101fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f496e636f7272656374204554482066656500000000000000000000000000000060448201526064015b60405180910390fd5b335f9081526020819052604090205461021a9062015180906104a3565b421015806102345750335f90815260208190526040902054155b61029a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f5761697420323420686f7572730000000000000000000000000000000000000060448201526064016101f4565b335f908152602081905260408082204290555173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169034908381818185875af1925050503d805f811461031d576040519150601f19603f3d011682016040523d82523d5f602084013e610322565b606091505b505090508061038d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f466565207472616e73666572206661696c65640000000000000000000000000060448201526064016101f4565b60405133907f2c87d8ee91bb31c46c18656ab95c2c8175461ed9884084ef1ac6d7d029ac815b905f90a250565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526020819052604081205481036103ec57505f919050565b73ffffffffffffffffffffffffffffffffffffffff82165f9081526020819052604081205461041b90426104bc565b905062015180811061042f57505f92915050565b61043c81620151806104bc565b9392505050565b5f60208284031215610453575f5ffd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461043c575f5ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b808201808211156104b6576104b6610476565b92915050565b818103818111156104b6576104b661047656fea26469706673582212202054c800c3f02c21f76e4400c140993d6c5c3906ce21c2819edd241dff9aa20364736f6c634300081c0033
Deployed Bytecode
0x608060405260043610610063575f3560e01c80636bb6979f116100415780636bb6979f146100f25780638928a1d614610111578063e3ea4c4d1461013c575f5ffd5b806346904840146100675780635011b71c146100c4578063698224ae146100ce575b5f5ffd5b348015610072575f5ffd5b5061009a7f0000000000000000000000007500a83df2af99b2755c47b6b321a8217d876a8581565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6100cc61016f565b005b3480156100d9575f5ffd5b506100e46201518081565b6040519081526020016100bb565b3480156100fd575f5ffd5b506100e461010c366004610443565b6103ba565b34801561011c575f5ffd5b506100e461012b366004610443565b5f6020819052908152604090205481565b348015610147575f5ffd5b506100e47f00000000000000000000000000000000000000000000000000001a6016b2d00081565b7f00000000000000000000000000000000000000000000000000001a6016b2d00034146101fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f496e636f7272656374204554482066656500000000000000000000000000000060448201526064015b60405180910390fd5b335f9081526020819052604090205461021a9062015180906104a3565b421015806102345750335f90815260208190526040902054155b61029a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f5761697420323420686f7572730000000000000000000000000000000000000060448201526064016101f4565b335f908152602081905260408082204290555173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000007500a83df2af99b2755c47b6b321a8217d876a85169034908381818185875af1925050503d805f811461031d576040519150601f19603f3d011682016040523d82523d5f602084013e610322565b606091505b505090508061038d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f466565207472616e73666572206661696c65640000000000000000000000000060448201526064016101f4565b60405133907f2c87d8ee91bb31c46c18656ab95c2c8175461ed9884084ef1ac6d7d029ac815b905f90a250565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526020819052604081205481036103ec57505f919050565b73ffffffffffffffffffffffffffffffffffffffff82165f9081526020819052604081205461041b90426104bc565b905062015180811061042f57505f92915050565b61043c81620151806104bc565b9392505050565b5f60208284031215610453575f5ffd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461043c575f5ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b808201808211156104b6576104b6610476565b92915050565b818103818111156104b6576104b661047656fea26469706673582212202054c800c3f02c21f76e4400c140993d6c5c3906ce21c2819edd241dff9aa20364736f6c634300081c0033
Deployed Bytecode Sourcemap
61:1709:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;139:37;;;;;;;;;;;;;;;;;;190:42:1;178:55;;;160:74;;148:2;133:18;139:37:0;;;;;;;;678:720;;;:::i;:::-;;221:45;;;;;;;;;;;;258:8;221:45;;;;;391:25:1;;;379:2;364:18;221:45:0;245:177:1;1456:311:0;;;;;;;;;;-1:-1:-1;1456:311:0;;;;;:::i;:::-;;:::i;336:50::-;;;;;;;;;;-1:-1:-1;336:50:0;;;;;:::i;:::-;;;;;;;;;;;;;;;183:31;;;;;;;;;;;;;;;678:720;744:6;731:9;:19;727:79;;767:27;;;;;943:2:1;767:27:0;;;925:21:1;982:2;962:18;;;955:30;1021:19;1001:18;;;994:47;1058:18;;767:27:0;;;;;;;;727:79;923:10;907:15;:27;;;;;;;;;;;:40;;258:8;;907:40;:::i;:::-;888:15;:59;;:95;;;-1:-1:-1;967:10:0;951:15;:27;;;;;;;;;;;:32;888:95;882:154;;1001:23;;;;;1608:2:1;1001:23:0;;;1590:21:1;1647:2;1627:18;;;1620:30;1686:15;1666:18;;;1659:43;1719:18;;1001:23:0;1406:337:1;882:154:0;1109:10;1093:15;:27;;;;;;;;;;;1123:15;1093:45;;1219:39;1093:27;1219:12;:17;;1244:9;;1093:15;1219:39;1093:15;1219:39;1244:9;1219:17;:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1201:57;;;1274:7;1269:70;;1298:29;;;;;2160:2:1;1298:29:0;;;2142:21:1;2199:2;2179:18;;;2172:30;2238:21;2218:18;;;2211:49;2277:18;;1298:29:0;1958:343:1;1269:70:0;1364:26;;1379:10;;1364:26;;;;;716:682;678:720::o;1456:311::-;1542:21;;;1518:7;1542:21;;;;;;;;;;;:26;;1538:40;;-1:-1:-1;1577:1:0;;1456:311;-1:-1:-1;1456:311:0:o;1538:40::-;1638:21;;;1599:18;1638:21;;;;;;;;;;;1620:39;;:15;:39;:::i;:::-;1599:60;;258:8;1674:10;:24;1670:38;;-1:-1:-1;1707:1:0;;1456:311;-1:-1:-1;;1456:311:0:o;1670:38::-;1736:23;1749:10;258:8;1736:23;:::i;:::-;1729:30;1456:311;-1:-1:-1;;;1456:311:0:o;427:309:1:-;486:6;539:2;527:9;518:7;514:23;510:32;507:52;;;555:1;552;545:12;507:52;594:9;581:23;644:42;637:5;633:54;626:5;623:65;613:93;;702:1;699;692:12;1087:184;1139:77;1136:1;1129:88;1236:4;1233:1;1226:15;1260:4;1257:1;1250:15;1276:125;1341:9;;;1362:10;;;1359:36;;;1375:18;;:::i;:::-;1276:125;;;;:::o;2306:128::-;2373:9;;;2394:11;;;2391:37;;;2408:18;;:::i
Swarm Source
ipfs://2054c800c3f02c21f76e4400c140993d6c5c3906ce21c2819edd241dff9aa203
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.