More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 4,852 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Register | 23019100 | 1164 days ago | IN | 0 POL | 0.00097782 | ||||
Register | 23019100 | 1164 days ago | IN | 0 POL | 0.00097782 | ||||
Register | 22848005 | 1168 days ago | IN | 0 POL | 0.00097782 | ||||
Register | 22848005 | 1168 days ago | IN | 0 POL | 0.00097782 | ||||
Register | 22827788 | 1169 days ago | IN | 0 POL | 0.00097782 | ||||
Register | 22827788 | 1169 days ago | IN | 0 POL | 0.00097782 | ||||
Register | 22827788 | 1169 days ago | IN | 0 POL | 0.00097782 | ||||
Register | 22820396 | 1169 days ago | IN | 0 POL | 0.00097782 | ||||
Register | 22820363 | 1169 days ago | IN | 0 POL | 0.00097782 | ||||
Register | 22780790 | 1170 days ago | IN | 0 POL | 0.00097782 | ||||
Register | 22744959 | 1171 days ago | IN | 0 POL | 0.00097782 | ||||
Register | 22740421 | 1171 days ago | IN | 0 POL | 0.00097782 | ||||
Register | 22736078 | 1171 days ago | IN | 0 POL | 0.00003585 | ||||
Register | 22736078 | 1171 days ago | IN | 0 POL | 0.00003585 | ||||
Register | 22736077 | 1171 days ago | IN | 0 POL | 0.00003911 | ||||
Register | 22736076 | 1171 days ago | IN | 0 POL | 0.00097782 | ||||
Register | 22736076 | 1171 days ago | IN | 0 POL | 0.00097782 | ||||
Register | 22736076 | 1171 days ago | IN | 0 POL | 0.00003943 | ||||
Register | 22736076 | 1171 days ago | IN | 0 POL | 0.00097782 | ||||
Register | 22736076 | 1171 days ago | IN | 0 POL | 0.0016297 | ||||
Register | 22736076 | 1171 days ago | IN | 0 POL | 0.00097782 | ||||
Register | 22731899 | 1171 days ago | IN | 0 POL | 0.00004776 | ||||
Register | 22731890 | 1171 days ago | IN | 0 POL | 0.00005378 | ||||
Register | 22731889 | 1171 days ago | IN | 0 POL | 0.00097782 | ||||
Register | 22731889 | 1171 days ago | IN | 0 POL | 0.00097782 |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x8919B63B...0f7b2A439 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
LaunchpadIDO
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)
// SPDX-License-Identifier: MIT pragma solidity =0.8.4; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "./WithLimits.sol"; import "../sale/Timed.sol"; import "./WithWhitelist.sol"; import "./WithLevelsSale.sol"; import "../sale/Withdrawable.sol"; import "./GeneralIDO.sol"; contract LaunchpadIDO is Adminable, ReentrancyGuard, Timed, GeneralIDO, Withdrawable, WithLimits, WithWhitelist, WithLevelsSale { using SafeERC20 for IERC20; string public id; uint256 public tokensSold; uint256 public raised; uint256 public participants; mapping(address => uint256) public balances; mapping(address => uint256) public contributed; uint256 public firstPurchaseBlockN; uint256 public lastPurchaseBlockN; event TokensPurchased( address indexed beneficiary, uint256 value, uint256 amount ); event UserRefunded( address indexed beneficiary, uint256 value, uint256 amount, bool refunded ); constructor( string memory _id, uint256 _startTime, uint256 _duration, uint256 _rate, uint256 _tokensForSale, address _fundToken ) GeneralIDO(_rate, _tokensForSale) Timed(_startTime, _duration) Withdrawable(_fundToken) { id = _id; } function balanceOf(address account) external view returns (uint256) { return balances[account]; } receive() external payable { require( !fundByTokens, "Sale: 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 { uint256 maxAllocation = checkAccountAllowedToBuy(); address account = _msgSender(); require(value > 0, "Sale: value is 0"); uint256 amount = calculatePurchaseAmount(value); require(amount > 0, "Sale: amount is 0"); tokensSold += amount; balances[account] += amount; contributed[account] += value; require(value >= minSell, "Sale: amount is too small"); require( maxAllocation == 0 || balances[account] <= maxAllocation, "Sale: amount exceeds max allocation" ); require(tokensSold <= tokensForSale, "Sale: cap reached"); raised = raised + value; participants = participants + 1; // Store the first and last block numbers to simplify data collection later if (firstPurchaseBlockN == 0) { firstPurchaseBlockN = block.number; } lastPurchaseBlockN = block.number; emit TokensPurchased(account, value, amount); } function checkAccountAllowedToBuy() private view returns (uint256) { address account = _msgSender(); uint256 levelAllocation = getUserLevelAllocation(account); uint256 maxAllocation = calculatePurchaseAmount(maxSell); // Public sale with no whitelist or levels if (!whitelistEnabled && !levelsEnabled) { return maxAllocation; } // User whitelisted, consider his level allocation too if (whitelistEnabled && whitelisted[msg.sender]) { if (levelAllocation > 0 && levelsOpenAll()) { (, , uint256 fcfsAllocation,) = getUserLevelState(account); require( fcfsAllocation > 0, "Sale: user does not have FCFS allocation" ); levelAllocation = fcfsAllocation; } return maxAllocation + levelAllocation; } if (whitelistEnabled && !levelsEnabled) { revert("Sale: not in the whitelist"); } // Check user level if levels enabled and user was not whitelisted if (levelsEnabled) { require( baseAllocation > 0, "Sale: levels are enabled but baseAllocation is not set" ); // If opened for all levels, just return the level allocation without checking user weight if (levelsOpenAll()) { (, , uint256 fcfsAllocation,) = getUserLevelState(account); require( fcfsAllocation > 0, "Sale: user does not have FCFS allocation" ); return fcfsAllocation; } bytes memory levelBytes = bytes(userLevel[account]); require( levelBytes.length > 0, "Sale: user level is not registered" ); require( levelAllocation > 0, "Sale: user has no level allocation, not registered, lost lottery or level is too low" ); return levelAllocation; } revert("Sale: unreachable state"); } function voidAndRefund(address payable account, bool refund) external onlyOwnerOrAdmin { uint256 purchased = balances[account]; uint256 value = contributed[account]; tokensSold -= purchased; balances[account] = 0; raised -= value; contributed[account] = 0; participants -= 1; // Refund bool refunded = false; if (refund) { if (fundByTokens && fundToken.balanceOf(address(this)) > value) { fundToken.transfer(account, value); refunded = true; } if (!fundByTokens && address(this).balance > value) { payable(account).transfer(raised); refunded = true; } } emit UserRefunded(account, value, purchased, refunded); } function max(uint256 a, uint256 b) private pure returns (uint256) { return a > b ? a : b; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (security/ReentrancyGuard.sol) 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 making 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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol) 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/utils/SafeERC20.sol) 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' 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 require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Address.sol) 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; 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"); (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"); (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"); (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"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal 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 assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity =0.8.4; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; abstract contract Adminable is Ownable, AccessControl { constructor() { _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); } modifier onlyOwnerOrAdmin() { require( owner() == _msgSender() || hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "Adminable: caller is not the owner or admin" ); _; } }
// SPDX-License-Identifier: MIT pragma solidity =0.8.4; import "@openzeppelin/contracts/access/Ownable.sol"; import "../sale/Timed.sol"; import "../Adminable.sol"; abstract contract GeneralIDO is Adminable, Timed { // Actual rate is: rate / 1e6 // 6.123456 actual rate = 6123456 specified rate uint256 public rate; uint256 public tokensForSale; event RateChanged(uint256 newRate); event CapChanged(uint256 newRate); constructor(uint256 _rate, uint256 _tokensForSale) { rate = _rate; tokensForSale = _tokensForSale; } function setTokensForSale(uint256 _tokensForSale) external onlyOwnerOrAdmin { require( !isLive() || _tokensForSale > tokensForSale, "Sale: Sale is live, cap change only allowed to a higher value" ); tokensForSale = _tokensForSale; emit CapChanged(tokensForSale); } function calculatePurchaseAmount(uint256 purchaseAmountWei) public view returns (uint256) { return (purchaseAmountWei * rate) / 1e6; } function setRate(uint256 newRate) public onlyOwnerOrAdmin { require(!isLive(), "Sale: Sale is live, rate change not allowed"); rate = newRate; emit RateChanged(rate); } function stringsEqual(string memory a, string memory b) internal pure returns (bool) { return keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b)); } }
// SPDX-License-Identifier: MIT pragma solidity =0.8.4; import "../Adminable.sol"; import "../sale/Timed.sol"; import "./GeneralIDO.sol"; import "./WithWhitelist.sol"; import "./WithLimits.sol"; import "../levels/ILevelManager.sol"; abstract contract WithLevelsSale is Adminable, Timed, GeneralIDO, WithLimits, WithWhitelist { ILevelManager public levelManager; bool public levelsEnabled = true; bool public forceLevelsOpenAll = false; bool public lockOnRegister = true; bool public isVip = false; // Sum of weights (lottery losers are subtracted when picking winners) for base allocation calculation uint256 public totalWeights; // Base allocation is 1x in TOKENS uint256 public baseAllocation; // 0 - all levels, 6 - starting from "associate", etc uint256 public minAllowedLevelMultiplier; // Min allocation in TOKENS after registration closes. If 0, then ignored uint256 public minBaseAllocation; mapping(string => address[]) public levelAddresses; // Whether (and how many) winners were picked for a lottery level mapping(string => address[]) public levelWinners; // Needed for user allocation calculation = baseAllocation * userWeight // If user lost lottery, his weight resets to 0 - means user can't participate in sale mapping(address => uint8) public userWeight; mapping(address => string) public userLevel; event BaseAllocationCalculated(uint256 baseAllocation); event BaseAllocationChanged(uint256 baseAllocation); event MinBaseAllocationChanged(uint256 minBaseAllocation); event LevelManagerChanged(address staking); event LevelsEnabled(bool status); event VipEnabled(bool status); event SaleOpenedForAllLevels(bool status); event LockOnRegisterEnabled(bool status); event WinnersPicked( string tierId, uint256 totalN, uint256 winnersN, address[] winners ); event Registered( address indexed account, string levelId, uint256 weight, bool tokensLocked ); event MinAllowedLevelMultiplierChanged(uint256 multiplier); function levelsOpenAll() public view returns (bool) { return forceLevelsOpenAll || isFcfsTime(); } modifier ongoingRegister() { require(!isLive(), "Sale: Cannot register, sale is live"); require( !reachedMinBaseAllocation(), "Sale: Min base allocation reached, registration closed" ); require(isRegistering(), "Sale: Not open for registration"); _; } function isRegisterTime() internal view returns (bool) { return block.timestamp > registerTime && block.timestamp < registerTime + registerDuration; } function isRegistering() public view returns (bool) { return isRegisterTime() && !reachedMinBaseAllocation(); } function reachedMinBaseAllocation() public view returns (bool) { if (minBaseAllocation == 0) { return false; } uint256 allocation = baseAllocation > 0 ? baseAllocation : getAutoBaseAllocation(); return allocation < minBaseAllocation; } /** * Return: id, multiplier, allocation, isWinner. * * User is a winner when: * - winners were picked for the level * - user has non-zero weight (i.e. registered and not excluded as loser) * - the level is a lottery level */ function getUserLevelState(address account) public view returns ( string memory, uint256, uint256, bool ) { bool levelsOpen = levelsOpenAll(); bytes memory levelBytes = bytes(userLevel[account]); ILevelManager.Tier memory tier = levelsOpen ? levelManager.getUserTier(account) : levelManager.getTierById( levelBytes.length == 0 ? "none" : userLevel[account] ); // For non-registered in non-FCFS = 0 uint8 weight = levelsOpen ? tier.multiplier : userWeight[account]; uint256 allocation = weight * baseAllocation; uint16 fcfsMultiplier = getFcfsAllocationMultiplier(); allocation += (allocation * fcfsMultiplier) / 100; bool isWinner = levelBytes.length == 0 ? false : tier.random && levelWinners[tier.id].length > 0 && userWeight[account] > 0; return (tier.id, weight, allocation, isWinner); } /** * Returns multiplier for FCFS allocation, with 2 decimals. 1x = 100 * The result allocation will be = baseAllocation + baseAllocation * fcfsMultiplier * When forceLevelsOpenAll is enabled, registered users get 2x allocation, non-registered 1x. */ function getFcfsAllocationMultiplier() public view returns (uint16) { if (forceLevelsOpenAll) { return 100; } if (!isFcfsTime()) { return 0; } // Let's imagine the fcfs duration is 60 minutes, then... uint256 fcfsStartTime = getEndTime() - fcfsDuration; uint256 quarterTime = fcfsDuration / 4; // first 15 minutes if (block.timestamp < fcfsStartTime + quarterTime) { return 35; } // 15-30 minutes if (block.timestamp < fcfsStartTime + quarterTime * 2) { return 80; } // 30-45 minutes if (block.timestamp < fcfsStartTime + quarterTime * 3) { return 200; } // last 15 minutes - 100x return 10000; } function getUserLevelAllocation(address account) public view returns (uint256) { return userWeight[account] * baseAllocation; } function getLevelAddresses(string calldata id) external view returns (address[] memory) { return levelAddresses[id]; } function getLevelWinners(string calldata id) external view returns (address[] memory) { return levelWinners[id]; } function getLevelNumbers() external view returns (string[] memory, uint256[] memory) { string[] memory ids = levelManager.getTierIds(); uint256[] memory counts = new uint256[](ids.length); for (uint256 i = 0; i < ids.length; i++) { counts[i] = levelAddresses[ids[i]].length; } return (ids, counts); } function getLevelNumber(string calldata id) external view returns (uint256) { return levelAddresses[id].length; } function toggleLevels(bool status) external onlyOwnerOrAdmin { levelsEnabled = status; emit LevelsEnabled(status); } function toggleVip(bool status) external onlyOwnerOrAdmin { isVip = status; emit VipEnabled(status); } function openForAllLevels(bool status) external onlyOwnerOrAdmin { forceLevelsOpenAll = status; emit SaleOpenedForAllLevels(status); } function toggleLockOnRegister(bool status) external onlyOwnerOrAdmin { lockOnRegister = status; emit LockOnRegisterEnabled(status); } function setBaseAllocation(uint256 _baseAllocation) external onlyOwnerOrAdmin { baseAllocation = _baseAllocation; emit BaseAllocationChanged(baseAllocation); } function setMinBaseAllocation(uint256 value) external onlyOwnerOrAdmin { minBaseAllocation = value; emit MinBaseAllocationChanged(minBaseAllocation); } function setLevelManager(ILevelManager _levelManager) external onlyOwnerOrAdmin { levelManager = _levelManager; emit LevelManagerChanged(address(levelManager)); } function setMinAllowedLevelMultiplier(uint256 multiplier) external onlyOwnerOrAdmin { minAllowedLevelMultiplier = multiplier; emit MinAllowedLevelMultiplierChanged(multiplier); } function getAutoBaseAllocation() internal view returns (uint256) { uint256 weights = totalWeights > 0 ? totalWeights : 1; uint256 levelsAlloc = tokensForSale - whitelistAllocation(); return levelsAlloc / weights; } /** * Find the new base allocation based on total weights of all levels, # of whitelisted accounts and their max buy. * Should be called after winners are picked. */ function updateBaseAllocation() external onlyOwnerOrAdmin { baseAllocation = getAutoBaseAllocation(); emit BaseAllocationCalculated(baseAllocation); } /** * Register a user with his current level multiplier. * Level multiplier is added to total weights, which later is used to calculate the base allocation. * Address is stored, so we can see all registered people. * * Later, when picking winners, loser weight is removed from total weights for correct base allocation calculation. */ function register() external ongoingRegister { require(levelsEnabled, "Sale: Cannot register, levels disabled"); require( address(levelManager) != address(0), "Sale: Levels staking address is not specified" ); address account = _msgSender(); ILevelManager.Tier memory tier = levelManager.getUserTier(account); require(tier.multiplier > 0, "Sale: Your level is too low to register"); require( userWeight[account] == 0 || tier.multiplier >= userWeight[account], "Sale: Already registered with lower level" ); // If user re-registers with higher level... if (userWeight[account] > 0) { totalWeights -= userWeight[account]; } // Lock the staked tokens based on the current user level. if (lockOnRegister) { levelManager.lock(account); } userLevel[account] = tier.id; userWeight[account] = tier.multiplier; totalWeights += tier.multiplier; levelAddresses[tier.id].push(account); // TODO: maybe remove so we allow the allocation to drop lower // require( // !reachedMinBaseAllocation(), // "Sale: Min base allocation reached, registration closed" // ); emit Registered(account, tier.id, tier.multiplier, lockOnRegister); } function setWinners(string calldata id, address[] calldata winners) external onlyOwnerOrAdmin { uint8 weight = levelManager.getTierById(id).multiplier; for (uint256 i = 0; i < levelAddresses[id].length; i++) { address addr = levelAddresses[id][i]; // Skip users who re-registered if (!stringsEqual(userLevel[addr], id)) { continue; } totalWeights -= userWeight[addr]; userWeight[addr] = 0; } for (uint256 i = 0; i < winners.length; i++) { address addr = winners[i]; // Skip users who re-registered if (!stringsEqual(userLevel[addr], id)) { continue; } totalWeights += weight; userWeight[addr] = weight; userLevel[addr] = id; } levelWinners[id] = winners; emit WinnersPicked( id, levelAddresses[id].length, winners.length, winners ); } function batchRegisterLevel( string memory tierId, uint256 weight, address[] calldata addresses ) external onlyOwnerOrAdmin { for (uint256 i = 0; i < addresses.length; i++) { address account = addresses[i]; if (userWeight[account] > 0) { totalWeights -= userWeight[account]; } userLevel[account] = tierId; userWeight[account] = uint8(weight); totalWeights += weight; levelAddresses[tierId].push(account); } } }
// SPDX-License-Identifier: MIT pragma solidity =0.8.4; import "../Adminable.sol"; abstract contract WithLimits is Adminable { // Max sell per user in currency uint256 public maxSell; // Min contribution per TX in currency uint256 public minSell; event MinChanged(uint256 value); event MaxChanged(uint256 value); function getMinMaxLimits() external view returns (uint256, uint256) { return (minSell, maxSell); } function setMin(uint256 value) public onlyOwnerOrAdmin { require(maxSell == 0 || value <= maxSell, "Must be smaller than max"); minSell = value; emit MinChanged(value); } function setMax(uint256 value) public onlyOwnerOrAdmin { require(minSell == 0 || value >= minSell, "Must be bigger than min"); maxSell = value; emit MaxChanged(value); } }
// SPDX-License-Identifier: MIT pragma solidity =0.8.4; import "../Adminable.sol"; import "./GeneralIDO.sol"; import "./WithLimits.sol"; // TODO: two types of whitelists, two limits abstract contract WithWhitelist is Adminable, GeneralIDO, WithLimits { bool public whitelistEnabled = true; mapping(address => bool) public whitelisted; address[] public whitelistedAddresses; uint256 internal whitelistedCount; event WhitelistEnabled(bool status); function getWhitelistedAddresses() public view returns (address[] memory) { return whitelistedAddresses; } // Return tokens amount allocated for whitelist function whitelistAllocation() public view returns (uint256) { uint256 whitelistAlloc = calculatePurchaseAmount(maxSell); return whitelistAlloc * whitelistedCount; } function toggleWhitelist(bool status) public onlyOwnerOrAdmin { whitelistEnabled = status; emit WhitelistEnabled(status); } function batchAddWhitelisted(address[] calldata addresses) external onlyOwnerOrAdmin { for (uint256 i = 0; i < addresses.length; i++) { if (!whitelisted[addresses[i]]) { whitelisted[addresses[i]] = true; whitelistedAddresses.push(addresses[i]); whitelistedCount += 1; } } } function batchRemoveWhitelisted(address[] calldata addresses) external onlyOwnerOrAdmin { for (uint256 i = 0; i < addresses.length; i++) { if (whitelisted[addresses[i]]) { whitelisted[addresses[i]] = false; whitelistedCount -= 1; } } } }
// SPDX-License-Identifier: MIT pragma solidity =0.8.4; interface ILevelManager { struct Tier { string id; uint8 multiplier; uint256 lockingPeriod; // in seconds uint256 minAmount; // tier is applied when userAmount >= minAmount bool random; uint8 odds; // divider: 2 = 50%, 4 = 25%, 10 = 10% bool vip; } function getAlwaysRegister() external view returns ( address[] memory, string[] memory, uint256[] memory ); function isLocked(address pool, address account) external view returns (bool); function getLockPeriod(address pool) external view returns (uint256); function getUserUnlocksAt(address pool, address account) external view returns (uint256); function getTierById(string calldata id) external view returns (Tier memory); function getUserTier(address account) external view returns (Tier memory); function getTierIds() external view returns (string[] memory); function lock(address account) external; function unlock(address account) external; }
// SPDX-License-Identifier: MIT pragma solidity =0.8.4; import "../Adminable.sol"; abstract contract Timed is Adminable { uint256 public startTime; uint256 public duration; uint256 public registerTime; uint256 public registerDuration; // FCFS starts from: end - fcfsDuration uint256 public fcfsDuration; event StartChanged(uint256 time); event DurationChanged(uint256 duration); event RegisterTimeChanged(uint256 time); event RegisterDurationChanged(uint256 duration); event FCFSDurationChanged(uint256 duration); constructor(uint256 _startTime, uint256 _saleDuration) { startTime = _startTime; duration = _saleDuration; } modifier ongoingSale() { require(isLive(), "Sale: Not live"); _; } function isLive() public view returns (bool) { return block.timestamp > startTime && block.timestamp < getEndTime(); } function isFcfsTime() public view returns (bool) { return block.timestamp + fcfsDuration > getEndTime(); } function getEndTime() public view returns (uint256) { return startTime + duration; } function setStartTime(uint256 newTime) public onlyOwnerOrAdmin { require( newTime > registerTime, "Sale: start time must be after the register time" ); startTime = newTime; emit StartChanged(startTime); } function setDuration(uint256 newDuration) public onlyOwnerOrAdmin { duration = newDuration; emit DurationChanged(duration); } function setRegisterTime(uint256 newTime) public onlyOwnerOrAdmin { require( newTime < startTime, "Sale: register time must be before the start time" ); registerTime = newTime; emit RegisterTimeChanged(registerTime); } function setRegisterDuration(uint256 newDuration) public onlyOwnerOrAdmin { require( registerTime + newDuration < startTime, "Sale: register end must be before the start time" ); registerDuration = newDuration; emit RegisterDurationChanged(registerDuration); } function setFCFSDuration(uint256 newDuration) public onlyOwnerOrAdmin { fcfsDuration = newDuration; emit FCFSDurationChanged(duration); } function setTimeline( uint256 _registerTime, uint256 _registerDuration, uint256 _fcfsDuration ) external onlyOwnerOrAdmin { setRegisterTime(_registerTime); setRegisterDuration(_registerDuration); setFCFSDuration(_fcfsDuration); } }
// SPDX-License-Identifier: MIT pragma solidity =0.8.4; import "../Adminable.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; abstract contract Withdrawable is Adminable { using SafeERC20 for IERC20; bool public fundByTokens = false; IERC20 public fundToken; event FundTokenChanged(address tokenAddress); constructor(address _fundToken) { fundByTokens = _fundToken != address(0); if (fundByTokens) { fundToken = IERC20(_fundToken); } } function setFundToken(address tokenAddress) external onlyOwnerOrAdmin { fundByTokens = tokenAddress != address(0); fundToken = IERC20(tokenAddress); emit FundTokenChanged(tokenAddress); } /** * Withdraw ALL both BNB and the currency token if specified */ function withdrawAll() external onlyOwnerOrAdmin { 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))); } } /** * Withdraw the specified amount of BNB or currency token */ function withdrawBalance(uint256 amount) external onlyOwnerOrAdmin { require(amount > 0, "Withdrawable: amount should be greater than zero"); if (fundByTokens) { fundToken.transfer(owner(), amount); } else { payable(owner()).transfer(amount); } } /** * When tokens are sent to the sale by mistake: withdraw the specified token. */ function withdrawToken(address token, uint256 amount) external onlyOwnerOrAdmin { require(amount > 0, "Withdrawable: amount should be greater than zero"); IERC20(token).transfer(owner(), amount); } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"string","name":"_id","type":"string"},{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"uint256","name":"_duration","type":"uint256"},{"internalType":"uint256","name":"_rate","type":"uint256"},{"internalType":"uint256","name":"_tokensForSale","type":"uint256"},{"internalType":"address","name":"_fundToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"baseAllocation","type":"uint256"}],"name":"BaseAllocationCalculated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"baseAllocation","type":"uint256"}],"name":"BaseAllocationChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newRate","type":"uint256"}],"name":"CapChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"}],"name":"DurationChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"}],"name":"FCFSDurationChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tokenAddress","type":"address"}],"name":"FundTokenChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"staking","type":"address"}],"name":"LevelManagerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"LevelsEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"LockOnRegisterEnabled","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":"multiplier","type":"uint256"}],"name":"MinAllowedLevelMultiplierChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"minBaseAllocation","type":"uint256"}],"name":"MinBaseAllocationChanged","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":"newRate","type":"uint256"}],"name":"RateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"}],"name":"RegisterDurationChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"RegisterTimeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"string","name":"levelId","type":"string"},{"indexed":false,"internalType":"uint256","name":"weight","type":"uint256"},{"indexed":false,"internalType":"bool","name":"tokensLocked","type":"bool"}],"name":"Registered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"SaleOpenedForAllLevels","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"StartChanged","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":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bool","name":"refunded","type":"bool"}],"name":"UserRefunded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"VipEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"WhitelistEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"tierId","type":"string"},{"indexed":false,"internalType":"uint256","name":"totalN","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"winnersN","type":"uint256"},{"indexed":false,"internalType":"address[]","name":"winners","type":"address[]"}],"name":"WinnersPicked","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"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":"string","name":"tierId","type":"string"},{"internalType":"uint256","name":"weight","type":"uint256"},{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"batchRegisterLevel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"batchRemoveWhitelisted","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":[{"internalType":"address","name":"","type":"address"}],"name":"contributed","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":"fcfsDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"firstPurchaseBlockN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"forceLevelsOpenAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fundByTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fundToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFcfsAllocationMultiplier","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"id","type":"string"}],"name":"getLevelAddresses","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"id","type":"string"}],"name":"getLevelNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLevelNumbers","outputs":[{"internalType":"string[]","name":"","type":"string[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"id","type":"string"}],"name":"getLevelWinners","outputs":[{"internalType":"address[]","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":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getUserLevelAllocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getUserLevelState","outputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWhitelistedAddresses","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"id","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isFcfsTime","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isLive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isRegistering","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isVip","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastPurchaseBlockN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"levelAddresses","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"levelManager","outputs":[{"internalType":"contract ILevelManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"levelWinners","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"levelsEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"levelsOpenAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockOnRegister","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":"minAllowedLevelMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minBaseAllocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minSell","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"openForAllLevels","outputs":[],"stateMutability":"nonpayable","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":[],"name":"reachedMinBaseAllocation","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"register","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"registerDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"registerTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_baseAllocation","type":"uint256"}],"name":"setBaseAllocation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newDuration","type":"uint256"}],"name":"setDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newDuration","type":"uint256"}],"name":"setFCFSDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"setFundToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ILevelManager","name":"_levelManager","type":"address"}],"name":"setLevelManager","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":"multiplier","type":"uint256"}],"name":"setMinAllowedLevelMultiplier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setMinBaseAllocation","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":"setRegisterDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newTime","type":"uint256"}],"name":"setRegisterTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newTime","type":"uint256"}],"name":"setStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_registerTime","type":"uint256"},{"internalType":"uint256","name":"_registerDuration","type":"uint256"},{"internalType":"uint256","name":"_fcfsDuration","type":"uint256"}],"name":"setTimeline","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokensForSale","type":"uint256"}],"name":"setTokensForSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"id","type":"string"},{"internalType":"address[]","name":"winners","type":"address[]"}],"name":"setWinners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"toggleLevels","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"toggleLockOnRegister","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"toggleVip","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"toggleWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokensForSale","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokensSold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalWeights","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":"updateBaseAllocation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userLevel","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userWeight","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"},{"internalType":"bool","name":"refund","type":"bool"}],"name":"voidAndRefund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"whitelistAllocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"whitelistedAddresses","outputs":[{"internalType":"address","name":"","type":"address"}],"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"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Deployed Bytecode
0x60806040526004361061051b5760003560e01c8063715018a6116102a2578063bd30992411610165578063d936547e116100cc578063f0ea4bfc11610085578063f0ea4bfc14611065578063f2fde38b1461107b578063f3a467471461109b578063f6be71d1146110b0578063f733a16c146110d0578063fefca77c146110e557600080fd5b8063d936547e14610f9e578063da00734914610fce578063da76d5cd14610fee578063e1b318c21461100e578063eea622171461102f578063ef70723a1461104f57600080fd5b8063d0febe4c1161011e578063d0febe4c1461059e578063d3527bd614610f08578063d547741f14610f28578063d6e8b9b114610f48578063d79b855814610f5d578063d80a52aa14610f7d57600080fd5b8063bd30992414610e4a578063be40a32714610e6a578063c138353714610e8a578063c3816f6314610eb2578063c4bfce1814610ed2578063c96c813714610ee857600080fd5b806393b9400d11610209578063af640d0f116101c2578063af640d0f14610da9578063b2b215b514610dbe578063b8eb354614610ddf578063b8f7a66514610df5578063ba4e5c4914610e0a578063bd152bc714610e2a57600080fd5b806393b9400d14610ce3578063995c5e9d14610d065780639e281a9814610d33578063a217fddf14610d53578063a6b02bc314610d68578063ae0ffad214610d8857600080fd5b80637afc56f51161025b5780637afc56f514610c3a57806380e3f1ad14610c5a578063853828b614610c7a5780638da5cb5b14610c8f57806391d1485414610cad578063926323d514610ccd57600080fd5b8063715018a614610ba3578063738fa94b14610bb857806375a5b1ab14610bd857806375c33e0b14610bee578063766daf7b14610c0457806378e9792514610c2457600080fd5b806334fcf437116103ea57806350ba759811610351578063589d7c541161030a578063589d7c5414610ab0578063637c92ff14610af257806364661e4b14610b125780636c4470fb14610b425780636d02802714610b5857806370a0823114610b6d57600080fd5b806350ba7598146109fe578063518ab2a814610a1e57806351fb012d14610a34578063538a13f314610a4e5780635666cd7814610a7b578063577174e914610a9057600080fd5b80633e0a322d116103a35780633e0a322d1461094f578063439f5ac21461096f5780634497e6b41461098457806345dc3dd814610999578063491ce4d0146109b957806350adcdb7146109d957600080fd5b806334fcf437146108995780633610724e146108b957806336568abe146108d957806338687875146108f95780633b6d03ca146109195780633d7faab91461093957600080fd5b806318eca61f1161048e5780632a8d950c116104475780632a8d950c146107f75780632b888f69146108175780632bce8e631461082d5780632c4e722e1461084d5780632f2ff15d1461086357806334dadad51461088357600080fd5b806318eca61f146107175780631aa3a008146107375780631fe9eabc1461074c578063248a9ca31461076c57806327e235e31461079d578063280e31cc146107ca57600080fd5b806310ff2dcf116104e057806310ff2dcf1461065557806312aef8c31461066b5780631302973a14610681578063131b2a601461069757806313cbf16e146106cf57806318c08810146106f757600080fd5b8062fed700146105ad5780630130e4ee146105dc57806301ffc9a7146105fc5780630af429281461061c5780630fb5a6b41461063157600080fd5b366105a857600a5460ff161561059e5760405162461bcd60e51b815260206004820152603c60248201527f53616c653a20546869732070726573616c652069732066756e6465642062792060448201527f746f6b656e732c2075736520627579546f6b656e732876616c7565290000000060648201526084015b60405180910390fd5b6105a6611105565b005b600080fd5b3480156105b957600080fd5b50600a546105c79060ff1681565b60405190151581526020015b60405180910390f35b3480156105e857600080fd5b506105a66105f7366004615159565b611222565b34801561060857600080fd5b506105c7610617366004615330565b6114d8565b34801561062857600080fd5b506105c761150f565b34801561063d57600080fd5b5061064760045481565b6040519081526020016105d3565b34801561066157600080fd5b5061064760155481565b34801561067757600080fd5b5061064760095481565b34801561068d57600080fd5b50610647600c5481565b3480156106a357600080fd5b506106b76106b23660046153f3565b61152c565b6040516001600160a01b0390911681526020016105d3565b3480156106db57600080fd5b506106e4611573565b60405161ffff90911681526020016105d3565b34801561070357600080fd5b506105a66107123660046152f4565b61163a565b34801561072357600080fd5b506105a6610732366004615560565b6116b4565b34801561074357600080fd5b506105a661170f565b34801561075857600080fd5b506105a66107673660046152f4565b611c8c565b34801561077857600080fd5b506106476107873660046152f4565b6000908152600160208190526040909120015490565b3480156107a957600080fd5b506106476107b836600461513d565b601e6020526000908152604090205481565b3480156107d657600080fd5b506107ea6107e536600461513d565b611d59565b6040516105d391906157ec565b34801561080357600080fd5b506011546106b7906001600160a01b031681565b34801561082357600080fd5b5061064760205481565b34801561083957600080fd5b506105a66108483660046152f4565b611df3565b34801561085957600080fd5b5061064760085481565b34801561086f57600080fd5b506105a661087e36600461530c565b611e63565b34801561088f57600080fd5b5061064760055481565b3480156108a557600080fd5b506105a66108b43660046152f4565b611e8a565b3480156108c557600080fd5b506105a66108d43660046152f4565b611f63565b3480156108e557600080fd5b506105a66108f436600461530c565b612161565b34801561090557600080fd5b506105a66109143660046152f4565b6121df565b34801561092557600080fd5b506105a66109343660046152bc565b61224f565b34801561094557600080fd5b5061064760075481565b34801561095b57600080fd5b506105a661096a3660046152f4565b6122d7565b34801561097b57600080fd5b506106476123b1565b34801561099057600080fd5b506105c76123c8565b3480156109a557600080fd5b506105a66109b43660046152f4565b612401565b3480156109c557600080fd5b506105a66109d436600461513d565b6124ce565b3480156109e557600080fd5b50600a546106b79061010090046001600160a01b031681565b348015610a0a57600080fd5b506105a6610a19366004615435565b61256c565b348015610a2a57600080fd5b50610647601b5481565b348015610a4057600080fd5b50600d546105c79060ff1681565b348015610a5a57600080fd5b50610a6e610a69366004615358565b612712565b6040516105d39190615681565b348015610a8757600080fd5b5061064761278f565b348015610a9c57600080fd5b506105a6610aab36600461538b565b6127b3565b348015610abc57600080fd5b50610ae0610acb36600461513d565b60186020526000908152604090205460ff1681565b60405160ff90911681526020016105d3565b348015610afe57600080fd5b506105a6610b0d3660046152f4565b612bbe565b348015610b1e57600080fd5b50610b32610b2d36600461513d565b612c99565b6040516105d394939291906157ff565b348015610b4e57600080fd5b50610647601d5481565b348015610b6457600080fd5b50610a6e61302f565b348015610b7957600080fd5b50610647610b8836600461513d565b6001600160a01b03166000908152601e602052604090205490565b348015610baf57600080fd5b506105a6613091565b348015610bc457600080fd5b506105a6610bd33660046152f4565b6130f7565b348015610be457600080fd5b5061064760065481565b348015610bfa57600080fd5b5061064760215481565b348015610c1057600080fd5b506105a6610c1f3660046151bc565b6131de565b348015610c3057600080fd5b5061064760035481565b348015610c4657600080fd5b50610a6e610c55366004615358565b61331c565b348015610c6657600080fd5b506105a6610c753660046152bc565b613330565b348015610c8657600080fd5b506105a66133ac565b348015610c9b57600080fd5b506000546001600160a01b03166106b7565b348015610cb957600080fd5b506105c7610cc836600461530c565b6135e8565b348015610cd957600080fd5b5061064760125481565b348015610cef57600080fd5b50610cf8613613565b6040516105d39291906156ce565b348015610d1257600080fd5b50610647610d2136600461513d565b601f6020526000908152604090205481565b348015610d3f57600080fd5b506105a6610d4e366004615191565b613795565b348015610d5f57600080fd5b50610647600081565b348015610d7457600080fd5b50610647610d833660046152f4565b613891565b348015610d9457600080fd5b506011546105c790600160a81b900460ff1681565b348015610db557600080fd5b506107ea6138af565b348015610dca57600080fd5b506011546105c790600160b01b900460ff1681565b348015610deb57600080fd5b50610647600b5481565b348015610e0157600080fd5b506105c76138bc565b348015610e1657600080fd5b506106b7610e253660046152f4565b6138d9565b348015610e3657600080fd5b506105a6610e4536600461513d565b613903565b348015610e5657600080fd5b50610647610e6536600461513d565b61398c565b348015610e7657600080fd5b506105a6610e853660046152bc565b6139b6565b348015610e9657600080fd5b50600c54600b54604080519283526020830191909152016105d3565b348015610ebe57600080fd5b506106b7610ecd3660046153f3565b613a3e565b348015610ede57600080fd5b5061064760135481565b348015610ef457600080fd5b506105a6610f033660046152f4565b613a69565b348015610f1457600080fd5b506105a6610f233660046151bc565b613ad9565b348015610f3457600080fd5b506105a6610f4336600461530c565b613c72565b348015610f5457600080fd5b506105a6613c99565b348015610f6957600080fd5b506105a6610f783660046152bc565b613d16565b348015610f8957600080fd5b506011546105c790600160b81b900460ff1681565b348015610faa57600080fd5b506105c7610fb936600461513d565b600e6020526000908152604090205460ff1681565b348015610fda57600080fd5b50610647610fe9366004615358565b613d9e565b348015610ffa57600080fd5b506105a66110093660046152f4565b613dca565b34801561101a57600080fd5b506011546105c790600160a01b900460ff1681565b34801561103b57600080fd5b506105a661104a3660046152f4565b613ec5565b34801561105b57600080fd5b5061064760145481565b34801561107157600080fd5b50610647601c5481565b34801561108757600080fd5b506105a661109636600461513d565b613fbc565b3480156110a757600080fd5b506105c7614084565b3480156110bc57600080fd5b506105a66110cb3660046152f4565b6140a2565b3480156110dc57600080fd5b506105c7614112565b3480156110f157600080fd5b506105a66111003660046152bc565b614131565b61110d6138bc565b61114a5760405162461bcd60e51b815260206004820152600e60248201526d53616c653a204e6f74206c69766560901b6044820152606401610595565b60028054141561119c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610595565b60028055600a5460ff16156112125760405162461bcd60e51b815260206004820152603660248201527f53616c653a2070726573616c652069732066756e64656420627920746f6b656e60448201527573206275742076616c7565206973206d697373696e6760501b6064820152608401610595565b61121b346141b9565b6001600255565b6000546001600160a01b031633148061124157506112416000336135e8565b61125d5760405162461bcd60e51b8152600401610595906158ad565b6001600160a01b0382166000908152601e6020908152604080832054601f909252822054601b805492939192849290611297908490615a16565b90915550506001600160a01b0384166000908152601e60205260408120819055601c80548392906112c9908490615a16565b90915550506001600160a01b0384166000908152601f60205260408120819055601d8054600192906112fc908490615a16565b9091555060009050831561148457600a5460ff1680156113995750600a546040516370a0823160e01b8152306004820152839161010090046001600160a01b0316906370a082319060240160206040518083038186803b15801561135f57600080fd5b505afa158015611373573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113979190615548565b115b1561143057600a5460405163a9059cbb60e01b81526001600160a01b038781166004830152602482018590526101009092049091169063a9059cbb90604401602060405180830381600087803b1580156113f257600080fd5b505af1158015611406573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061142a91906152d8565b50600190505b600a5460ff1615801561144257508147115b1561148457601c546040516001600160a01b0387169180156108fc02916000818181858888f1935050505015801561147e573d6000803e3d6000fd5b50600190505b60408051838152602081018590528215158183015290516001600160a01b038716917f7b1d0957863f96650b2225526d9a381eaf1fb553726081650e3f9d8b1e00e8d9919081900360600190a25050505050565b60006001600160e01b03198216637965db0b60e01b148061150957506301ffc9a760e01b6001600160e01b03198316145b92915050565b60006115196123b1565b60075461152690426159bf565b11905090565b8151602081840181018051601782529282019185019190912091905280548290811061155757600080fd5b6000918252602090912001546001600160a01b03169150829050565b601154600090600160a81b900460ff161561158e5750606490565b61159661150f565b6115a05750600090565b60006007546115ad6123b1565b6115b79190615a16565b9050600060046007546115ca91906159d7565b90506115d681836159bf565b4210156115e65760239250505090565b6115f18160026159f7565b6115fb90836159bf565b42101561160b5760509250505090565b6116168160036159f7565b61162090836159bf565b4210156116305760c89250505090565b6127109250505090565b6000546001600160a01b031633148061165957506116596000336135e8565b6116755760405162461bcd60e51b8152600401610595906158ad565b60078190556004546040519081527fff9eb67881f60bf89c804c5f5baf096fc4011374504513568b2825aa85c60860906020015b60405180910390a150565b6000546001600160a01b03163314806116d357506116d36000336135e8565b6116ef5760405162461bcd60e51b8152600401610595906158ad565b6116f883612bbe565b611701826130f7565b61170a8161163a565b505050565b6117176138bc565b156117705760405162461bcd60e51b815260206004820152602360248201527f53616c653a2043616e6e6f742072656769737465722c2073616c65206973206c60448201526269766560e81b6064820152608401610595565b6117786123c8565b156117e45760405162461bcd60e51b815260206004820152603660248201527f53616c653a204d696e206261736520616c6c6f636174696f6e20726561636865604482015275190b081c9959da5cdd1c985d1a5bdb8818db1bdcd95960521b6064820152608401610595565b6117ec614112565b6118385760405162461bcd60e51b815260206004820152601f60248201527f53616c653a204e6f74206f70656e20666f7220726567697374726174696f6e006044820152606401610595565b601154600160a01b900460ff166118a05760405162461bcd60e51b815260206004820152602660248201527f53616c653a2043616e6e6f742072656769737465722c206c6576656c732064696044820152651cd8589b195960d21b6064820152608401610595565b6011546001600160a01b031661190e5760405162461bcd60e51b815260206004820152602d60248201527f53616c653a204c6576656c73207374616b696e6720616464726573732069732060448201526c1b9bdd081cdc1958da599a5959609a1b6064820152608401610595565b600033601154604051637269310760e11b81526001600160a01b0380841660048301529293506000929091169063e4d2620e9060240160006040518083038186803b15801561195c57600080fd5b505afa158015611970573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526119989190810190615488565b90506000816020015160ff1611611a015760405162461bcd60e51b815260206004820152602760248201527f53616c653a20596f7572206c6576656c20697320746f6f206c6f7720746f207260448201526632b3b4b9ba32b960c91b6064820152608401610595565b6001600160a01b03821660009081526018602052604090205460ff161580611a4e57506001600160a01b0382166000908152601860209081526040909120549082015160ff918216911610155b611aac5760405162461bcd60e51b815260206004820152602960248201527f53616c653a20416c726561647920726567697374657265642077697468206c6f6044820152681dd95c881b195d995b60ba1b6064820152608401610595565b6001600160a01b03821660009081526018602052604090205460ff1615611b03576001600160a01b0382166000908152601860205260408120546012805460ff909216929091611afd908490615a16565b90915550505b601154600160b01b900460ff1615611b755760115460405163f435f5a760e01b81526001600160a01b0384811660048301529091169063f435f5a790602401600060405180830381600087803b158015611b5c57600080fd5b505af1158015611b70573d6000803e3d6000fd5b505050505b80516001600160a01b03831660009081526019602090815260409091208251611ba393919290910190614ea0565b50602081810180516001600160a01b0385166000908152601890935260408320805460ff191660ff928316179055905160128054919092169290611be89084906159bf565b90915550508051604051601691611bfe916155e0565b9081526040516020918190038201812080546001810182556000918252908390200180546001600160a01b0319166001600160a01b03861690811790915583519284015160115491937f2c4f034e06930af56f941f70cd4d8a322e62777b01e1db02013de59b1a626d1893611c8093919291600160b01b900460ff1690615830565b60405180910390a25050565b6000546001600160a01b0316331480611cab5750611cab6000336135e8565b611cc75760405162461bcd60e51b8152600401610595906158ad565b600c541580611cd85750600c548110155b611d245760405162461bcd60e51b815260206004820152601760248201527f4d75737420626520626967676572207468616e206d696e0000000000000000006044820152606401610595565b600b8190556040518181527f770427b1be4e1c22afadce4780c0ad65c0cbdd9b12543bea5a992f5bda025507906020016116a9565b60196020526000908152604090208054611d7290615a70565b80601f0160208091040260200160405190810160405280929190818152602001828054611d9e90615a70565b8015611deb5780601f10611dc057610100808354040283529160200191611deb565b820191906000526020600020905b815481529060010190602001808311611dce57829003601f168201915b505050505081565b6000546001600160a01b0316331480611e125750611e126000336135e8565b611e2e5760405162461bcd60e51b8152600401610595906158ad565b60148190556040518181527f4c6bd46b8e8373c4f78ebede75d8afec366b949b6da3dff8159bdbbf7d559672906020016116a9565b60008281526001602081905260409091200154611e80813361445b565b61170a83836144bf565b6000546001600160a01b0316331480611ea95750611ea96000336135e8565b611ec55760405162461bcd60e51b8152600401610595906158ad565b611ecd6138bc565b15611f2e5760405162461bcd60e51b815260206004820152602b60248201527f53616c653a2053616c65206973206c6976652c2072617465206368616e67652060448201526a1b9bdd08185b1b1bddd95960aa1b6064820152608401610595565b60088190556040518181527f595a30f13a69b616c4d568e2a2b7875fdfe86e4300a049953c76ee278f8f3f10906020016116a9565b611f6b6138bc565b611fa85760405162461bcd60e51b815260206004820152600e60248201526d53616c653a204e6f74206c69766560901b6044820152606401610595565b600280541415611ffa5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610595565b60028055600a5460ff1661205f5760405162461bcd60e51b815260206004820152602660248201527f53616c653a2066756e64696e6720627920746f6b656e73206973206e6f7420616044820152651b1b1bddd95960d21b6064820152608401610595565b600a54604051636eb1769f60e11b8152336004820152306024820152829161010090046001600160a01b03169063dd62ed3e9060440160206040518083038186803b1580156120ad57600080fd5b505afa1580156120c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120e59190615548565b10156121335760405162461bcd60e51b815260206004820152601d60248201527f53616c653a2066756e6420746f6b656e206e6f7420617070726f7665640000006044820152606401610595565b61213c816141b9565b600a546121599061010090046001600160a01b031633308461452a565b506001600255565b6001600160a01b03811633146121d15760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610595565b6121db828261458a565b5050565b6000546001600160a01b03163314806121fe57506121fe6000336135e8565b61221a5760405162461bcd60e51b8152600401610595906158ad565b60158190556040518181527f97d6eaf9f89b78bcf55d2707de7044fcc37a9308cf93ccca6495b32a72e45be2906020016116a9565b6000546001600160a01b031633148061226e575061226e6000336135e8565b61228a5760405162461bcd60e51b8152600401610595906158ad565b60118054821515600160a81b0260ff60a81b199091161790556040517f2f82dda56001bd3e8726092bb940912a2b44c3994cde91f6946ec09e36870aff906116a990831515815260200190565b6000546001600160a01b03163314806122f657506122f66000336135e8565b6123125760405162461bcd60e51b8152600401610595906158ad565b600554811161237c5760405162461bcd60e51b815260206004820152603060248201527f53616c653a2073746172742074696d65206d757374206265206166746572207460448201526f68652072656769737465722074696d6560801b6064820152608401610595565b60038190556040518181527fb40bc62c7614c21c292641d79509c0572ffdcf912e874169cf69162e026146c9906020016116a9565b60006004546003546123c391906159bf565b905090565b6000601554600014156123db5750600090565b600080601354116123f3576123ee6145f1565b6123f7565b6013545b6015541192915050565b6000546001600160a01b031633148061242057506124206000336135e8565b61243c5760405162461bcd60e51b8152600401610595906158ad565b600b54158061244d5750600b548111155b6124995760405162461bcd60e51b815260206004820152601860248201527f4d75737420626520736d616c6c6572207468616e206d617800000000000000006044820152606401610595565b600c8190556040518181527f46077927d83541de01a449629a0bb1dbeb03e03fd6ee2e3ba4bf2952e3943350906020016116a9565b6000546001600160a01b03163314806124ed57506124ed6000336135e8565b6125095760405162461bcd60e51b8152600401610595906158ad565b600a80546001600160a81b0319166001600160a01b038316801515610100600160a81b031916919091176101008202179091556040519081527f212b2eba76cc5f9d7a0ee5363b517577da12e63f1231d6329ed6ff838b9973c4906020016116a9565b6000546001600160a01b031633148061258b575061258b6000336135e8565b6125a75760405162461bcd60e51b8152600401610595906158ad565b60005b8181101561270b5760008383838181106125d457634e487b7160e01b600052603260045260246000fd5b90506020020160208101906125e9919061513d565b6001600160a01b03811660009081526018602052604090205490915060ff1615612643576001600160a01b0381166000908152601860205260408120546012805460ff90921692909161263d908490615a16565b90915550505b6001600160a01b0381166000908152601960209081526040909120875161266c92890190614ea0565b506001600160a01b0381166000908152601860205260408120805460ff191660ff8816179055601280548792906126a49084906159bf565b90915550506040516016906126ba9088906155e0565b90815260405160209181900382019020805460018101825560009182529190200180546001600160a01b0319166001600160a01b03929092169190911790558061270381615aab565b9150506125aa565b5050505050565b6060601783836040516127269291906155fc565b908152604080519182900360209081018320805480830285018301909352828452919083018282801561278257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612764575b5050505050905092915050565b60008061279d600b54613891565b9050601054816127ad91906159f7565b91505090565b6000546001600160a01b03163314806127d257506127d26000336135e8565b6127ee5760405162461bcd60e51b8152600401610595906158ad565b60115460405163d5a162bd60e01b81526000916001600160a01b03169063d5a162bd906128219088908890600401615767565b60006040518083038186803b15801561283957600080fd5b505afa15801561284d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526128759190810190615488565b60200151905060005b601686866040516128909291906155fc565b90815260405190819003602001902054811015612a49576000601687876040516128bb9291906155fc565b908152602001604051809103902082815481106128e857634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b03168083526019909152604090912080549192506129d89161291e90615a70565b80601f016020809104026020016040519081016040528092919081815260200182805461294a90615a70565b80156129975780601f1061296c57610100808354040283529160200191612997565b820191906000526020600020905b81548152906001019060200180831161297a57829003601f168201915b505050505088888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061463592505050565b6129e25750612a37565b6001600160a01b0381166000908152601860205260408120546012805460ff909216929091612a12908490615a16565b90915550506001600160a01b03166000908152601860205260409020805460ff191690555b80612a4181615aab565b91505061287e565b5060005b82811015612b29576000848483818110612a7757634e487b7160e01b600052603260045260246000fd5b9050602002016020810190612a8c919061513d565b6001600160a01b03811660009081526019602052604090208054919250612ab69161291e90615a70565b612ac05750612b17565b8260ff1660126000828254612ad591906159bf565b90915550506001600160a01b0381166000908152601860209081526040808320805460ff191660ff881617905560199091529020612b14908888614f24565b50505b80612b2181615aab565b915050612a4d565b50828260178787604051612b3e9291906155fc565b908152604051908190036020019020612b58929091614f98565b507f1384e026e8cb5a62c4b4038979dd91ae8a2e68f61772d6079c3b7e7384b89c1b858560168888604051612b8e9291906155fc565b90815260405190819003602001812054612baf93929187908990829061577b565b60405180910390a15050505050565b6000546001600160a01b0316331480612bdd5750612bdd6000336135e8565b612bf95760405162461bcd60e51b8152600401610595906158ad565b6003548110612c645760405162461bcd60e51b815260206004820152603160248201527f53616c653a2072656769737465722074696d65206d757374206265206265666f6044820152707265207468652073746172742074696d6560781b6064820152608401610595565b60058190556040518181527f90d3be8da38886a5f029d2f1188aa8d57c6826b16cbc7abdcf22d883f6605acc906020016116a9565b6060600080600080612ca9614084565b6001600160a01b038716600090815260196020526040812080549293509091612cd190615a70565b80601f0160208091040260200160405190810160405280929190818152602001828054612cfd90615a70565b8015612d4a5780601f10612d1f57610100808354040283529160200191612d4a565b820191906000526020600020905b815481529060010190602001808311612d2d57829003601f168201915b50505050509050600082612ead5760115482516001600160a01b039091169063d5a162bd9015612e1a576001600160a01b038a1660009081526019602052604090208054612d9790615a70565b80601f0160208091040260200160405190810160405280929190818152602001828054612dc390615a70565b8015612e105780601f10612de557610100808354040283529160200191612e10565b820191906000526020600020905b815481529060010190602001808311612df357829003601f168201915b5050505050612e38565b604051806040016040528060048152602001636e6f6e6560e01b8152505b6040518263ffffffff1660e01b8152600401612e5491906157ec565b60006040518083038186803b158015612e6c57600080fd5b505afa158015612e80573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612ea89190810190615488565b612f2e565b601154604051637269310760e11b81526001600160a01b038a811660048301529091169063e4d2620e9060240160006040518083038186803b158015612ef257600080fd5b505afa158015612f06573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612f2e9190810190615488565b9050600083612f58576001600160a01b03891660009081526018602052604090205460ff16612f5e565b81602001515b905060006013548260ff16612f7391906159f7565b90506000612f7f611573565b90506064612f9161ffff8316846159f7565b612f9b91906159d7565b612fa590836159bf565b9150600085516000146130115784608001518015612fe65750600060178660000151604051612fd491906155e0565b90815260405190819003602001902054115b801561300c57506001600160a01b038c1660009081526018602052604090205460ff1615155b613014565b60005b94519a505060ff909216975095509093505050509193509193565b6060600f80548060200260200160405190810160405280929190818152602001828054801561308757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613069575b5050505050905090565b6000546001600160a01b031633146130eb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610595565b6130f5600061468e565b565b6000546001600160a01b031633148061311657506131166000336135e8565b6131325760405162461bcd60e51b8152600401610595906158ad565b6003548160055461314391906159bf565b106131a95760405162461bcd60e51b815260206004820152603060248201527f53616c653a20726567697374657220656e64206d757374206265206265666f7260448201526f65207468652073746172742074696d6560801b6064820152608401610595565b60068190556040518181527f0427e7ba04df00e564e2a87324ce9927680ca725fde43516ad6055c9d3c6b6ad906020016116a9565b6000546001600160a01b03163314806131fd57506131fd6000336135e8565b6132195760405162461bcd60e51b8152600401610595906158ad565b60005b8181101561170a57600e600084848481811061324857634e487b7160e01b600052603260045260246000fd5b905060200201602081019061325d919061513d565b6001600160a01b0316815260208101919091526040016000205460ff161561330a576000600e60008585858181106132a557634e487b7160e01b600052603260045260246000fd5b90506020020160208101906132ba919061513d565b6001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055506001601060008282546133049190615a16565b90915550505b8061331481615aab565b91505061321c565b6060601683836040516127269291906155fc565b6000546001600160a01b031633148061334f575061334f6000336135e8565b61336b5760405162461bcd60e51b8152600401610595906158ad565b600d805460ff19168215159081179091556040519081527f9bea0dd3cae4438dc4c54c3110002aedc380f4075b6edae73ae0536105a2008a906020016116a9565b6000546001600160a01b03163314806133cb57506133cb6000336135e8565b6133e75760405162461bcd60e51b8152600401610595906158ad565b47801561342957600080546040516001600160a01b039091169183156108fc02918491818181858888f19350505050158015613427573d6000803e3d6000fd5b505b600a5460ff1680156134b95750600a546040516370a0823160e01b815230600482015260009161010090046001600160a01b0316906370a082319060240160206040518083038186803b15801561347f57600080fd5b505afa158015613493573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134b79190615548565b115b156135e557600a546001600160a01b036101009091041663a9059cbb6134e76000546001600160a01b031690565b600a546040516370a0823160e01b81523060048201526101009091046001600160a01b0316906370a082319060240160206040518083038186803b15801561352e57600080fd5b505afa158015613542573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135669190615548565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044015b602060405180830381600087803b1580156135ad57600080fd5b505af11580156135c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121db91906152d8565b50565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060806000601160009054906101000a90046001600160a01b03166001600160a01b031663d8cde1c66040518163ffffffff1660e01b815260040160006040518083038186803b15801561366657600080fd5b505afa15801561367a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526136a291908101906151fb565b9050600081516001600160401b038111156136cd57634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156136f6578160200160208202803683370190505b50905060005b825181101561378b57601683828151811061372757634e487b7160e01b600052603260045260246000fd5b602002602001015160405161373c91906155e0565b90815260200160405180910390208054905082828151811061376e57634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061378381615aab565b9150506136fc565b5090939092509050565b6000546001600160a01b03163314806137b457506137b46000336135e8565b6137d05760405162461bcd60e51b8152600401610595906158ad565b600081116137f05760405162461bcd60e51b81526004016105959061585d565b816001600160a01b031663a9059cbb6138116000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401602060405180830381600087803b15801561385957600080fd5b505af115801561386d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061170a91906152d8565b6000620f4240600854836138a591906159f7565b61150991906159d7565b601a8054611d7290615a70565b6000600354421180156123c357506138d26123b1565b4210905090565b600f81815481106138e957600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b031633148061392257506139226000336135e8565b61393e5760405162461bcd60e51b8152600401610595906158ad565b601180546001600160a01b0319166001600160a01b0383169081179091556040519081527fbfa5a19d46258dbc91d88bb610f25e8f77fe8092101241c542bf84619f938c96906020016116a9565b6013546001600160a01b03821660009081526018602052604081205490916115099160ff166159f7565b6000546001600160a01b03163314806139d557506139d56000336135e8565b6139f15760405162461bcd60e51b8152600401610595906158ad565b60118054821515600160b01b0260ff60b01b199091161790556040517f0615d623d485097ea27091190b1b298ccd7557f48c9f963a477f18185af6b899906116a990831515815260200190565b8151602081840181018051601682529282019185019190912091905280548290811061155757600080fd5b6000546001600160a01b0316331480613a885750613a886000336135e8565b613aa45760405162461bcd60e51b8152600401610595906158ad565b60138190556040518181527fde564456246ca1697b6573255d45061d65b3e9ee5a2577854152bbd6b80ad3a4906020016116a9565b6000546001600160a01b0316331480613af85750613af86000336135e8565b613b145760405162461bcd60e51b8152600401610595906158ad565b60005b8181101561170a57600e6000848484818110613b4357634e487b7160e01b600052603260045260246000fd5b9050602002016020810190613b58919061513d565b6001600160a01b0316815260208101919091526040016000205460ff16613c60576001600e6000858585818110613b9f57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190613bb4919061513d565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055600f838383818110613bfe57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190613c13919061513d565b81546001808201845560009384526020842090910180546001600160a01b0319166001600160a01b0393909316929092179091556010805491929091613c5a9084906159bf565b90915550505b80613c6a81615aab565b915050613b17565b60008281526001602081905260409091200154613c8f813361445b565b61170a838361458a565b6000546001600160a01b0316331480613cb85750613cb86000336135e8565b613cd45760405162461bcd60e51b8152600401610595906158ad565b613cdc6145f1565b60138190556040519081527f156702b521bc18881bb99ad74c814751f495cf46a54895d63c8f55f59db44a0f9060200160405180910390a1565b6000546001600160a01b0316331480613d355750613d356000336135e8565b613d515760405162461bcd60e51b8152600401610595906158ad565b60118054821515600160b81b0260ff60b81b199091161790556040517f60c4f3ac3ffcc54d9f33c0fbc9e0c6f9f7a7368b96273b08546d21dfc448e332906116a990831515815260200190565b600060168383604051613db29291906155fc565b90815260405190819003602001902054905092915050565b6000546001600160a01b0316331480613de95750613de96000336135e8565b613e055760405162461bcd60e51b8152600401610595906158ad565b60008111613e255760405162461bcd60e51b81526004016105959061585d565b600a5460ff1615613e8c57600a546001600160a01b036101009091041663a9059cbb613e596000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401613593565b600080546040516001600160a01b039091169183156108fc02918491818181858888f193505050501580156121db573d6000803e3d6000fd5b6000546001600160a01b0316331480613ee45750613ee46000336135e8565b613f005760405162461bcd60e51b8152600401610595906158ad565b613f086138bc565b1580613f15575060095481115b613f875760405162461bcd60e51b815260206004820152603d60248201527f53616c653a2053616c65206973206c6976652c20636170206368616e6765206f60448201527f6e6c7920616c6c6f77656420746f2061206869676865722076616c75650000006064820152608401610595565b60098190556040518181527f162238f20a51a0fd11d4e4e9ea154917f3776b59af9fedaeaf42676ad580a2c7906020016116a9565b6000546001600160a01b031633146140165760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610595565b6001600160a01b03811661407b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610595565b6135e58161468e565b601154600090600160a81b900460ff16806123c357506123c361150f565b6000546001600160a01b03163314806140c157506140c16000336135e8565b6140dd5760405162461bcd60e51b8152600401610595906158ad565b60048190556040518181527f9bb10695bde7db94333a5404f0767118f3965fd73217e45f96529c3d368285af906020016116a9565b600061411c6146de565b80156123c3575061412b6123c8565b15905090565b6000546001600160a01b031633148061415057506141506000336135e8565b61416c5760405162461bcd60e51b8152600401610595906158ad565b60118054821515600160a01b0260ff60a01b199091161790556040517f5a93387354333593ee4e928f4c1050f3f43ca3f370542ce5de543ca1b7109288906116a990831515815260200190565b60006141c36146fc565b905033826142065760405162461bcd60e51b815260206004820152601060248201526f053616c653a2076616c756520697320360841b6044820152606401610595565b600061421184613891565b9050600081116142575760405162461bcd60e51b8152602060048201526011602482015270053616c653a20616d6f756e74206973203607c1b6044820152606401610595565b80601b600082825461426991906159bf565b90915550506001600160a01b0382166000908152601e6020526040812080548392906142969084906159bf565b90915550506001600160a01b0382166000908152601f6020526040812080548692906142c39084906159bf565b9091555050600c5484101561431a5760405162461bcd60e51b815260206004820152601960248201527f53616c653a20616d6f756e7420697320746f6f20736d616c6c000000000000006044820152606401610595565b82158061433f57506001600160a01b0382166000908152601e60205260409020548310155b6143975760405162461bcd60e51b815260206004820152602360248201527f53616c653a20616d6f756e742065786365656473206d617820616c6c6f63617460448201526234b7b760e91b6064820152608401610595565b600954601b5411156143df5760405162461bcd60e51b815260206004820152601160248201527014d85b194e8818d85c081c995858da1959607a1b6044820152606401610595565b83601c546143ed91906159bf565b601c55601d546143fe9060016159bf565b601d5560205461440d57436020555b4360215560408051858152602081018390526001600160a01b038416917f8fafebcaf9d154343dad25669bfa277f4fbacd7ac6b0c4fed522580e040a0f33910160405180910390a250505050565b61446582826135e8565b6121db5761447d816001600160a01b03166014614adb565b614488836020614adb565b60405160200161449992919061560c565b60408051601f198184030181529082905262461bcd60e51b8252610595916004016157ec565b6144c982826135e8565b6121db5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052614584908590614cc3565b50505050565b61459482826135e8565b156121db5760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600080600060125411614605576001614609565b6012545b9050600061461561278f565b6009546146229190615a16565b905061462e82826159d7565b9250505090565b60008160405160200161464891906155e0565b604051602081830303815290604052805190602001208360405160200161466f91906155e0565b6040516020818303038152906040528051906020012014905092915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000600554421180156123c357506006546005546138d291906159bf565b600033816147098261398c565b90506000614718600b54613891565b600d5490915060ff161580156147385750601154600160a01b900460ff16155b15614744579392505050565b600d5460ff1680156147655750336000908152600e602052604090205460ff165b156147c75760008211801561477d575061477d614084565b156147b557600061478d84612c99565b5092505050600081116147b25760405162461bcd60e51b8152600401610595906158f8565b91505b6147bf82826159bf565b935050505090565b600d5460ff1680156147e35750601154600160a01b900460ff16155b156148305760405162461bcd60e51b815260206004820152601a60248201527f53616c653a206e6f7420696e207468652077686974656c6973740000000000006044820152606401610595565b601154600160a01b900460ff1615614a93576000601354116148b35760405162461bcd60e51b815260206004820152603660248201527f53616c653a206c6576656c732061726520656e61626c6564206275742062617360448201527519505b1b1bd8d85d1a5bdb881a5cc81b9bdd081cd95d60521b6064820152608401610595565b6148bb614084565b156148f85760006148cb84612c99565b5092505050600081116148f05760405162461bcd60e51b8152600401610595906158f8565b949350505050565b6001600160a01b0383166000908152601960205260408120805461491b90615a70565b80601f016020809104026020016040519081016040528092919081815260200182805461494790615a70565b80156149945780601f1061496957610100808354040283529160200191614994565b820191906000526020600020905b81548152906001019060200180831161497757829003601f168201915b5050505050905060008151116149f75760405162461bcd60e51b815260206004820152602260248201527f53616c653a2075736572206c6576656c206973206e6f74207265676973746572604482015261195960f21b6064820152608401610595565b60008311614a8a5760405162461bcd60e51b815260206004820152605460248201527f53616c653a207573657220686173206e6f206c6576656c20616c6c6f6361746960448201527f6f6e2c206e6f7420726567697374657265642c206c6f7374206c6f7474657279606482015273206f72206c6576656c20697320746f6f206c6f7760601b608482015260a401610595565b50909392505050565b60405162461bcd60e51b815260206004820152601760248201527f53616c653a20756e726561636861626c652073746174650000000000000000006044820152606401610595565b60606000614aea8360026159f7565b614af59060026159bf565b6001600160401b03811115614b1a57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015614b44576020820181803683370190505b509050600360fc1b81600081518110614b6d57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110614baa57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000614bce8460026159f7565b614bd99060016159bf565b90505b6001811115614c6d576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110614c1b57634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110614c3f57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93614c6681615a59565b9050614bdc565b508315614cbc5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610595565b9392505050565b6000614d18826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614d959092919063ffffffff16565b80519091501561170a5780806020019051810190614d3691906152d8565b61170a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610595565b60606148f0848460008585843b614dee5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610595565b600080866001600160a01b03168587604051614e0a91906155e0565b60006040518083038185875af1925050503d8060008114614e47576040519150601f19603f3d011682016040523d82523d6000602084013e614e4c565b606091505b5091509150614e5c828286614e67565b979650505050505050565b60608315614e76575081614cbc565b825115614e865782518084602001fd5b8160405162461bcd60e51b815260040161059591906157ec565b828054614eac90615a70565b90600052602060002090601f016020900481019282614ece5760008555614f14565b82601f10614ee757805160ff1916838001178555614f14565b82800160010185558215614f14579182015b82811115614f14578251825591602001919060010190614ef9565b50614f20929150614feb565b5090565b828054614f3090615a70565b90600052602060002090601f016020900481019282614f525760008555614f14565b82601f10614f6b5782800160ff19823516178555614f14565b82800160010185558215614f14579182015b82811115614f14578235825591602001919060010190614f7d565b828054828255906000526020600020908101928215614f14579160200282015b82811115614f145781546001600160a01b0319166001600160a01b03843516178255602090920191600190910190614fb8565b5b80821115614f205760008155600101614fec565b60008083601f840112615011578182fd5b5081356001600160401b03811115615027578182fd5b6020830191508360208260051b850101111561504257600080fd5b9250929050565b805161505481615b07565b919050565b60008083601f84011261506a578182fd5b5081356001600160401b03811115615080578182fd5b60208301915083602082850101111561504257600080fd5b600082601f8301126150a8578081fd5b81356150bb6150b682615998565b615968565b8181528460208386010111156150cf578283fd5b816020850160208301379081016020019190915292915050565b600082601f8301126150f9578081fd5b81516151076150b682615998565b81815284602083860101111561511b578283fd5b6148f0826020830160208701615a2d565b805160ff8116811461505457600080fd5b60006020828403121561514e578081fd5b8135614cbc81615af2565b6000806040838503121561516b578081fd5b823561517681615af2565b9150602083013561518681615b07565b809150509250929050565b600080604083850312156151a3578182fd5b82356151ae81615af2565b946020939093013593505050565b600080602083850312156151ce578182fd5b82356001600160401b038111156151e3578283fd5b6151ef85828601615000565b90969095509350505050565b6000602080838503121561520d578182fd5b82516001600160401b0380821115615223578384fd5b818501915085601f830112615236578384fd5b81518181111561524857615248615adc565b8060051b615257858201615968565b8281528581019085870183870188018b1015615271578889fd5b8893505b848410156152ae5780518681111561528b57898afd5b6152998c8a838b01016150e9565b84525060019390930192918701918701615275565b509998505050505050505050565b6000602082840312156152cd578081fd5b8135614cbc81615b07565b6000602082840312156152e9578081fd5b8151614cbc81615b07565b600060208284031215615305578081fd5b5035919050565b6000806040838503121561531e578182fd5b82359150602083013561518681615af2565b600060208284031215615341578081fd5b81356001600160e01b031981168114614cbc578182fd5b6000806020838503121561536a578182fd5b82356001600160401b0381111561537f578283fd5b6151ef85828601615059565b600080600080604085870312156153a0578182fd5b84356001600160401b03808211156153b6578384fd5b6153c288838901615059565b909650945060208701359150808211156153da578384fd5b506153e787828801615000565b95989497509550505050565b60008060408385031215615405578182fd5b82356001600160401b0381111561541a578283fd5b61542685828601615098565b95602094909401359450505050565b6000806000806060858703121561544a578182fd5b84356001600160401b0380821115615460578384fd5b61546c88838901615098565b95506020870135945060408701359150808211156153da578384fd5b600060208284031215615499578081fd5b81516001600160401b03808211156154af578283fd5b9083019060e082860312156154c2578283fd5b6154ca615940565b8251828111156154d8578485fd5b6154e4878286016150e9565b8252506154f36020840161512c565b6020820152604083015160408201526060830151606082015261551860808401615049565b608082015261552960a0840161512c565b60a082015261553a60c08401615049565b60c082015295945050505050565b600060208284031215615559578081fd5b5051919050565b600080600060608486031215615574578081fd5b505081359360208301359350604090920135919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b600081518084526155cc816020860160208601615a2d565b601f01601f19169290920160200192915050565b600082516155f2818460208701615a2d565b9190910192915050565b8183823760009101908152919050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615644816017850160208801615a2d565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615675816028840160208801615a2d565b01602801949350505050565b6020808252825182820181905260009190848201906040850190845b818110156156c25783516001600160a01b03168352928401929184019160010161569d565b50909695505050505050565b6000604082016040835280855180835260608501915060608160051b86010192506020808801855b8381101561572457605f198887030185526157128683516155b4565b955093820193908201906001016156f6565b505085840381870152865180855287820194820193509150845b8281101561575a5784518452938101939281019260010161573e565b5091979650505050505050565b6020815260006148f060208301848661558b565b60808152600061578f60808301888a61558b565b602083810188905260408401879052838203606085015284825285918101835b868110156157dd5783356157c281615af2565b6001600160a01b0316825292820192908201906001016157af565b509a9950505050505050505050565b602081526000614cbc60208301846155b4565b60808152600061581260808301876155b4565b60208301959095525060408101929092521515606090910152919050565b60608152600061584360608301866155b4565b60ff94909416602083015250901515604090910152919050565b60208082526030908201527f576974686472617761626c653a20616d6f756e742073686f756c64206265206760408201526f726561746572207468616e207a65726f60801b606082015260800190565b6020808252602b908201527f41646d696e61626c653a2063616c6c6572206973206e6f7420746865206f776e60408201526a32b91037b91030b236b4b760a91b606082015260800190565b60208082526028908201527f53616c653a207573657220646f6573206e6f742068617665204643465320616c6040820152673637b1b0ba34b7b760c11b606082015260800190565b60405160e081016001600160401b038111828210171561596257615962615adc565b60405290565b604051601f8201601f191681016001600160401b038111828210171561599057615990615adc565b604052919050565b60006001600160401b038211156159b1576159b1615adc565b50601f01601f191660200190565b600082198211156159d2576159d2615ac6565b500190565b6000826159f257634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615615a1157615a11615ac6565b500290565b600082821015615a2857615a28615ac6565b500390565b60005b83811015615a48578181015183820152602001615a30565b838111156145845750506000910152565b600081615a6857615a68615ac6565b506000190190565b600181811c90821680615a8457607f821691505b60208210811415615aa557634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415615abf57615abf615ac6565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146135e557600080fd5b80151581146135e557600080fdfea2646970667358221220252fe643b6629e2466460f93c975ccaff1e582e37cc8ae1f0da9eb76b2a9492b64736f6c63430008040033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
POL | 100.00% | $0.999903 | 27.5469 | $27.54 |
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.