Address io14qqv4xz8jzk3hexhmp9qdtdghdpamvyzuqajrd

Contract Overview

Balance:
0 IOTX

IOTX Value:
$ 0

Token:
Txn Hash
Block
From
To
Value [Txn Fee]
8c615635b97a187bf79211b55bd003586a6edbffb7207021168c1ac5b1c10d0b 15460755 2022-01-23 03:24:50 +0000 UTC about a minute ago io1cr675n77vnlfntxknwws2rcjhtweaqezckycu9  IN    Contract: AlianaSale 0 IOTX 0.105259
4b18fb5f35113a3769434595669ca9ee457ee5300a7387783d28484e8f216ce9 15460745 2022-01-23 03:24:00 +0000 UTC 2 minutes ago io1vtyfs8zfelyk9spktn8xwpg2lsq3sd0f53ndup  IN    Contract: AlianaSale 0 IOTX 0.085921
96481cedfeb179095687ed4919a62a5af5a658e11d87b7b934280e0523725859 15460744 2022-01-23 03:23:55 +0000 UTC 2 minutes ago io1vtyfs8zfelyk9spktn8xwpg2lsq3sd0f53ndup  IN    Contract: AlianaSale 0 IOTX 0.107359
206fd539c713c82c241bedc4eb5324a3ba5061731a6051e21852803e04f0bb88 15460730 2022-01-23 03:22:45 +0000 UTC 3 minutes ago io1w7lqvd5updj5rucrpknmstt6a0k66gt9jxcn82  IN    Contract: AlianaSale 0 IOTX 0.098821
a2fc4c42300ad5e617661898143f2347f7d24efc7dd4f5f75c409a5e2ce695a4 15460689 2022-01-23 03:19:20 +0000 UTC 7 minutes ago io1lv7z3tvwtz5dz6e2tyqmdajkz87y9eqwyf432k  IN    Contract: AlianaSale 0 IOTX 0.107359
f23922a044aa6241379b3f81cbd1e8f5b86746169dcde10b0a85fd32358e3339 15460675 2022-01-23 03:18:10 +0000 UTC 8 minutes ago io1g7nq6pm5sm4n6ep99z4mg30u3s3h4d35amxshk  IN    Contract: AlianaSale 0 IOTX 0.100921
757ad9f215eca58fdd4fcaa3660997a69f595ac0da23d5cadd24f4e0f52d54d6 15460637 2022-01-23 03:15:00 +0000 UTC 11 minutes ago io1xf2cwc2z3g5ugc5kkh7n5r2f3r3c5458685dzu  IN    Contract: AlianaSale 0 IOTX 0.083821
38706e610a0ab552ea842548d8fe43c4386a3a9de357e1cda619ef0fb4de1d13 15460635 2022-01-23 03:14:50 +0000 UTC 11 minutes ago io1xf2cwc2z3g5ugc5kkh7n5r2f3r3c5458685dzu  IN    Contract: AlianaSale 0 IOTX 0.085921
559e36b71efb0c15953629ee937dc6afa6886f140de2dd821aafc0398b2ab01a 15460623 2022-01-23 03:13:50 +0000 UTC 12 minutes ago io17lfnrw8stc3sj5kzz6xvc5pm2ytm35yf7d9r3x  IN    Contract: AlianaSale 0 IOTX 0.083821
f58cff81f682e778bf65294007cf029e67d17018a99df2ae63aefb16ec607c35 15460620 2022-01-23 03:13:35 +0000 UTC 13 minutes ago io17lfnrw8stc3sj5kzz6xvc5pm2ytm35yf7d9r3x  IN    Contract: AlianaSale 0 IOTX 0.105259
6380df761f3ecd95f7c5e1972ce56207adc6aa946afc00e67dd34eeb3905f642 15460612 2022-01-23 03:12:55 +0000 UTC 13 minutes ago io1v00lhzk85t2mhc329le93kv3ndtxlp7wvrvedk  IN    Contract: AlianaSale 0 IOTX 0.108432
5de1f826e27e2fee5c5560263fc1d1d52420b87d4805c3eaf3e6ad12226005d3 15460568 2022-01-23 03:09:15 +0000 UTC 17 minutes ago io1tq9p5fexa9g3ua48qv2jj3fszntwx78u8yq06w  IN    Contract: AlianaSale 0 IOTX 0.085921
0b9858f4a87542737c3660e3aff59323e7e55da23fcfd6fb302bb39cf3546b62 15460556 2022-01-23 03:08:15 +0000 UTC 18 minutes ago io1tq9p5fexa9g3ua48qv2jj3fszntwx78u8yq06w  IN    Contract: AlianaSale 0 IOTX 0.090259
017d4dc72bf78b2297ef39a337c622fdc9a2eaa445f1fb6af2b6b298d9ffa433 15460553 2022-01-23 03:08:00 +0000 UTC 18 minutes ago io1tq9p5fexa9g3ua48qv2jj3fszntwx78u8yq06w  IN    Contract: AlianaSale 0 IOTX 0.107359
ab86e61a851a881fb863b347f27c953fa2054dd771ba75e7fc1ca32cecb093f6 15460547 2022-01-23 03:07:30 +0000 UTC 19 minutes ago io1j23hceqv5hpr5ut8uk0mrnkg83hdkcv5pvlpkm  IN    Contract: AlianaSale 0 IOTX 0.083821
0fa01b4013dabf604a3b08fac9474fbd74910acfa099badae32153a3d377cdbf 15460545 2022-01-23 03:07:20 +0000 UTC 19 minutes ago io1j23hceqv5hpr5ut8uk0mrnkg83hdkcv5pvlpkm  IN    Contract: AlianaSale 0 IOTX 0.100921
4520e853488f307adb95fd639c6b86fb6e1dfb839e7293cd109b46921fbbc419 15460488 2022-01-23 03:02:35 +0000 UTC 24 minutes ago io1k4y5u5atkum5pnzt9kqe9al3uqp9dy4gqvr7h3  IN    Contract: AlianaSale 0 IOTX 0.105259
da370164c8ee15a43fcdd79a32491bb864eb3fbc8cfae26ba03531f3e9076203 15460464 2022-01-23 03:00:35 +0000 UTC 26 minutes ago io1h9gq34pv2twcdn5fgexcaptmj5x9zzf599478e  IN    Contract: AlianaSale 0 IOTX 0.085921
97fa685bc394171b2330456adca75fa6f9fb9843f0489bda835352ebe465ffea 15460445 2022-01-23 02:59:00 +0000 UTC 27 minutes ago io14fvd2rq6kflhjwr6sfjj5gvhv58m6r7p040gwg  IN    Contract: AlianaSale 0 IOTX 0.083821
7d64fc2cafb3c18d826d96f8eb25cb20c72dbd1d51d58e1885993e61bfcb3919 15460376 2022-01-23 02:53:10 +0000 UTC 33 minutes ago io1dts9mnzjltcq00el59wclavujl0568epvnc8kj  IN    Contract: AlianaSale 0 IOTX 0.090259
21d160545f8cec68e47db57c5706058c8282478874d505f9537a1a5094f50aad 15460365 2022-01-23 02:52:15 +0000 UTC 34 minutes ago io1xh3nledzzfvsg59ucre8mg0y30laej8ctlnene  IN    Contract: AlianaSale 0 IOTX 0.092359
1b0dd14617237ad290df39867f003c4da0d6c99a111a75c4815e6d271059473f 15460355 2022-01-23 02:51:25 +0000 UTC 35 minutes ago io159myp8fcmkl7dpygy4m6rzhl6r4qeqt8yequzm  IN    Contract: AlianaSale 0 IOTX 0.098821
1d96fef7ecdefb6141ef6ef34bf0b1778190d152346fb7ddfcad88160f0b08e5 15460351 2022-01-23 02:51:05 +0000 UTC 35 minutes ago io18j4rzzcjh5mcncz2lkzxrq0mxfv6a0rzch60h9  IN    Contract: AlianaSale 0 IOTX 0.105259
565d99ff99b6f5dfdc8c665b3338c4de8953af814a93bd5fc843ac8ff37da37c 15460348 2022-01-23 02:50:50 +0000 UTC 35 minutes ago io1v00lhzk85t2mhc329le93kv3ndtxlp7wvrvedk  IN    Contract: AlianaSale 0 IOTX 0.091161
67540e377db840da3998058e516df89b720b3b38df9a6dbc1ef81f1ef181daf1 15460342 2022-01-23 02:50:20 +0000 UTC 36 minutes ago io18j4rzzcjh5mcncz2lkzxrq0mxfv6a0rzch60h9  IN    Contract: AlianaSale 0 IOTX 0.107359
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
AlianaSale

Compiler Version
v0.5.5+commit.47a71e8f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license
File 1 of 9: ./contract/AlianaSale.sol
pragma solidity ^0.5.0;

import "./aliana/GFAccessControl.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "./aliana/IAliana.sol";

contract AlianaSale is GFAccessControl {
    using SafeMath for uint256;

    // The gae TOKEN
    IERC20 public gaeToken;
    IAliana public aliana;

    // Mapping from owner to list of owned token IDs
    mapping(address => uint256[]) private _ownedTokensSale;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndexSale;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokensSale;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndexSale;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => AlianaSaleInfo) private _allSaleAlianaInfo;

    // Cut owner takes on each auction, measured in basis points (1/100 of a percent).
    // Values 0-10,000 map to 0%-100%
    uint256 public ownerCutSale;
    uint256 public cutedSaleBalance;

    // Info of each sale aliana.
    struct AlianaSaleInfo {
        uint256 tokenId;
        uint256 beginBlock;
        uint256 price;
        address seller;
    }

    event CreateAlianaSale(
        address indexed seller,
        uint256 indexed tokenId,
        uint256 price
    );
    event CancelAlianaSale(address indexed seller, uint256 tokenId);
    event BuySaleAliana(
        address indexed seller,
        address indexed buyer,
        uint256 indexed tokenId
    );

    constructor(IERC20 _gaeToken, IAliana _alianaAddr) public {
        require(_alianaAddr.isAliana(), "AlianaSale: isAliana false");
        gaeToken = _gaeToken;
        aliana = _alianaAddr;
        ownerCutSale = 300;
    }

    /// @dev Update the value of ownerCutSale, can only be called by the CEO.
    function setOwnerCutSale(uint256 num) external onlyCEO {
        require(num <= 10000, "AlianaSale: num not valid");
        ownerCutSale = num;
    }

    function withdrawOwnerCutSale(uint256 num) external onlyCLevel {
        require(num <= cutedSaleBalance, "AlianaSale: num <= cutedSaleBalance");

        require(
            gaeToken.transferFrom(address(this), msg.sender, num),
            "AlianaSale: failed to transfer gae token"
        );

        cutedSaleBalance = cutedSaleBalance.sub(num);
    }

    /// @notice Returns all the relevant information about a specific aliana.
    /// @param _tokenId The ID of the aliana of interest.
    function getAlianaSaleInfo(uint256 _tokenId)
        external
        view
        returns (
            uint256 beginBlock,
            uint256 price,
            address seller
        )
    {
        AlianaSaleInfo storage info = _allSaleAlianaInfo[_tokenId];
        beginBlock = info.beginBlock;
        price = info.price;
        seller = info.seller;
        if (!_isOnSale(info)) {
            beginBlock = 0;
            price = 0;
            seller = address(0);
        }
    }

    function createAlianaSale(uint256 _tokenId, uint256 _price)
        external
        whenNotPaused
    {
        _createAlianaSaleFrom(msg.sender, _tokenId, _price);
    }

    function _createAlianaSaleFrom(
        address _from,
        uint256 _tokenId,
        uint256 _price
    ) internal whenNotPaused {
        require(_price > 0, "AlianaSale: price can't be 0");
        require(
            aliana.ownerOf(_tokenId) == _from,
            "AlianaSale: must be the owner"
        );

        aliana.transferFrom(address(_from), address(this), _tokenId);

        _addTokenToOwnerEnumerationSale(_from, _tokenId);

        _addTokenToAllTokensEnumerationSale(_tokenId);

        AlianaSaleInfo storage info = _allSaleAlianaInfo[_tokenId];
        info.tokenId = _tokenId;
        info.beginBlock = block.number;
        info.price = _price;
        info.seller = _from;

        emit CreateAlianaSale(_from, _tokenId, _price);
    }

    function adminCancelAlianaSales(uint256[] memory _tokenIds)
        public
        onlyCLevel
    {
        for (uint256 i = 0; i < _tokenIds.length; i++) {
            uint256 _tokenId = _tokenIds[i];
            AlianaSaleInfo storage info = _allSaleAlianaInfo[_tokenId];
            if (_isOnSale(info)) {
                aliana.transferFrom(
                    address(this),
                    address(info.seller),
                    _tokenId
                );
                _burnSale(info.seller, _tokenId);
                emit CancelAlianaSale(info.seller, _tokenId);
            }
        }
    }

    function cancelAlianaSale(uint256 _tokenId) external {
        _cancelAlianaSaleFrom(msg.sender, _tokenId);
    }

    function _cancelAlianaSaleFrom(address _from, uint256 _tokenId) internal {
        AlianaSaleInfo storage info = _allSaleAlianaInfo[_tokenId];
        require(_isOnSale(info), "AlianaSale: target token not on sale");
        address seller = info.seller;
        require(_from == seller, "AlianaSale: you're not the seller");

        aliana.transferFrom(address(this), address(info.seller), _tokenId);

        _burnSale(info.seller, _tokenId);

        emit CancelAlianaSale(info.seller, _tokenId);
    }

    function buySaleAliana(uint256 _tokenId) external whenNotPaused {
        _buySaleAlianaFrom(msg.sender, _tokenId);
    }

    function _buySaleAlianaFrom(address buyer, uint256 _tokenId)
        internal
        whenNotPaused
    {
        AlianaSaleInfo storage info = _allSaleAlianaInfo[_tokenId];
        require(_isOnSale(info), "AlianaSale: target token not on sale");

        require(
            gaeToken.transferFrom(buyer, address(this), info.price),
            "AlianaSale: failed to transfer gae token to contract"
        );

        uint256 auctioneerCut = _computeCutSale(info.price);
        uint256 sellerGet = info.price - auctioneerCut;
        cutedSaleBalance = cutedSaleBalance.add(auctioneerCut);

        require(
            gaeToken.transferFrom(address(this), info.seller, sellerGet),
            "AlianaSale: failed to transfer gae token to seller"
        );

        aliana.transferFrom(address(this), address(buyer), _tokenId);

        emit BuySaleAliana(info.seller, buyer, _tokenId);
        _burnSale(info.seller, _tokenId);
    }

    /// @dev Computes owner's cut of a sale.
    /// @param _price - Sale price of NFT.
    function _computeCutSale(uint256 _price) internal view returns (uint256) {
        // NOTE: We don't use SafeMath (or similar) in this function because
        //  all of our entry functions carefully cap the maximum values for
        //  currency (at 128-bits), and ownerCut <= 10000 (see the require()
        //  statement in the ClockAuction constructor). The result of this
        //  function is always guaranteed to be <= _price.
        return (_price * ownerCutSale) / 10000;
    }

    function _burnSale(address _seller, uint256 _tokenId) internal {
        _removeTokenFromOwnerEnumerationSale(_seller, _tokenId);
        // Since _tokenId will be deleted, we can clear its slot in _ownedTokensIndex to trigger a gas refund
        _ownedTokensIndexSale[_tokenId] = 0;
        _removeTokenFromAllTokensEnumerationSale(_tokenId);

        AlianaSaleInfo storage info = _allSaleAlianaInfo[_tokenId];
        info.beginBlock = 0;
        info.seller = address(0);
        info.price = 0;
    }

    /// @dev Returns true if the NFT is on sale.
    /// @param _info - Auction to check.
    function _isOnSale(AlianaSaleInfo storage _info)
        internal
        view
        returns (bool)
    {
        return (_info.beginBlock > 0);
    }

    function totalSale() public view returns (uint256) {
        return _allTokensSale.length;
    }

    /**
     * @dev Gets the list of token IDs of the sale.
     * @return uint256[] List of token IDs sale.
     */
    function allTokensSale() external view returns (uint256[] memory tokenIds) {
        return _allTokensSale;
    }

    /**
     * @dev Gets the list of token IDs of the sale.
     * @return uint256[] List of token IDs sale.
     */
    function listTokensSale(uint256 _skip, uint256 _limit)
        external
        view
        returns (uint256[] memory tokenIds)
    {
        uint256 totalCount = totalSale();
        if (_limit == 0 || _skip >= totalCount) {
            // Return an empty array
            return new uint256[](0);
        } else {
            uint256 tokenCount = _limit;
            if (_skip.add(_limit) > totalCount) {
                tokenCount = totalCount - _skip;
            }
            uint256 end = _skip.add(tokenCount);
            uint256[] memory result = new uint256[](tokenCount);
            uint256 resultIndex = 0;

            // We count on the fact that all cats have IDs starting at 1 and increasing
            // sequentially up to the totalCat count.
            uint256 i;

            for (i = _skip; i < end; i++) {
                result[resultIndex] = _allTokensSale[i];
                resultIndex++;
            }

            return result;
        }
    }

    /// @notice Returns a list of all Aliana IDs assigned to an address.
    /// @param _owner The owner whose Kitties we are interested in.
    /// @dev This method MUST NEVER be called by smart contract code. First, it's fairly
    ///  expensive (it walks the entire Aliana array looking for cats belonging to owner),
    ///  but it also returns a dynamic array, which is only supported for web3 calls, and
    ///  not contract-to-contract calls.
    function tokensOfOwnerSale(address _owner)
        external
        view
        returns (uint256[] memory ownerTokens)
    {
        return _tokensOfOwnerSale(_owner);
    }

    /**
     * @dev Gets the list of token IDs of the requested owner.
     * @param owner address owning the tokens
     * @return uint256[] List of token IDs owned by the requested address
     */
    function _tokensOfOwnerSale(address owner)
        internal
        view
        returns (uint256[] storage)
    {
        return _ownedTokensSale[owner];
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumerationSale(address to, uint256 tokenId)
        private
    {
        _ownedTokensIndexSale[tokenId] = _ownedTokensSale[to].length;
        _ownedTokensSale[to].push(tokenId);
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumerationSale(uint256 tokenId) private {
        _allTokensIndexSale[tokenId] = _allTokensSale.length;
        _allTokensSale.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumerationSale(address from, uint256 tokenId)
        private
    {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _ownedTokensSale[from].length.sub(1);
        uint256 tokenIndex = _ownedTokensIndexSale[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokensSale[from][lastTokenIndex];

            _ownedTokensSale[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndexSale[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        _ownedTokensSale[from].length--;

        // Note that _ownedTokensIndex[tokenId] hasn't been cleared: it still points to the old slot (now occupied by
        // lastTokenId, or just over the end of the array if the token was the last one).
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumerationSale(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokensSale.length.sub(1);
        uint256 tokenIndex = _allTokensIndexSale[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokensSale[lastTokenIndex];

        _allTokensSale[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndexSale[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        _allTokensSale.length--;
        _allTokensIndexSale[tokenId] = 0;
    }

    function receiveApproval(
        address _sender,
        uint256 _value,
        address _tokenContract,
        bytes memory _extraData
    ) public {
        require(_value >= 0, "AlianaSale: approval negative");
        uint256 action;
        assembly {
            action := mload(add(_extraData, 0x20))
        }
        require(action == 1 || action == 2, "AlianaSale: unknow action");
        if (action == 1) {
            // buy
            require(
                _tokenContract == address(gaeToken),
                "AlianaSale: approval and want buy a aliana, but used token isn't GFT"
            );
            uint256 tokenId;
            assembly {
                tokenId := mload(add(_extraData, 0x40))
            }
            _buySaleAlianaFrom(_sender, tokenId);
        } else if (action == 2) {
            // sale
            require(
                _tokenContract == address(aliana),
                "AlianaSale: approval and want sale a aliana, but used token isn't Aliana"
            );
            uint256 tokenId;
            uint256 price;
            assembly {
                tokenId := mload(add(_extraData, 0x40))
                price := mload(add(_extraData, 0x60))
            }
            _createAlianaSaleFrom(_sender, tokenId, price);
        }
    }
}

File 2 of 9: ./contract/aliana/IAliana.sol
pragma solidity ^0.5.0;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";

/// @title SEKRETOOOO
contract IAliana is IERC721 {
    function createOfficialAliana(uint256 _genes, address _owner)
        public
        returns (uint256);

    function burn(uint256 _tokenID) external;

    function isAliana() public returns (bool);

    function geneLpLabor(int256 _id, uint256 _gene)
        public
        view
        returns (uint256);

    function geneLpLabors(int256[] memory _ids, uint256[] memory _genes)
        public
        view
        returns (uint256[] memory);

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

    function getAliana(uint256 _id)
        external
        view
        returns (
            uint256 birthTime,
            uint256 matronId,
            uint256 sireId,
            uint256 genes,
            uint256 lpLabor
        );
}

File 3 of 9: @openzeppelin/contracts/token/ERC20/IERC20.sol
pragma solidity ^0.5.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see {ERC20Detailed}.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 4 of 9: @openzeppelin/contracts/token/ERC20/SafeERC20.sol
pragma solidity ^0.5.0;

import "./IERC20.sol";
import "../../math/SafeMath.sol";
import "../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves.

        // A Solidity high level call has three parts:
        //  1. The target address is checked to verify it contains contract code
        //  2. The call itself is made, and success asserted
        //  3. The return value is decoded, which in turn checks the size of the returned data.
        // solhint-disable-next-line max-line-length
        require(address(token).isContract(), "SafeERC20: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = address(token).call(data);
        require(success, "SafeERC20: low-level call failed");

        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 5 of 9: ./contract/aliana/GFAccessControl.sol
pragma solidity ^0.5.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";

/// @title A facet of AlianaCore that manages special access privileges.
/// @dev See the AlianaCore contract documentation to understand how the various contract facets are arranged.
contract GFAccessControl {
    mapping(address => bool) public whitelist;

    event WhitelistedAddressAdded(address addr);
    event WhitelistedAddressRemoved(address addr);

    /**
     * @dev Throws if called by any account that's not whitelisted.
     */
    modifier onlyWhitelisted() {
        require(whitelist[msg.sender], "not whitelisted");
        _;
    }

    /**
     * @dev add an address to the whitelist
     * @param addr address
     * @return true if the address was added to the whitelist, false if the address was already in the whitelist
     */
    function addAddressToWhitelist(address addr)
        external
        onlyCEO
        returns (bool success)
    {
        return _addAddressToWhitelist(addr);
    }

    /**
     * @dev add an address to the whitelist
     * @param addr address
     * @return true if the address was added to the whitelist, false if the address was already in the whitelist
     */
    function _addAddressToWhitelist(address addr)
        private
        onlyCEO
        returns (bool success)
    {
        if (!whitelist[addr]) {
            whitelist[addr] = true;
            emit WhitelistedAddressAdded(addr);
            success = true;
        }
    }

    /**
     * @dev add addresses to the whitelist
     * @param addrs addresses
     * @return true if at least one address was added to the whitelist,
     * false if all addresses were already in the whitelist
     */
    function addAddressesToWhitelist(address[] calldata addrs)
        external
        onlyCEO
        returns (bool success)
    {
        for (uint256 i = 0; i < addrs.length; i++) {
            if (_addAddressToWhitelist(addrs[i])) {
                success = true;
            }
        }
    }

    /**
     * @dev remove an address from the whitelist
     * @param addr address
     * @return true if the address was removed from the whitelist,
     * false if the address wasn't in the whitelist in the first place
     */
    function removeAddressFromWhitelist(address addr)
        external
        onlyCEO
        returns (bool success)
    {
        return _removeAddressFromWhitelist(addr);
    }

    /**
     * @dev remove an address from the whitelist
     * @param addr address
     * @return true if the address was removed from the whitelist,
     * false if the address wasn't in the whitelist in the first place
     */
    function _removeAddressFromWhitelist(address addr)
        private
        onlyCEO
        returns (bool success)
    {
        if (whitelist[addr]) {
            whitelist[addr] = false;
            emit WhitelistedAddressRemoved(addr);
            success = true;
        }
    }

    /**
     * @dev remove addresses from the whitelist
     * @param addrs addresses
     * @return true if at least one address was removed from the whitelist,
     * false if all addresses weren't in the whitelist in the first place
     */
    function removeAddressesFromWhitelist(address[] calldata addrs)
        external
        onlyCEO
        returns (bool success)
    {
        for (uint256 i = 0; i < addrs.length; i++) {
            if (_removeAddressFromWhitelist(addrs[i])) {
                success = true;
            }
        }
    }

    // This facet controls access control for GameAlianas. There are four roles managed here:
    //
    //     - The CEO: The CEO can reassign other roles and change the addresses of our dependent smart
    //         contracts. It is also the only role that can unpause the smart contract. It is initially
    //         set to the address that created the smart contract in the AlianaCore constructor.
    //
    //     - The CFO: The CFO can withdraw funds from AlianaCore and its auction contracts.
    //
    //     - The COO: The COO can release gen0 alianas to auction, and mint promo cats.
    //
    // It should be noted that these roles are distinct without overlap in their access abilities, the
    // abilities listed for each role above are exhaustive. In particular, while the CEO can assign any
    // address to any role, the CEO address itself doesn't have the ability to act in those roles. This
    // restriction is intentional so that we aren't tempted to use the CEO address frequently out of
    // convenience. The less we use an address, the less likely it is that we somehow compromise the
    // account.

    /// @dev Emited when contract is upgraded - See README.md for updgrade plan
    event ContractUpgrade(address newContract);

    // The addresses of the accounts (or contracts) that can execute actions within each roles.
    address public ceoAddress;
    address public candidateCEOAddress;

    address public cfoAddress;
    address public cooAddress;

    event SetCandidateCEO(address addr);
    event AcceptCEO(address addr);
    event SetCFO(address addr);
    event SetCOO(address addr);

    event Pause(address operator);
    event Unpause(address operator);

    // @dev Keeps track whether the contract is paused. When that is true, most actions are blocked
    bool public paused = false;

    /**
     * @dev The Ownable constructor sets the original `ceoAddress` of the contract to the sender
     * account.
     */
    constructor() public {
        ceoAddress = msg.sender;
        emit AcceptCEO(ceoAddress);
    }

    /// @dev Access modifier for CEO-only functionality
    modifier onlyCEO() {
        require(msg.sender == ceoAddress, "not ceo");
        _;
    }

    /// @dev Access modifier for CFO-only functionality
    modifier onlyCFO() {
        require(msg.sender == cfoAddress, "not cfo");
        _;
    }

    /// @dev Access modifier for COO-only functionality
    modifier onlyCOO() {
        require(msg.sender == cooAddress, "not coo");
        _;
    }

    modifier onlyCLevel() {
        require(
            msg.sender == cooAddress ||
                msg.sender == ceoAddress ||
                msg.sender == cfoAddress,
            "not c level"
        );
        _;
    }

    modifier onlyCLevelOrWhitelisted() {
        require(
            msg.sender == cooAddress ||
                msg.sender == ceoAddress ||
                msg.sender == cfoAddress ||
                whitelist[msg.sender],
            "not c level or whitelisted"
        );
        _;
    }

    /// @dev Assigns a new address to act as the CEO. Only available to the current CEO.
    /// @param _candidateCEO The address of the new CEO
    function setCandidateCEO(address _candidateCEO) external onlyCEO {
        require(_candidateCEO != address(0), "addr can't be 0");

        candidateCEOAddress = _candidateCEO;
        emit SetCandidateCEO(candidateCEOAddress);
    }

    /// @dev Accept CEO invite.
    function acceptCEO() external {
        require(msg.sender == candidateCEOAddress, "you are not the candidate");

        ceoAddress = candidateCEOAddress;
        emit AcceptCEO(ceoAddress);
    }

    /// @dev Assigns a new address to act as the CFO. Only available to the current CEO.
    /// @param _newCFO The address of the new CFO
    function setCFO(address _newCFO) external onlyCEO {
        require(_newCFO != address(0), "addr can't be 0");

        cfoAddress = _newCFO;
        emit SetCFO(cfoAddress);
    }

    /// @dev Assigns a new address to act as the COO. Only available to the current CEO.
    /// @param _newCOO The address of the new COO
    function setCOO(address _newCOO) external onlyCEO {
        require(_newCOO != address(0), "addr can't be 0");

        cooAddress = _newCOO;
        emit SetCOO(cooAddress);
    }

    /*** Pausable functionality adapted from OpenZeppelin ***/

    /// @dev Modifier to allow actions only when the contract IS NOT paused
    modifier whenNotPaused() {
        require(!paused, "paused");
        _;
    }

    /// @dev Modifier to allow actions only when the contract IS paused
    modifier whenPaused() {
        require(paused, "not paused");
        _;
    }

    /// @dev Called by any "C-level" role to pause the contract. Used only when
    ///  a bug or exploit is detected and we need to limit damage.
    function pause() external onlyCEO whenNotPaused {
        paused = true;
        emit Pause(msg.sender);
    }

    /// @dev Unpauses the smart contract. Can only be called by the CEO, since
    ///  one reason we may pause the contract is when CFO or COO accounts are
    ///  compromised.
    /// @notice This is public rather than external so it can be called by
    ///  derived contracts.
    function unpause() public onlyCEO whenPaused {
        // can't unpause if contract was upgraded
        paused = false;
        emit Unpause(msg.sender);
    }

    // Set in case the core contract is broken and an upgrade is required
    address public newContractAddress;

    /// @dev Used to mark the smart contract as upgraded, in case there is a serious
    ///  breaking bug. This method does nothing but keep track of the new contract and
    ///  emit a message indicating that the new address is set. It's up to clients of this
    ///  contract to update to the new contract address in that case. (This contract will
    ///  be paused indefinitely if such an upgrade takes place.)
    /// @param _v2Address new address
    function setNewAddress(address _v2Address) external onlyCEO whenPaused {
        // See README.md for updgrade plan
        newContractAddress = _v2Address;
        emit ContractUpgrade(_v2Address);
    }

    //////////
    // Safety Methods
    //////////

    /// @notice This method can be used by the owner to extract mistakenly
    ///  sent tokens to this contract.
    /// @param token_ The address of the token contract that you want to recover
    ///  set to 0 in case you want to extract ether.
    function claimTokens(address token_) external onlyCEO {
        if (token_ == address(0)) {
            address(msg.sender).transfer(address(this).balance);
            return;
        }

        IERC20 token = IERC20(token_);
        uint256 balance = token.balanceOf(address(this));
        token.transfer(address(msg.sender), balance);

        emit ClaimedTokens(token_, address(msg.sender), balance);
    }

    function withdrawTokens(
        IERC20 token_,
        address to_,
        uint256 amount_
    ) external onlyCEO {
        assert(token_.transfer(to_, amount_));
        emit WithdrawTokens(address(token_), address(msg.sender), to_, amount_);
    }

    ////////////////
    // Events
    ////////////////

    event ClaimedTokens(
        address indexed token_,
        address indexed controller_,
        uint256 amount_
    );

    event WithdrawTokens(
        address indexed token_,
        address indexed controller_,
        address indexed to_,
        uint256 amount_
    );
}

File 6 of 9: @openzeppelin/contracts/introspection/IERC165.sol
pragma solidity ^0.5.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 7 of 9: @openzeppelin/contracts/math/SafeMath.sol
pragma solidity ^0.5.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     *
     * _Available since v2.4.0._
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    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;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     *
     * _Available since v2.4.0._
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        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;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     *
     * _Available since v2.4.0._
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

File 8 of 9: @openzeppelin/contracts/token/ERC721/IERC721.sol
pragma solidity ^0.5.0;

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

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
contract IERC721 is IERC165 {
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of NFTs in `owner`'s account.
     */
    function balanceOf(address owner) public view returns (uint256 balance);

    /**
     * @dev Returns the owner of the NFT specified by `tokenId`.
     */
    function ownerOf(uint256 tokenId) public view returns (address owner);

    /**
     * @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to
     * another (`to`).
     *
     *
     *
     * Requirements:
     * - `from`, `to` cannot be zero.
     * - `tokenId` must be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this
     * NFT by either {approve} or {setApprovalForAll}.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) public;
    /**
     * @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to
     * another (`to`).
     *
     * Requirements:
     * - If the caller is not `from`, it must be approved to move this NFT by
     * either {approve} or {setApprovalForAll}.
     */
    function transferFrom(address from, address to, uint256 tokenId) public;
    function approve(address to, uint256 tokenId) public;
    function getApproved(uint256 tokenId) public view returns (address operator);

    function setApprovalForAll(address operator, bool _approved) public;
    function isApprovedForAll(address owner, address operator) public view returns (bool);


    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public;
}

File 9 of 9: @openzeppelin/contracts/utils/Address.sol
pragma solidity ^0.5.5;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following 
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @dev Converts an `address` into `address payable`. Note that this is
     * simply a type cast: the actual underlying value is not changed.
     *
     * _Available since v2.4.0._
     */
    function toPayable(address account) internal pure returns (address payable) {
        return address(uint160(account));
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     *
     * _Available since v2.4.0._
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-call-value
        (bool success, ) = recipient.call.value(amount)("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }
}

Contract ABI

[{"constant":true,"inputs":[],"name":"cfoAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_candidateCEO","type":"address"}],"name":"setCandidateCEO","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"ceoAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"aliana","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_skip","type":"uint256"},{"name":"_limit","type":"uint256"}],"name":"listTokensSale","outputs":[{"name":"tokenIds","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ownerCutSale","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"addrs","type":"address[]"}],"name":"removeAddressesFromWhitelist","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"addr","type":"address"}],"name":"removeAddressFromWhitelist","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"num","type":"uint256"}],"name":"withdrawOwnerCutSale","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newCOO","type":"address"}],"name":"setCOO","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"acceptCEO","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"allTokensSale","outputs":[{"name":"tokenIds","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newCFO","type":"address"}],"name":"setCFO","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"token_","type":"address"},{"name":"to_","type":"address"},{"name":"amount_","type":"uint256"}],"name":"withdrawTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"newContractAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"candidateCEOAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_v2Address","type":"address"}],"name":"setNewAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"addr","type":"address"}],"name":"addAddressToWhitelist","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_sender","type":"address"},{"name":"_value","type":"uint256"},{"name":"_tokenContract","type":"address"},{"name":"_extraData","type":"bytes"}],"name":"receiveApproval","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"whitelist","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"tokensOfOwnerSale","outputs":[{"name":"ownerTokens","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"cooAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"},{"name":"_price","type":"uint256"}],"name":"createAlianaSale","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"num","type":"uint256"}],"name":"setOwnerCutSale","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"gaeToken","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tokenIds","type":"uint256[]"}],"name":"adminCancelAlianaSales","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"token_","type":"address"}],"name":"claimTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"addrs","type":"address[]"}],"name":"addAddressesToWhitelist","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSale","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"getAlianaSaleInfo","outputs":[{"name":"beginBlock","type":"uint256"},{"name":"price","type":"uint256"},{"name":"seller","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"cutedSaleBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"buySaleAliana","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"cancelAlianaSale","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_gaeToken","type":"address"},{"name":"_alianaAddr","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"seller","type":"address"},{"indexed":true,"name":"tokenId","type":"uint256"},{"indexed":false,"name":"price","type":"uint256"}],"name":"CreateAlianaSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"seller","type":"address"},{"indexed":false,"name":"tokenId","type":"uint256"}],"name":"CancelAlianaSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"seller","type":"address"},{"indexed":true,"name":"buyer","type":"address"},{"indexed":true,"name":"tokenId","type":"uint256"}],"name":"BuySaleAliana","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"addr","type":"address"}],"name":"WhitelistedAddressAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"addr","type":"address"}],"name":"WhitelistedAddressRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newContract","type":"address"}],"name":"ContractUpgrade","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"addr","type":"address"}],"name":"SetCandidateCEO","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"addr","type":"address"}],"name":"AcceptCEO","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"addr","type":"address"}],"name":"SetCFO","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"addr","type":"address"}],"name":"SetCOO","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"operator","type":"address"}],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"operator","type":"address"}],"name":"Unpause","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"token_","type":"address"},{"indexed":true,"name":"controller_","type":"address"},{"indexed":false,"name":"amount_","type":"uint256"}],"name":"ClaimedTokens","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"token_","type":"address"},{"indexed":true,"name":"controller_","type":"address"},{"indexed":true,"name":"to_","type":"address"},{"indexed":false,"name":"amount_","type":"uint256"}],"name":"WithdrawTokens","type":"event"}]

Contract Creation Code

608060405234801561001057600080fd5b506004361061021c5760003560e01c80637158798811610125578063cd90dfdf116100ad578063ea4ce2391161007c578063ea4ce23914610769578063ef76383f14610771578063f3052c7e146107b5578063f50e6229146107bd578063fc6868f7146107da5761021c565b8063cd90dfdf1461062c578063d17fb3de14610634578063df8de3e7146106d5578063e2ec6ec3146106fb5761021c565b80639b19251a116100f45780639b19251a146105985780639f66063f146105be578063b047fb50146105e4578063b90e1158146105ec578063bde52be21461060f5761021c565b806371587988146104815780637b9417c8146104a75780638456cb59146104cd5780638f4ffcb1146104d55761021c565b80632ba73c15116101a85780634e0a3379116101775780634e0a33791461040d5780635c975abb146104335780635e35359e1461043b5780636af04a57146104715780637108cd76146104795761021c565b80632ba73c15146103cf578063382244f3146103f55780633f4ba83a146103fd57806344cb9d03146104055761021c565b80631f7d1b11116101ef5780631f7d1b111461027d57806321fffbab146102f057806324953eaa1461030a578063286dd3f51461038c5780632ac871fb146103b25761021c565b80630519ce79146102215780630776c6fb146102455780630a0f81681461026d5780631589a4fd14610275575b600080fd5b6102296107f7565b604080516001600160a01b039092168252519081900360200190f35b61026b6004803603602081101561025b57600080fd5b50356001600160a01b0316610806565b005b610229610904565b610229610913565b6102a06004803603604081101561029357600080fd5b5080359060200135610922565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156102dc5781810151838201526020016102c4565b505050509050019250505060405180910390f35b6102f8610a17565b60408051918252519081900360200190f35b6103786004803603602081101561032057600080fd5b810190602081018135600160201b81111561033a57600080fd5b82018360208201111561034c57600080fd5b803590602001918460208302840111600160201b8311171561036d57600080fd5b509092509050610a1d565b604080519115158252519081900360200190f35b610378600480360360208110156103a257600080fd5b50356001600160a01b0316610ab0565b61026b600480360360208110156103c857600080fd5b5035610b13565b61026b600480360360208110156103e557600080fd5b50356001600160a01b0316610cb8565b61026b610db6565b61026b610e71565b6102a0610f58565b61026b6004803603602081101561042357600080fd5b50356001600160a01b0316610fb1565b6103786110af565b61026b6004803603606081101561045157600080fd5b506001600160a01b038135811691602081013590911690604001356110bf565b6102296111ec565b6102296111fb565b61026b6004803603602081101561049757600080fd5b50356001600160a01b031661120a565b610378600480360360208110156104bd57600080fd5b50356001600160a01b0316611300565b61026b61135b565b61026b600480360360808110156104eb57600080fd5b6001600160a01b038235811692602081013592604082013590921691810190608081016060820135600160201b81111561052457600080fd5b82018360208201111561053657600080fd5b803590602001918460018302840111600160201b8311171561055757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611443945050505050565b610378600480360360208110156105ae57600080fd5b50356001600160a01b0316611591565b6102a0600480360360208110156105d457600080fd5b50356001600160a01b03166115a6565b610229611607565b61026b6004803603604081101561060257600080fd5b5080359060200135611616565b61026b6004803603602081101561062557600080fd5b5035611673565b610229611721565b61026b6004803603602081101561064a57600080fd5b810190602081018135600160201b81111561066457600080fd5b82018360208201111561067657600080fd5b803590602001918460208302840111600160201b8311171561069757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611730945050505050565b61026b600480360360208110156106eb57600080fd5b50356001600160a01b03166118d8565b6103786004803603602081101561071157600080fd5b810190602081018135600160201b81111561072b57600080fd5b82018360208201111561073d57600080fd5b803590602001918460208302840111600160201b8311171561075e57600080fd5b509092509050611aac565b6102f8611b3f565b61078e6004803603602081101561078757600080fd5b5035611b45565b6040805193845260208401929092526001600160a01b031682820152519081900360600190f35b6102f8611b94565b61026b600480360360208110156107d357600080fd5b5035611b9a565b61026b600480360360208110156107f057600080fd5b5035611bf2565b6003546001600160a01b031681565b6001546001600160a01b031633146108555760408051600160e51b62461bcd0281526020600482015260076024820152600160c81b666e6f742063656f02604482015290519081900360640190fd5b6001600160a01b03811615156108aa5760408051600160e51b62461bcd02815260206004820152600f60248201526001608c1b6e0616464722063616e277420626520302604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b03838116919091179182905560408051929091168252517f55b80fb4511e0b943ccc1f4339e36bb5c0bd9d8907412a7e15b2902740d34192916020908290030190a150565b6001546001600160a01b031681565b6007546001600160a01b031681565b6060600061092e611b3f565b905082158061093d5750808410155b15610958575050604080516000815260208101909152610a11565b828161096a868363ffffffff611bfc16565b111561097557508381035b6000610987868363ffffffff611bfc16565b90506060826040519080825280602002602001820160405280156109b5578160200160208202803883390190505b5090506000875b83811015610a0157600a8054829081106109d257fe5b906000526020600020015483838151811015156109eb57fe5b60209081029091010152600191820191016109bc565b829650505050505050610a11565b505b92915050565b600d5481565b6001546000906001600160a01b03163314610a6f5760408051600160e51b62461bcd0281526020600482015260076024820152600160c81b666e6f742063656f02604482015290519081900360640190fd5b60005b82811015610a0f57610a9e848483818110610a8957fe5b905060200201356001600160a01b0316611c60565b15610aa857600191505b600101610a72565b6001546000906001600160a01b03163314610b025760408051600160e51b62461bcd0281526020600482015260076024820152600160c81b666e6f742063656f02604482015290519081900360640190fd5b610b0b82611c60565b90505b919050565b6004546001600160a01b0316331480610b3657506001546001600160a01b031633145b80610b4b57506003546001600160a01b031633145b1515610b925760408051600160e51b62461bcd02815260206004820152600b6024820152600160aa1b6a1b9bdd0818c81b195d995b02604482015290519081900360640190fd5b600e54811115610bd657604051600160e51b62461bcd02815260040180806020018281038252602381526020018061297b6023913960400191505060405180910390fd5b60065460408051600160e01b6323b872dd0281523060048201523360248201526044810184905290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b158015610c3357600080fd5b505af1158015610c47573d6000803e3d6000fd5b505050506040513d6020811015610c5d57600080fd5b50511515610c9f57604051600160e51b62461bcd0281526004018080602001828103825260288152602001806129e36028913960400191505060405180910390fd5b600e54610cb2908263ffffffff611d2e16565b600e5550565b6001546001600160a01b03163314610d075760408051600160e51b62461bcd0281526020600482015260076024820152600160c81b666e6f742063656f02604482015290519081900360640190fd5b6001600160a01b0381161515610d5c5760408051600160e51b62461bcd02815260206004820152600f60248201526001608c1b6e0616464722063616e277420626520302604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b03838116919091179182905560408051929091168252517faabebeb2ff97ad067c61c8502e6a2abb9994358e1df40b67dcb61981d5432181916020908290030190a150565b6002546001600160a01b03163314610e185760408051600160e51b62461bcd02815260206004820152601960248201527f796f7520617265206e6f74207468652063616e64696461746500000000000000604482015290519081900360640190fd5b600254600180546001600160a01b0319166001600160a01b0392831617908190556040805191909216815290517f47faea4248095943034a5272688739ee6f2c28c2ead4e3584b59a918ae530dac9181900360200190a1565b6001546001600160a01b03163314610ec05760408051600160e51b62461bcd0281526020600482015260076024820152600160c81b666e6f742063656f02604482015290519081900360640190fd5b600454600160a01b900460ff161515610f135760408051600160e51b62461bcd02815260206004820152600a6024820152600160b21b691b9bdd081c185d5cd95902604482015290519081900360640190fd5b60048054600160a01b60ff02191690556040805133815290517faeb196d352664784d1900b0e7414a8face7d29f4dae8c4b0cf68ed477423bbf49181900360200190a1565b6060600a805480602002602001604051908101604052809291908181526020018280548015610fa657602002820191906000526020600020905b815481526020019060010190808311610f92575b505050505090505b90565b6001546001600160a01b031633146110005760408051600160e51b62461bcd0281526020600482015260076024820152600160c81b666e6f742063656f02604482015290519081900360640190fd5b6001600160a01b03811615156110555760408051600160e51b62461bcd02815260206004820152600f60248201526001608c1b6e0616464722063616e277420626520302604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b03838116919091179182905560408051929091168252517f84b74c5bbb392e2b5031680a6778f6e49e0eed616d7f59d1b7cbe0dc06c814be916020908290030190a150565b600454600160a01b900460ff1681565b6001546001600160a01b0316331461110e5760408051600160e51b62461bcd0281526020600482015260076024820152600160c81b666e6f742063656f02604482015290519081900360640190fd5b826001600160a01b031663a9059cbb83836040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561116e57600080fd5b505af1158015611182573d6000803e3d6000fd5b505050506040513d602081101561119857600080fd5b505115156111a257fe5b6040805182815290516001600160a01b03808516923392918716917fc9e8848e763791df46dee01dfdd8f0eb58cd33dd15e0773146866af844e8f09b9181900360200190a4505050565b6005546001600160a01b031681565b6002546001600160a01b031681565b6001546001600160a01b031633146112595760408051600160e51b62461bcd0281526020600482015260076024820152600160c81b666e6f742063656f02604482015290519081900360640190fd5b600454600160a01b900460ff1615156112ac5760408051600160e51b62461bcd02815260206004820152600a6024820152600160b21b691b9bdd081c185d5cd95902604482015290519081900360640190fd5b600580546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f450db8da6efbe9c22f2347f7c2021231df1fc58d3ae9a2fa75d39fa4461993059181900360200190a150565b6001546000906001600160a01b031633146113525760408051600160e51b62461bcd0281526020600482015260076024820152600160c81b666e6f742063656f02604482015290519081900360640190fd5b610b0b82611d70565b6001546001600160a01b031633146113aa5760408051600160e51b62461bcd0281526020600482015260076024820152600160c81b666e6f742063656f02604482015290519081900360640190fd5b600454600160a01b900460ff16156113f85760408051600160e51b62461bcd0281526020600482015260066024820152600160d21b651c185d5cd95902604482015290519081900360640190fd5b60048054600160a01b60ff021916600160a01b1790556040805133815290517f5ee71a369c8672edded508e624ffc9257fa1ae6886ef32905c18e60196bca3999181900360200190a1565b602081015160018114806114575750806002145b15156114ad5760408051600160e51b62461bcd02815260206004820152601960248201527f416c69616e6153616c653a20756e6b6e6f7720616374696f6e00000000000000604482015290519081900360640190fd5b806001141561151a576006546001600160a01b0384811691161461150557604051600160e51b62461bcd0281526004018080602001828103825260448152602001806129056044913960600191505060405180910390fd5b60408201516115148682611e42565b5061158a565b806002141561158a576007546001600160a01b0384811691161461157257604051600160e51b62461bcd028152600401808060200182810382526048815260200180612a0b6048913960600191505060405180910390fd5b60408201516060830151611587878383612185565b50505b5050505050565b60006020819052908152604090205460ff1681565b60606115b18261240d565b8054806020026020016040519081016040528092919081815260200182805480156115fb57602002820191906000526020600020905b8154815260200190600101908083116115e7575b50505050509050919050565b6004546001600160a01b031681565b600454600160a01b900460ff16156116645760408051600160e51b62461bcd0281526020600482015260066024820152600160d21b651c185d5cd95902604482015290519081900360640190fd5b61166f338383612185565b5050565b6001546001600160a01b031633146116c25760408051600160e51b62461bcd0281526020600482015260076024820152600160c81b666e6f742063656f02604482015290519081900360640190fd5b61271081111561171c5760408051600160e51b62461bcd02815260206004820152601960248201527f416c69616e6153616c653a206e756d206e6f742076616c696400000000000000604482015290519081900360640190fd5b600d55565b6006546001600160a01b031681565b6004546001600160a01b031633148061175357506001546001600160a01b031633145b8061176857506003546001600160a01b031633145b15156117af5760408051600160e51b62461bcd02815260206004820152600b6024820152600160aa1b6a1b9bdd0818c81b195d995b02604482015290519081900360640190fd5b60005b815181101561166f57600082828151811015156117cb57fe5b60209081029091018101516000818152600c90925260409091209091506117f181612427565b156118ce57600754600382015460408051600160e01b6323b872dd0281523060048201526001600160a01b03928316602482015260448101869052905191909216916323b872dd91606480830192600092919082900301818387803b15801561185957600080fd5b505af115801561186d573d6000803e3d6000fd5b505050600382015461188991506001600160a01b031683612430565b60038101546040805184815290516001600160a01b03909216917f855aacbac020c9240e5d36610362ec97c341cacea4a89ba876237e14bcb304e19181900360200190a25b50506001016117b2565b6001546001600160a01b031633146119275760408051600160e51b62461bcd0281526020600482015260076024820152600160c81b666e6f742063656f02604482015290519081900360640190fd5b6001600160a01b038116151561196a576040513390303180156108fc02916000818181858888f19350505050158015611964573d6000803e3d6000fd5b50611aa9565b60408051600160e01b6370a08231028152306004820152905182916000916001600160a01b038416916370a08231916024808301926020929190829003018186803b1580156119b857600080fd5b505afa1580156119cc573d6000803e3d6000fd5b505050506040513d60208110156119e257600080fd5b505160408051600160e01b63a9059cbb0281523360048201526024810183905290519192506001600160a01b0384169163a9059cbb916044808201926020929091908290030181600087803b158015611a3a57600080fd5b505af1158015611a4e573d6000803e3d6000fd5b505050506040513d6020811015611a6457600080fd5b505060408051828152905133916001600160a01b038616917ff931edb47c50b4b4104c187b5814a9aef5f709e17e2ecf9617e860cacade929c9181900360200190a350505b50565b6001546000906001600160a01b03163314611afe5760408051600160e51b62461bcd0281526020600482015260076024820152600160c81b666e6f742063656f02604482015290519081900360640190fd5b60005b82811015610a0f57611b2d848483818110611b1857fe5b905060200201356001600160a01b0316611d70565b15611b3757600191505b600101611b01565b600a5490565b6000818152600c60205260409020600181015460028201546003830154919290916001600160a01b031690611b7981612427565b1515611b8c576000935060009250600091505b509193909250565b600e5481565b600454600160a01b900460ff1615611be85760408051600160e51b62461bcd0281526020600482015260066024820152600160d21b651c185d5cd95902604482015290519081900360640190fd5b611aa93382611e42565b611aa93382612480565b600082820183811015611c595760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001546000906001600160a01b03163314611cb25760408051600160e51b62461bcd0281526020600482015260076024820152600160c81b666e6f742063656f02604482015290519081900360640190fd5b6001600160a01b03821660009081526020819052604090205460ff1615610b0e576001600160a01b03821660008181526020818152604091829020805460ff19169055815192835290517ff1abf01a1043b7c244d128e8595cf0c1d10743b022b03a02dffd8ca3bf729f5a9281900390910190a1506001919050565b6000611c5983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612607565b6001546000906001600160a01b03163314611dc25760408051600160e51b62461bcd0281526020600482015260076024820152600160c81b666e6f742063656f02604482015290519081900360640190fd5b6001600160a01b03821660009081526020819052604090205460ff161515610b0e576001600160a01b03821660008181526020818152604091829020805460ff19166001179055815192835290517fd1bba68c128cc3f427e5831b3c6f99f480b6efa6b9e80c757768f6124158cc3f9281900390910190a1506001919050565b600454600160a01b900460ff1615611e905760408051600160e51b62461bcd0281526020600482015260066024820152600160d21b651c185d5cd95902604482015290519081900360640190fd5b6000818152600c60205260409020611ea781612427565b1515611ee757604051600160e51b62461bcd02815260040180806020018281038252602481526020018061299e6024913960400191505060405180910390fd5b600654600282015460408051600160e01b6323b872dd0281526001600160a01b0387811660048301523060248301526044820193909352905191909216916323b872dd9160648083019260209291908290030181600087803b158015611f4c57600080fd5b505af1158015611f60573d6000803e3d6000fd5b505050506040513d6020811015611f7657600080fd5b50511515611fb857604051600160e51b62461bcd028152600401808060200182810382526034815260200180612a536034913960400191505060405180910390fd5b6000611fc782600201546126a1565b6002830154600e5491925082900390611fe6908363ffffffff611bfc16565b600e55600654600384015460408051600160e01b6323b872dd0281523060048201526001600160a01b03928316602482015260448101859052905191909216916323b872dd9160648083019260209291908290030181600087803b15801561204d57600080fd5b505af1158015612061573d6000803e3d6000fd5b505050506040513d602081101561207757600080fd5b505115156120b957604051600160e51b62461bcd0281526004018080602001828103825260328152602001806129496032913960400191505060405180910390fd5b60075460408051600160e01b6323b872dd0281523060048201526001600160a01b03888116602483015260448201889052915191909216916323b872dd91606480830192600092919082900301818387803b15801561211757600080fd5b505af115801561212b573d6000803e3d6000fd5b50505060038401546040518692506001600160a01b038089169216907fab45b949a37ecd984d754e236ec91c509ac61761563a51513b9a05d465f28f8790600090a4600383015461158a906001600160a01b031685612430565b600454600160a01b900460ff16156121d35760408051600160e51b62461bcd0281526020600482015260066024820152600160d21b651c185d5cd95902604482015290519081900360640190fd5b80151561222a5760408051600160e51b62461bcd02815260206004820152601c60248201527f416c69616e6153616c653a2070726963652063616e2774206265203000000000604482015290519081900360640190fd5b60075460408051600160e11b6331a9108f0281526004810185905290516001600160a01b03808716931691636352211e916024808301926020929190829003018186803b15801561227a57600080fd5b505afa15801561228e573d6000803e3d6000fd5b505050506040513d60208110156122a457600080fd5b50516001600160a01b0316146123045760408051600160e51b62461bcd02815260206004820152601d60248201527f416c69616e6153616c653a206d75737420626520746865206f776e6572000000604482015290519081900360640190fd5b60075460408051600160e01b6323b872dd0281526001600160a01b03868116600483015230602483015260448201869052915191909216916323b872dd91606480830192600092919082900301818387803b15801561236257600080fd5b505af1158015612376573d6000803e3d6000fd5b5050505061238483836126ad565b61238d826126eb565b6000828152600c6020908152604091829020848155436001820155600281018490556003810180546001600160a01b0319166001600160a01b038816908117909155835185815293519193869391927ffdd18ec8ae32608213edbbbd441d63341c4c65313cde9de8fb7160845127890f929181900390910190a350505050565b6001600160a01b0316600090815260086020526040902090565b60010154151590565b61243a828261272f565b6000818152600960205260408120556124528161281f565b6000908152600c60205260408120600181018290556003810180546001600160a01b03191690556002015550565b6000818152600c6020526040902061249781612427565b15156124d757604051600160e51b62461bcd02815260040180806020018281038252602481526020018061299e6024913960400191505060405180910390fd5b60038101546001600160a01b03908116908416811461252a57604051600160e51b62461bcd0281526004018080602001828103825260218152602001806129c26021913960400191505060405180910390fd5b600754600383015460408051600160e01b6323b872dd0281523060048201526001600160a01b03928316602482015260448101879052905191909216916323b872dd91606480830192600092919082900301818387803b15801561258d57600080fd5b505af11580156125a1573d6000803e3d6000fd5b50505060038301546125bd91506001600160a01b031684612430565b60038201546040805185815290516001600160a01b03909216917f855aacbac020c9240e5d36610362ec97c341cacea4a89ba876237e14bcb304e19181900360200190a250505050565b6000818484111561269957604051600160e51b62461bcd0281526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561265e578181015183820152602001612646565b50505050905090810190601f16801561268b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600d5461271091020490565b6001600160a01b0390911660009081526008602081815260408084208054868652600984529185208290559282526001810183559183529091200155565b600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b6001600160a01b03821660009081526008602052604081205461275990600163ffffffff611d2e16565b6000838152600960205260409020549091508082146127f6576001600160a01b038416600090815260086020526040812080548490811061279657fe5b906000526020600020015490508060086000876001600160a01b03166001600160a01b03168152602001908152602001600020838154811015156127d657fe5b600091825260208083209091019290925591825260099052604090208190555b6001600160a01b038416600090815260086020526040902080549061158a9060001983016128bd565b600a5460009061283690600163ffffffff611d2e16565b6000838152600b6020526040812054600a805493945090928490811061285857fe5b9060005260206000200154905080600a8381548110151561287557fe5b6000918252602080832090910192909255828152600b90915260409020829055600a8054906128a89060001983016128bd565b505050600091825250600b6020526040812055565b8154818355818111156128e1576000838152602090206128e19181019083016128e6565b505050565b610fae91905b8082111561290057600081556001016128ec565b509056fe416c69616e6153616c653a20617070726f76616c20616e642077616e7420627579206120616c69616e612c20627574207573656420746f6b656e2069736e277420474654416c69616e6153616c653a206661696c656420746f207472616e736665722067616520746f6b656e20746f2073656c6c6572416c69616e6153616c653a206e756d203c3d20637574656453616c6542616c616e6365416c69616e6153616c653a2074617267657420746f6b656e206e6f74206f6e2073616c65416c69616e6153616c653a20796f75277265206e6f74207468652073656c6c6572416c69616e6153616c653a206661696c656420746f207472616e736665722067616520746f6b656e416c69616e6153616c653a20617070726f76616c20616e642077616e742073616c65206120616c69616e612c20627574207573656420746f6b656e2069736e277420416c69616e61416c69616e6153616c653a206661696c656420746f207472616e736665722067616520746f6b656e20746f20636f6e7472616374a165627a7a723058206699dab12e09db8df80d6d71b4761c7a77b6885169c82c929d83d7dd959ab8720029

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.