MNT Price: $0.71 (+1.55%)

Contract

0xB8Af4Fa4FEABaa02A09d146E4F871eA4a0a41C04
 

Overview

MNT Balance

Mantle Mainnet Network LogoMantle Mainnet Network LogoMantle Mainnet Network Logo0 MNT

MNT Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Boost786302762025-04-23 6:47:442 mins ago1745390864IN
0xB8Af4Fa4...4a0a41C04
0 MNT0.002181580.02
Boost786302392025-04-23 6:46:303 mins ago1745390790IN
0xB8Af4Fa4...4a0a41C04
0 MNT0.003211430.03
Boost786301432025-04-23 6:43:186 mins ago1745390598IN
0xB8Af4Fa4...4a0a41C04
0 MNT0.002205460.0202
Boost786300882025-04-23 6:41:288 mins ago1745390488IN
0xB8Af4Fa4...4a0a41C04
0 MNT0.004271970.04
Boost786300692025-04-23 6:40:509 mins ago1745390450IN
0xB8Af4Fa4...4a0a41C04
0 MNT0.002202990.02
Boost786298852025-04-23 6:34:4215 mins ago1745390082IN
0xB8Af4Fa4...4a0a41C04
0 MNT0.002204480.02
Boost786297792025-04-23 6:31:1019 mins ago1745389870IN
0xB8Af4Fa4...4a0a41C04
0 MNT0.003292890.03
Boost786297512025-04-23 6:30:1420 mins ago1745389814IN
0xB8Af4Fa4...4a0a41C04
0 MNT0.002217760.02
Boost786296852025-04-23 6:28:0222 mins ago1745389682IN
0xB8Af4Fa4...4a0a41C04
0 MNT0.002208140.02
Boost786292302025-04-23 6:12:5237 mins ago1745388772IN
0xB8Af4Fa4...4a0a41C04
0 MNT0.002170510.02
Boost786292042025-04-23 6:12:0038 mins ago1745388720IN
0xB8Af4Fa4...4a0a41C04
0 MNT0.002176150.02
Boost786290422025-04-23 6:06:3643 mins ago1745388396IN
0xB8Af4Fa4...4a0a41C04
0 MNT0.002142480.02
Boost786288442025-04-23 6:00:0050 mins ago1745388000IN
0xB8Af4Fa4...4a0a41C04
0 MNT0.002127290.02
Boost786287662025-04-23 5:57:2452 mins ago1745387844IN
0xB8Af4Fa4...4a0a41C04
0 MNT0.002158370.0202
Boost786285672025-04-23 5:50:461 hrs ago1745387446IN
0xB8Af4Fa4...4a0a41C04
0 MNT0.003193350.03
Boost786284412025-04-23 5:46:341 hr ago1745387194IN
0xB8Af4Fa4...4a0a41C04
0 MNT0.004226990.04
Boost786283462025-04-23 5:43:241 hr ago1745387004IN
0xB8Af4Fa4...4a0a41C04
0 MNT0.00214880.02
Boost786282342025-04-23 5:39:401 hr ago1745386780IN
0xB8Af4Fa4...4a0a41C04
0 MNT0.002000480.02
Boost786281112025-04-23 5:35:341 hr ago1745386534IN
0xB8Af4Fa4...4a0a41C04
0 MNT0.003200530.03
Boost786280902025-04-23 5:34:521 hr ago1745386492IN
0xB8Af4Fa4...4a0a41C04
0 MNT0.003214680.03
Boost786280492025-04-23 5:33:301 hr ago1745386410IN
0xB8Af4Fa4...4a0a41C04
0 MNT0.002158920.02
Boost786279392025-04-23 5:29:501 hr ago1745386190IN
0xB8Af4Fa4...4a0a41C04
0 MNT0.004253180.04
Boost786278312025-04-23 5:26:141 hr ago1745385974IN
0xB8Af4Fa4...4a0a41C04
0 MNT0.002154930.02
Boost786273572025-04-23 5:10:261 hr ago1745385026IN
0xB8Af4Fa4...4a0a41C04
0 MNT0.002150250.02
Boost786273172025-04-23 5:09:061 hr ago1745384946IN
0xB8Af4Fa4...4a0a41C04
0 MNT0.003203610.03
View all transactions

Advanced mode:
Parent Transaction Hash Block From To
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
AstraGameBooster

Compiler Version
v0.8.26+commit.8a97fa7a

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at mantlescan.xyz on 2024-07-10
*/

// SPDX-License-Identifier: MIT
pragma solidity >=0.8.2 <0.9.0;

contract AstraGameBooster {
    struct BoostData {
        uint256 latestBoostTime;
        uint256 boostCount;
        uint256 consecutiveDays;
    }
    mapping(address => BoostData) private users;

    event GameBoost(address indexed sender, uint256 boostCount, uint256 consecutiveDays, uint256 latestBoostTime);

    // 24 hours (in seconds)
    uint256 private constant BOOST_INTERVAL = 24 * 60 * 60;

    uint256 public participantCount;

    function boost() public returns (uint256 latestBoostTime, uint256 boostCount, uint256 consecutiveDays) {
        address currentUser = msg.sender;
        BoostData storage user = users[currentUser];

        require(
            user.latestBoostTime == 0 || block.timestamp >= user.latestBoostTime + BOOST_INTERVAL,
            "AstraGameBoost available only once every 24 hours."
        );

        if (user.boostCount == 0) {
            participantCount++;
        }

        // Calculate consecutive days
        if (block.timestamp < user.latestBoostTime + 2 * BOOST_INTERVAL) {
            user.consecutiveDays++;
        } else {
            user.consecutiveDays = 1;
        }
        user.latestBoostTime = block.timestamp;
        user.boostCount++;

        emit GameBoost(currentUser, user.boostCount, user.consecutiveDays, block.timestamp);

        return (user.latestBoostTime, user.boostCount, user.consecutiveDays);
    }

    function userGameBoost(
        address userAddress
    ) public view returns (uint256 latestBoostTime, uint256 boostCount, uint256 consecutiveDays) {
        BoostData storage user = users[userAddress];
        return (user.latestBoostTime, user.boostCount, user.consecutiveDays);
    }
}

Contract Security Audit

Contract ABI

API
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"boostCount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"consecutiveDays","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"latestBoostTime","type":"uint256"}],"name":"GameBoost","type":"event"},{"inputs":[],"name":"boost","outputs":[{"internalType":"uint256","name":"latestBoostTime","type":"uint256"},{"internalType":"uint256","name":"boostCount","type":"uint256"},{"internalType":"uint256","name":"consecutiveDays","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"participantCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"}],"name":"userGameBoost","outputs":[{"internalType":"uint256","name":"latestBoostTime","type":"uint256"},{"internalType":"uint256","name":"boostCount","type":"uint256"},{"internalType":"uint256","name":"consecutiveDays","type":"uint256"}],"stateMutability":"view","type":"function"}]

6080604052348015600e575f80fd5b506105708061001c5f395ff3fe608060405234801561000f575f80fd5b506004361061003f575f3560e01c8063362f04c01461004357806349cd2acb14610061578063a66f42c014610093575b5f80fd5b61004b6100b3565b60405161005891906102dd565b60405180910390f35b61007b60048036038101906100769190610354565b6100b9565b60405161008a9392919061037f565b60405180910390f35b61009b610117565b6040516100aa9392919061037f565b60405180910390f35b60015481565b5f805f805f808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f209050805f015481600101548260020154935093509350509193909250565b5f805f803390505f805f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2090505f815f0154148061017f575062015180815f015461017b91906103e1565b4210155b6101be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101b590610494565b60405180910390fd5b5f8160010154036101e15760015f8154809291906101db906104b2565b91905055505b6201518060026101f191906104f9565b815f01546101ff91906103e1565b42101561022457806002015f81548092919061021a906104b2565b919050555061022f565b600181600201819055505b42815f0181905550806001015f81548092919061024b906104b2565b91905055508173ffffffffffffffffffffffffffffffffffffffff167ffdf41324b9480de20f4da06d5ea907dab34706e8c091e0afa10816d9280f111382600101548360020154426040516102a29392919061037f565b60405180910390a2805f0154816001015482600201549450945094505050909192565b5f819050919050565b6102d7816102c5565b82525050565b5f6020820190506102f05f8301846102ce565b92915050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610323826102fa565b9050919050565b61033381610319565b811461033d575f80fd5b50565b5f8135905061034e8161032a565b92915050565b5f60208284031215610369576103686102f6565b5b5f61037684828501610340565b91505092915050565b5f6060820190506103925f8301866102ce565b61039f60208301856102ce565b6103ac60408301846102ce565b949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6103eb826102c5565b91506103f6836102c5565b925082820190508082111561040e5761040d6103b4565b5b92915050565b5f82825260208201905092915050565b7f417374726147616d65426f6f737420617661696c61626c65206f6e6c79206f6e5f8201527f636520657665727920323420686f7572732e0000000000000000000000000000602082015250565b5f61047e603283610414565b915061048982610424565b604082019050919050565b5f6020820190508181035f8301526104ab81610472565b9050919050565b5f6104bc826102c5565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036104ee576104ed6103b4565b5b600182019050919050565b5f610503826102c5565b915061050e836102c5565b925082820261051c816102c5565b91508282048414831517610533576105326103b4565b5b509291505056fea2646970667358221220ecf044dfb71f77b2d921f55a2c7f82835c12ec0bcfe93d49f88482ccd2b504a564736f6c634300081a0033

Deployed Bytecode

0x608060405234801561000f575f80fd5b506004361061003f575f3560e01c8063362f04c01461004357806349cd2acb14610061578063a66f42c014610093575b5f80fd5b61004b6100b3565b60405161005891906102dd565b60405180910390f35b61007b60048036038101906100769190610354565b6100b9565b60405161008a9392919061037f565b60405180910390f35b61009b610117565b6040516100aa9392919061037f565b60405180910390f35b60015481565b5f805f805f808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f209050805f015481600101548260020154935093509350509193909250565b5f805f803390505f805f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2090505f815f0154148061017f575062015180815f015461017b91906103e1565b4210155b6101be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101b590610494565b60405180910390fd5b5f8160010154036101e15760015f8154809291906101db906104b2565b91905055505b6201518060026101f191906104f9565b815f01546101ff91906103e1565b42101561022457806002015f81548092919061021a906104b2565b919050555061022f565b600181600201819055505b42815f0181905550806001015f81548092919061024b906104b2565b91905055508173ffffffffffffffffffffffffffffffffffffffff167ffdf41324b9480de20f4da06d5ea907dab34706e8c091e0afa10816d9280f111382600101548360020154426040516102a29392919061037f565b60405180910390a2805f0154816001015482600201549450945094505050909192565b5f819050919050565b6102d7816102c5565b82525050565b5f6020820190506102f05f8301846102ce565b92915050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610323826102fa565b9050919050565b61033381610319565b811461033d575f80fd5b50565b5f8135905061034e8161032a565b92915050565b5f60208284031215610369576103686102f6565b5b5f61037684828501610340565b91505092915050565b5f6060820190506103925f8301866102ce565b61039f60208301856102ce565b6103ac60408301846102ce565b949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6103eb826102c5565b91506103f6836102c5565b925082820190508082111561040e5761040d6103b4565b5b92915050565b5f82825260208201905092915050565b7f417374726147616d65426f6f737420617661696c61626c65206f6e6c79206f6e5f8201527f636520657665727920323420686f7572732e0000000000000000000000000000602082015250565b5f61047e603283610414565b915061048982610424565b604082019050919050565b5f6020820190508181035f8301526104ab81610472565b9050919050565b5f6104bc826102c5565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036104ee576104ed6103b4565b5b600182019050919050565b5f610503826102c5565b915061050e836102c5565b925082820261051c816102c5565b91508282048414831517610533576105326103b4565b5b509291505056fea2646970667358221220ecf044dfb71f77b2d921f55a2c7f82835c12ec0bcfe93d49f88482ccd2b504a564736f6c634300081a0033

Deployed Bytecode Sourcemap

68:1732:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;492:31;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1505:292;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;532:965;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;492:31;;;;:::o;1505:292::-;1586:23;1611:18;1631:23;1667:22;1692:5;:18;1698:11;1692:18;;;;;;;;;;;;;;;1667:43;;1729:4;:20;;;1751:4;:15;;;1768:4;:20;;;1721:68;;;;;;;1505:292;;;;;:::o;532:965::-;565:23;590:18;610:23;646:19;668:10;646:32;;689:22;714:5;:18;720:11;714:18;;;;;;;;;;;;;;;689:43;;791:1;767:4;:20;;;:25;:85;;;;471:12;815:4;:20;;;:37;;;;:::i;:::-;796:15;:56;;767:85;745:185;;;;;;;;;;;;:::i;:::-;;;;;;;;;966:1;947:4;:15;;;:20;943:71;;984:16;;:18;;;;;;;;;:::i;:::-;;;;;;943:71;471:12;1110:1;:18;;;;:::i;:::-;1087:4;:20;;;:41;;;;:::i;:::-;1069:15;:59;1065:171;;;1145:4;:20;;;:22;;;;;;;;;:::i;:::-;;;;;;1065:171;;;1223:1;1200:4;:20;;:24;;;;1065:171;1269:15;1246:4;:20;;:38;;;;1295:4;:15;;;:17;;;;;;;;;:::i;:::-;;;;;;1340:11;1330:78;;;1353:4;:15;;;1370:4;:20;;;1392:15;1330:78;;;;;;;;:::i;:::-;;;;;;;;1429:4;:20;;;1451:4;:15;;;1468:4;:20;;;1421:68;;;;;;;;532:965;;;:::o;7:77:1:-;44:7;73:5;62:16;;7:77;;;:::o;90:118::-;177:24;195:5;177:24;:::i;:::-;172:3;165:37;90:118;;:::o;214:222::-;307:4;345:2;334:9;330:18;322:26;;358:71;426:1;415:9;411:17;402:6;358:71;:::i;:::-;214:222;;;;:::o;523:117::-;632:1;629;622:12;769:126;806:7;846:42;839:5;835:54;824:65;;769:126;;;:::o;901:96::-;938:7;967:24;985:5;967:24;:::i;:::-;956:35;;901:96;;;:::o;1003:122::-;1076:24;1094:5;1076:24;:::i;:::-;1069:5;1066:35;1056:63;;1115:1;1112;1105:12;1056:63;1003:122;:::o;1131:139::-;1177:5;1215:6;1202:20;1193:29;;1231:33;1258:5;1231:33;:::i;:::-;1131:139;;;;:::o;1276:329::-;1335:6;1384:2;1372:9;1363:7;1359:23;1355:32;1352:119;;;1390:79;;:::i;:::-;1352:119;1510:1;1535:53;1580:7;1571:6;1560:9;1556:22;1535:53;:::i;:::-;1525:63;;1481:117;1276:329;;;;:::o;1611:442::-;1760:4;1798:2;1787:9;1783:18;1775:26;;1811:71;1879:1;1868:9;1864:17;1855:6;1811:71;:::i;:::-;1892:72;1960:2;1949:9;1945:18;1936:6;1892:72;:::i;:::-;1974;2042:2;2031:9;2027:18;2018:6;1974:72;:::i;:::-;1611:442;;;;;;:::o;2059:180::-;2107:77;2104:1;2097:88;2204:4;2201:1;2194:15;2228:4;2225:1;2218:15;2245:191;2285:3;2304:20;2322:1;2304:20;:::i;:::-;2299:25;;2338:20;2356:1;2338:20;:::i;:::-;2333:25;;2381:1;2378;2374:9;2367:16;;2402:3;2399:1;2396:10;2393:36;;;2409:18;;:::i;:::-;2393:36;2245:191;;;;:::o;2442:169::-;2526:11;2560:6;2555:3;2548:19;2600:4;2595:3;2591:14;2576:29;;2442:169;;;;:::o;2617:237::-;2757:34;2753:1;2745:6;2741:14;2734:58;2826:20;2821:2;2813:6;2809:15;2802:45;2617:237;:::o;2860:366::-;3002:3;3023:67;3087:2;3082:3;3023:67;:::i;:::-;3016:74;;3099:93;3188:3;3099:93;:::i;:::-;3217:2;3212:3;3208:12;3201:19;;2860:366;;;:::o;3232:419::-;3398:4;3436:2;3425:9;3421:18;3413:26;;3485:9;3479:4;3475:20;3471:1;3460:9;3456:17;3449:47;3513:131;3639:4;3513:131;:::i;:::-;3505:139;;3232:419;;;:::o;3657:233::-;3696:3;3719:24;3737:5;3719:24;:::i;:::-;3710:33;;3765:66;3758:5;3755:77;3752:103;;3835:18;;:::i;:::-;3752:103;3882:1;3875:5;3871:13;3864:20;;3657:233;;;:::o;3896:410::-;3936:7;3959:20;3977:1;3959:20;:::i;:::-;3954:25;;3993:20;4011:1;3993:20;:::i;:::-;3988:25;;4048:1;4045;4041:9;4070:30;4088:11;4070:30;:::i;:::-;4059:41;;4249:1;4240:7;4236:15;4233:1;4230:22;4210:1;4203:9;4183:83;4160:139;;4279:18;;:::i;:::-;4160:139;3944:362;3896:410;;;;:::o

Swarm Source

ipfs://ecf044dfb71f77b2d921f55a2c7f82835c12ec0bcfe93d49f88482ccd2b504a5

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.