Contract 0x46e8bbcd8e1886a25574743bf4dc3816a52e9867

 
Txn Hash
Block
From
To
Value [Txn Fee]
0xe20e421f12a08c3c009e605ed9783e76affaf36eb3e26d4e9f83ff4f0c18bfd380914892021-06-07 14:17:4052 days 27 mins agoTrustPad: Deployer IN  0x46e8bbcd8e1886a25574743bf4dc3816a52e98670 BNB0.00020348
0x4103691687a9d637ef0c900fbc28711522db1a721f22c78d0cb4b2e49c739d3880914842021-06-07 14:17:2552 days 27 mins agoTrustPad: Deployer IN  0x46e8bbcd8e1886a25574743bf4dc3816a52e98670 BNB0.000234312
0x9ca26c6e09362ede02888dc0d5c68b502805e836b264e3497756c3bc52b4871979514782021-06-02 17:20:5656 days 21 hrs ago0x0fa14ec2765bcc1d6b9754eb29af5d7f4b62dfe3 IN  0x46e8bbcd8e1886a25574743bf4dc3816a52e98670 BNB0.00010903
0x4d30b989a27d47571d48cff3913e28cd7eec8845408d2ce092c355b2a332956f79469422021-06-02 13:33:3557 days 1 hr agoTrustPad: Deployer IN  0x46e8bbcd8e1886a25574743bf4dc3816a52e98670 BNB0.000502065
0x329d9b3891f23acaddc7c810178731386d919dc46f924f30f523d04fe48c338279398332021-06-02 7:35:4157 days 7 hrs ago0x6f42e50ab0d134240e857d513e817eb2fc8e632d IN  0x46e8bbcd8e1886a25574743bf4dc3816a52e98670 BNB0.00011413
0x644157280479f74d22fc948dd9d2d11fa32abffad27355d603f72c70dc8300bf79289172021-06-01 22:29:3957 days 16 hrs agoTrustPad: Deployer IN  0x46e8bbcd8e1886a25574743bf4dc3816a52e98670 BNB0.000142345
0xee0aca9aa561e5c4b2f6fe07eac80173f5b55518217eaa276ac8475e5685acb179289082021-06-01 22:29:1257 days 16 hrs agoTrustPad: Deployer IN  0x46e8bbcd8e1886a25574743bf4dc3816a52e98670 BNB0.000142345
0x083df0d1343b2a5e41a1548cb4541c707c943701b5262285d5842dc62c33656f79288972021-06-01 22:28:3957 days 16 hrs agoTrustPad: Deployer IN  0x46e8bbcd8e1886a25574743bf4dc3816a52e98670 BNB0.000142345
0x0570eadb1d947f24119745eb6e250167c986d7b07f865dfcf6df921417eb4cee79288942021-06-01 22:28:3057 days 16 hrs agoTrustPad: Deployer IN  0x46e8bbcd8e1886a25574743bf4dc3816a52e98670 BNB0.000142355
0xbac528231850936faaf1bf54eee13bc07f50e7f5cf49ed18af76a24712a4335679286672021-06-01 22:17:0957 days 16 hrs ago0xd1f36de682b60418377430f567426d5a64ab962e IN  0x46e8bbcd8e1886a25574743bf4dc3816a52e98670 BNB0.00012119
0x231007c591444adaa3bb83f77124a286642c5defb981f8f48815a354ebb5c12079286662021-06-01 22:17:0657 days 16 hrs ago0xefbc12b93b397394afed84b1e497d1fe00789188 IN  0x46e8bbcd8e1886a25574743bf4dc3816a52e98670 BNB0.00012131
0xf816a094a7e97e8be40e6672d670ed17f242b2948a535f0a0713438d60ae0e2379286642021-06-01 22:17:0057 days 16 hrs ago0xaeb3f0539770ab71034ab285399238167ac6416a IN  0x46e8bbcd8e1886a25574743bf4dc3816a52e98670 BNB0.00036357
0x82c7833c87ad952c3d93d83a2ee2fe33a563078a6f4321a2d4e09f76b8cd70f279286632021-06-01 22:16:5757 days 16 hrs ago0xa29ed947031653271ea31168d29a91049c000808 IN  0x46e8bbcd8e1886a25574743bf4dc3816a52e98670 BNB0.00012119
0xae6670c846a25076c8f1578af7ec8c73c6637a1b861c0f5f664516451cc1e34079286632021-06-01 22:16:5757 days 16 hrs agoTrustPad: Deployer IN  0x46e8bbcd8e1886a25574743bf4dc3816a52e98670 BNB0.000142345
0x38c9d928f2aca5bb560e0f96852c39ca21cce8664c4c9e6098b0e13b9c78c38f79286442021-06-01 22:16:0057 days 16 hrs ago0xaeb3f0539770ab71034ab285399238167ac6416a IN  0x46e8bbcd8e1886a25574743bf4dc3816a52e98670 BNB0.0012425
0x6faf17367093652af737071bd7e6a0ea203f03ae78e1461b55d8cdc5cced16f879286272021-06-01 22:15:0957 days 16 hrs ago0x7c01bdac2e6e3e4f9814bf52f25e601bcd7dc1a4 IN  0x46e8bbcd8e1886a25574743bf4dc3816a52e98670 BNB0.0007515
0xc820fe4dc32d5497a2181cc4d2e992c68882196c94699d076dda41b57beb027479286192021-06-01 22:14:4557 days 16 hrs ago0xcee75ec16f202e541148e65e813bc128d9c5d3c6 IN  0x46e8bbcd8e1886a25574743bf4dc3816a52e98670 BNB0.000805525
0xb4ffb6a68471bfd79543c4eaa1b2fd7aa6c78f9647ccd61893ff6699f8ea8ab979285712021-06-01 22:12:2157 days 16 hrs ago0xe5a3f1e72d1dfa5c361516ac2779e9602106fea6 IN  0x46e8bbcd8e1886a25574743bf4dc3816a52e98670 BNB0.00087594
0xe627daddbc131c71857e6f77b3dec742908c9b67ca5b31e66f092f62c57fe95e79285712021-06-01 22:12:2157 days 16 hrs ago0xa9903f104d05b33727c3a3e9f24145ee77794aaf IN  0x46e8bbcd8e1886a25574743bf4dc3816a52e98670 BNB0.00080082
0x91ca71a9b2a99c8fbb0654739103cca080a9ba28b60bc118052a12e9db7bed8a79285702021-06-01 22:12:1857 days 16 hrs ago0xf83e7aa070564d5b8dd41d3f4285ee2e0a3a1e28 IN  0x46e8bbcd8e1886a25574743bf4dc3816a52e98670 BNB0.00054716
0x10071997bf2f7d70d97be8df7341bbb644bbfaf88242a506138cdb3e1ac9ed9b79285702021-06-01 22:12:1857 days 16 hrs ago0x2a842b73e5c98bbd434bc041212037cc23a58924 IN  0x46e8bbcd8e1886a25574743bf4dc3816a52e98670 BNB0.00054716
0x8c77a3c4f3bd377614df7831667f6b1ebcbe99cf0e3c0422d91db5177fbeab5a79285702021-06-01 22:12:1857 days 16 hrs ago0xbf00506a8a650b2cfedd1b316e88641523eedd40 IN  0x46e8bbcd8e1886a25574743bf4dc3816a52e98670 BNB0.00054716
0xd55834c811fe61ffbc8a67e48702b6bfd3e6f762432bba3ca5b07d042b7052fe79285702021-06-01 22:12:1857 days 16 hrs ago0x3f9f03b21ec322b24d0b91c58725b5a5aedee07a IN  0x46e8bbcd8e1886a25574743bf4dc3816a52e98670 BNB0.00118733
0x71d9626e080d0c000c9c18b8321afa4e75feea03eed5958a45695cef073e3bae79285702021-06-01 22:12:1857 days 16 hrs ago0x7c8d843c507b498b8d1eba6b2483951d3b8ede19 IN  0x46e8bbcd8e1886a25574743bf4dc3816a52e98670 BNB0.00054716
0x4ee108d05f4b4e66ef7389b654f643f06589f88db6187caa037768a44ef0e5e479285702021-06-01 22:12:1857 days 16 hrs ago0xd7749275e60b570941e20756456ae4b6e38f01d0 IN  0x46e8bbcd8e1886a25574743bf4dc3816a52e98670 BNB0.00054716
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Similar Match)
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0xE658eA65D3620E357bDF9a70F97Fb3E81D24FD7a

Contract Name:
TrustPadTieredSale

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 8 : ITieredStaking.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

library StakingStructs {
    struct Tier {
        string id;
        uint8 multiplier;
        uint256 lockingPeriod; // in seconds
        uint256 minAmount; // tier is applied when userAmount >= minAmount
        bool random;
    }
}

interface ITieredStaking {
    function getUserTierIdx(address account) external view returns (uint);

    function getUserTier(address account) external view returns (StakingStructs.Tier memory);

    function getTierById(string calldata id) external view returns (StakingStructs.Tier memory);

    function getTier(uint idx) external view returns (StakingStructs.Tier memory);

    function getTotalTierNumbers() external view returns (uint[] memory, string[] memory);

    function getTierNumbers(address presale) external view returns (uint[] memory, string[] memory);

    function pickWinners(address presale, string calldata tierId, uint256 winnersN) external returns (address[] memory);

    function isWinner(address presale, address account) external view returns (bool);

    function getWinners(address presale, string calldata tierId) external view returns (address[] memory);

    function getWinnersCount(address presale, string calldata tierId) external view returns (uint);

    function deposit(uint256 amount) external;

    function withdraw(uint256 amount) external;
}

File 2 of 8 : TrustPadTieredSale.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./ITieredStaking.sol";

contract TrustPadTieredSale is Ownable, ReentrancyGuard {
    using SafeERC20 for IERC20;

    uint8 public constant version = 2;

    string public id;

    bool private fundByTokens = false;
    IERC20 public fundToken;
    ITieredStaking public tieredStaking;

    uint256 public startTime;
    uint256 public duration;

    uint256 public baseAllocation;
    // Actual rate is: rate / 1e6
    // 6.123456 actual rate = 6123456 specified rate
    uint256 public rate;
    uint256 public cap;
    uint256 public tokensSold;

    // Max sell per user in currency
    uint256 public maxSell;
    // Min contribution per TX in currency
    uint256 public minSell;

    uint256 public raised;
    uint256 public participants;

    mapping(address => uint256) public balances;

    bool public isPublic = false;
    bool public isWhitelistEnabled = true;
    bool public isTiersEnabled = true;
    mapping(address => bool) public whitelisted;

    event RateChanged(uint256 rate);
    event BaseAllocationChanged(uint256 baseAllocation);
    event MinChanged(uint256 value);
    event MaxChanged(uint256 value);
    event StartChanged(uint256 startTime);
    event DurationChanged(uint256 duration);
    event WhitelistChanged(bool enabled);
    event TiersEnabledChanged(bool enabled);
    event IsPublicChanged(bool isPublic);
    event TieredStakingChanged(address staking);

    /**
     * Event for token purchase logging
     * @param beneficiary who got the tokens
     * @param value weis paid for purchase
     * @param amount amount of tokens purchased
     */
    event TokensPurchased(address indexed beneficiary, uint256 value, uint256 amount);

    constructor(
        string memory _id,
        uint256 _startTime,
        uint256 _saleDuration,
        uint256 _rate,
        uint256 _baseAllocation,
        uint256 _cap,
        address _fundToken
    ) {
        id = _id;
        startTime = _startTime;
        duration = _saleDuration;
        rate = _rate;
        baseAllocation = _baseAllocation;
        cap = _cap;
        whitelisted[msg.sender] = true;
        fundByTokens = _fundToken != address(0);
        if (fundByTokens) {
            fundToken = IERC20(_fundToken);
        }
    }

    modifier ongoingSale(){
        require(isLive(), "Presale is not live");
        _;
    }

    function isLive() public view returns (bool) {
        return block.timestamp > startTime && block.timestamp < startTime + duration;
    }

    function getMinMaxLimits() external view returns (uint256, uint256) {
        return (minSell, maxSell);
    }

    function setTieredStaking(ITieredStaking _staking) external onlyOwner {
        tieredStaking = _staking;
        emit TieredStakingChanged(address(tieredStaking));
    }

    function setBaseAllocation(uint256 _baseAllocation) external onlyOwner {
        baseAllocation = _baseAllocation;
        emit BaseAllocationChanged(baseAllocation);
    }

    function setMin(uint256 value) external onlyOwner {
        require(maxSell == 0 || value <= maxSell, "Must be smaller than max");
        minSell = value;
        emit MinChanged(value);
    }

    function setMax(uint256 value) external onlyOwner {
        require(value >= minSell, "Must be bigger than min");
        maxSell = value;
        emit MaxChanged(value);
    }

    function setRate(uint256 newRate) external onlyOwner {
        require(!isLive(), "Presale is live, rate change not allowed");
        rate = newRate;
        emit RateChanged(rate);
    }

    function setStartTime(uint256 newStartTime) external onlyOwner {
        startTime = newStartTime;
        emit StartChanged(startTime);
    }

    function setSaleDuration(uint256 newDuration) external onlyOwner {
        duration = newDuration;
        emit DurationChanged(duration);
    }

    function setWhitelistEnabled(bool enabled) external onlyOwner {
        isWhitelistEnabled = enabled;
        emit WhitelistChanged(enabled);
    }

    function setTiersEnabled(bool enabled) external onlyOwner {
        isTiersEnabled = enabled;
        emit TiersEnabledChanged(enabled);
    }

    function setIsPublic(bool _isPublic) external onlyOwner {
        isPublic = _isPublic;
        emit IsPublicChanged(_isPublic);
    }

    function calculatePurchaseAmount(uint purchaseAmountWei) public view returns (uint256) {
        return purchaseAmountWei * rate / 1e6;
    }

    receive() external payable {
        require(!fundByTokens, "This presale is funded by tokens, use buyTokens(value)");
        buyTokens();
    }

    function buyTokens() public payable ongoingSale nonReentrant {
        require(!fundByTokens, "Sale: presale is funded by tokens but value is missing");

        internalBuyTokens(msg.value);
    }

    /**
    * The fund token must be first approved to be transferred by presale contract for the given "value".
    */
    function buyTokens(uint256 value) public ongoingSale nonReentrant {
        require(fundByTokens, "Sale: funding by tokens is not allowed");
        require(fundToken.allowance(msg.sender, address(this)) >= value, 'Sale: fund token not approved');

        internalBuyTokens(value);

        fundToken.safeTransferFrom(msg.sender, address(this), value);
    }

    function internalBuyTokens(uint256 value) private {
        uint maxAllocation = checkAccountAllowedToBuy();

        address beneficiary = msg.sender;
        uint256 amount = calculatePurchaseAmount(value);
        tokensSold += amount;
        balances[beneficiary] += amount;

        require(amount > 0, "Sale: amount is 0");
        require(value >= minSell, "Sale: amount is too small");
        require(maxAllocation == 0 || balances[beneficiary] <= maxAllocation, "Sale: amount exceeds max allocation");
        require(tokensSold <= cap, "Sale: cap reached");

        raised = raised + value;
        participants = participants + 1;

        emit TokensPurchased(beneficiary, value, amount);
    }

    function checkAccountAllowedToBuy() private view returns (uint) {
        uint maxAllocation = calculatePurchaseAmount(maxSell);
        bool isWhitelisted = isWhitelistEnabled && whitelisted[msg.sender];

        if (isTiersEnabled) {
            require(baseAllocation > 0, "Sale: tiers are enabled but baseAllocation is not set");

            StakingStructs.Tier memory tier = tieredStaking.getUserTier(msg.sender);
            if (tier.multiplier > 0) {
                uint tierAllocation = baseAllocation * tier.multiplier;

                if (isPublic || isWhitelisted) {
                    return tierAllocation > maxAllocation ? tierAllocation : maxAllocation;
                }

                require(!tier.random || tieredStaking.isWinner(address(this), msg.sender), "Sale: account was not picked in a level lottery");
                return tierAllocation;
            }

            if (!isPublic && !isWhitelisted) {
                revert('Sale: tier is not high enough to participate in the sale');
            }
        }

        if (isWhitelisted || isPublic) {
            return maxAllocation;
        }

        revert('Sale: not in the whitelist');
    }

    function balanceOf(address account) external view returns (uint256) {
        return balances[account];
    }

    function withdrawBalance(uint256 amount) external onlyOwner {
        if (fundByTokens) {
            fundToken.transfer(owner(), amount);
        } else {
            payable(owner()).transfer(amount);
        }
    }

    function withdrawAll() external onlyOwner {
        uint256 balance = address(this).balance;
        if (balance > 0) {
            payable(owner()).transfer(balance);
        }

        if (fundByTokens && fundToken.balanceOf(address(this)) > 0) {
            fundToken.transfer(owner(), fundToken.balanceOf(address(this)));
        }
    }

    function batchAddWhitelisted(address[] calldata addresses) external onlyOwner {
        for (uint i = 0; i < addresses.length; i++) {
            whitelisted[addresses[i]] = true;
        }
    }

    function removeWhitelisted(address account) external onlyOwner {
        whitelisted[account] = false;
    }
}

File 3 of 8 : 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 () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), 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 {
        emit OwnershipTransferred(_owner, address(0));
        _owner = 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");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 4 of 8 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor () {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 5 of 8 : 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 6 of 8 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.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 IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    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));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    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) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _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. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "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 7 of 8 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @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) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    /**
     * @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].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

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

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 8 of 8 : 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) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "istanbul",
  "libraries": {
    "": {}
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"inputs":[{"internalType":"string","name":"_id","type":"string"},{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"uint256","name":"_saleDuration","type":"uint256"},{"internalType":"uint256","name":"_rate","type":"uint256"},{"internalType":"uint256","name":"_baseAllocation","type":"uint256"},{"internalType":"uint256","name":"_cap","type":"uint256"},{"internalType":"address","name":"_fundToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"baseAllocation","type":"uint256"}],"name":"BaseAllocationChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"}],"name":"DurationChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isPublic","type":"bool"}],"name":"IsPublicChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"MaxChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"MinChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"rate","type":"uint256"}],"name":"RateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"}],"name":"StartChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"staking","type":"address"}],"name":"TieredStakingChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"TiersEnabledChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokensPurchased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"WhitelistChanged","type":"event"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseAllocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"batchAddWhitelisted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"buyTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"buyTokens","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"purchaseAmountWei","type":"uint256"}],"name":"calculatePurchaseAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"duration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fundToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMinMaxLimits","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"id","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isLive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPublic","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isTiersEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isWhitelistEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSell","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minSell","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":"participants","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"raised","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"removeWhitelisted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_baseAllocation","type":"uint256"}],"name":"setBaseAllocation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isPublic","type":"bool"}],"name":"setIsPublic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setMax","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setMin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newRate","type":"uint256"}],"name":"setRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newDuration","type":"uint256"}],"name":"setSaleDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newStartTime","type":"uint256"}],"name":"setStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ITieredStaking","name":"_staking","type":"address"}],"name":"setTieredStaking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setTiersEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setWhitelistEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tieredStaking","outputs":[{"internalType":"contract ITieredStaking","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokensSold","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":"version","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040526003805460ff191690556010805462ffffff1916620101001790553480156200002c57600080fd5b5060405162002655380380620026558339810160408190526200004f91620001f0565b600080546001600160a01b031916339081178255604051909182917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180558651620000a99060029060208a01906200012d565b5060058690556006859055600884905560078390556009829055336000908152601160205260409020805460ff19908116600117909155600380546001600160a01b038416151592168217905560ff1615620001205760038054610100600160a81b0319166101006001600160a01b038416021790555b505050505050506200035f565b8280546200013b906200030c565b90600052602060002090601f0160209004810192826200015f5760008555620001aa565b82601f106200017a57805160ff1916838001178555620001aa565b82800160010185558215620001aa579182015b82811115620001aa5782518255916020019190600101906200018d565b50620001b8929150620001bc565b5090565b5b80821115620001b85760008155600101620001bd565b80516001600160a01b0381168114620001eb57600080fd5b919050565b600080600080600080600060e0888a0312156200020b578283fd5b87516001600160401b038082111562000222578485fd5b818a0191508a601f83011262000236578485fd5b8151818111156200024b576200024b62000349565b604051601f8201601f19908116603f0116810190838211818310171562000276576200027662000349565b81604052828152602093508d8484870101111562000292578788fd5b8791505b82821015620002b5578482018401518183018501529083019062000296565b82821115620002c657878484830101525b809b50505050808a01519750505060408801519450606088015193506080880151925060a08801519150620002fe60c08901620001d3565b905092959891949750929550565b600181811c908216806200032157607f821691505b602082108114156200034357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6122e6806200036f6000396000f3fe6080604052600436106102555760003560e01c8063715018a611610139578063c1383537116100b6578063d936547e1161007a578063d936547e14610736578063da76d5cd14610766578063dc9a153514610786578063f0ea4bfc146107a0578063f2fde38b146107b6578063fdab3b3f146107d657600080fd5b8063c1383537146106b8578063c4bfce18146106e0578063c96c8137146106f6578063d0febe4c146102d1578063d3527bd61461071657600080fd5b80638da5cb5b116100fd5780638da5cb5b1461062d578063a6b02bc31461064b578063af640d0f1461066b578063b8eb35461461068d578063b8f7a665146106a357600080fd5b8063715018a6146105ad578063784ded4d146105c257806378e97925146105e25780637e12180e146105f8578063853828b61461061857600080fd5b8063355274ea116101d257806350adcdb71161019657806350adcdb7146104df578063518ab2a81461050457806354fd4d501461051a5780636c4470fb146105415780636d2909451461055757806370a082311461057757600080fd5b8063355274ea146104315780633610724e146104475780633e0a322d146104675780633f80d1211461048757806345dc3dd8146104bf57600080fd5b80631fe9eabc116102195780631fe9eabc1461038e57806327e235e3146103ae578063291d9549146103db5780632c4e722e146103fb57806334fcf4371461041157600080fd5b8063052d9e7e146102e05780630b2c4449146103005780630fb5a6b4146103355780631302973a14610359578063184d69ab1461036f57600080fd5b366102db5760035460ff16156102d15760405162461bcd60e51b815260206004820152603660248201527f546869732070726573616c652069732066756e64656420627920746f6b656e736044820152752c2075736520627579546f6b656e732876616c75652960501b60648201526084015b60405180910390fd5b6102d96107f6565b005b600080fd5b3480156102ec57600080fd5b506102d96102fb366004611f55565b610919565b34801561030c57600080fd5b506010546103209062010000900460ff1681565b60405190151581526020015b60405180910390f35b34801561034157600080fd5b5061034b60065481565b60405190815260200161032c565b34801561036557600080fd5b5061034b600c5481565b34801561037b57600080fd5b5060105461032090610100900460ff1681565b34801561039a57600080fd5b506102d96103a936600461207a565b610997565b3480156103ba57600080fd5b5061034b6103c9366004611ec9565b600f6020526000908152604090205481565b3480156103e757600080fd5b506102d96103f6366004611ec9565b610a48565b34801561040757600080fd5b5061034b60085481565b34801561041d57600080fd5b506102d961042c36600461207a565b610a93565b34801561043d57600080fd5b5061034b60095481565b34801561045357600080fd5b506102d961046236600461207a565b610b58565b34801561047357600080fd5b506102d961048236600461207a565b610d5c565b34801561049357600080fd5b506004546104a7906001600160a01b031681565b6040516001600160a01b03909116815260200161032c565b3480156104cb57600080fd5b506102d96104da36600461207a565b610dbb565b3480156104eb57600080fd5b506003546104a79061010090046001600160a01b031681565b34801561051057600080fd5b5061034b600a5481565b34801561052657600080fd5b5061052f600281565b60405160ff909116815260200161032c565b34801561054d57600080fd5b5061034b600e5481565b34801561056357600080fd5b506102d9610572366004611ec9565b610e77565b34801561058357600080fd5b5061034b610592366004611ec9565b6001600160a01b03166000908152600f602052604090205490565b3480156105b957600080fd5b506102d9610eef565b3480156105ce57600080fd5b506102d96105dd366004611f55565b610f63565b3480156105ee57600080fd5b5061034b60055481565b34801561060457600080fd5b506102d961061336600461207a565b610fd8565b34801561062457600080fd5b506102d9611037565b34801561063957600080fd5b506000546001600160a01b03166104a7565b34801561065757600080fd5b5061034b61066636600461207a565b611264565b34801561067757600080fd5b50610680611288565b60405161032c91906120c6565b34801561069957600080fd5b5061034b600b5481565b3480156106af57600080fd5b50610320611316565b3480156106c457600080fd5b50600c54600b546040805192835260208301919091520161032c565b3480156106ec57600080fd5b5061034b60075481565b34801561070257600080fd5b506102d961071136600461207a565b61133c565b34801561072257600080fd5b506102d9610731366004611ee5565b61139b565b34801561074257600080fd5b50610320610751366004611ec9565b60116020526000908152604090205460ff1681565b34801561077257600080fd5b506102d961078136600461207a565b61144a565b34801561079257600080fd5b506010546103209060ff1681565b3480156107ac57600080fd5b5061034b600d5481565b3480156107c257600080fd5b506102d96107d1366004611ec9565b611514565b3480156107e257600080fd5b506102d96107f1366004611f55565b6115fe565b6107fe611316565b6108405760405162461bcd60e51b815260206004820152601360248201527250726573616c65206973206e6f74206c69766560681b60448201526064016102c8565b600260015414156108935760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102c8565b600260015560035460ff161561090a5760405162461bcd60e51b815260206004820152603660248201527f53616c653a2070726573616c652069732066756e64656420627920746f6b656e60448201527573206275742076616c7565206973206d697373696e6760501b60648201526084016102c8565b61091334611669565b60018055565b6000546001600160a01b031633146109435760405162461bcd60e51b81526004016102c8906120f9565b601080548215156101000261ff00199091161790556040517f0d50ffb8142306f44502939eeb37f97727c319ac3cd8ec196ca88f3338eca9af9061098c90831515815260200190565b60405180910390a150565b6000546001600160a01b031633146109c15760405162461bcd60e51b81526004016102c8906120f9565b600c54811015610a135760405162461bcd60e51b815260206004820152601760248201527f4d75737420626520626967676572207468616e206d696e00000000000000000060448201526064016102c8565b600b8190556040518181527f770427b1be4e1c22afadce4780c0ad65c0cbdd9b12543bea5a992f5bda0255079060200161098c565b6000546001600160a01b03163314610a725760405162461bcd60e51b81526004016102c8906120f9565b6001600160a01b03166000908152601160205260409020805460ff19169055565b6000546001600160a01b03163314610abd5760405162461bcd60e51b81526004016102c8906120f9565b610ac5611316565b15610b235760405162461bcd60e51b815260206004820152602860248201527f50726573616c65206973206c6976652c2072617465206368616e6765206e6f7460448201526708185b1b1bddd95960c21b60648201526084016102c8565b60088190556040518181527f595a30f13a69b616c4d568e2a2b7875fdfe86e4300a049953c76ee278f8f3f109060200161098c565b610b60611316565b610ba25760405162461bcd60e51b815260206004820152601360248201527250726573616c65206973206e6f74206c69766560681b60448201526064016102c8565b60026001541415610bf55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102c8565b600260015560035460ff16610c5b5760405162461bcd60e51b815260206004820152602660248201527f53616c653a2066756e64696e6720627920746f6b656e73206973206e6f7420616044820152651b1b1bddd95960d21b60648201526084016102c8565b600354604051636eb1769f60e11b8152336004820152306024820152829161010090046001600160a01b03169063dd62ed3e9060440160206040518083038186803b158015610ca957600080fd5b505afa158015610cbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce19190612092565b1015610d2f5760405162461bcd60e51b815260206004820152601d60248201527f53616c653a2066756e6420746f6b656e206e6f7420617070726f76656400000060448201526064016102c8565b610d3881611669565b600354610d559061010090046001600160a01b031633308461188b565b5060018055565b6000546001600160a01b03163314610d865760405162461bcd60e51b81526004016102c8906120f9565b60058190556040518181527fb40bc62c7614c21c292641d79509c0572ffdcf912e874169cf69162e026146c99060200161098c565b6000546001600160a01b03163314610de55760405162461bcd60e51b81526004016102c8906120f9565b600b541580610df65750600b548111155b610e425760405162461bcd60e51b815260206004820152601860248201527f4d75737420626520736d616c6c6572207468616e206d6178000000000000000060448201526064016102c8565b600c8190556040518181527f46077927d83541de01a449629a0bb1dbeb03e03fd6ee2e3ba4bf2952e39433509060200161098c565b6000546001600160a01b03163314610ea15760405162461bcd60e51b81526004016102c8906120f9565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527fcda31de31b7282c53a20dcf2e11851d1a514ad6e83565a31368da782b17b23b89060200161098c565b6000546001600160a01b03163314610f195760405162461bcd60e51b81526004016102c8906120f9565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b03163314610f8d5760405162461bcd60e51b81526004016102c8906120f9565b60108054821515620100000262ff0000199091161790556040517fda79ca787ac2a23bf4f414ec61ae35acf9438de9caf9b7b724b6033536b9b67e9061098c90831515815260200190565b6000546001600160a01b031633146110025760405162461bcd60e51b81526004016102c8906120f9565b60068190556040518181527f9bb10695bde7db94333a5404f0767118f3965fd73217e45f96529c3d368285af9060200161098c565b6000546001600160a01b031633146110615760405162461bcd60e51b81526004016102c8906120f9565b4780156110a357600080546040516001600160a01b039091169183156108fc02918491818181858888f193505050501580156110a1573d6000803e3d6000fd5b505b60035460ff16801561113357506003546040516370a0823160e01b815230600482015260009161010090046001600160a01b0316906370a082319060240160206040518083038186803b1580156110f957600080fd5b505afa15801561110d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111319190612092565b115b15611261576003546001600160a01b036101009091041663a9059cbb6111616000546001600160a01b031690565b6003546040516370a0823160e01b81523060048201526101009091046001600160a01b0316906370a082319060240160206040518083038186803b1580156111a857600080fd5b505afa1580156111bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e09190612092565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044015b602060405180830381600087803b15801561122757600080fd5b505af115801561123b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125f9190611f71565b505b50565b6000620f42406008548361127891906121c0565b61128291906121a0565b92915050565b600280546112959061220b565b80601f01602080910402602001604051908101604052809291908181526020018280546112c19061220b565b801561130e5780601f106112e35761010080835404028352916020019161130e565b820191906000526020600020905b8154815290600101906020018083116112f157829003601f168201915b505050505081565b60006005544211801561133757506006546005546113349190612188565b42105b905090565b6000546001600160a01b031633146113665760405162461bcd60e51b81526004016102c8906120f9565b60078190556040518181527fde564456246ca1697b6573255d45061d65b3e9ee5a2577854152bbd6b80ad3a49060200161098c565b6000546001600160a01b031633146113c55760405162461bcd60e51b81526004016102c8906120f9565b60005b81811015611445576001601160008585858181106113f657634e487b7160e01b600052603260045260246000fd5b905060200201602081019061140b9190611ec9565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558061143d81612246565b9150506113c8565b505050565b6000546001600160a01b031633146114745760405162461bcd60e51b81526004016102c8906120f9565b60035460ff16156114db576003546001600160a01b036101009091041663a9059cbb6114a86000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024810184905260440161120d565b600080546040516001600160a01b039091169183156108fc02918491818181858888f1935050505015801561125f573d6000803e3d6000fd5b6000546001600160a01b0316331461153e5760405162461bcd60e51b81526004016102c8906120f9565b6001600160a01b0381166115a35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102c8565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146116285760405162461bcd60e51b81526004016102c8906120f9565b6010805460ff19168215159081179091556040519081527f7f470e9576cd150be3d9a27f0f0683212df7fb54e05be00c7ec767ea7b6e2d999060200161098c565b60006116736118eb565b905033600061168184611264565b905080600a60008282546116959190612188565b90915550506001600160a01b0382166000908152600f6020526040812080548392906116c2908490612188565b9091555050806117085760405162461bcd60e51b8152602060048201526011602482015270053616c653a20616d6f756e74206973203607c1b60448201526064016102c8565b600c5484101561175a5760405162461bcd60e51b815260206004820152601960248201527f53616c653a20616d6f756e7420697320746f6f20736d616c6c0000000000000060448201526064016102c8565b82158061177f57506001600160a01b0382166000908152600f60205260409020548310155b6117d75760405162461bcd60e51b815260206004820152602360248201527f53616c653a20616d6f756e742065786365656473206d617820616c6c6f63617460448201526234b7b760e91b60648201526084016102c8565b600954600a54111561181f5760405162461bcd60e51b815260206004820152601160248201527014d85b194e8818d85c081c995858da1959607a1b60448201526064016102c8565b83600d5461182d9190612188565b600d55600e5461183e906001612188565b600e5560408051858152602081018390526001600160a01b038416917f8fafebcaf9d154343dad25669bfa277f4fbacd7ac6b0c4fed522580e040a0f33910160405180910390a250505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526118e5908590611c5c565b50505050565b6000806118f9600b54611264565b601054909150600090610100900460ff16801561192557503360009081526011602052604090205460ff165b60105490915062010000900460ff1615611bfb576000600754116119a95760405162461bcd60e51b815260206004820152603560248201527f53616c653a2074696572732061726520656e61626c6564206275742062617365604482015274105b1b1bd8d85d1a5bdb881a5cc81b9bdd081cd95d605a1b60648201526084016102c8565b60048054604051637269310760e11b815233928101929092526000916001600160a01b039091169063e4d2620e9060240160006040518083038186803b1580156119f257600080fd5b505afa158015611a06573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611a2e9190810190611f8d565b602081015190915060ff1615611b75576000816020015160ff16600754611a5591906121c0565b60105490915060ff1680611a665750825b15611a8357838111611a785783611a7a565b805b94505050505090565b81608001511580611b1157506004805460405163c4f161ab60e01b815230928101929092523360248301526001600160a01b03169063c4f161ab9060440160206040518083038186803b158015611ad957600080fd5b505afa158015611aed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b119190611f71565b611a785760405162461bcd60e51b815260206004820152602f60248201527f53616c653a206163636f756e7420776173206e6f74207069636b656420696e2060448201526e61206c6576656c206c6f747465727960881b60648201526084016102c8565b60105460ff16158015611b86575081155b15611bf95760405162461bcd60e51b815260206004820152603860248201527f53616c653a2074696572206973206e6f74206869676820656e6f75676820746f60448201527f20706172746963697061746520696e207468652073616c65000000000000000060648201526084016102c8565b505b8080611c09575060105460ff165b15611c145750919050565b60405162461bcd60e51b815260206004820152601a60248201527f53616c653a206e6f7420696e207468652077686974656c69737400000000000060448201526064016102c8565b6000611cb1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611d2e9092919063ffffffff16565b8051909150156114455780806020019051810190611ccf9190611f71565b6114455760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016102c8565b6060611d3d8484600085611d47565b90505b9392505050565b606082471015611da85760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016102c8565b843b611df65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102c8565b600080866001600160a01b03168587604051611e1291906120aa565b60006040518083038185875af1925050503d8060008114611e4f576040519150601f19603f3d011682016040523d82523d6000602084013e611e54565b606091505b5091509150611e64828286611e6f565b979650505050505050565b60608315611e7e575081611d40565b825115611e8e5782518084602001fd5b8160405162461bcd60e51b81526004016102c891906120c6565b8051611eb3816122a2565b919050565b805160ff81168114611eb357600080fd5b600060208284031215611eda578081fd5b8135611d408161228d565b60008060208385031215611ef7578081fd5b823567ffffffffffffffff80821115611f0e578283fd5b818501915085601f830112611f21578283fd5b813581811115611f2f578384fd5b8660208260051b8501011115611f43578384fd5b60209290920196919550909350505050565b600060208284031215611f66578081fd5b8135611d40816122a2565b600060208284031215611f82578081fd5b8151611d40816122a2565b60006020808385031215611f9f578182fd5b825167ffffffffffffffff80821115611fb6578384fd5b9084019060a08287031215611fc9578384fd5b611fd161212e565b825182811115611fdf578586fd5b8301601f81018813611fef578586fd5b80518381111561200157612001612277565b612013601f8201601f19168701612157565b93508084528886828401011115612028578687fd5b612037818786018885016121df565b5050818152612047848401611eb8565b84820152604083015160408201526060830151606082015261206b60808401611ea8565b60808201529695505050505050565b60006020828403121561208b578081fd5b5035919050565b6000602082840312156120a3578081fd5b5051919050565b600082516120bc8184602087016121df565b9190910192915050565b60208152600082518060208401526120e58160408501602087016121df565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60405160a0810167ffffffffffffffff8111828210171561215157612151612277565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561218057612180612277565b604052919050565b6000821982111561219b5761219b612261565b500190565b6000826121bb57634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156121da576121da612261565b500290565b60005b838110156121fa5781810151838201526020016121e2565b838111156118e55750506000910152565b600181811c9082168061221f57607f821691505b6020821081141561224057634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561225a5761225a612261565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461126157600080fd5b801515811461126157600080fdfea264697066735822122047eab20e97b40089323c48a364003fc0df30fe783cd36bfdf71c4509946ce48a64736f6c6343000804003300000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000060a7a0c00000000000000000000000000000000000000000000000000000000000000e10000000000000000000000000000000000000000000000000000000000065b9aa00000000000000000000000000000000000000000000000cd9092451f7940000000000000000000000000000000000000000000000008d2c09496426a6680000000000000000000000000000e9e7cea3dedca5984780bafc599bd69add087d5600000000000000000000000000000000000000000000000000000000000000066e657476726b0000000000000000000000000000000000000000000000000000

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.