ETH Price: $2,181.51 (-5.83%)

Transaction Decoder

Block:
12759032 at Jul-04-2021 04:51:13 AM +UTC
Transaction Fee:
0.00083207 ETH $1.82
Gas Used:
83,207 Gas / 10 Gwei

Emitted Events:

290 ZildFinanceCoin.Transfer( from=[Receiver] Minter, to=[Sender] 0x8deb60b3a2cc5a2d40007ae9ec763b5830b2a237, value=251712017088089401 )
291 Minter.EventClaim( orderId=1411548122173272065, userAddress=[Sender] 0x8deb60b3a2cc5a2d40007ae9ec763b5830b2a237, amount=251712017088089401 )

Account State Difference:

  Address   Before After State Difference Code
0x006699d3...59A16B12B
(F2Pool Old)
2,234.134776542945048231 Eth2,234.135608612945048231 Eth0.00083207
0x8deb60b3...830B2A237
0.39955842812312128 Eth
Nonce: 22
0.39872635812312128 Eth
Nonce: 23
0.00083207
0xD31e8B5c...9baA8715F

Execution Trace

Minter.claim( orderId=1411548122173272065, amount=251712017088089401, deadline=1625633472, v=28, r=D993735B5DAC7EA7ECBC7D1CEFEE2482B13855D6AF134A6A586BB41C71F61DFB, s=7ADDE0242C86BA0C6A98314438A33B5DC42DFEBA84E7DD2003C820B4620F00E2 )
  • Null: 0x000...001.fe96618b( )
  • ZildFinanceCoin.transfer( to=0x8deb60b3a2cC5A2d40007AE9ec763b5830B2A237, amount=251712017088089401 ) => ( True )
    File 1 of 2: Minter
    pragma solidity 0.6.12;
    
    abstract contract Context {
        function _msgSender() internal view virtual returns (address payable) {
            return msg.sender;
        }
    
        function _msgData() internal view virtual returns (bytes memory) {
            this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
            return msg.data;
        }	
    }
    
    contract Ownable is Context {
        address private _owner;
        address public admin;
        address public dev;
        
        event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
    
        /**
         * @dev Initializes the contract setting the deployer as the initial owner.
         */
        constructor () internal {
            address msgSender = _msgSender();
            _owner = msgSender;
            emit OwnershipTransferred(address(0), msgSender);
        }
    
        /**
         * @dev Returns the address of the current owner.
         */
        function owner() public view returns (address) {
            return _owner;
        }
    
        /**
         * @dev Throws if called by any account other than the owner.
         */
        modifier onlyOwner() {
            require(_owner == _msgSender(), "Ownable: caller is not the owner");
            _;
        }
    
        function renounceOwnership() public virtual onlyOwner {
            emit OwnershipTransferred(_owner, address(0));
            _owner = address(0);
        }
    
        function transferOwnership(address newOwner) public virtual onlyOwner {
            require(newOwner != address(0), "Ownable: new owner is the zero address");
            emit OwnershipTransferred(_owner, newOwner);
            _owner = newOwner;
        }
    
        function setAdmin(address _admin) public onlyOwner {
            admin = _admin;
        }
    
        function setDev(address _dev) public onlyOwner {
            dev = _dev;
        }
        
        modifier onlyAdmin {
            require(msg.sender == admin || msg.sender == _owner);
            _;
        }
        
        modifier onlyDev {
            require(msg.sender == dev || msg.sender == admin || msg.sender == _owner);
            _;
        }    
    }
    
    library SafeMath {
    
        function add(uint256 a, uint256 b) internal pure returns (uint256) {
            uint256 c = a + b;
            require(c >= a, "SafeMath: addition overflow");
    
            return c;
        }
    
        function sub(uint256 a, uint256 b) internal pure returns (uint256) {
            return sub(a, b, "SafeMath: subtraction overflow");
        }
    
        function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
            require(b <= a, errorMessage);
            uint256 c = a - b;
    
            return c;
        }
    
        function mul(uint256 a, uint256 b) internal pure returns (uint256) {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) {
                return 0;
            }
    
            uint256 c = a * b;
            require(c / a == b, "SafeMath: multiplication overflow");
    
            return c;
        }
    
        function div(uint256 a, uint256 b) internal pure returns (uint256) {
            return div(a, b, "SafeMath: division by zero");
        }
    
        function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
            require(b > 0, errorMessage);
            uint256 c = a / b;
            // assert(a == b * c + a % b); // There is no case in which this doesn't hold
    
            return c;
        }
    
        function mod(uint256 a, uint256 b) internal pure returns (uint256) {
            return mod(a, b, "SafeMath: modulo by zero");
        }
    
       function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
            require(b != 0, errorMessage);
            return a % b;
        }
    }
    
    abstract contract ContractConn{
        function transfer(address _to, uint256 _value) virtual public;
        function balanceOf(address who) virtual public view returns (uint256);
    }
    
    
    
    contract Minter is Ownable {
    
        using SafeMath for uint256;
        
        uint256 public userMinted = 0;
        bool public checkDeadline = false;   
    
        mapping (uint256 => bool) public claimedOrderId;
        
        ContractConn public zild;   
        
        event EventUpdateCheckDeadline(bool newValue);
    
        event EventClaim(uint256 orderId, address userAddress,uint256 amount);
        
        constructor(address _token) public {
            zild = ContractConn(_token);
        }    
    
        function claim(uint256 orderId, uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public  {
            if(checkDeadline){
                require(deadline >= block.timestamp, "expired order");
            }
            
            require(claimedOrderId[orderId] == false, "already claimed");
          
            bytes32 hash1 = keccak256(
                abi.encode(
                    address(this),
                    msg.sender,
                    orderId,
                    amount,
                    deadline
                )
            );
    
            bytes32 hash2 = keccak256(
                abi.encodePacked(
                    "\x19Ethereum Signed Message:\n32",
                    hash1
                )
            );
    
            address signer = openzeppelin_recover(hash2, v, r, s);
    
            require(signer == dev, "invalid signer");
    
            zild.transfer(msg.sender,amount);
            userMinted = userMinted.add(amount);
            
            claimedOrderId[orderId] = true;
            emit EventClaim(orderId, msg.sender, amount);
        }
    
        // for special case
        function claimByAdmin(uint256 orderId, address _to, uint256 amount) public onlyAdmin {        
            require(claimedOrderId[orderId] == false, "already claimed");
            claimedOrderId[orderId] = true;   
            zild.transfer(_to,amount);
            userMinted = userMinted.add(amount);
            emit EventClaim(orderId, _to,amount);
        }
    
        function updateCheckDeadline(bool _checkDeadline) public onlyAdmin {        
            checkDeadline = _checkDeadline;
            emit EventUpdateCheckDeadline(_checkDeadline);
        } 
    
        /**
         *  openzeppelin-contracts/blob/master/contracts/cryptography/ECDSA.sol
         * @dev Overload of {ECDSA-recover-bytes32-bytes-} that receives the `v`,
         * `r` and `s` signature fields separately.
         */
        function openzeppelin_recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
            // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
            // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
            // the valid range for s in (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): v ∈ {27, 28}. Most
            // signatures from current libraries generate a unique signature with an s-value in the lower half order.
            //
            // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
            // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
            // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
            // these malleable signatures as well.
            require(uint256(s) <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0, "ECDSA: invalid signature 's' value");
            require(v == 27 || v == 28, "ECDSA: invalid signature 'v' value");
    
            // If the signature is valid (and not malleable), return the signer address
            address signer = ecrecover(hash, v, r, s);
            require(signer != address(0), "ECDSA: invalid signature");
    
            return signer;
        }
    }

    File 2 of 2: ZildFinanceCoin
    {"IERC20.sol":{"content":"pragma solidity 0.5.4;\r\n\r\ninterface IERC20 {\r\n\r\n    function balanceOf(address account) external view returns (uint256);\r\n    function transfer(address recipient, uint256 amount) external returns (bool);\r\n    function allowance(address owner, address spender) external view returns (uint256);\r\n    function approve(address spender, uint256 amount) external returns (bool);\r\n    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\r\n    event Transfer(address indexed from, address indexed to, uint256 value);\r\n    event Approval(address indexed owner, address indexed spender, uint256 value);\r\n\r\n}"},"Ownable.sol":{"content":"pragma solidity 0.5.4;\r\n\r\ncontract Ownable {\r\n\r\n    address private _owner;\r\n\r\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\r\n\r\n    constructor() internal {\r\n        _owner = msg.sender;\r\n        emit OwnershipTransferred(address(0), _owner);\r\n    }\r\n\r\n    function owner() public view returns (address) {\r\n        return _owner;\r\n    }\r\n\r\n    function isOwner() public view returns (bool) {\r\n        return msg.sender == _owner;\r\n    }\r\n\r\n    modifier onlyOwner() {\r\n        require(msg.sender == _owner, \"Ownable: caller is not the owner\");\r\n        _;\r\n    }\r\n\r\n    function transferOwnership(address newOwner) public onlyOwner {\r\n        require(newOwner != address(0), \"Ownable: new owner is the zero address\");\r\n        emit OwnershipTransferred(_owner, newOwner);\r\n        _owner = newOwner;\r\n    }\r\n\r\n}"},"SafeMath.sol":{"content":"pragma solidity ^0.5.0;\r\n\r\n/**\r\n * @dev Wrappers over Solidity\u0027s arithmetic operations with added overflow\r\n * checks.\r\n *\r\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\r\n * in bugs, because programmers usually assume that an overflow raises an\r\n * error, which is the standard behavior in high level programming languages.\r\n * `SafeMath` restores this intuition by reverting the transaction when an\r\n * operation overflows.\r\n *\r\n * Using this library instead of the unchecked operations eliminates an entire\r\n * class of bugs, so it\u0027s recommended to use it always.\r\n */\r\nlibrary SafeMath {\r\n    /**\r\n     * @dev Returns the addition of two unsigned integers, reverting on\r\n     * overflow.\r\n     *\r\n     * Counterpart to Solidity\u0027s `+` operator.\r\n     *\r\n     * Requirements:\r\n     * - Addition cannot overflow.\r\n     */\r\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\r\n        uint256 c = a + b;\r\n        require(c \u003e= a, \"SafeMath: addition overflow\");\r\n\r\n        return c;\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the subtraction of two unsigned integers, reverting on\r\n     * overflow (when the result is negative).\r\n     *\r\n     * Counterpart to Solidity\u0027s `-` operator.\r\n     *\r\n     * Requirements:\r\n     * - Subtraction cannot overflow.\r\n     */\r\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\r\n        return sub(a, b, \"SafeMath: subtraction overflow\");\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\r\n     * overflow (when the result is negative).\r\n     *\r\n     * Counterpart to Solidity\u0027s `-` operator.\r\n     *\r\n     * Requirements:\r\n     * - Subtraction cannot overflow.\r\n     *\r\n     * _Available since v2.4.0._\r\n     */\r\n    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\r\n        require(b \u003c= a, errorMessage);\r\n        uint256 c = a - b;\r\n\r\n        return c;\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the multiplication of two unsigned integers, reverting on\r\n     * overflow.\r\n     *\r\n     * Counterpart to Solidity\u0027s `*` operator.\r\n     *\r\n     * Requirements:\r\n     * - Multiplication cannot overflow.\r\n     */\r\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\r\n        // Gas optimization: this is cheaper than requiring \u0027a\u0027 not being zero, but the\r\n        // benefit is lost if \u0027b\u0027 is also tested.\r\n        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\r\n        if (a == 0) {\r\n            return 0;\r\n        }\r\n\r\n        uint256 c = a * b;\r\n        require(c / a == b, \"SafeMath: multiplication overflow\");\r\n\r\n        return c;\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the integer division of two unsigned integers. Reverts on\r\n     * division by zero. The result is rounded towards zero.\r\n     *\r\n     * Counterpart to Solidity\u0027s `/` operator. Note: this function uses a\r\n     * `revert` opcode (which leaves remaining gas untouched) while Solidity\r\n     * uses an invalid opcode to revert (consuming all remaining gas).\r\n     *\r\n     * Requirements:\r\n     * - The divisor cannot be zero.\r\n     */\r\n    function div(uint256 a, uint256 b) internal pure returns (uint256) {\r\n        return div(a, b, \"SafeMath: division by zero\");\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\r\n     * division by zero. The result is rounded towards zero.\r\n     *\r\n     * Counterpart to Solidity\u0027s `/` operator. Note: this function uses a\r\n     * `revert` opcode (which leaves remaining gas untouched) while Solidity\r\n     * uses an invalid opcode to revert (consuming all remaining gas).\r\n     *\r\n     * Requirements:\r\n     * - The divisor cannot be zero.\r\n     *\r\n     * _Available since v2.4.0._\r\n     */\r\n    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\r\n        // Solidity only automatically asserts when dividing by 0\r\n        require(b \u003e 0, errorMessage);\r\n        uint256 c = a / b;\r\n        // assert(a == b * c + a % b); // There is no case in which this doesn\u0027t hold\r\n\r\n        return c;\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\r\n     * Reverts when dividing by zero.\r\n     *\r\n     * Counterpart to Solidity\u0027s `%` operator. This function uses a `revert`\r\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\r\n     * invalid opcode to revert (consuming all remaining gas).\r\n     *\r\n     * Requirements:\r\n     * - The divisor cannot be zero.\r\n     */\r\n    function mod(uint256 a, uint256 b) internal pure returns (uint256) {\r\n        return mod(a, b, \"SafeMath: modulo by zero\");\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\r\n     * Reverts with custom message when dividing by zero.\r\n     *\r\n     * Counterpart to Solidity\u0027s `%` operator. This function uses a `revert`\r\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\r\n     * invalid opcode to revert (consuming all remaining gas).\r\n     *\r\n     * Requirements:\r\n     * - The divisor cannot be zero.\r\n     *\r\n     * _Available since v2.4.0._\r\n     */\r\n    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\r\n        require(b != 0, errorMessage);\r\n        return a % b;\r\n    }\r\n}"},"ZildFinance.sol":{"content":"pragma solidity 0.5.4;\r\n\r\nimport \u0027SafeMath.sol\u0027;\r\nimport \u0027Ownable.sol\u0027;\r\nimport \u0027IERC20.sol\u0027;\r\n\r\ncontract ZildFinanceCoin is Ownable, IERC20 {\r\n\r\n    using SafeMath for uint256;\r\n\r\n    string public constant name = \u0027Zild Finance Coin\u0027;\r\n    string public constant symbol = \u0027Zild\u0027;\r\n    uint8 public constant decimals = 18;\r\n    uint256 public totalSupply = 9980 * 10000 * 10 ** uint256(decimals);\r\n    uint256 public allowBurn = 2100 * 10000 * 10 ** uint256(decimals);\r\n    uint256 public tokenDestroyed;\r\n\t\r\n    uint256 public constant FounderAllocation = 1497 * 10000 * 10 ** uint256(decimals);\r\n    uint256 public constant FounderLockupAmount = 998 * 10000 * 10 ** uint256(decimals);\r\n    uint256 public constant FounderLockupCliff = 365 days;\r\n    uint256 public constant FounderReleaseInterval = 30 days;\r\n    uint256 public constant FounderReleaseAmount = 20.7916 * 10000 * 10 ** uint256(decimals);\r\n    uint256 public constant MarketingAllocation = 349 * 10000 * 10 ** uint256(decimals);\r\n    uint256 public constant FurnaceAllocation = 150 * 10000 * 10 ** uint256(decimals);\r\n\t\r\n    address public founder = address(0);\r\n    uint256 public founderLockupStartTime = 0;\r\n    uint256 public founderReleasedAmount = 0;\r\n\r\n    mapping (address =\u003e uint256) private _balances;\r\n    mapping (address =\u003e mapping (address =\u003e uint256)) private _allowances;    \r\n    mapping (address =\u003e bool) public frozenAccount;\r\n\r\n    event Transfer(address indexed from, address indexed to, uint256 value);\r\n    event Approval(address indexed from, address indexed to, uint256 value);\r\n    event ChangeFounder(address indexed previousFounder, address indexed newFounder);\r\n    event SetMinter(address indexed minter);\r\n    event SetMarketing(address indexed marketing);\r\n    event SetFurnace(address indexed furnace);\t\r\n    event Burn(address indexed _from, uint256 _tokenDestroyed, uint256 _timestamp);\r\n    event FrozenFunds(address target, bool frozen);\r\n\t\r\n    constructor(address _founder, address _marketing) public {\r\n        require(_founder != address(0), \"ZildFinanceCoin: founder is the zero address\");\r\n        require(_marketing != address(0), \"ZildFinanceCoin: operator is the zero address\");\r\n        founder = _founder;\r\n        founderLockupStartTime = block.timestamp;\r\n        _balances[address(this)] = totalSupply;\r\n        _transfer(address(this), _marketing, MarketingAllocation);\r\n    }\r\n\r\n    function release() public {\r\n        uint256 currentTime = block.timestamp;\r\n        uint256 cliffTime = founderLockupStartTime.add(FounderLockupCliff);\r\n        if (currentTime \u003c cliffTime) return;\r\n        if (founderReleasedAmount \u003e= FounderLockupAmount) return;\r\n        uint256 month = currentTime.sub(cliffTime).div(FounderReleaseInterval);\r\n        uint256 releaseAmount = month.mul(FounderReleaseAmount);\r\n        if (releaseAmount \u003e FounderLockupAmount) releaseAmount = FounderLockupAmount;\r\n        if (releaseAmount \u003c= founderReleasedAmount) return;\r\n        uint256 amount = releaseAmount.sub(founderReleasedAmount);\r\n        founderReleasedAmount = releaseAmount;\r\n        _transfer(address(this), founder, amount);\r\n    }\r\n\r\n    function balanceOf(address account) public view returns (uint256) {\r\n        return _balances[account];\r\n    }\r\n\r\n    function transfer(address to, uint256 amount) public returns (bool) {\r\n        require(to != address(0), \"ERC20: tranfer to the zero address\");\r\n        require(!frozenAccount[msg.sender]);\r\n        require(!frozenAccount[to]);\r\n        _transfer(msg.sender, to, amount);\r\n        return true;\r\n    }\r\n\t\r\n    function burn(uint256 _value) public returns (bool){\r\n        _burn(msg.sender, _value);\r\n        return true;\r\n    }\r\n\r\n    function _burn(address _who, uint256 _burntAmount) internal {\r\n        require (tokenDestroyed.add(_burntAmount) \u003c= allowBurn, \"ZildFinanceCoin: exceeded the maximum allowable burning amount\" );\r\n        require(_balances[msg.sender] \u003e= _burntAmount \u0026\u0026 _burntAmount \u003e 0);\r\n        _transfer(address(_who), address(0), _burntAmount);\r\n        totalSupply = totalSupply.sub(_burntAmount);\r\n        tokenDestroyed = tokenDestroyed.add(_burntAmount);\r\n        emit Burn(_who, _burntAmount, block.timestamp);\r\n    }\r\n\t\r\n\r\n    function allowance(address from, address to) public view returns (uint256) {\r\n        return _allowances[from][to];\r\n    }\r\n\r\n    function approve(address to, uint256 amount) public returns (bool) {\r\n        _approve(msg.sender, to, amount);\r\n        return true;\r\n    }\r\n\r\n    function transferFrom(address from, address to, uint256 amount) public returns (bool) {\r\n        uint256 remaining = _allowances[from][msg.sender].sub(amount, \"ERC20: transfer amount exceeds allowance\");\r\n        require(to != address(0), \"ERC20: tranfer to the zero address\");\r\n        require(!frozenAccount[from]);\r\n        require(!frozenAccount[to]);\r\n        require(!frozenAccount[msg.sender]);\r\n        _transfer(from, to, amount);\r\n        _approve(from, msg.sender, remaining);\r\n        return true;\r\n    }\r\n\r\n    function _transfer(address from, address to, uint256 amount) private {\r\n        require(from != address(0), \"ERC20: transfer from the zero address\");\r\n        _balances[from] = _balances[from].sub(amount, \"ERC20: transfer amount exceeds balance\");\r\n        _balances[to] = _balances[to].add(amount);\r\n        emit Transfer(from, to, amount);\r\n    }\r\n\r\n    function _approve(address from, address to, uint256 amount) private {\r\n        require(from != address(0), \"ERC20: approve from the zero address\");\r\n        require(to != address(0), \"ERC20: approve to the zero address\");\r\n        _allowances[from][to] = amount;\r\n        emit Approval(from, to, amount);\r\n    }\r\n\r\n    function changeFounder(address _founder) public onlyOwner {\r\n        require(_founder != address(0), \"ZildFinanceCoin: founder is the zero address\");\r\n        emit ChangeFounder(founder, _founder);\r\n        founder = _founder;\r\n    }\r\n\r\n    function setMinter(address minter) public onlyOwner {\r\n        require(minter != address(0), \"ZildFinanceCoin: minter is the zero address\");\r\n        require(_balances[minter] == 0, \"ZildFinanceCoin: minter has been initialized\");\r\n        _transfer(address(this), minter, totalSupply.sub(FounderAllocation));\r\n        emit SetMinter(minter);\r\n    }\r\n\r\n    function setFurnace(address furnace) public onlyOwner {\r\n        require(furnace != address(0), \"ZildFinanceCoin: furnace is the zero address\");\r\n        require(_balances[furnace] == 0, \"ZildFinanceCoin: furnace has been initialized\");\r\n        _transfer(address(this), furnace, FurnaceAllocation);\r\n        emit SetFurnace(furnace);\r\n    }\r\n\t\r\n    function freezeAccount(address _target, bool _bool) public onlyOwner {\r\n        if (_target != address(0)) {\r\n            frozenAccount[_target] = _bool;\r\n            emit FrozenFunds(_target,_bool);\r\n        }\r\n    }\r\n\r\n}"}}