ETH Price: $3,231.34 (-1.42%)
Gas: 1.93 Gwei

Contract

0xdb7a1FFCB7beE3b161279c370383c0a3D0459865
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Unstake G2191602722024-02-05 6:24:11342 days ago1707114251IN
0xdb7a1FFC...3D0459865
0 ETH0.0018750613.08098629
Unstake All OG191601442024-02-05 5:58:35342 days ago1707112715IN
0xdb7a1FFC...3D0459865
0 ETH0.0013867611.42845464
Unstake G2191593252024-02-05 3:12:47343 days ago1707102767IN
0xdb7a1FFC...3D0459865
0 ETH0.0011544711.22508544
Unstake All OG191593012024-02-05 3:07:59343 days ago1707102479IN
0xdb7a1FFC...3D0459865
0 ETH0.000978812.49242731
Unstake All OG191593002024-02-05 3:07:47343 days ago1707102467IN
0xdb7a1FFC...3D0459865
0 ETH0.0015014312.37343836
Unstake All OG191591262024-02-05 2:32:59343 days ago1707100379IN
0xdb7a1FFC...3D0459865
0 ETH0.0012127312.63501275
Unstake G2191501332024-02-03 20:13:47344 days ago1706991227IN
0xdb7a1FFC...3D0459865
0 ETH0.001902514.65226529
Unstake G2190387032024-01-19 5:05:11360 days ago1705640711IN
0xdb7a1FFC...3D0459865
0 ETH0.00212920
Unstake All OG186491382023-11-25 13:54:23414 days ago1700920463IN
0xdb7a1FFC...3D0459865
0 ETH0.0028940423.85012604
Unstake All OG185754132023-11-15 6:08:59424 days ago1700028539IN
0xdb7a1FFC...3D0459865
0 ETH0.0035659721.53976827
Unstake G2180330882023-08-31 7:33:47500 days ago1693467227IN
0xdb7a1FFC...3D0459865
0 ETH0.0012479613.9671027
Unstake G2180330862023-08-31 7:33:23500 days ago1693467203IN
0xdb7a1FFC...3D0459865
0 ETH0.0016330514.67916671
Unstake G2175625962023-06-26 9:05:23566 days ago1687770323IN
0xdb7a1FFC...3D0459865
0 ETH0.0015607412.63253056
Unstake All OG175135722023-06-19 11:42:59573 days ago1687174979IN
0xdb7a1FFC...3D0459865
0 ETH0.0025523113.97356534
Unstake All OG174755372023-06-14 3:31:23579 days ago1686713483IN
0xdb7a1FFC...3D0459865
0 ETH0.0030382821.94608677
Claim174567752023-06-11 12:08:23581 days ago1686485303IN
0xdb7a1FFC...3D0459865
0 ETH0.0012654216.75126724
Unstake All OG174504542023-06-10 14:46:35582 days ago1686408395IN
0xdb7a1FFC...3D0459865
0 ETH0.0026991622.24413343
Unstake G2173990102023-06-03 8:35:59589 days ago1685781359IN
0xdb7a1FFC...3D0459865
0 ETH0.0045248921.45537358
Unstake All OG173989182023-06-03 8:17:35589 days ago1685780255IN
0xdb7a1FFC...3D0459865
0 ETH0.0019146719.94829576
Unstake All OG173864862023-06-01 14:14:47591 days ago1685628887IN
0xdb7a1FFC...3D0459865
0 ETH0.0049767741.01409941
Unstake All OG173864622023-06-01 14:09:59591 days ago1685628599IN
0xdb7a1FFC...3D0459865
0 ETH0.0030932939.47942465
Unstake All OG173864102023-06-01 13:59:35591 days ago1685627975IN
0xdb7a1FFC...3D0459865
0 ETH0.0029141437.19294699
Unstake All OG173414172023-05-26 6:12:35597 days ago1685081555IN
0xdb7a1FFC...3D0459865
0 ETH0.0034454424.88708026
Unstake All OG173405562023-05-26 3:18:35598 days ago1685071115IN
0xdb7a1FFC...3D0459865
0 ETH0.0045504531.94019667
Unstake All OG173399032023-05-26 1:06:35598 days ago1685063195IN
0xdb7a1FFC...3D0459865
0 ETH0.0035203729.01177388
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
AGStakeX

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 14 : AGStakeFull.sol
// SPDX-License-Identifier: MIT LICENSE

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";
import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";

import "./interfaces/IAGStakeFull.sol";
import "./interfaces/IAlphaGangGenerative.sol";
import "./interfaces/IAlphaGangOG.sol";
import "./interfaces/IGangToken.sol";

contract AGStakeX is IAGStake, Ownable, ERC721Holder, ERC1155Holder {
    // address to timestamp of last update
    mapping(address => uint256) public lastUpdate;

    IAlphaGangOG immutable AlphaGangOG;
    IAlphaGangGenerative AlphaGangG2;
    IGangToken immutable GANG;

    // maps OG tokenId to mapping of address to count of staked tokens
    mapping(uint256 => mapping(address => uint256)) public vaultOG;

    // Mapping: address to token to staked timestamp
    mapping(address => mapping(uint256 => uint256)) public override vaultG2;

    /**
     * token ID to staked at timestamp or 0 if token is not staked
     * Note 1 is more gas optimal than 0 for unstaked state but we won't expect too many of these changes
     */
    mapping(address => uint256) public stakedAtG2;

    // Mapping: address to count of tokens staked
    mapping(address => uint256) public ownerG2StakedCount;

    /**
     * mapping of address to timestamp when last OG was staked
     * Note This offers less granular controll of staking tokens at a benefit of less complexity/gas savings
     */
    mapping(address => uint256) stakedAtOG;

    // OG rate 300 per week
    uint256 public ogStakeRate = 496031746031746;
    // G2 rate 30 per week
    uint256 public G2StakeRate = 49603174603175;
    // Bonus base for holding OG tokens
    uint256 bonusBase = 500_000;
    // Bonus for holding all 3 kind of OG tokens
    uint256 triBonus = 100_000;

    uint256 constant BASE = 1_000_000;

    mapping(address => uint256) public override ogAllocation;

    constructor(
        IAlphaGangOG _og,
        IAlphaGangGenerative _G2,
        IGangToken _token
    ) {
        AlphaGangOG = _og;
        AlphaGangG2 = _G2;
        GANG = _token;
    }

    /**
     * @dev Stake tokens for generative.
     * Note This makes stakeAll obsolete, since we'd have to check every token minted to get all user tokens with ERC721A.
     */
    function stakeG2(uint256[] calldata tokenIds) public override {
        uint256 timeNow = block.timestamp;
        // for extra check both msg.sender and tx origin are correct:
        address _owner = msg.sender;
        if (msg.sender == address(AlphaGangG2)) {
            _owner = tx.origin;
        }

        _claim(_owner);

        for (uint8 i = 0; i < tokenIds.length; i++) {
            // verify the ownership
            require(
                AlphaGangG2.ownerOf(tokenIds[i]) == _owner,
                "Not your token"
            );

            require(vaultG2[_owner][tokenIds[i]] == 0, "Token already staked");

            // stake the token for _owner
            AlphaGangG2.transferFrom(_owner, address(this), tokenIds[i]);
            vaultG2[_owner][tokenIds[i]] = timeNow;
        }
        // update lastStake time for _owner
        // stakedAtG2[_owner] = timeNow;
        unchecked {
            ownerG2StakedCount[_owner] += tokenIds.length;
        }

        emit StakedG2(_owner, tokenIds, timeNow);
    }

    /**
     * @dev Unstake tokens for generative.
     *
     * @param tokenIds Array of tokens to unstake
     */
    function unstakeG2(uint256[] memory tokenIds) external {
        address _owner = msg.sender;
        _claim(_owner);

        for (uint8 i = 0; i < tokenIds.length; ++i) {
            require(vaultG2[_owner][tokenIds[i]] > 0, "Not your token");
            require(
                vaultG2[_owner][tokenIds[i]] < block.timestamp + 72 hours,
                "Token locked for 3 days"
            );
            vaultG2[_owner][tokenIds[i]] = 0;

            AlphaGangG2.transferFrom(address(this), _owner, tokenIds[i]);
        }

        ownerG2StakedCount[_owner] -= tokenIds.length;

        emit UnstakedG2(_owner, tokenIds, block.timestamp);
    }

    function claim() external {
        _claim(msg.sender);
    }

    function claimForAddress(address account) external {
        _claim(account);
    }

    function _claim(address account) internal {
        uint256 earned;

        // if there is no last update just set the first timestamp for address
        if (lastUpdate[account] > 0) {
            earned = earningInfo(account);
        }

        lastUpdate[account] = block.timestamp;

        if (earned > 0) {
            GANG.mint(account, earned);
        }

        emit Claimed(account, earned, block.timestamp);
    }

    // Check how much tokens account has for claiming
    function earningInfo(address account) public view returns (uint256 earned) {
        uint256 earnedWBonus;
        uint256 earnedNBonus;

        uint256 timestamp = block.timestamp;
        uint256 _lastUpdate = lastUpdate[account];

        // no earnings so far
        if (_lastUpdate == 0) return 0;

        uint256 tokenCountOG;

        uint256[] memory stakedCountOG = stakedOGBalanceOf(account);

        // bonus is applied for holding all 3 assets(can only be applied once)
        uint256 triBonusCount;
        unchecked {
            for (uint32 i; i < 3; ++i) {
                if (stakedCountOG[i] > 0) {
                    tokenCountOG += stakedCountOG[i];
                    ++triBonusCount;
                }
            }
        }

        uint256 bonus = BASE; // multiplier of 1

        unchecked {
            // add G2 tokens to bonusBase
            earnedWBonus += G2StakeRate * ownerG2StakedCount[account]; // count of owners tokens times rate for G2

            // Calculate bonus to be applied
            if (tokenCountOG > 0) {
                // Order: 50, Mac, Riri, bonus is halved by 50% for each additional token
                uint256 _bonusBase = bonusBase;

                // Add a single token to bonusBase
                earnedWBonus += ogStakeRate;
                // Add rest to noBonusBase
                earnedNBonus += ogStakeRate * (tokenCountOG - 1);

                // calculate total bonus to be applied, start adding bonus for more hodls
                for (uint32 i = 0; i < tokenCountOG; ++i) {
                    bonus += _bonusBase;
                    _bonusBase /= 2;
                }

                // triBonus for holding all 3 OGs
                if (triBonusCount == 3) {
                    bonus += triBonus;
                }
            }
        }

        // calculate and return how much is earned
        return
            (((earnedWBonus * bonus) / BASE) + earnedNBonus) *
            (timestamp - _lastUpdate);
    }

    /** OG Functions */
    function stakeSingleOG(uint256 tokenId, uint256 tokenCount) external {
        address _owner = msg.sender;

        // claim unstaked tokens, since count/rate will change
        _claim(_owner);

        AlphaGangOG.safeTransferFrom(
            _owner,
            address(this),
            tokenId,
            tokenCount,
            ""
        );

        stakedAtOG[_owner] = block.timestamp;

        unchecked {
            vaultOG[tokenId][_owner] += tokenCount;
        }

        emit StakedOG(
            _owner,
            _asSingletonArray(tokenId),
            _asSingletonArray(tokenCount),
            block.timestamp
        );
    }

    function unstakeSingleOG(uint256 tokenId, uint256 tokenCount) external {
        address _owner = msg.sender;
        uint256 _totalStaked = vaultOG[tokenId][_owner];

        require(
            _totalStaked >= 0,
            "You do have any tokens available for unstaking"
        );
        require(
            _totalStaked >= tokenCount,
            "You do not have requested token amount available for unstaking"
        );
        require(
            stakedAtOG[_owner] < block.timestamp + 72 hours,
            "Tokens locked for 3 days"
        );

        // claim rewards before unstaking
        _claim(_owner);

        unchecked {
            vaultOG[tokenId][_owner] -= tokenCount;
        }

        AlphaGangOG.safeTransferFrom(
            address(this),
            _owner,
            tokenId,
            tokenCount,
            ""
        );

        emit UnstakedOG(
            msg.sender,
            _asSingletonArray(tokenId),
            _asSingletonArray(tokenCount),
            block.timestamp
        );
    }

    function updateOGAllocation(address _owner, uint256 _count)
        external
        override
    {
        require(msg.sender == address(AlphaGangG2), "Only Generative");
        ogAllocation[_owner] -= _count;
    }

    /**
     * @dev
     *
     * Note this will stake all available tokens, but makes it possible to not immediately stake G2 tokens (@Hax)
     */
    function stakeOGForMint() external payable {
        // check if OG minting is active
        require(AlphaGangG2.mintActive(1), "Sale is not active");

        address _owner = msg.sender;
        uint256[] memory totalAvailable = unstakedOGBalanceOf(_owner);

        // get the count of tokens
        uint256 _totalOGsToBeStaked = totalAvailable[0] +
            totalAvailable[1] +
            totalAvailable[2];
        // make sure there are tokens to be staked
        require(_totalOGsToBeStaked > 0, "No tokens to stake");

        /**
         * Ammount of eth is sent to G2 contract, but checked here first
         * all OG get 2 tokens for WL + one additional for each token staked
         * in addition whales(3+ tokens) get reduced price
         */
        uint256 g2MintCount = _totalOGsToBeStaked + 2;

        uint256 timeNow = block.timestamp;

        uint256[] memory tokens = new uint256[](3);
        tokens[0] = 1;
        tokens[1] = 2;
        tokens[2] = 3;

        // claim and update the timestamp for this account
        _claim(_owner);

        AlphaGangOG.safeBatchTransferFrom(
            _owner,
            address(this),
            tokens,
            totalAvailable,
            ""
        );

        // Update stake time
        stakedAtOG[_owner] = timeNow;

        ogAllocation[_owner] += g2MintCount;

        // loop over and update the vault
        unchecked {
            for (uint32 i = 1; i < 4; i++) {
                vaultOG[i][_owner] += totalAvailable[i - 1];
            }
        }

        emit StakedForMint(msg.sender, tokens, totalAvailable, block.timestamp);
    }

    /**
     * @dev Stakes all OG tokens of {_owner} by transfering them to this contract.
     *
     * Emits a {StakedOG} event.
     */
    function stakeAllOG() external {
        address _owner = msg.sender;
        uint256[] memory totalAvailable = unstakedOGBalanceOf(_owner);

        // claim for owner
        _claim(_owner);

        uint256[] memory tokens = new uint256[](3);
        tokens[0] = 1;
        tokens[1] = 2;
        tokens[2] = 3;

        AlphaGangOG.safeBatchTransferFrom(
            _owner,
            address(this),
            tokens,
            totalAvailable,
            ""
        );

        // Update stake time
        stakedAtOG[_owner] = block.timestamp;

        // loop over and update the vault
        unchecked {
            for (uint32 i = 1; i < 4; i++) {
                vaultOG[i][_owner] += totalAvailable[i - 1];
            }
        }

        emit StakedOG(msg.sender, tokens, totalAvailable, block.timestamp);
    }

    function unstakeAllOG() external {
        address _owner = msg.sender;
        require(
            stakedAtOG[_owner] < block.timestamp + 72 hours,
            "Tokens locked for 3 days"
        );

        // claim for owner
        _claim(_owner);

        uint256[] memory _totalStaked = stakedOGBalanceOf(_owner);

        uint256[] memory tokens = new uint256[](3);
        tokens[0] = 1;
        tokens[1] = 2;
        tokens[2] = 3;

        // loop over and update the vault
        unchecked {
            for (uint32 i = 1; i < 4; i++) {
                vaultOG[i][_owner] -= _totalStaked[i - 1];
            }
        }

        AlphaGangOG.safeBatchTransferFrom(
            address(this),
            _owner,
            tokens,
            _totalStaked,
            ""
        );

        emit UnstakedOG(_owner, tokens, _totalStaked, block.timestamp);
    }

    /** Views */
    function stakedOGBalanceOf(address account)
        public
        view
        returns (uint256[] memory _tokenBalance)
    {
        uint256[] memory tokenBalance = new uint256[](3);

        unchecked {
            for (uint32 i = 1; i < 4; i++) {
                uint256 stakedCount = vaultOG[i][account];
                if (stakedCount > 0) {
                    tokenBalance[i - 1] += stakedCount;
                }
            }
        }
        return tokenBalance;
    }

    function unstakedOGBalanceOf(address account)
        public
        view
        returns (uint256[] memory _tokenBalance)
    {
        // This consumes ~4k gas less than batchBalanceOf with address array
        uint256[] memory totalTokenBalance = new uint256[](3);
        totalTokenBalance[0] = AlphaGangOG.balanceOf(account, 1);
        totalTokenBalance[1] = AlphaGangOG.balanceOf(account, 2);
        totalTokenBalance[2] = AlphaGangOG.balanceOf(account, 3);

        return totalTokenBalance;
    }

    /** Utils */
    function _asSingletonArray(uint256 element)
        private
        pure
        returns (uint256[] memory)
    {
        uint256[] memory array = new uint256[](1);
        array[0] = element;

        return array;
    }

    /**
     * @dev
     * (@Hax) Migrate feature in case we need to manage tokens
     * Eg. someone sends token to staking contract directly or we need to migrate
     *
     */
    function setApprovalForAll(address operator, bool approved)
        external
        onlyOwner
    {
        AlphaGangG2.setApprovalForAll(operator, approved);
        AlphaGangOG.setApprovalForAll(operator, approved);
    }

    /**
     * @dev Withdraw any ether that might get sent/stuck on this contract
     */
    function withdraw() external onlyOwner {
        payable(owner()).transfer(address(this).balance);
    }

    function stakedG2TokensOfOwner(address account)
        external
        view
        returns (uint256[] memory)
    {
        uint256 supply = AlphaGangG2.totalSupply();

        uint256 ownerStakedTokenCount = ownerG2StakedCount[account];
        uint256[] memory tokens = new uint256[](ownerStakedTokenCount);

        uint256 index = 0;
        for (uint256 tokenId = 1; tokenId <= supply; tokenId++) {
            if (vaultG2[account][tokenId] > 0) {
                tokens[index] = tokenId;
            }
        }
        return tokens;
    }
}

File 2 of 14 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual 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");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 14 : ERC1155Holder.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol)

pragma solidity ^0.8.0;

import "./ERC1155Receiver.sol";

/**
 * Simple implementation of `ERC1155Receiver` that will allow a contract to hold ERC1155 tokens.
 *
 * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be
 * stuck.
 *
 * @dev _Available since v3.1._
 */
contract ERC1155Holder is ERC1155Receiver {
    function onERC1155Received(
        address,
        address,
        uint256,
        uint256,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC1155Received.selector;
    }

    function onERC1155BatchReceived(
        address,
        address,
        uint256[] memory,
        uint256[] memory,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC1155BatchReceived.selector;
    }
}

File 4 of 14 : ERC721Holder.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/utils/ERC721Holder.sol)

pragma solidity ^0.8.0;

import "../IERC721Receiver.sol";

/**
 * @dev Implementation of the {IERC721Receiver} interface.
 *
 * Accepts all token transfers.
 * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}.
 */
contract ERC721Holder is IERC721Receiver {
    /**
     * @dev See {IERC721Receiver-onERC721Received}.
     *
     * Always returns `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address,
        address,
        uint256,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC721Received.selector;
    }
}

File 5 of 14 : IAGStakeFull.sol
// SPDX-License-Identifier: MIT LICENSE

pragma solidity ^0.8.0;

interface IAGStake {
    event StakedG2(address owner, uint256[] tokenIds, uint256 timestamp);
    event UnstakedG2(address owner, uint256[] tokenIds, uint256 timestamp);
    event StakedOG(
        address owner,
        uint256[] tokenIds,
        uint256[] counts,
        uint256 timestamp
    );
    event StakedForMint(
        address owner,
        uint256[] tokenIds,
        uint256[] counts,
        uint256 timestamp
    );
    event UnstakedOG(
        address owner,
        uint256[] tokenIds,
        uint256[] counts,
        uint256 timestamp
    );
    event Claimed(address owner, uint256 amount, uint256 timestamp);

    function ogAllocation(address _owner)
        external
        view
        returns (uint256 _allocation);

    function vaultG2(address, uint256) external view returns (uint256);

    function stakeG2(uint256[] calldata tokenIds) external;

    function updateOGAllocation(address _owner, uint256 _count) external;
}

File 6 of 14 : IAlphaGangGenerative.sol
// SPDX-License-Identifier: MIT LICENSE

pragma solidity ^0.8.0;

interface IAlphaGangGenerative {
    function balanceOf(address account) external view returns (uint256);

    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    function ownerOf(uint256 tokenId) external view returns (address);

    function setApprovalForAll(address operator, bool approved) external;

    function totalSupply() external view returns (uint256);

    function SUPPLY_MAX() external view returns (uint256);

    function mintActive(uint8 mintType) external view returns (bool);

    function tokensOfOwner(address _owner)
        external
        view
        returns (uint256[] memory ownerTokens);
}

File 7 of 14 : IAlphaGangOG.sol
// SPDX-License-Identifier: MIT LICENSE

pragma solidity ^0.8.0;

interface IAlphaGangOG {
    function balanceOf(address account, uint256 id)
        external
        view
        returns (uint256);

    // change to transfer
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) external;

    function setApprovalForAll(address operator, bool approved) external;
}

File 8 of 14 : IGangToken.sol
// SPDX-License-Identifier: MIT LICENSE

pragma solidity ^0.8.0;

interface IGangToken {
    function mint(address to, uint256 amount) external;
}

File 9 of 14 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 10 of 14 : ERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)

pragma solidity ^0.8.0;

import "../IERC1155Receiver.sol";
import "../../../utils/introspection/ERC165.sol";

/**
 * @dev _Available since v3.1._
 */
abstract contract ERC1155Receiver is ERC165, IERC1155Receiver {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);
    }
}

File 11 of 14 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

File 12 of 14 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 13 of 14 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 14 of 14 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IAlphaGangOG","name":"_og","type":"address"},{"internalType":"contract IAlphaGangGenerative","name":"_G2","type":"address"},{"internalType":"contract IGangToken","name":"_token","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"counts","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"StakedForMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"StakedG2","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"counts","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"StakedOG","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"UnstakedG2","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"counts","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"UnstakedOG","type":"event"},{"inputs":[],"name":"G2StakeRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"claimForAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earningInfo","outputs":[{"internalType":"uint256","name":"earned","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastUpdate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"ogAllocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ogStakeRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"ownerG2StakedCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakeAllOG","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"stakeG2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakeOGForMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"tokenCount","type":"uint256"}],"name":"stakeSingleOG","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakedAtG2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"stakedG2TokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"stakedOGBalanceOf","outputs":[{"internalType":"uint256[]","name":"_tokenBalance","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unstakeAllOG","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"unstakeG2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"tokenCount","type":"uint256"}],"name":"unstakeSingleOG","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"unstakedOGBalanceOf","outputs":[{"internalType":"uint256[]","name":"_tokenBalance","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_count","type":"uint256"}],"name":"updateOGAllocation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"vaultG2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"vaultOG","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c06040526601c32364050082600855652d1d239a19a76009556207a120600a55620186a0600b553480156200003457600080fd5b5060405162002c1838038062002c188339810160408190526200005791620000fb565b620000623362000092565b6001600160a01b03928316608052600280546001600160a01b031916928416929092179091551660a0526200014f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381168114620000f857600080fd5b50565b6000806000606084860312156200011157600080fd5b83516200011e81620000e2565b60208501519093506200013181620000e2565b60408501519092506200014481620000e2565b809150509250925092565b60805160a051612a6b620001ad60003960006121ad01526000818161086901528181610f78015281816115520152818161174e015281816117fd015281816118aa0152818161198301528181611d8901526120810152612a6b6000f3fe6080604052600436106101d85760003560e01c8063715018a611610102578063cb03fb1e11610095578063f23a6e6111610064578063f23a6e61146105fd578063f2fde38b14610642578063f6574f1b14610662578063faab492a1461066a57600080fd5b8063cb03fb1e1461057a578063d8dc7fb8146105a7578063da960185146105bd578063e20b576e146105dd57600080fd5b8063a22cb465116100d1578063a22cb465146104c8578063ab1c99fa146104e8578063acfd14b014610515578063bc197c811461053557600080fd5b8063715018a6146104335780637ef5c072146104485780638da5cb5b14610480578063941e75d1146104a857600080fd5b806319daaec01161017a5780634e71d92d116101495780634e71d92d146103bc5780635ffed1ab146103d1578063642c961e146103fe57806370bf74f21461041357600080fd5b806319daaec0146103395780631b5b7654146103595780633ccfd60b1461036f5780633e7b16d41461038457600080fd5b80630f0e9598116101b65780630f0e959814610262578063100bd9ee1461028f57806314a9919a146102af578063150b7a02146102dc57600080fd5b806301ffc9a7146101dd5780630692ccf2146102125780630ec68ff214610234575b600080fd5b3480156101e957600080fd5b506101fd6101f83660046122f5565b61067f565b60405190151581526020015b60405180910390f35b34801561021e57600080fd5b5061023261022d366004612326565b6106e8565b005b34801561024057600080fd5b5061025461024f36600461235d565b610918565b604051908152602001610209565b34801561026e57600080fd5b5061028261027d36600461235d565b610a83565b60405161020991906123b5565b34801561029b57600080fd5b506102326102aa36600461235d565b610b2a565b3480156102bb57600080fd5b506102546102ca36600461235d565b60056020526000908152604090205481565b3480156102e857600080fd5b506103206102f736600461247f565b7f150b7a0200000000000000000000000000000000000000000000000000000000949350505050565b6040516001600160e01b03199091168152602001610209565b34801561034557600080fd5b506102326103543660046124eb565b610b36565b34801561036557600080fd5b5061025460085481565b34801561037b57600080fd5b50610232610e26565b34801561039057600080fd5b5061025461039f366004612560565b600360209081526000928352604080842090915290825290205481565b3480156103c857600080fd5b50610232610eba565b3480156103dd57600080fd5b506102546103ec36600461235d565b60066020526000908152604090205481565b34801561040a57600080fd5b50610232610ec5565b34801561041f57600080fd5b5061023261042e366004612590565b6110b3565b34801561043f57600080fd5b5061023261113e565b34801561045457600080fd5b50610254610463366004612590565b600460209081526000928352604080842090915290825290205481565b34801561048c57600080fd5b506000546040516001600160a01b039091168152602001610209565b3480156104b457600080fd5b506102326104c336600461263c565b6111a2565b3480156104d457600080fd5b506102326104e3366004612687565b61146c565b3480156104f457600080fd5b5061025461050336600461235d565b600c6020526000908152604090205481565b34801561052157600080fd5b5061028261053036600461235d565b6115b4565b34801561054157600080fd5b506103206105503660046126b5565b7fbc197c810000000000000000000000000000000000000000000000000000000095945050505050565b34801561058657600080fd5b5061025461059536600461235d565b60016020526000908152604090205481565b3480156105b357600080fd5b5061025460095481565b3480156105c957600080fd5b506102826105d836600461235d565b611702565b3480156105e957600080fd5b506102326105f8366004612326565b611938565b34801561060957600080fd5b50610320610618366004612763565b7ff23a6e610000000000000000000000000000000000000000000000000000000095945050505050565b34801561064e57600080fd5b5061023261065d36600461235d565b611a59565b610232611b38565b34801561067657600080fd5b50610232611ee7565b60006001600160e01b031982167f4e2312e00000000000000000000000000000000000000000000000000000000014806106e257507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b600082815260036020908152604080832033808552925290912054610711565b60405180910390fd5b828110156107875760405162461bcd60e51b815260206004820152603e60248201527f596f7520646f206e6f7420686176652072657175657374656420746f6b656e2060448201527f616d6f756e7420617661696c61626c6520666f7220756e7374616b696e6700006064820152608401610708565b610794426203f4806127e2565b6001600160a01b038316600090815260076020526040902054106107fa5760405162461bcd60e51b815260206004820152601860248201527f546f6b656e73206c6f636b656420666f722033206461797300000000000000006044820152606401610708565b61080382612123565b60008481526003602090815260408083206001600160a01b0386811680865291909352818420805488900390559051637921219560e11b81523060048201526024810191909152604481018790526064810186905260a0608482015260a48101929092527f0000000000000000000000000000000000000000000000000000000000000000169063f242432a9060c401600060405180830381600087803b1580156108ad57600080fd5b505af11580156108c1573d6000803e3d6000fd5b505050507fff20c51538ccc085c61cf63ee5e255767d9f5eeef8ebb2ce21b38439bc4d22d5336108f086612253565b6108f986612253565b4260405161090a94939291906127fa565b60405180910390a150505050565b6001600160a01b03811660009081526001602052604081205481908190429080830361094a5750600095945050505050565b60008061095688610a83565b90506000805b60038163ffffffff1610156109c6576000838263ffffffff168151811061098557610985612840565b602002602001015111156109be57828163ffffffff16815181106109ab576109ab612840565b6020026020010151840193508160010191505b60010161095c565b506001600160a01b038916600090815260066020526040902054600954029690960195620f42408315610a3e57600a5460085498890198600019860102979097019660005b858163ffffffff161015610a2b5791810191600282049150600101610a0b565b5082600303610a3c57600b54820191505b505b610a488587612856565b87620f4240610a57848c61286d565b610a61919061288c565b610a6b91906127e2565b610a75919061286d565b9a9950505050505050505050565b604080516003808252608082019092526060916000919060208201848036833701905050905060015b60048163ffffffff161015610b235763ffffffff811660009081526003602090815260408083206001600160a01b03881684529091529020548015610b1a5780836001840363ffffffff1681518110610b0757610b07612840565b6020026020010181815101915081815250505b50600101610aac565b5092915050565b610b3381612123565b50565b600254429033906001600160a01b03168103610b4f5750325b610b5881612123565b60005b60ff8116841115610dd1576002546001600160a01b038084169116636352211e878760ff8616818110610b9057610b90612840565b905060200201356040518263ffffffff1660e01b8152600401610bb591815260200190565b602060405180830381865afa158015610bd2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bf691906128ae565b6001600160a01b031614610c4c5760405162461bcd60e51b815260206004820152600e60248201527f4e6f7420796f757220746f6b656e0000000000000000000000000000000000006044820152606401610708565b6001600160a01b038216600090815260046020526040812090868660ff8516818110610c7a57610c7a612840565b90506020020135815260200190815260200160002054600014610cdf5760405162461bcd60e51b815260206004820152601460248201527f546f6b656e20616c7265616479207374616b65640000000000000000000000006044820152606401610708565b6002546001600160a01b03166323b872dd8330888860ff8716818110610d0757610d07612840565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b158015610d5e57600080fd5b505af1158015610d72573d6000803e3d6000fd5b505050506001600160a01b03821660009081526004602052604081208491878760ff8616818110610da557610da5612840565b905060200201358152602001908152602001600020819055508080610dc9906128cb565b915050610b5b565b506001600160a01b03811660009081526006602052604090819020805485019055517fc4dc1dc09dccc24a61fd3762642d1b17d47806f3483ff317a353a919252643bf9061090a9083908790879087906128ea565b6000546001600160a01b03163314610e805760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610708565b600080546040516001600160a01b03909116914780156108fc02929091818181858888f19350505050158015610b33573d6000803e3d6000fd5b610ec333612123565b565b336000610ed182611702565b9050610edc82612123565b6040805160038082526080820190925260009160208201606080368337019050509050600181600081518110610f1457610f14612840565b602002602001018181525050600281600181518110610f3557610f35612840565b602002602001018181525050600381600281518110610f5657610f56612840565b6020908102919091010152604051631759616b60e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690632eb2c2d690610fb3908690309086908890600401612959565b600060405180830381600087803b158015610fcd57600080fd5b505af1158015610fe1573d6000803e3d6000fd5b5050506001600160a01b03841660009081526007602052604090204290555060015b60048163ffffffff16101561107057826001820363ffffffff168151811061102d5761102d612840565b60209081029190910181015163ffffffff831660009081526003835260408082206001600160a01b03891683529093529190912080549091019055600101611003565b507fea8682dc8d491e977e357bb5a872cc1bfd0cd140cd9b1fef95c5148f919fe91d338284426040516110a694939291906127fa565b60405180910390a1505050565b6002546001600160a01b0316331461110d5760405162461bcd60e51b815260206004820152600f60248201527f4f6e6c792047656e6572617469766500000000000000000000000000000000006044820152606401610708565b6001600160a01b0382166000908152600c602052604081208054839290611135908490612856565b90915550505050565b6000546001600160a01b031633146111985760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610708565b610ec3600061228d565b336111ac81612123565b60005b82518160ff1610156113fc576001600160a01b038216600090815260046020526040812084518290869060ff86169081106111ec576111ec612840565b6020026020010151815260200190815260200160002054116112505760405162461bcd60e51b815260206004820152600e60248201527f4e6f7420796f757220746f6b656e0000000000000000000000000000000000006044820152606401610708565b61125d426203f4806127e2565b6001600160a01b03831660009081526004602052604081208551909190869060ff861690811061128f5761128f612840565b6020026020010151815260200190815260200160002054106112f35760405162461bcd60e51b815260206004820152601760248201527f546f6b656e206c6f636b656420666f72203320646179730000000000000000006044820152606401610708565b6001600160a01b038216600090815260046020526040812084518290869060ff861690811061132457611324612840565b6020026020010151815260200190815260200160002081905550600260009054906101000a90046001600160a01b03166001600160a01b03166323b872dd3084868560ff168151811061137957611379612840565b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b1580156113d357600080fd5b505af11580156113e7573d6000803e3d6000fd5b50505050806113f5906128cb565b90506111af565b5081516001600160a01b03821660009081526006602052604081208054909190611427908490612856565b90915550506040517f9c976369f88055398c1dede2748b210d08ada1f227b1265d30c7261f2580524990611460908390859042906129b4565b60405180910390a15050565b6000546001600160a01b031633146114c65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610708565b60025460405163a22cb46560e01b81526001600160a01b03848116600483015283151560248301529091169063a22cb46590604401600060405180830381600087803b15801561151557600080fd5b505af1158015611529573d6000803e3d6000fd5b505060405163a22cb46560e01b81526001600160a01b03858116600483015284151560248301527f000000000000000000000000000000000000000000000000000000000000000016925063a22cb4659150604401600060405180830381600087803b15801561159857600080fd5b505af11580156115ac573d6000803e3d6000fd5b505050505050565b60606000600260009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561160b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061162f91906129e6565b6001600160a01b0384166000908152600660205260408120549192508167ffffffffffffffff811115611664576116646123c8565b60405190808252806020026020018201604052801561168d578160200160208202803683370190505b509050600060015b8481116116f7576001600160a01b0387166000908152600460209081526040808320848452909152902054156116e557808383815181106116d8576116d8612840565b6020026020010181815250505b806116ef816129ff565b915050611695565b509095945050505050565b604080516003808252608082019092526060916000919060208201848036833701905050604051627eeac760e11b81526001600160a01b038581166004830152600160248301529192507f00000000000000000000000000000000000000000000000000000000000000009091169062fdd58e90604401602060405180830381865afa158015611796573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117ba91906129e6565b816000815181106117cd576117cd612840565b6020908102919091010152604051627eeac760e11b81526001600160a01b038481166004830152600260248301527f0000000000000000000000000000000000000000000000000000000000000000169062fdd58e90604401602060405180830381865afa158015611843573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061186791906129e6565b8160018151811061187a5761187a612840565b6020908102919091010152604051627eeac760e11b81526001600160a01b038481166004830152600360248301527f0000000000000000000000000000000000000000000000000000000000000000169062fdd58e90604401602060405180830381865afa1580156118f0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061191491906129e6565b8160028151811061192757611927612840565b602090810291909101015292915050565b3361194281612123565b604051637921219560e11b81526001600160a01b038281166004830152306024830152604482018590526064820184905260a06084830152600060a48301527f0000000000000000000000000000000000000000000000000000000000000000169063f242432a9060c401600060405180830381600087803b1580156119c757600080fd5b505af11580156119db573d6000803e3d6000fd5b5050506001600160a01b03821660008181526007602090815260408083204290558783526003825280832093835292905220805484019055507fea8682dc8d491e977e357bb5a872cc1bfd0cd140cd9b1fef95c5148f919fe91d81611a3f85612253565b611a4885612253565b426040516110a694939291906127fa565b6000546001600160a01b03163314611ab35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610708565b6001600160a01b038116611b2f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610708565b610b338161228d565b6002546040517ff22fb1d3000000000000000000000000000000000000000000000000000000008152600160048201526001600160a01b039091169063f22fb1d390602401602060405180830381865afa158015611b9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bbe9190612a18565b611c0a5760405162461bcd60e51b815260206004820152601260248201527f53616c65206973206e6f742061637469766500000000000000000000000000006044820152606401610708565b336000611c1682611702565b9050600081600281518110611c2d57611c2d612840565b602002602001015182600181518110611c4857611c48612840565b602002602001015183600081518110611c6357611c63612840565b6020026020010151611c7591906127e2565b611c7f91906127e2565b905060008111611cd15760405162461bcd60e51b815260206004820152601260248201527f4e6f20746f6b656e7320746f207374616b6500000000000000000000000000006044820152606401610708565b6000611cde8260026127e2565b60408051600380825260808201909252919250429160009160208201606080368337019050509050600181600081518110611d1b57611d1b612840565b602002602001018181525050600281600181518110611d3c57611d3c612840565b602002602001018181525050600381600281518110611d5d57611d5d612840565b602002602001018181525050611d7286612123565b604051631759616b60e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690632eb2c2d690611dc4908990309086908b90600401612959565b600060405180830381600087803b158015611dde57600080fd5b505af1158015611df2573d6000803e3d6000fd5b505050506001600160a01b0386166000908152600760209081526040808320859055600c90915281208054859290611e2b9084906127e2565b90915550600190505b60048163ffffffff161015611ea157856001820363ffffffff1681518110611e5e57611e5e612840565b60209081029190910181015163ffffffff831660009081526003835260408082206001600160a01b038c1683529093529190912080549091019055600101611e34565b507f817746107cf51dfd99c990c44b9d8713fdd78578eca5172b189a355ce49d123933828742604051611ed794939291906127fa565b60405180910390a1505050505050565b33611ef5426203f4806127e2565b6001600160a01b03821660009081526007602052604090205410611f5b5760405162461bcd60e51b815260206004820152601860248201527f546f6b656e73206c6f636b656420666f722033206461797300000000000000006044820152606401610708565b611f6481612123565b6000611f6f82610a83565b604080516003808252608082019092529192506000919060208201606080368337019050509050600181600081518110611fab57611fab612840565b602002602001018181525050600281600181518110611fcc57611fcc612840565b602002602001018181525050600381600281518110611fed57611fed612840565b602090810291909101015260015b60048163ffffffff16101561206957826001820363ffffffff168151811061202557612025612840565b60209081029190910181015163ffffffff831660009081526003835260408082206001600160a01b0389168352909352919091208054919091039055600101611ffb565b50604051631759616b60e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690632eb2c2d6906120bc903090879086908890600401612959565b600060405180830381600087803b1580156120d657600080fd5b505af11580156120ea573d6000803e3d6000fd5b505050507fff20c51538ccc085c61cf63ee5e255767d9f5eeef8ebb2ce21b38439bc4d22d5838284426040516110a694939291906127fa565b6001600160a01b0381166000908152600160205260408120541561214d5761214a82610918565b90505b6001600160a01b0382166000908152600160205260409020429055801561220a576040517f40c10f190000000000000000000000000000000000000000000000000000000081526001600160a01b038381166004830152602482018390527f000000000000000000000000000000000000000000000000000000000000000016906340c10f1990604401600060405180830381600087803b1580156121f157600080fd5b505af1158015612205573d6000803e3d6000fd5b505050505b604080516001600160a01b03841681526020810183905242918101919091527f987d620f307ff6b94d58743cb7a7509f24071586a77759b77c2d4e29f75a2f9a90606001611460565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061192757611927612840565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561230757600080fd5b81356001600160e01b03198116811461231f57600080fd5b9392505050565b6000806040838503121561233957600080fd5b50508035926020909101359150565b6001600160a01b0381168114610b3357600080fd5b60006020828403121561236f57600080fd5b813561231f81612348565b600081518084526020808501945080840160005b838110156123aa5781518752958201959082019060010161238e565b509495945050505050565b60208152600061231f602083018461237a565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612407576124076123c8565b604052919050565b600082601f83011261242057600080fd5b813567ffffffffffffffff81111561243a5761243a6123c8565b61244d601f8201601f19166020016123de565b81815284602083860101111561246257600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561249557600080fd5b84356124a081612348565b935060208501356124b081612348565b925060408501359150606085013567ffffffffffffffff8111156124d357600080fd5b6124df8782880161240f565b91505092959194509250565b600080602083850312156124fe57600080fd5b823567ffffffffffffffff8082111561251657600080fd5b818501915085601f83011261252a57600080fd5b81358181111561253957600080fd5b8660208260051b850101111561254e57600080fd5b60209290920196919550909350505050565b6000806040838503121561257357600080fd5b82359150602083013561258581612348565b809150509250929050565b600080604083850312156125a357600080fd5b82356125ae81612348565b946020939093013593505050565b600082601f8301126125cd57600080fd5b8135602067ffffffffffffffff8211156125e9576125e96123c8565b8160051b6125f88282016123de565b928352848101820192828101908785111561261257600080fd5b83870192505b8483101561263157823582529183019190830190612618565b979650505050505050565b60006020828403121561264e57600080fd5b813567ffffffffffffffff81111561266557600080fd5b612671848285016125bc565b949350505050565b8015158114610b3357600080fd5b6000806040838503121561269a57600080fd5b82356126a581612348565b9150602083013561258581612679565b600080600080600060a086880312156126cd57600080fd5b85356126d881612348565b945060208601356126e881612348565b9350604086013567ffffffffffffffff8082111561270557600080fd5b61271189838a016125bc565b9450606088013591508082111561272757600080fd5b61273389838a016125bc565b9350608088013591508082111561274957600080fd5b506127568882890161240f565b9150509295509295909350565b600080600080600060a0868803121561277b57600080fd5b853561278681612348565b9450602086013561279681612348565b93506040860135925060608601359150608086013567ffffffffffffffff8111156127c057600080fd5b6127568882890161240f565b634e487b7160e01b600052601160045260246000fd5b600082198211156127f5576127f56127cc565b500190565b6001600160a01b038516815260806020820152600061281c608083018661237a565b828103604084015261282e818661237a565b91505082606083015295945050505050565b634e487b7160e01b600052603260045260246000fd5b600082821015612868576128686127cc565b500390565b6000816000190483118215151615612887576128876127cc565b500290565b6000826128a957634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156128c057600080fd5b815161231f81612348565b600060ff821660ff81036128e1576128e16127cc565b60010192915050565b6001600160a01b03851681526060602082015282606082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff84111561293257600080fd5b8360051b808660808501376000908301608001908152604090920192909252949350505050565b60006001600160a01b03808716835280861660208401525060a0604083015261298560a083018561237a565b8281036060840152612997818561237a565b838103608090940193909352505060008152602001949350505050565b6001600160a01b03841681526060602082015260006129d6606083018561237a565b9050826040830152949350505050565b6000602082840312156129f857600080fd5b5051919050565b600060018201612a1157612a116127cc565b5060010190565b600060208284031215612a2a57600080fd5b815161231f8161267956fea2646970667358221220f261ccb2d68dceb5861ccf30cfcd9998df0ae13b448556e3f3fad8877bbe529a64736f6c634300080d0033000000000000000000000000595a70409711f20523bd99b83d088cea9d3f92e1000000000000000000000000125808292f4bb11bf2d01b070d94e19490f7f4dc0000000000000000000000003321551494954f2bd682d2614495e365e9dffb2f

Deployed Bytecode

0x6080604052600436106101d85760003560e01c8063715018a611610102578063cb03fb1e11610095578063f23a6e6111610064578063f23a6e61146105fd578063f2fde38b14610642578063f6574f1b14610662578063faab492a1461066a57600080fd5b8063cb03fb1e1461057a578063d8dc7fb8146105a7578063da960185146105bd578063e20b576e146105dd57600080fd5b8063a22cb465116100d1578063a22cb465146104c8578063ab1c99fa146104e8578063acfd14b014610515578063bc197c811461053557600080fd5b8063715018a6146104335780637ef5c072146104485780638da5cb5b14610480578063941e75d1146104a857600080fd5b806319daaec01161017a5780634e71d92d116101495780634e71d92d146103bc5780635ffed1ab146103d1578063642c961e146103fe57806370bf74f21461041357600080fd5b806319daaec0146103395780631b5b7654146103595780633ccfd60b1461036f5780633e7b16d41461038457600080fd5b80630f0e9598116101b65780630f0e959814610262578063100bd9ee1461028f57806314a9919a146102af578063150b7a02146102dc57600080fd5b806301ffc9a7146101dd5780630692ccf2146102125780630ec68ff214610234575b600080fd5b3480156101e957600080fd5b506101fd6101f83660046122f5565b61067f565b60405190151581526020015b60405180910390f35b34801561021e57600080fd5b5061023261022d366004612326565b6106e8565b005b34801561024057600080fd5b5061025461024f36600461235d565b610918565b604051908152602001610209565b34801561026e57600080fd5b5061028261027d36600461235d565b610a83565b60405161020991906123b5565b34801561029b57600080fd5b506102326102aa36600461235d565b610b2a565b3480156102bb57600080fd5b506102546102ca36600461235d565b60056020526000908152604090205481565b3480156102e857600080fd5b506103206102f736600461247f565b7f150b7a0200000000000000000000000000000000000000000000000000000000949350505050565b6040516001600160e01b03199091168152602001610209565b34801561034557600080fd5b506102326103543660046124eb565b610b36565b34801561036557600080fd5b5061025460085481565b34801561037b57600080fd5b50610232610e26565b34801561039057600080fd5b5061025461039f366004612560565b600360209081526000928352604080842090915290825290205481565b3480156103c857600080fd5b50610232610eba565b3480156103dd57600080fd5b506102546103ec36600461235d565b60066020526000908152604090205481565b34801561040a57600080fd5b50610232610ec5565b34801561041f57600080fd5b5061023261042e366004612590565b6110b3565b34801561043f57600080fd5b5061023261113e565b34801561045457600080fd5b50610254610463366004612590565b600460209081526000928352604080842090915290825290205481565b34801561048c57600080fd5b506000546040516001600160a01b039091168152602001610209565b3480156104b457600080fd5b506102326104c336600461263c565b6111a2565b3480156104d457600080fd5b506102326104e3366004612687565b61146c565b3480156104f457600080fd5b5061025461050336600461235d565b600c6020526000908152604090205481565b34801561052157600080fd5b5061028261053036600461235d565b6115b4565b34801561054157600080fd5b506103206105503660046126b5565b7fbc197c810000000000000000000000000000000000000000000000000000000095945050505050565b34801561058657600080fd5b5061025461059536600461235d565b60016020526000908152604090205481565b3480156105b357600080fd5b5061025460095481565b3480156105c957600080fd5b506102826105d836600461235d565b611702565b3480156105e957600080fd5b506102326105f8366004612326565b611938565b34801561060957600080fd5b50610320610618366004612763565b7ff23a6e610000000000000000000000000000000000000000000000000000000095945050505050565b34801561064e57600080fd5b5061023261065d36600461235d565b611a59565b610232611b38565b34801561067657600080fd5b50610232611ee7565b60006001600160e01b031982167f4e2312e00000000000000000000000000000000000000000000000000000000014806106e257507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b600082815260036020908152604080832033808552925290912054610711565b60405180910390fd5b828110156107875760405162461bcd60e51b815260206004820152603e60248201527f596f7520646f206e6f7420686176652072657175657374656420746f6b656e2060448201527f616d6f756e7420617661696c61626c6520666f7220756e7374616b696e6700006064820152608401610708565b610794426203f4806127e2565b6001600160a01b038316600090815260076020526040902054106107fa5760405162461bcd60e51b815260206004820152601860248201527f546f6b656e73206c6f636b656420666f722033206461797300000000000000006044820152606401610708565b61080382612123565b60008481526003602090815260408083206001600160a01b0386811680865291909352818420805488900390559051637921219560e11b81523060048201526024810191909152604481018790526064810186905260a0608482015260a48101929092527f000000000000000000000000595a70409711f20523bd99b83d088cea9d3f92e1169063f242432a9060c401600060405180830381600087803b1580156108ad57600080fd5b505af11580156108c1573d6000803e3d6000fd5b505050507fff20c51538ccc085c61cf63ee5e255767d9f5eeef8ebb2ce21b38439bc4d22d5336108f086612253565b6108f986612253565b4260405161090a94939291906127fa565b60405180910390a150505050565b6001600160a01b03811660009081526001602052604081205481908190429080830361094a5750600095945050505050565b60008061095688610a83565b90506000805b60038163ffffffff1610156109c6576000838263ffffffff168151811061098557610985612840565b602002602001015111156109be57828163ffffffff16815181106109ab576109ab612840565b6020026020010151840193508160010191505b60010161095c565b506001600160a01b038916600090815260066020526040902054600954029690960195620f42408315610a3e57600a5460085498890198600019860102979097019660005b858163ffffffff161015610a2b5791810191600282049150600101610a0b565b5082600303610a3c57600b54820191505b505b610a488587612856565b87620f4240610a57848c61286d565b610a61919061288c565b610a6b91906127e2565b610a75919061286d565b9a9950505050505050505050565b604080516003808252608082019092526060916000919060208201848036833701905050905060015b60048163ffffffff161015610b235763ffffffff811660009081526003602090815260408083206001600160a01b03881684529091529020548015610b1a5780836001840363ffffffff1681518110610b0757610b07612840565b6020026020010181815101915081815250505b50600101610aac565b5092915050565b610b3381612123565b50565b600254429033906001600160a01b03168103610b4f5750325b610b5881612123565b60005b60ff8116841115610dd1576002546001600160a01b038084169116636352211e878760ff8616818110610b9057610b90612840565b905060200201356040518263ffffffff1660e01b8152600401610bb591815260200190565b602060405180830381865afa158015610bd2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bf691906128ae565b6001600160a01b031614610c4c5760405162461bcd60e51b815260206004820152600e60248201527f4e6f7420796f757220746f6b656e0000000000000000000000000000000000006044820152606401610708565b6001600160a01b038216600090815260046020526040812090868660ff8516818110610c7a57610c7a612840565b90506020020135815260200190815260200160002054600014610cdf5760405162461bcd60e51b815260206004820152601460248201527f546f6b656e20616c7265616479207374616b65640000000000000000000000006044820152606401610708565b6002546001600160a01b03166323b872dd8330888860ff8716818110610d0757610d07612840565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b158015610d5e57600080fd5b505af1158015610d72573d6000803e3d6000fd5b505050506001600160a01b03821660009081526004602052604081208491878760ff8616818110610da557610da5612840565b905060200201358152602001908152602001600020819055508080610dc9906128cb565b915050610b5b565b506001600160a01b03811660009081526006602052604090819020805485019055517fc4dc1dc09dccc24a61fd3762642d1b17d47806f3483ff317a353a919252643bf9061090a9083908790879087906128ea565b6000546001600160a01b03163314610e805760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610708565b600080546040516001600160a01b03909116914780156108fc02929091818181858888f19350505050158015610b33573d6000803e3d6000fd5b610ec333612123565b565b336000610ed182611702565b9050610edc82612123565b6040805160038082526080820190925260009160208201606080368337019050509050600181600081518110610f1457610f14612840565b602002602001018181525050600281600181518110610f3557610f35612840565b602002602001018181525050600381600281518110610f5657610f56612840565b6020908102919091010152604051631759616b60e11b81526001600160a01b037f000000000000000000000000595a70409711f20523bd99b83d088cea9d3f92e11690632eb2c2d690610fb3908690309086908890600401612959565b600060405180830381600087803b158015610fcd57600080fd5b505af1158015610fe1573d6000803e3d6000fd5b5050506001600160a01b03841660009081526007602052604090204290555060015b60048163ffffffff16101561107057826001820363ffffffff168151811061102d5761102d612840565b60209081029190910181015163ffffffff831660009081526003835260408082206001600160a01b03891683529093529190912080549091019055600101611003565b507fea8682dc8d491e977e357bb5a872cc1bfd0cd140cd9b1fef95c5148f919fe91d338284426040516110a694939291906127fa565b60405180910390a1505050565b6002546001600160a01b0316331461110d5760405162461bcd60e51b815260206004820152600f60248201527f4f6e6c792047656e6572617469766500000000000000000000000000000000006044820152606401610708565b6001600160a01b0382166000908152600c602052604081208054839290611135908490612856565b90915550505050565b6000546001600160a01b031633146111985760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610708565b610ec3600061228d565b336111ac81612123565b60005b82518160ff1610156113fc576001600160a01b038216600090815260046020526040812084518290869060ff86169081106111ec576111ec612840565b6020026020010151815260200190815260200160002054116112505760405162461bcd60e51b815260206004820152600e60248201527f4e6f7420796f757220746f6b656e0000000000000000000000000000000000006044820152606401610708565b61125d426203f4806127e2565b6001600160a01b03831660009081526004602052604081208551909190869060ff861690811061128f5761128f612840565b6020026020010151815260200190815260200160002054106112f35760405162461bcd60e51b815260206004820152601760248201527f546f6b656e206c6f636b656420666f72203320646179730000000000000000006044820152606401610708565b6001600160a01b038216600090815260046020526040812084518290869060ff861690811061132457611324612840565b6020026020010151815260200190815260200160002081905550600260009054906101000a90046001600160a01b03166001600160a01b03166323b872dd3084868560ff168151811061137957611379612840565b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b1580156113d357600080fd5b505af11580156113e7573d6000803e3d6000fd5b50505050806113f5906128cb565b90506111af565b5081516001600160a01b03821660009081526006602052604081208054909190611427908490612856565b90915550506040517f9c976369f88055398c1dede2748b210d08ada1f227b1265d30c7261f2580524990611460908390859042906129b4565b60405180910390a15050565b6000546001600160a01b031633146114c65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610708565b60025460405163a22cb46560e01b81526001600160a01b03848116600483015283151560248301529091169063a22cb46590604401600060405180830381600087803b15801561151557600080fd5b505af1158015611529573d6000803e3d6000fd5b505060405163a22cb46560e01b81526001600160a01b03858116600483015284151560248301527f000000000000000000000000595a70409711f20523bd99b83d088cea9d3f92e116925063a22cb4659150604401600060405180830381600087803b15801561159857600080fd5b505af11580156115ac573d6000803e3d6000fd5b505050505050565b60606000600260009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561160b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061162f91906129e6565b6001600160a01b0384166000908152600660205260408120549192508167ffffffffffffffff811115611664576116646123c8565b60405190808252806020026020018201604052801561168d578160200160208202803683370190505b509050600060015b8481116116f7576001600160a01b0387166000908152600460209081526040808320848452909152902054156116e557808383815181106116d8576116d8612840565b6020026020010181815250505b806116ef816129ff565b915050611695565b509095945050505050565b604080516003808252608082019092526060916000919060208201848036833701905050604051627eeac760e11b81526001600160a01b038581166004830152600160248301529192507f000000000000000000000000595a70409711f20523bd99b83d088cea9d3f92e19091169062fdd58e90604401602060405180830381865afa158015611796573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117ba91906129e6565b816000815181106117cd576117cd612840565b6020908102919091010152604051627eeac760e11b81526001600160a01b038481166004830152600260248301527f000000000000000000000000595a70409711f20523bd99b83d088cea9d3f92e1169062fdd58e90604401602060405180830381865afa158015611843573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061186791906129e6565b8160018151811061187a5761187a612840565b6020908102919091010152604051627eeac760e11b81526001600160a01b038481166004830152600360248301527f000000000000000000000000595a70409711f20523bd99b83d088cea9d3f92e1169062fdd58e90604401602060405180830381865afa1580156118f0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061191491906129e6565b8160028151811061192757611927612840565b602090810291909101015292915050565b3361194281612123565b604051637921219560e11b81526001600160a01b038281166004830152306024830152604482018590526064820184905260a06084830152600060a48301527f000000000000000000000000595a70409711f20523bd99b83d088cea9d3f92e1169063f242432a9060c401600060405180830381600087803b1580156119c757600080fd5b505af11580156119db573d6000803e3d6000fd5b5050506001600160a01b03821660008181526007602090815260408083204290558783526003825280832093835292905220805484019055507fea8682dc8d491e977e357bb5a872cc1bfd0cd140cd9b1fef95c5148f919fe91d81611a3f85612253565b611a4885612253565b426040516110a694939291906127fa565b6000546001600160a01b03163314611ab35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610708565b6001600160a01b038116611b2f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610708565b610b338161228d565b6002546040517ff22fb1d3000000000000000000000000000000000000000000000000000000008152600160048201526001600160a01b039091169063f22fb1d390602401602060405180830381865afa158015611b9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bbe9190612a18565b611c0a5760405162461bcd60e51b815260206004820152601260248201527f53616c65206973206e6f742061637469766500000000000000000000000000006044820152606401610708565b336000611c1682611702565b9050600081600281518110611c2d57611c2d612840565b602002602001015182600181518110611c4857611c48612840565b602002602001015183600081518110611c6357611c63612840565b6020026020010151611c7591906127e2565b611c7f91906127e2565b905060008111611cd15760405162461bcd60e51b815260206004820152601260248201527f4e6f20746f6b656e7320746f207374616b6500000000000000000000000000006044820152606401610708565b6000611cde8260026127e2565b60408051600380825260808201909252919250429160009160208201606080368337019050509050600181600081518110611d1b57611d1b612840565b602002602001018181525050600281600181518110611d3c57611d3c612840565b602002602001018181525050600381600281518110611d5d57611d5d612840565b602002602001018181525050611d7286612123565b604051631759616b60e11b81526001600160a01b037f000000000000000000000000595a70409711f20523bd99b83d088cea9d3f92e11690632eb2c2d690611dc4908990309086908b90600401612959565b600060405180830381600087803b158015611dde57600080fd5b505af1158015611df2573d6000803e3d6000fd5b505050506001600160a01b0386166000908152600760209081526040808320859055600c90915281208054859290611e2b9084906127e2565b90915550600190505b60048163ffffffff161015611ea157856001820363ffffffff1681518110611e5e57611e5e612840565b60209081029190910181015163ffffffff831660009081526003835260408082206001600160a01b038c1683529093529190912080549091019055600101611e34565b507f817746107cf51dfd99c990c44b9d8713fdd78578eca5172b189a355ce49d123933828742604051611ed794939291906127fa565b60405180910390a1505050505050565b33611ef5426203f4806127e2565b6001600160a01b03821660009081526007602052604090205410611f5b5760405162461bcd60e51b815260206004820152601860248201527f546f6b656e73206c6f636b656420666f722033206461797300000000000000006044820152606401610708565b611f6481612123565b6000611f6f82610a83565b604080516003808252608082019092529192506000919060208201606080368337019050509050600181600081518110611fab57611fab612840565b602002602001018181525050600281600181518110611fcc57611fcc612840565b602002602001018181525050600381600281518110611fed57611fed612840565b602090810291909101015260015b60048163ffffffff16101561206957826001820363ffffffff168151811061202557612025612840565b60209081029190910181015163ffffffff831660009081526003835260408082206001600160a01b0389168352909352919091208054919091039055600101611ffb565b50604051631759616b60e11b81526001600160a01b037f000000000000000000000000595a70409711f20523bd99b83d088cea9d3f92e11690632eb2c2d6906120bc903090879086908890600401612959565b600060405180830381600087803b1580156120d657600080fd5b505af11580156120ea573d6000803e3d6000fd5b505050507fff20c51538ccc085c61cf63ee5e255767d9f5eeef8ebb2ce21b38439bc4d22d5838284426040516110a694939291906127fa565b6001600160a01b0381166000908152600160205260408120541561214d5761214a82610918565b90505b6001600160a01b0382166000908152600160205260409020429055801561220a576040517f40c10f190000000000000000000000000000000000000000000000000000000081526001600160a01b038381166004830152602482018390527f0000000000000000000000003321551494954f2bd682d2614495e365e9dffb2f16906340c10f1990604401600060405180830381600087803b1580156121f157600080fd5b505af1158015612205573d6000803e3d6000fd5b505050505b604080516001600160a01b03841681526020810183905242918101919091527f987d620f307ff6b94d58743cb7a7509f24071586a77759b77c2d4e29f75a2f9a90606001611460565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061192757611927612840565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561230757600080fd5b81356001600160e01b03198116811461231f57600080fd5b9392505050565b6000806040838503121561233957600080fd5b50508035926020909101359150565b6001600160a01b0381168114610b3357600080fd5b60006020828403121561236f57600080fd5b813561231f81612348565b600081518084526020808501945080840160005b838110156123aa5781518752958201959082019060010161238e565b509495945050505050565b60208152600061231f602083018461237a565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612407576124076123c8565b604052919050565b600082601f83011261242057600080fd5b813567ffffffffffffffff81111561243a5761243a6123c8565b61244d601f8201601f19166020016123de565b81815284602083860101111561246257600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561249557600080fd5b84356124a081612348565b935060208501356124b081612348565b925060408501359150606085013567ffffffffffffffff8111156124d357600080fd5b6124df8782880161240f565b91505092959194509250565b600080602083850312156124fe57600080fd5b823567ffffffffffffffff8082111561251657600080fd5b818501915085601f83011261252a57600080fd5b81358181111561253957600080fd5b8660208260051b850101111561254e57600080fd5b60209290920196919550909350505050565b6000806040838503121561257357600080fd5b82359150602083013561258581612348565b809150509250929050565b600080604083850312156125a357600080fd5b82356125ae81612348565b946020939093013593505050565b600082601f8301126125cd57600080fd5b8135602067ffffffffffffffff8211156125e9576125e96123c8565b8160051b6125f88282016123de565b928352848101820192828101908785111561261257600080fd5b83870192505b8483101561263157823582529183019190830190612618565b979650505050505050565b60006020828403121561264e57600080fd5b813567ffffffffffffffff81111561266557600080fd5b612671848285016125bc565b949350505050565b8015158114610b3357600080fd5b6000806040838503121561269a57600080fd5b82356126a581612348565b9150602083013561258581612679565b600080600080600060a086880312156126cd57600080fd5b85356126d881612348565b945060208601356126e881612348565b9350604086013567ffffffffffffffff8082111561270557600080fd5b61271189838a016125bc565b9450606088013591508082111561272757600080fd5b61273389838a016125bc565b9350608088013591508082111561274957600080fd5b506127568882890161240f565b9150509295509295909350565b600080600080600060a0868803121561277b57600080fd5b853561278681612348565b9450602086013561279681612348565b93506040860135925060608601359150608086013567ffffffffffffffff8111156127c057600080fd5b6127568882890161240f565b634e487b7160e01b600052601160045260246000fd5b600082198211156127f5576127f56127cc565b500190565b6001600160a01b038516815260806020820152600061281c608083018661237a565b828103604084015261282e818661237a565b91505082606083015295945050505050565b634e487b7160e01b600052603260045260246000fd5b600082821015612868576128686127cc565b500390565b6000816000190483118215151615612887576128876127cc565b500290565b6000826128a957634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156128c057600080fd5b815161231f81612348565b600060ff821660ff81036128e1576128e16127cc565b60010192915050565b6001600160a01b03851681526060602082015282606082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff84111561293257600080fd5b8360051b808660808501376000908301608001908152604090920192909252949350505050565b60006001600160a01b03808716835280861660208401525060a0604083015261298560a083018561237a565b8281036060840152612997818561237a565b838103608090940193909352505060008152602001949350505050565b6001600160a01b03841681526060602082015260006129d6606083018561237a565b9050826040830152949350505050565b6000602082840312156129f857600080fd5b5051919050565b600060018201612a1157612a116127cc565b5060010190565b600060208284031215612a2a57600080fd5b815161231f8161267956fea2646970667358221220f261ccb2d68dceb5861ccf30cfcd9998df0ae13b448556e3f3fad8877bbe529a64736f6c634300080d0033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000595a70409711f20523bd99b83d088cea9d3f92e1000000000000000000000000125808292f4bb11bf2d01b070d94e19490f7f4dc0000000000000000000000003321551494954f2bd682d2614495e365e9dffb2f

-----Decoded View---------------
Arg [0] : _og (address): 0x595a70409711F20523BD99b83D088CeA9d3f92e1
Arg [1] : _G2 (address): 0x125808292F4Bb11Bf2D01b070d94E19490f7f4Dc
Arg [2] : _token (address): 0x3321551494954f2BD682D2614495E365e9DFfb2F

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000595a70409711f20523bd99b83d088cea9d3f92e1
Arg [1] : 000000000000000000000000125808292f4bb11bf2d01b070d94e19490f7f4dc
Arg [2] : 0000000000000000000000003321551494954f2bd682d2614495e365e9dffb2f


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
Loading...
Loading
[ 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.