ETH Price: $2,551.69 (+2.59%)

Transaction Decoder

Block:
19238119 at Feb-16-2024 04:34:23 AM +UTC
Transaction Fee:
0.00096071428935939 ETH $2.45
Gas Used:
58,845 Gas / 16.326183862 Gwei

Emitted Events:

395 AxeCapProfitShare7.EthClaim( claimer=[Sender] 0x4583dffaa7a5e0302232313681561402910cf2f8, amount=49791793295149900 )

Account State Difference:

  Address   Before After State Difference Code
0x4583dfFA...2910cf2F8
5.990398328120451175 Eth
Nonce: 390
6.039229407126241685 Eth
Nonce: 391
0.04883107900579051
(beaverbuild)
13.017317255041797364 Eth13.017318155503169374 Eth0.00000090046137201
0xAb2c7743...aC0133177 3.594738580838720461 Eth3.544946787543570561 Eth0.0497917932951499

Execution Trace

AxeCapProfitShare7.CALL( )
  • ETH 0.0497917932951499 0x4583dffaa7a5e0302232313681561402910cf2f8.CALL( )
    // SPDX-License-Identifier: MIT
    pragma solidity ^0.8.0;
    contract AxeCapProfitShare7 {
        uint256 immutable public REVENUE_AMOUNT;
        address public owner;
        uint256 public totalSnapshotTokens;
        uint256 public snapshotTime;
        bool public isSnapshotLocked;
        bool public isFreezed; 
        mapping(address => uint256) public snapshotBalances;
        mapping(address => bool) public hasClaimed;
        event AxeSnapshotLock();
        event AxeSnapshotUnlock();
        event EthClaim(address indexed claimer, uint256 amount);
        event AdminWithdraw(uint256 amount);
        constructor () payable {
            owner = msg.sender;
            REVENUE_AMOUNT = msg.value;
        }
        modifier onlyOwner() {
            require(msg.sender == owner, "Caller is not the owner");
            _;
        }
    //  
        modifier after3Days() {
            require(block.timestamp > snapshotTime + 3 days , "Can only call after 3 days of snapshot");
            _;
        }
        function uploadSnapshot(address[] calldata users, uint256[] calldata balances) external onlyOwner {
            require(users.length == balances.length, "Arrays must be of equal length");
            // require(users.length <= 125, "Can only upload up to 125 addresses at a time");
            // note: should not have more than one user value
            for (uint256 i = 0; i < users.length; i++) {
                snapshotBalances[users[i]] += balances[i];
                totalSnapshotTokens += balances[i];
            }
        }
        function lockSnapshot() external onlyOwner {
            require(!isSnapshotLocked, "snapshot already locked");
            snapshotTime = block.timestamp;
            isSnapshotLocked = true;
            emit AxeSnapshotLock();
        }
        function freeze() external onlyOwner {
            require(!isFreezed, "Contract is already frozen");
            isFreezed = true;
            emit AxeSnapshotUnlock();
        }
        function claimETH() external {
            require(!isFreezed, "Contract is frozen");
            require(isSnapshotLocked, "Snapshot not yet locked");
            require(!hasClaimed[msg.sender], "You have already claimed your ETH");
            require(snapshotBalances[msg.sender] > 0, "You do not have any AXE tokens in the snapshot");
            uint256 claimableAmount = (REVENUE_AMOUNT * snapshotBalances[msg.sender]) / totalSnapshotTokens;
            // prevent reentrancy
            hasClaimed[msg.sender] = true;
            // see https://ethereum.stackexchange.com/questions/78124/is-transfer-still-safe-after-the-istanbul-update
            (bool isSuccess,) = msg.sender.call{value: claimableAmount}("");
            require(isSuccess, "Claim amount tranfer failed");
            emit EthClaim(msg.sender, claimableAmount);
        }
        // Function to withdraw unclaimed ETH after 7 days
        function withdrawUnclaimedETH() public onlyOwner after3Days {
            uint256 amount = address(this).balance;
            (bool success, ) = msg.sender.call{value: amount}("");
            require(success, "Withdraw failed");
            emit AdminWithdraw(amount);
        }
        receive() external payable {}
    }