Contract 0x76eDdE5DB3A88009b2239f5888200d0e4BaCEd77 1

 
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x2b138f24c2cd7924c64214346ac99bd1d95d3cce992c967d028583f10245c18cBuy Token144266892022-01-16 21:40:375 days 1 hr ago0x43be8e63997fdae899d7b7175aa97e03e87e0ffa IN  0x76edde5db3a88009b2239f5888200d0e4baced770 BNB0.00101018
0x3956cec33ae114a56c771cd38f170259913fc436045ea88f5f94857c23e01727Transfer Ownersh...138203462021-12-26 19:25:2626 days 3 hrs ago0xd9f07b350537cdb89a4be9658539b5115988cbb5 IN  0x76edde5db3a88009b2239f5888200d0e4baced770 BNB0.000151065
0xf97a44bdf895b874e5721ee0f475bf74ff67a96e79a8b399dd41779a18cbfa43Set Token Sold138115612021-12-26 12:05:1226 days 11 hrs ago0xd9f07b350537cdb89a4be9658539b5115988cbb5 IN  0x76edde5db3a88009b2239f5888200d0e4baced770 BNB0.032249855
0x554493d89249bada2479e9b0e11b6042ad96e30c36947b21fc6ae0f04b542728Set CLD Sale138098322021-12-26 10:38:2626 days 12 hrs ago0xd9f07b350537cdb89a4be9658539b5115988cbb5 IN  0x76edde5db3a88009b2239f5888200d0e4baced770 BNB0.000143425
0x912693bc6caa7e8cd8b926d5ac2770be0826969d7db6eca96547f391d4e29ec90x60806040137871392021-12-25 15:42:2227 days 7 hrs ago0xd9f07b350537cdb89a4be9658539b5115988cbb5 IN  Create: Crowdsale0 BNB0.00840474
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Crowdsale

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 5 : Crowdsale.sol
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

interface IERC721 {
    function mint(address to, uint256 tokenId) external;
    function exists(uint256 tokenId) external view returns (bool);
}

interface ICLDSale {
    function rate() external view returns (uint256);
}

/**
 * @title Crowdsale
 * @dev Crowdsale contract allowing investors to purchase the cell token with our ERC20 land tokens.
 * This contract implements such functionality in its most fundamental form and can be extended 
 * to provide additional functionality and/or custom behavior.
 */
contract Crowdsale is Context, Ownable {
    using SafeMath for uint256;
    // The token being sold
    IERC721 private _cellToken;

    // The main token that you can buy cell with it
    IERC20 private _land;
    address private _tokenWallet;
    
    // The main sale contract that you can buy cld
    ICLDSale private _cldSale;

    // Address where your paid land tokens are collected
    address payable private _wallet;

    // Amount of land token raised
    uint256 private _tokenRaised;

    // Amount of token to be pay for one ERC721 token
    uint256 private _landPerToken;

    // Max token count to be sale
    uint256 private _maxTokenCount;

    mapping(uint256 => bool) private _alreadySold;

    /**
     * Event for token purchase logging
     * @param purchaser who paid for the tokens
     * @param beneficiary who got the tokens
     * @param tokenId uint256 ID of the token to be purchased
     */
    event TokensPurchased(address indexed purchaser, address indexed beneficiary, uint256 tokenId);

    /**
     * @param wallet_ Address where collected tokens will be forwarded to
     * @param landToken_ Address of the Land token that you can buy with it
     * @param cellToken_ Address of the Cell token being sold
     * @param landPerToken_ tokens amount paid for purchase a Cell token
     */
    constructor (address payable wallet_, IERC20 landToken_, address tokenWallet_, IERC721 cellToken_, uint256 landPerToken_, uint256 maxTokenCoun_, ICLDSale cldSale_)
        public
    {
        require(wallet_ != address(0), "Crowdsale: wallet is the zero address");
        require(address(landToken_) != address(0), "Crowdsale: land token is the zero address");
        require(address(cellToken_) != address(0), "Crowdsale: cell token is the zero address");
        require(landPerToken_ > 0, "Crowdsale: token price must be greater than zero");
        require(maxTokenCoun_ > 0, "Crowdsale: max token count must be greater than zero");
        require(address(cldSale_) != address(0), "Crowdsale: CLDSale is the zero address");
        _wallet = wallet_;
        _land = landToken_;
        _tokenWallet = tokenWallet_;
        _cellToken = cellToken_;
        _landPerToken = landPerToken_;
        _maxTokenCount = maxTokenCoun_;
        _cldSale = cldSale_;
    }

    /**
     * @dev Fallback function revert your fund.
     * Only buy Cell token with Land token.
     */
    fallback() external payable {
        revert("Crowdsale: cannot accept any amount directly");
    }

    /**
     * @return The base token that you can buy with it
     */
    function land() public view returns (IERC20) {
        return _land;
    }

    /**
     * @return The token being sold.
     */
    function cellToken() public view returns (IERC721) {
        return _cellToken;
    }

    /**
     * @return Amount of Land token to be pay for a Cell token
     */
    function landPerToken() public view returns (uint256) {
        return _landPerToken;
    }

    /**
     * @return The address where tokens amounts are collected.
     */
    function wallet() public view returns (address) {
        return _wallet;
    }

    /**
     * @return The amount of Land token raised.
     */
    function tokenRaised() public view returns (uint256) {
        return _tokenRaised;
    }
    
    /**
     * @return The amount of Cell token can be sold.
     */
    function getMaxTokenCount() public view returns (uint256) {
        return _maxTokenCount;
    }

    /**
     * @dev Returns x and y where represent the position of the cell.
     * @param tokenId uint256 ID of the token
     */
    function cellById(uint256 tokenId) public pure returns (uint256 x, uint256 y){
        y = tokenId / 90;
        x = tokenId - (y * 90);
    }

    /**
     * @return The address where tokens amounts are collected.
     * @param tokenId uint256 ID of the token
     */
    function alreadySold(uint256 tokenId) public view returns (bool) {
        return _alreadySold[tokenId];
    }

    /**
     * @return The address where tokens amounts are collected.
     * @param tokenIds uint256 ID of the token
     */
    function setTokenSold(uint256[] memory tokenIds) public onlyOwner returns (bool) {
        for (uint256 i = 0; i < tokenIds.length; ++i) {
            _alreadySold[tokenIds[i]] = true;
        }
        return true;
    }

    /**
     * @return The base token that you can buy with it
     */
    function cldSale() public view returns (ICLDSale) {
        return _cldSale;
    }

    /**
     * @return The base token that you can buy with it
     */
    function setCLDSale(ICLDSale cldsale_) public onlyOwner returns (bool) {
        _cldSale = cldsale_;
        return true;
    }

    /**
     * @return the number of token units a buyer gets per wei.
     */
    function rate() public view returns (uint256) {
        return _cldSale.rate();
        
    }

    /**
     * @dev token purchase with pay Land tokens
     * @param beneficiary Recipient of the token purchase
     * @param tokenId uint256 ID of the token to be purchase
     */
    function buyToken(address beneficiary, uint256 tokenId) public payable{
        require(beneficiary != address(0), "Crowdsale: beneficiary is the zero address");
        require(_landPerToken <= _land.allowance(_msgSender(), address(this)), "Crowdsale: Not enough CLD allowance");
        require(tokenId < getMaxTokenCount(), "Crowdsale: tokenId must be less than max token count");
        (uint256 x, uint256 y) = cellById(tokenId);
        require(x < 38 || x > 53 || y < 28 || y > 43, "Crowdsale: tokenId should not be in the unsold range");
        require(!alreadySold(tokenId), "Crowdsale: token already sold");
        require(!_cellToken.exists(tokenId), "Crowdsale: token already minted");
        uint256 balance = _land.balanceOf(_msgSender());
        if (_landPerToken <= balance){
            _land.transferFrom(_msgSender(), _wallet, _landPerToken);
        }
        else{
            require(msg.value > 0, "Crowdsale: Not enough CLD or ETH");
            uint256 newAmount = _getTokenAmount(msg.value);
            require(newAmount.add(balance) >= _landPerToken, "Crowdsale: Not enough CLD or ETH");
            _land.transferFrom(_tokenWallet, _msgSender(), newAmount);
            _land.transferFrom(_msgSender(), _wallet, _landPerToken);
            _wallet.transfer(msg.value);
        }
        _tokenRaised += _landPerToken;
        _cellToken.mint(beneficiary, tokenId);
        emit TokensPurchased(msg.sender, beneficiary, tokenId);
    }
    
    /**
     * @dev batch token purchase with pay our ERC20 tokens
     * @param beneficiary Recipient of the token purchase
     * @param tokenIds uint256 IDs of the token to be purchase
     */
    function buyBatchTokens(address beneficiary, uint256[] memory tokenIds) public payable{
        require(beneficiary != address(0), "Crowdsale: beneficiary is the zero address");
        uint256 tokenAmount = _landPerToken * tokenIds.length;
        require(tokenAmount <= _land.allowance(_msgSender(), address(this)), "Crowdsale: Not enough CLD allowance");
        for (uint256 i = 0; i < tokenIds.length; ++i) {
            require(tokenIds[i] < getMaxTokenCount(), "Crowdsale: tokenId must be less than max token count");
            (uint256 x, uint256 y) = cellById(tokenIds[i]);
            require(x < 38 || x > 53 || y < 28 || y > 43, "Crowdsale: tokenId should not be in the unsold range");
            require(!alreadySold(tokenIds[i]), "Crowdsale: token already sold");
            require(!_cellToken.exists(tokenIds[i]), "Crowdsale: token already minted");
        }
        uint256 balance = _land.balanceOf(_msgSender());
        if (tokenAmount <= balance){
            _land.transferFrom(_msgSender(), _wallet, tokenAmount);
        }
        else{
            require(msg.value > 0, "Crowdsale: Not enough CLD or ETH");
            uint256 newAmount = _getTokenAmount(msg.value);
            require(newAmount.add(balance) >= tokenAmount, "Crowdsale: Not enough CLD or ETH");
            _land.transferFrom(_tokenWallet, _msgSender(), newAmount);
            _land.transferFrom(_msgSender(), _wallet, tokenAmount);
            _wallet.transfer(msg.value);
        }
        
        _tokenRaised += tokenAmount;
        for (uint256 i = 0; i < tokenIds.length; ++i) {
            _cellToken.mint(beneficiary, tokenIds[i]);
            emit TokensPurchased(msg.sender, beneficiary, tokenIds[i]);
        }
    }

    /**
     * @dev Overrides function in the Crowdsale contract to enable a custom phased distribution
     * @param weiAmount Value in wei to be converted into tokens
     * @return Number of tokens that can be purchased with the specified weiAmount
     */
    function _getTokenAmount(uint256 weiAmount) internal view returns (uint256) {
        uint256 amount = weiAmount.mul(rate());
        if (amount >= 500000 * 1e18) {
            return amount.mul(120).div(100);
        } else if (amount >= 200000 * 1e18) {
            return amount.mul(114).div(100);
        } else if (amount >= 70000 * 1e18) {
            return amount.mul(109).div(100);
        } else if (amount >= 30000 * 1e18) {
            return amount.mul(106).div(100);
        } else if (amount >= 10000 * 1e18) {
            return amount.mul(104).div(100);
        } else {
            return amount;
        }
    }
}

File 2 of 5 : Context.sol
// SPDX-License-Identifier: MIT

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 3 of 5 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
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 5 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // 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 (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @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) {
        return a + b;
    }

    /**
     * @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 a - b;
    }

    /**
     * @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) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting 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 a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting 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.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * 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,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 5 of 5 : Ownable.sol
// SPDX-License-Identifier: MIT

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() {
        _setOwner(_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 {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address payable","name":"wallet_","type":"address"},{"internalType":"contract IERC20","name":"landToken_","type":"address"},{"internalType":"address","name":"tokenWallet_","type":"address"},{"internalType":"contract IERC721","name":"cellToken_","type":"address"},{"internalType":"uint256","name":"landPerToken_","type":"uint256"},{"internalType":"uint256","name":"maxTokenCoun_","type":"uint256"},{"internalType":"contract ICLDSale","name":"cldSale_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":true,"internalType":"address","name":"purchaser","type":"address"},{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokensPurchased","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"alreadySold","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"beneficiary","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"buyBatchTokens","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"beneficiary","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"buyToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"cellById","outputs":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"cellToken","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cldSale","outputs":[{"internalType":"contract ICLDSale","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxTokenCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"land","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"landPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ICLDSale","name":"cldsale_","type":"address"}],"name":"setCLDSale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"setTokenSold","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokenRaised","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b5060405162001e9038038062001e908339810160408190526200003491620001f9565b6200004862000042620001a5565b620001a9565b6001600160a01b0387166200007a5760405162461bcd60e51b81526004016200007190620003b4565b60405180910390fd5b6001600160a01b038616620000a35760405162461bcd60e51b815260040162000071906200036b565b6001600160a01b038416620000cc5760405162461bcd60e51b8152600401620000719062000322565b60008311620000ef5760405162461bcd60e51b81526004016200007190620002d2565b60008211620001125760405162461bcd60e51b81526004016200007190620003f9565b6001600160a01b0381166200013b5760405162461bcd60e51b815260040162000071906200028c565b600580546001600160a01b03199081166001600160a01b03998a16179091556002805482169789169790971790965560038054871695881695909517909455600180548616938716939093179092556007556008556004805490921692169190911790556200046f565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080600080600080600060e0888a03121562000214578283fd5b8751620002218162000456565b6020890151909750620002348162000456565b6040890151909650620002478162000456565b60608901519095506200025a8162000456565b809450506080880151925060a0880151915060c08801516200027c8162000456565b8091505092959891949750929550565b60208082526026908201527f43726f776473616c653a20434c4453616c6520697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526030908201527f43726f776473616c653a20746f6b656e207072696365206d757374206265206760408201526f726561746572207468616e207a65726f60801b606082015260800190565b60208082526029908201527f43726f776473616c653a2063656c6c20746f6b656e20697320746865207a65726040820152686f206164647265737360b81b606082015260800190565b60208082526029908201527f43726f776473616c653a206c616e6420746f6b656e20697320746865207a65726040820152686f206164647265737360b81b606082015260800190565b60208082526025908201527f43726f776473616c653a2077616c6c657420697320746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526034908201527f43726f776473616c653a206d617820746f6b656e20636f756e74206d7573742060408201527f62652067726561746572207468616e207a65726f000000000000000000000000606082015260800190565b6001600160a01b03811681146200046c57600080fd5b50565b611a11806200047f6000396000f3fe6080604052600436106100fe5760003560e01c80638c98012911610095578063d73a1b8111610064578063d73a1b8114610261578063df79e54e1461028f578063ec7ac1c4146102a4578063f2fde38b146102c4578063fe35749c146102e4576100fe565b80638c980129146102025780638da5cb5b14610217578063913aab591461022c578063d4a388801461024c576100fe565b80633de80302116100d15780633de80302146101a1578063521eb273146101c357806368f8fc10146101d8578063715018a6146101ed576100fe565b806325bb291c1461011f57806326a21575146101555780632c4e722e146101775780632f83a4a31461018c575b60405162461bcd60e51b8152600401610116906117b7565b60405180910390fd5b34801561012b57600080fd5b5061013f61013a36600461155a565b6102f7565b60405161014c9190611650565b60405180910390f35b34801561016157600080fd5b5061016a6103b3565b60405161014c91906118fa565b34801561018357600080fd5b5061016a6103b9565b34801561019857600080fd5b5061016a610446565b3480156101ad57600080fd5b506101b661044c565b60405161014c91906115e5565b3480156101cf57600080fd5b506101b661045b565b6101eb6101e636600461152f565b61046a565b005b3480156101f957600080fd5b506101eb610a3d565b34801561020e57600080fd5b506101b6610a88565b34801561022357600080fd5b506101b6610a97565b34801561023857600080fd5b5061013f6102473660046114c5565b610aa6565b34801561025857600080fd5b506101b6610b0c565b34801561026d57600080fd5b5061028161027c3660046115b5565b610b1b565b60405161014c929190611903565b34801561029b57600080fd5b5061016a610b47565b3480156102b057600080fd5b5061013f6102bf3660046115b5565b610b4d565b3480156102d057600080fd5b506101eb6102df3660046114c5565b610b62565b6101eb6102f23660046114e1565b610bd3565b60006103016112dd565b6001600160a01b0316610312610a97565b6001600160a01b0316146103385760405162461bcd60e51b815260040161011690611803565b60005b82518110156103a85760016009600085848151811061036a57634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060006101000a81548160ff021916908315150217905550806103a19061197f565b905061033b565b50600190505b919050565b60065490565b6000600460009054906101000a90046001600160a01b03166001600160a01b0316632c4e722e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561040957600080fd5b505afa15801561041d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044191906115cd565b905090565b60085490565b6001546001600160a01b031690565b6005546001600160a01b031690565b6001600160a01b0382166104905760405162461bcd60e51b815260040161011690611838565b6002546001600160a01b031663dd62ed3e6104a96112dd565b306040518363ffffffff1660e01b81526004016104c79291906115f9565b60206040518083038186803b1580156104df57600080fd5b505afa1580156104f3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051791906115cd565b60075411156105385760405162461bcd60e51b8152600401610116906118b7565b610540610446565b811061055e5760405162461bcd60e51b815260040161011690611763565b60008061056a83610b1b565b91509150602682108061057d5750603582115b806105885750601c81105b806105935750602b81115b6105af5760405162461bcd60e51b81526004016101169061165b565b6105b883610b4d565b156105d55760405162461bcd60e51b8152600401610116906116f5565b600154604051634f558e7960e01b81526001600160a01b0390911690634f558e79906106059086906004016118fa565b60206040518083038186803b15801561061d57600080fd5b505afa158015610631573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106559190611595565b156106725760405162461bcd60e51b81526004016101169061172c565b6002546000906001600160a01b03166370a0823161068e6112dd565b6040518263ffffffff1660e01b81526004016106aa91906115e5565b60206040518083038186803b1580156106c257600080fd5b505afa1580156106d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106fa91906115cd565b905080600754116107a8576002546001600160a01b03166323b872dd61071e6112dd565b6005546007546040516001600160e01b031960e086901b16815261075093926001600160a01b03169190600401611613565b602060405180830381600087803b15801561076a57600080fd5b505af115801561077e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a29190611595565b5061096e565b600034116107c85760405162461bcd60e51b815260040161011690611882565b60006107d3346112e1565b6007549091506107e382846113b2565b10156108015760405162461bcd60e51b815260040161011690611882565b6002546003546001600160a01b03918216916323b872dd91166108226112dd565b846040518463ffffffff1660e01b815260040161084193929190611613565b602060405180830381600087803b15801561085b57600080fd5b505af115801561086f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108939190611595565b506002546001600160a01b03166323b872dd6108ad6112dd565b6005546007546040516001600160e01b031960e086901b1681526108df93926001600160a01b03169190600401611613565b602060405180830381600087803b1580156108f957600080fd5b505af115801561090d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109319190611595565b506005546040516001600160a01b03909116903480156108fc02916000818181858888f1935050505015801561096b573d6000803e3d6000fd5b50505b600754600660008282546109829190611911565b90915550506001546040516340c10f1960e01b81526001600160a01b03909116906340c10f19906109b99088908890600401611637565b600060405180830381600087803b1580156109d357600080fd5b505af11580156109e7573d6000803e3d6000fd5b50505050846001600160a01b0316336001600160a01b03167ff9b4eb3e43eebbf559e9b96ceff1c786a7edab2938c7f5f80678197c2e0edba586604051610a2e91906118fa565b60405180910390a35050505050565b610a456112dd565b6001600160a01b0316610a56610a97565b6001600160a01b031614610a7c5760405162461bcd60e51b815260040161011690611803565b610a8660006113c5565b565b6002546001600160a01b031690565b6000546001600160a01b031690565b6000610ab06112dd565b6001600160a01b0316610ac1610a97565b6001600160a01b031614610ae75760405162461bcd60e51b815260040161011690611803565b50600480546001600160a01b0383166001600160a01b03199091161790556001919050565b6004546001600160a01b031690565b600080610b29605a84611929565b9050610b3681605a611949565b610b409084611968565b9150915091565b60075490565b60009081526009602052604090205460ff1690565b610b6a6112dd565b6001600160a01b0316610b7b610a97565b6001600160a01b031614610ba15760405162461bcd60e51b815260040161011690611803565b6001600160a01b038116610bc75760405162461bcd60e51b8152600401610116906116af565b610bd0816113c5565b50565b6001600160a01b038216610bf95760405162461bcd60e51b815260040161011690611838565b60008151600754610c0a9190611949565b6002549091506001600160a01b031663dd62ed3e610c266112dd565b306040518363ffffffff1660e01b8152600401610c449291906115f9565b60206040518083038186803b158015610c5c57600080fd5b505afa158015610c70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c9491906115cd565b811115610cb35760405162461bcd60e51b8152600401610116906118b7565b60005b8251811015610eac57610cc7610446565b838281518110610ce757634e487b7160e01b600052603260045260246000fd5b602002602001015110610d0c5760405162461bcd60e51b815260040161011690611763565b600080610d3f858481518110610d3257634e487b7160e01b600052603260045260246000fd5b6020026020010151610b1b565b915091506026821080610d525750603582115b80610d5d5750601c81105b80610d685750602b81115b610d845760405162461bcd60e51b81526004016101169061165b565b610db4858481518110610da757634e487b7160e01b600052603260045260246000fd5b6020026020010151610b4d565b15610dd15760405162461bcd60e51b8152600401610116906116f5565b60015485516001600160a01b0390911690634f558e7990879086908110610e0857634e487b7160e01b600052603260045260246000fd5b60200260200101516040518263ffffffff1660e01b8152600401610e2c91906118fa565b60206040518083038186803b158015610e4457600080fd5b505afa158015610e58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7c9190611595565b15610e995760405162461bcd60e51b81526004016101169061172c565b505080610ea59061197f565b9050610cb6565b506002546000906001600160a01b03166370a08231610ec96112dd565b6040518263ffffffff1660e01b8152600401610ee591906115e5565b60206040518083038186803b158015610efd57600080fd5b505afa158015610f11573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3591906115cd565b9050808211610fdf576002546001600160a01b03166323b872dd610f576112dd565b6005546040516001600160e01b031960e085901b168152610f8792916001600160a01b0316908790600401611613565b602060405180830381600087803b158015610fa157600080fd5b505af1158015610fb5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd99190611595565b506111a0565b60003411610fff5760405162461bcd60e51b815260040161011690611882565b600061100a346112e1565b90508261101782846113b2565b10156110355760405162461bcd60e51b815260040161011690611882565b6002546003546001600160a01b03918216916323b872dd91166110566112dd565b846040518463ffffffff1660e01b815260040161107593929190611613565b602060405180830381600087803b15801561108f57600080fd5b505af11580156110a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c79190611595565b506002546001600160a01b03166323b872dd6110e16112dd565b6005546040516001600160e01b031960e085901b16815261111192916001600160a01b0316908890600401611613565b602060405180830381600087803b15801561112b57600080fd5b505af115801561113f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111639190611595565b506005546040516001600160a01b03909116903480156108fc02916000818181858888f1935050505015801561119d573d6000803e3d6000fd5b50505b81600660008282546111b29190611911565b90915550600090505b83518110156112d65760015484516001600160a01b03909116906340c10f199087908790859081106111fd57634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b8152600401611222929190611637565b600060405180830381600087803b15801561123c57600080fd5b505af1158015611250573d6000803e3d6000fd5b50505050846001600160a01b0316336001600160a01b03167ff9b4eb3e43eebbf559e9b96ceff1c786a7edab2938c7f5f80678197c2e0edba58684815181106112a957634e487b7160e01b600052603260045260246000fd5b60200260200101516040516112be91906118fa565b60405180910390a36112cf8161197f565b90506111bb565b5050505050565b3390565b6000806112f66112ef6103b9565b8490611415565b90506969e10de76676d080000081106113275761131f6064611319836078611415565b90611421565b9150506103ae565b692a5a058fc295ed00000081106113485761131f6064611319836072611415565b690ed2b525841adfc0000081106113695761131f606461131983606d611415565b69065a4da25d3016c00000811061138a5761131f606461131983606a611415565b69021e19e0c9bab240000081106113ab5761131f6064611319836068611415565b90506103ae565b60006113be8284611911565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006113be8284611949565b60006113be8284611929565b600082601f83011261143d578081fd5b8135602067ffffffffffffffff8083111561145a5761145a6119b0565b81830260405183828201018181108482111715611479576114796119b0565b60405284815283810192508684018288018501891015611497578687fd5b8692505b858310156114b957803584529284019260019290920191840161149b565b50979650505050505050565b6000602082840312156114d6578081fd5b81356113be816119c6565b600080604083850312156114f3578081fd5b82356114fe816119c6565b9150602083013567ffffffffffffffff811115611519578182fd5b6115258582860161142d565b9150509250929050565b60008060408385031215611541578182fd5b823561154c816119c6565b946020939093013593505050565b60006020828403121561156b578081fd5b813567ffffffffffffffff811115611581578182fd5b61158d8482850161142d565b949350505050565b6000602082840312156115a6578081fd5b815180151581146113be578182fd5b6000602082840312156115c6578081fd5b5035919050565b6000602082840312156115de578081fd5b5051919050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b60208082526034908201527f43726f776473616c653a20746f6b656e49642073686f756c64206e6f7420626560408201527320696e2074686520756e736f6c642072616e676560601b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601d908201527f43726f776473616c653a20746f6b656e20616c726561647920736f6c64000000604082015260600190565b6020808252601f908201527f43726f776473616c653a20746f6b656e20616c7265616479206d696e74656400604082015260600190565b60208082526034908201527f43726f776473616c653a20746f6b656e4964206d757374206265206c657373206040820152731d1a185b881b585e081d1bdad95b8818dbdd5b9d60621b606082015260800190565b6020808252602c908201527f43726f776473616c653a2063616e6e6f742061636365707420616e7920616d6f60408201526b756e74206469726563746c7960a01b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252602a908201527f43726f776473616c653a2062656e656669636961727920697320746865207a65604082015269726f206164647265737360b01b606082015260800190565b6020808252818101527f43726f776473616c653a204e6f7420656e6f75676820434c44206f7220455448604082015260600190565b60208082526023908201527f43726f776473616c653a204e6f7420656e6f75676820434c4420616c6c6f77616040820152626e636560e81b606082015260800190565b90815260200190565b918252602082015260400190565b600082198211156119245761192461199a565b500190565b60008261194457634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156119635761196361199a565b500290565b60008282101561197a5761197a61199a565b500390565b60006000198214156119935761199361199a565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610bd057600080fdfea264697066735822122049bf3d70ae0e5541e58d68152e35b7ace8dcb313b9d38573d427507e78320e6164736f6c63430008000033000000000000000000000000a1a6e865f08918fc2994386530fa9d169c9e1fc3000000000000000000000000a202f9f2cad6bf168a669a9c48d2f24d47aa0e4a000000000000000000000000d9f07b350537cdb89a4be9658539b5115988cbb50000000000000000000000006724e620e9696c58cdf1adf51d055333810e473100000000000000000000000000000000000000000000010f0cf064dd592000000000000000000000000000000000000000000000000000000000000000002d000000000000000000000000001971e42b6eb403e2d9439692a664bf1bc7257510

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

000000000000000000000000a1a6e865f08918fc2994386530fa9d169c9e1fc3000000000000000000000000a202f9f2cad6bf168a669a9c48d2f24d47aa0e4a000000000000000000000000d9f07b350537cdb89a4be9658539b5115988cbb50000000000000000000000006724e620e9696c58cdf1adf51d055333810e473100000000000000000000000000000000000000000000010f0cf064dd592000000000000000000000000000000000000000000000000000000000000000002d000000000000000000000000001971e42b6eb403e2d9439692a664bf1bc7257510

-----Decoded View---------------
Arg [0] : wallet_ (address): 0xa1a6e865f08918fc2994386530fa9d169c9e1fc3
Arg [1] : landToken_ (address): 0xa202f9f2cad6bf168a669a9c48d2f24d47aa0e4a
Arg [2] : tokenWallet_ (address): 0xd9f07b350537cdb89a4be9658539b5115988cbb5
Arg [3] : cellToken_ (address): 0x6724e620e9696c58cdf1adf51d055333810e4731
Arg [4] : landPerToken_ (uint256): 5000000000000000000000
Arg [5] : maxTokenCoun_ (uint256): 11520
Arg [6] : cldSale_ (address): 0x1971e42b6eb403e2d9439692a664bf1bc7257510

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 000000000000000000000000a1a6e865f08918fc2994386530fa9d169c9e1fc3
Arg [1] : 000000000000000000000000a202f9f2cad6bf168a669a9c48d2f24d47aa0e4a
Arg [2] : 000000000000000000000000d9f07b350537cdb89a4be9658539b5115988cbb5
Arg [3] : 0000000000000000000000006724e620e9696c58cdf1adf51d055333810e4731
Arg [4] : 00000000000000000000000000000000000000000000010f0cf064dd59200000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000002d00
Arg [6] : 0000000000000000000000001971e42b6eb403e2d9439692a664bf1bc7257510


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.