ERC-20
Overview
Max Total Supply
8,102,240 QD
Holders
6
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 24 Decimals)
Balance
5,400,000 QDValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Source Code Verified (Exact Match)
Contract Name:
QD
Compiler Version
v0.8.3+commit.8d00100c
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; import "Ownable.sol"; import "ERC20.sol"; import "SafeERC20.sol"; interface ILocker { // github.com/aurora-is-near/rainbow-token-connector/blob/master/erc20-connector/contracts/ERC20Locker.sol function lockToken(address ethToken, uint256 amount, string memory accountId) external; } contract QD is Ownable, ERC20 { using SafeERC20 for ERC20; event Mint (address indexed reciever, uint cost_in_usd, uint qd_amt); // NEAR NEP-141s have this precision... uint constant internal _QD_DECIMALS = 24; uint constant internal _USDT_DECIMALS = 6; uint constant public PRICE_PRECISION = 1e18; uint constant public start_price = 22 * PRICE_PRECISION / 100; uint constant public final_price = 96 * PRICE_PRECISION / 100; // 9x6 = 54 uint constant public MINT_QD_PER_DAY_MAX = 500_000; uint constant public SALE_START = 1647388800; // EOD Ides of March in GMT uint constant public SALE_LENGTH = 54 days; // twitter.com/Ukraine/status/1497594592438497282 address constant public UA = 0x165CD37b4C644C2921454429E7F9358d18A45e14; uint public constant pie = 2_700_000_000_000_000_000_000_000_000_000; uint public private_price = 6 * PRICE_PRECISION / 100; // 6th sense... uint public private_deposited; uint public public_deposited; uint public private_minted; // Set in constructor and never changed address immutable public lockyer; address immutable public tether; constructor(address _usdt, address _locker) ERC20("Qu!D", "QD") { private_minted = 2 * pie; // * R = 5.4M, full circumference _mint(_msgSender(), private_minted); // optimistically mint lockyer = _locker; tether = _usdt; } function withdraw() external { if (public_deposited > 0 && block.timestamp >= SALE_START + SALE_LENGTH) { ERC20(tether).approve(lockyer, public_deposited); ILocker(lockyer).lockToken(tether, public_deposited, "quid.near"); public_deposited = 0; } if (private_deposited > 0) { ERC20(tether).safeTransfer(owner(), private_deposited); private_deposited = 0; } } function mint(uint qd_amt, address beneficiary) external returns (uint cost_in_usdt, uint aid) { _mint(beneficiary, qd_amt); if (_msgSender() != owner()) { require(qd_amt >= 100_000_000_000_000_000_000_000_000, "QD: MINT_R1"); // $100 minimum require(block.timestamp >= SALE_START && block.timestamp < SALE_START + SALE_LENGTH, "QD: MINT_R2"); // Too late require(totalSupply() - private_minted <= get_total_supply_cap(block.timestamp), "QD: MINT_R3"); // Cap minting cost_in_usdt = qd_amt_to_usdt_amt(qd_amt, block.timestamp); aid = cost_in_usdt * 22 / 100; // 22% wartime tax to UA public_deposited += cost_in_usdt - aid; } else { require(qd_amt == pie, "Wrong QD amount entered"); require(private_price < start_price, "Can't allocate any more"); cost_in_usdt = qd_amt * 10 ** _USDT_DECIMALS * private_price / PRICE_PRECISION / 10 ** _QD_DECIMALS; private_price += 2 * PRICE_PRECISION / 100; private_deposited += cost_in_usdt; private_minted += qd_amt; } ERC20(tether).safeTransferFrom(_msgSender(), address(this), cost_in_usdt); // reverts on failure (e.g. allowance) if (aid > 0) { ERC20(tether).safeTransfer(UA, aid); } emit Mint(beneficiary, cost_in_usdt, qd_amt); } function qd_amt_to_usdt_amt(uint qd_amt, uint block_timestamp) public pure returns (uint usdt_amount) { uint price = calculate_price(block_timestamp); // cost = amount / qd_multiplier * usdt_multipler * price usdt_amount = qd_amt * 10 ** _USDT_DECIMALS * price / PRICE_PRECISION / 10 ** _QD_DECIMALS; } function calculate_price( uint block_timestamp) public pure returns (uint price){ uint time_elapsed = block_timestamp - SALE_START; // price = ((now - sale_start) // SALE_LENGTH) * (final_price - start_price) + start_price price = (final_price - start_price) * time_elapsed / SALE_LENGTH + start_price; } function get_total_supply_cap(uint block_timestamp) public pure returns (uint total_supply_cap) { uint time_elapsed = block_timestamp - SALE_START; total_supply_cap = MINT_QD_PER_DAY_MAX * 10 ** _QD_DECIMALS * time_elapsed / 1 days; } function decimals() public pure override(ERC20) returns (uint8) { return uint8(_QD_DECIMALS); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "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.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "IERC20.sol"; import "IERC20Metadata.sol"; import "Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, _allowances[owner][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = _allowances[owner][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; } _balances[to] += amount; emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Spend `amount` form the allowance of `owner` toward `spender`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.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 `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 `from` to `to` 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 from, address to, 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.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "IERC20.sol"; import "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 (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @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 * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 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); } } } }
{ "evmVersion": "istanbul", "optimizer": { "enabled": true, "runs": 200 }, "libraries": { "QD.sol": {} }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_usdt","type":"address"},{"internalType":"address","name":"_locker","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"reciever","type":"address"},{"indexed":false,"internalType":"uint256","name":"cost_in_usd","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"qd_amt","type":"uint256"}],"name":"Mint","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":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"MINT_QD_PER_DAY_MAX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE_PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SALE_LENGTH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SALE_START","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UA","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"block_timestamp","type":"uint256"}],"name":"calculate_price","outputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"final_price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"block_timestamp","type":"uint256"}],"name":"get_total_supply_cap","outputs":[{"internalType":"uint256","name":"total_supply_cap","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockyer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"qd_amt","type":"uint256"},{"internalType":"address","name":"beneficiary","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"cost_in_usdt","type":"uint256"},{"internalType":"uint256","name":"aid","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pie","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"private_deposited","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"private_minted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"private_price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"public_deposited","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"qd_amt","type":"uint256"},{"internalType":"uint256","name":"block_timestamp","type":"uint256"}],"name":"qd_amt_to_usdt_amt","outputs":[{"internalType":"uint256","name":"usdt_amount","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"start_price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tether","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c060405260646200001b670de0b6b3a7640000600662000399565b62000027919062000378565b6006553480156200003757600080fd5b5060405162001e6d38038062001e6d8339810160408190526200005a9162000326565b60405180604001604052806004815260200163145d485160e21b81525060405180604001604052806002815260200161145160f21b815250620000ac620000a66200012760201b60201c565b6200012b565b8151620000c190600490602085019062000263565b508051620000d790600590602084019062000263565b5050506c22142ba7658b08825ee00000006002620000f6919062000399565b60095562000107336009546200017b565b6001600160601b0319606091821b811660805291901b1660a0526200040e565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038216620001d65760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b8060036000828254620001ea91906200035d565b90915550506001600160a01b03821660009081526001602052604081208054839290620002199084906200035d565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b8280546200027190620003bb565b90600052602060002090601f016020900481019282620002955760008555620002e0565b82601f10620002b057805160ff1916838001178555620002e0565b82800160010185558215620002e0579182015b82811115620002e0578251825591602001919060010190620002c3565b50620002ee929150620002f2565b5090565b5b80821115620002ee5760008155600101620002f3565b80516001600160a01b03811681146200032157600080fd5b919050565b6000806040838503121562000339578182fd5b620003448362000309565b9150620003546020840162000309565b90509250929050565b60008219821115620003735762000373620003f8565b500190565b6000826200039457634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615620003b657620003b6620003f8565b500290565b600181811c90821680620003d057607f821691505b60208210811415620003f257634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60805160601c60a05160601c611a026200046b600039600081816102ca0152818161064b01528181610721015281816107ff01528181610ba30152610be60152600081816103130152818161067801526107710152611a026000f3fe608060405234801561001057600080fd5b50600436106101fb5760003560e01c8063834d026c1161011a578063a457c2d7116100ad578063c52e8c411161007c578063c52e8c4114610411578063d47823831461042c578063dd62ed3e14610435578063f2fde38b1461046e578063f7a3e04914610481576101fb565b8063a457c2d7146103d9578063a9059cbb146103ec578063bbc56cc8146103ff578063bf2b52bf14610409576101fb565b806394bf804d116100e957806394bf804d1461038757806395082d25146103af57806395d89b41146103be57806398b9cc6e146103c6576101fb565b8063834d026c146103505780638a95a746146103595780638bea5be41461036d5780638da5cb5b14610376576101fb565b80633950935111610192578063676e4cba11610161578063676e4cba1461030457806367f757261461030e57806370a0823114610335578063715018a614610348576101fb565b8063395093511461029f5780633ccfd60b146102b25780635796f10b146102bc5780635efc071a146102c5576101fb565b806322673030116101ce578063226730301461025f57806323b872dd1461026a578063313ce5671461027d578063367e1c3e1461028c576101fb565b806306fdde031461020057806308b309e31461021e578063095ea7b31461023457806318160ddd14610257575b600080fd5b610208610494565b604051610215919061179a565b60405180910390f35b610226610526565b604051908152602001610215565b6102476102423660046116da565b610548565b6040519015158152602001610215565b600354610226565b610226636231288081565b61024761027836600461169f565b610560565b60405160188152602001610215565b61022661029a366004611723565b610586565b6102476102ad3660046116da565b6105cb565b6102ba61060a565b005b61022660065481565b6102ec7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610215565b6102266207a12081565b6102ec7f000000000000000000000000000000000000000000000000000000000000000081565b610226610343366004611653565b61082e565b6102ba61084d565b61022660085481565b6102266c22142ba7658b08825ee000000081565b61022660095481565b6000546001600160a01b03166102ec565b61039a61039536600461173b565b6108b6565b60408051928352602083019190915201610215565b610226670de0b6b3a764000081565b610208610c6c565b6102266103d436600461175d565b610c7b565b6102476103e73660046116da565b610cdb565b6102476103fa3660046116da565b610d78565b6102266247310081565b610226610d86565b6102ec73165cd37b4c644c2921454429e7f9358d18a45e1481565b61022660075481565b61022661044336600461166d565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6102ba61047c366004611653565b610d9b565b61022661048f366004611723565b610e66565b6060600480546104a39061197b565b80601f01602080910402602001604051908101604052809291908181526020018280546104cf9061197b565b801561051c5780601f106104f15761010080835404028352916020019161051c565b820191906000526020600020905b8154815290600101906020018083116104ff57829003601f168201915b5050505050905090565b606461053b670de0b6b3a76400006060611919565b61054591906117e5565b81565b600033610556818585610f03565b5060019392505050565b60003361056e858285611027565b6105798585856110b9565b60019150505b9392505050565b600080610597636231288084611938565b905062015180816105aa6018600a61184b565b6105b7906207a120611919565b6105c19190611919565b61057f91906117e5565b3360008181526002602090815260408083206001600160a01b038716845290915281205490919061055690829086906106059087906117cd565b610f03565b600060085411801561062c57506106286247310063623128806117cd565b4210155b156107d55760085460405163095ea7b360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163095ea7b3916106b4917f0000000000000000000000000000000000000000000000000000000000000000916004016001600160a01b03929092168252602082015260400190565b602060405180830381600087803b1580156106ce57600080fd5b505af11580156106e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107069190611703565b50600854604051630889bfe760e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482019290925260606044820152600960648201526838bab4b2173732b0b960b91b60848201527f000000000000000000000000000000000000000000000000000000000000000090911690630889bfe79060a401600060405180830381600087803b1580156107b757600080fd5b505af11580156107cb573d6000803e3d6000fd5b5050600060085550505b6007541561082c576108266107f26000546001600160a01b031690565b6007546001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169190611287565b60006007555b565b6001600160a01b0381166000908152600160205260409020545b919050565b6000546001600160a01b031633146108ac5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b61082c60006112ef565b6000806108c3838561133f565b6000546001600160a01b03163314610a1b576a52b7d2dcc80cd2e400000084101561091e5760405162461bcd60e51b815260206004820152600b60248201526a51443a204d494e545f523160a81b60448201526064016108a3565b63623128804210158015610941575061093e6247310063623128806117cd565b42105b61097b5760405162461bcd60e51b815260206004820152600b60248201526a28a21d1026a4a72a2fa91960a91b60448201526064016108a3565b61098442610586565b6009546003546109949190611938565b11156109d05760405162461bcd60e51b815260206004820152600b60248201526a51443a204d494e545f523360a81b60448201526064016108a3565b6109da8442610c7b565b915060646109e9836016611919565b6109f391906117e5565b90506109ff8183611938565b60086000828254610a1091906117cd565b90915550610b9e9050565b6c22142ba7658b08825ee00000008414610a775760405162461bcd60e51b815260206004820152601760248201527f57726f6e6720514420616d6f756e7420656e746572656400000000000000000060448201526064016108a3565b6064610a8c670de0b6b3a76400006016611919565b610a9691906117e5565b60065410610ae65760405162461bcd60e51b815260206004820152601760248201527f43616e277420616c6c6f6361746520616e79206d6f726500000000000000000060448201526064016108a3565b610af26018600a61184b565b670de0b6b3a76400006006546006600a610b0c919061184b565b610b169088611919565b610b209190611919565b610b2a91906117e5565b610b3491906117e5565b91506064610b4b670de0b6b3a76400006002611919565b610b5591906117e5565b60066000828254610b6691906117cd565b925050819055508160076000828254610b7f91906117cd565b925050819055508360096000828254610b9891906117cd565b90915550505b610bd37f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633308561141e565b8015610c2157610c216001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001673165cd37b4c644c2921454429e7f9358d18a45e1483611287565b60408051838152602081018690526001600160a01b038516917f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f910160405180910390a29250929050565b6060600580546104a39061197b565b600080610c8783610e66565b9050610c956018600a61184b565b670de0b6b3a764000082610cab6006600a61184b565b610cb59088611919565b610cbf9190611919565b610cc991906117e5565b610cd391906117e5565b949350505050565b3360008181526002602090815260408083206001600160a01b038716845290915281205490919083811015610d605760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016108a3565b610d6d8286868403610f03565b506001949350505050565b6000336105568185856110b9565b606461053b670de0b6b3a76400006016611919565b6000546001600160a01b03163314610df55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108a3565b6001600160a01b038116610e5a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108a3565b610e63816112ef565b50565b600080610e77636231288084611938565b90506064610e8e670de0b6b3a76400006016611919565b610e9891906117e5565b62473100826064610eb2670de0b6b3a76400006016611919565b610ebc91906117e5565b6064610ed1670de0b6b3a76400006060611919565b610edb91906117e5565b610ee59190611938565b610eef9190611919565b610ef991906117e5565b61057f91906117cd565b6001600160a01b038316610f655760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016108a3565b6001600160a01b038216610fc65760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016108a3565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383811660009081526002602090815260408083209386168352929052205460001981146110b357818110156110a65760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016108a3565b6110b38484848403610f03565b50505050565b6001600160a01b03831661111d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016108a3565b6001600160a01b03821661117f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016108a3565b6001600160a01b038316600090815260016020526040902054818110156111f75760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016108a3565b6001600160a01b0380851660009081526001602052604080822085850390559185168152908120805484929061122e9084906117cd565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161127a91815260200190565b60405180910390a36110b3565b6040516001600160a01b0383166024820152604481018290526112ea90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611456565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0382166113955760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016108a3565b80600360008282546113a791906117cd565b90915550506001600160a01b038216600090815260016020526040812080548392906113d49084906117cd565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526110b39085906323b872dd60e01b906084016112b3565b60006114ab826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115289092919063ffffffff16565b8051909150156112ea57808060200190518101906114c99190611703565b6112ea5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016108a3565b6060610cd38484600085856001600160a01b0385163b61158a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016108a3565b600080866001600160a01b031685876040516115a6919061177e565b60006040518083038185875af1925050503d80600081146115e3576040519150601f19603f3d011682016040523d82523d6000602084013e6115e8565b606091505b50915091506115f8828286611603565b979650505050505050565b6060831561161257508161057f565b8251156116225782518084602001fd5b8160405162461bcd60e51b81526004016108a3919061179a565b80356001600160a01b038116811461084857600080fd5b600060208284031215611664578081fd5b61057f8261163c565b6000806040838503121561167f578081fd5b6116888361163c565b91506116966020840161163c565b90509250929050565b6000806000606084860312156116b3578081fd5b6116bc8461163c565b92506116ca6020850161163c565b9150604084013590509250925092565b600080604083850312156116ec578182fd5b6116f58361163c565b946020939093013593505050565b600060208284031215611714578081fd5b8151801515811461057f578182fd5b600060208284031215611734578081fd5b5035919050565b6000806040838503121561174d578182fd5b823591506116966020840161163c565b6000806040838503121561176f578182fd5b50508035926020909101359150565b6000825161179081846020870161194f565b9190910192915050565b60006020825282518060208401526117b981604085016020870161194f565b601f01601f19169190910160400192915050565b600082198211156117e0576117e06119b6565b500190565b60008261180057634e487b7160e01b81526012600452602481fd5b500490565b80825b60018086116118175750611842565b818704821115611829576118296119b6565b8086161561183657918102915b9490941c938002611808565b94509492505050565b600061057f60001984846000826118645750600161057f565b816118715750600061057f565b81600181146118875760028114611891576118be565b600191505061057f565b60ff8411156118a2576118a26119b6565b6001841b9150848211156118b8576118b86119b6565b5061057f565b5060208310610133831016604e8410600b84101617156118f1575081810a838111156118ec576118ec6119b6565b61057f565b6118fe8484846001611805565b808604821115611910576119106119b6565b02949350505050565b6000816000190483118215151615611933576119336119b6565b500290565b60008282101561194a5761194a6119b6565b500390565b60005b8381101561196a578181015183820152602001611952565b838111156110b35750506000910152565b600181811c9082168061198f57607f821691505b602082108114156119b057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfea264697066735822122087a4cf94b60298ab62502e9ba194decca177ea1e5097594d2ee44686c8af72f164736f6c63430008030033000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000023ddd3e3692d1861ed57ede224608875809e127f
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101fb5760003560e01c8063834d026c1161011a578063a457c2d7116100ad578063c52e8c411161007c578063c52e8c4114610411578063d47823831461042c578063dd62ed3e14610435578063f2fde38b1461046e578063f7a3e04914610481576101fb565b8063a457c2d7146103d9578063a9059cbb146103ec578063bbc56cc8146103ff578063bf2b52bf14610409576101fb565b806394bf804d116100e957806394bf804d1461038757806395082d25146103af57806395d89b41146103be57806398b9cc6e146103c6576101fb565b8063834d026c146103505780638a95a746146103595780638bea5be41461036d5780638da5cb5b14610376576101fb565b80633950935111610192578063676e4cba11610161578063676e4cba1461030457806367f757261461030e57806370a0823114610335578063715018a614610348576101fb565b8063395093511461029f5780633ccfd60b146102b25780635796f10b146102bc5780635efc071a146102c5576101fb565b806322673030116101ce578063226730301461025f57806323b872dd1461026a578063313ce5671461027d578063367e1c3e1461028c576101fb565b806306fdde031461020057806308b309e31461021e578063095ea7b31461023457806318160ddd14610257575b600080fd5b610208610494565b604051610215919061179a565b60405180910390f35b610226610526565b604051908152602001610215565b6102476102423660046116da565b610548565b6040519015158152602001610215565b600354610226565b610226636231288081565b61024761027836600461169f565b610560565b60405160188152602001610215565b61022661029a366004611723565b610586565b6102476102ad3660046116da565b6105cb565b6102ba61060a565b005b61022660065481565b6102ec7f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec781565b6040516001600160a01b039091168152602001610215565b6102266207a12081565b6102ec7f00000000000000000000000023ddd3e3692d1861ed57ede224608875809e127f81565b610226610343366004611653565b61082e565b6102ba61084d565b61022660085481565b6102266c22142ba7658b08825ee000000081565b61022660095481565b6000546001600160a01b03166102ec565b61039a61039536600461173b565b6108b6565b60408051928352602083019190915201610215565b610226670de0b6b3a764000081565b610208610c6c565b6102266103d436600461175d565b610c7b565b6102476103e73660046116da565b610cdb565b6102476103fa3660046116da565b610d78565b6102266247310081565b610226610d86565b6102ec73165cd37b4c644c2921454429e7f9358d18a45e1481565b61022660075481565b61022661044336600461166d565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6102ba61047c366004611653565b610d9b565b61022661048f366004611723565b610e66565b6060600480546104a39061197b565b80601f01602080910402602001604051908101604052809291908181526020018280546104cf9061197b565b801561051c5780601f106104f15761010080835404028352916020019161051c565b820191906000526020600020905b8154815290600101906020018083116104ff57829003601f168201915b5050505050905090565b606461053b670de0b6b3a76400006060611919565b61054591906117e5565b81565b600033610556818585610f03565b5060019392505050565b60003361056e858285611027565b6105798585856110b9565b60019150505b9392505050565b600080610597636231288084611938565b905062015180816105aa6018600a61184b565b6105b7906207a120611919565b6105c19190611919565b61057f91906117e5565b3360008181526002602090815260408083206001600160a01b038716845290915281205490919061055690829086906106059087906117cd565b610f03565b600060085411801561062c57506106286247310063623128806117cd565b4210155b156107d55760085460405163095ea7b360e01b81526001600160a01b037f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7169163095ea7b3916106b4917f00000000000000000000000023ddd3e3692d1861ed57ede224608875809e127f916004016001600160a01b03929092168252602082015260400190565b602060405180830381600087803b1580156106ce57600080fd5b505af11580156106e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107069190611703565b50600854604051630889bfe760e01b81526001600160a01b037f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec781166004830152602482019290925260606044820152600960648201526838bab4b2173732b0b960b91b60848201527f00000000000000000000000023ddd3e3692d1861ed57ede224608875809e127f90911690630889bfe79060a401600060405180830381600087803b1580156107b757600080fd5b505af11580156107cb573d6000803e3d6000fd5b5050600060085550505b6007541561082c576108266107f26000546001600160a01b031690565b6007546001600160a01b037f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7169190611287565b60006007555b565b6001600160a01b0381166000908152600160205260409020545b919050565b6000546001600160a01b031633146108ac5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b61082c60006112ef565b6000806108c3838561133f565b6000546001600160a01b03163314610a1b576a52b7d2dcc80cd2e400000084101561091e5760405162461bcd60e51b815260206004820152600b60248201526a51443a204d494e545f523160a81b60448201526064016108a3565b63623128804210158015610941575061093e6247310063623128806117cd565b42105b61097b5760405162461bcd60e51b815260206004820152600b60248201526a28a21d1026a4a72a2fa91960a91b60448201526064016108a3565b61098442610586565b6009546003546109949190611938565b11156109d05760405162461bcd60e51b815260206004820152600b60248201526a51443a204d494e545f523360a81b60448201526064016108a3565b6109da8442610c7b565b915060646109e9836016611919565b6109f391906117e5565b90506109ff8183611938565b60086000828254610a1091906117cd565b90915550610b9e9050565b6c22142ba7658b08825ee00000008414610a775760405162461bcd60e51b815260206004820152601760248201527f57726f6e6720514420616d6f756e7420656e746572656400000000000000000060448201526064016108a3565b6064610a8c670de0b6b3a76400006016611919565b610a9691906117e5565b60065410610ae65760405162461bcd60e51b815260206004820152601760248201527f43616e277420616c6c6f6361746520616e79206d6f726500000000000000000060448201526064016108a3565b610af26018600a61184b565b670de0b6b3a76400006006546006600a610b0c919061184b565b610b169088611919565b610b209190611919565b610b2a91906117e5565b610b3491906117e5565b91506064610b4b670de0b6b3a76400006002611919565b610b5591906117e5565b60066000828254610b6691906117cd565b925050819055508160076000828254610b7f91906117cd565b925050819055508360096000828254610b9891906117cd565b90915550505b610bd37f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec76001600160a01b031633308561141e565b8015610c2157610c216001600160a01b037f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec71673165cd37b4c644c2921454429e7f9358d18a45e1483611287565b60408051838152602081018690526001600160a01b038516917f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f910160405180910390a29250929050565b6060600580546104a39061197b565b600080610c8783610e66565b9050610c956018600a61184b565b670de0b6b3a764000082610cab6006600a61184b565b610cb59088611919565b610cbf9190611919565b610cc991906117e5565b610cd391906117e5565b949350505050565b3360008181526002602090815260408083206001600160a01b038716845290915281205490919083811015610d605760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016108a3565b610d6d8286868403610f03565b506001949350505050565b6000336105568185856110b9565b606461053b670de0b6b3a76400006016611919565b6000546001600160a01b03163314610df55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108a3565b6001600160a01b038116610e5a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108a3565b610e63816112ef565b50565b600080610e77636231288084611938565b90506064610e8e670de0b6b3a76400006016611919565b610e9891906117e5565b62473100826064610eb2670de0b6b3a76400006016611919565b610ebc91906117e5565b6064610ed1670de0b6b3a76400006060611919565b610edb91906117e5565b610ee59190611938565b610eef9190611919565b610ef991906117e5565b61057f91906117cd565b6001600160a01b038316610f655760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016108a3565b6001600160a01b038216610fc65760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016108a3565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383811660009081526002602090815260408083209386168352929052205460001981146110b357818110156110a65760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016108a3565b6110b38484848403610f03565b50505050565b6001600160a01b03831661111d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016108a3565b6001600160a01b03821661117f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016108a3565b6001600160a01b038316600090815260016020526040902054818110156111f75760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016108a3565b6001600160a01b0380851660009081526001602052604080822085850390559185168152908120805484929061122e9084906117cd565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161127a91815260200190565b60405180910390a36110b3565b6040516001600160a01b0383166024820152604481018290526112ea90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611456565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0382166113955760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016108a3565b80600360008282546113a791906117cd565b90915550506001600160a01b038216600090815260016020526040812080548392906113d49084906117cd565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526110b39085906323b872dd60e01b906084016112b3565b60006114ab826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115289092919063ffffffff16565b8051909150156112ea57808060200190518101906114c99190611703565b6112ea5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016108a3565b6060610cd38484600085856001600160a01b0385163b61158a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016108a3565b600080866001600160a01b031685876040516115a6919061177e565b60006040518083038185875af1925050503d80600081146115e3576040519150601f19603f3d011682016040523d82523d6000602084013e6115e8565b606091505b50915091506115f8828286611603565b979650505050505050565b6060831561161257508161057f565b8251156116225782518084602001fd5b8160405162461bcd60e51b81526004016108a3919061179a565b80356001600160a01b038116811461084857600080fd5b600060208284031215611664578081fd5b61057f8261163c565b6000806040838503121561167f578081fd5b6116888361163c565b91506116966020840161163c565b90509250929050565b6000806000606084860312156116b3578081fd5b6116bc8461163c565b92506116ca6020850161163c565b9150604084013590509250925092565b600080604083850312156116ec578182fd5b6116f58361163c565b946020939093013593505050565b600060208284031215611714578081fd5b8151801515811461057f578182fd5b600060208284031215611734578081fd5b5035919050565b6000806040838503121561174d578182fd5b823591506116966020840161163c565b6000806040838503121561176f578182fd5b50508035926020909101359150565b6000825161179081846020870161194f565b9190910192915050565b60006020825282518060208401526117b981604085016020870161194f565b601f01601f19169190910160400192915050565b600082198211156117e0576117e06119b6565b500190565b60008261180057634e487b7160e01b81526012600452602481fd5b500490565b80825b60018086116118175750611842565b818704821115611829576118296119b6565b8086161561183657918102915b9490941c938002611808565b94509492505050565b600061057f60001984846000826118645750600161057f565b816118715750600061057f565b81600181146118875760028114611891576118be565b600191505061057f565b60ff8411156118a2576118a26119b6565b6001841b9150848211156118b8576118b86119b6565b5061057f565b5060208310610133831016604e8410600b84101617156118f1575081810a838111156118ec576118ec6119b6565b61057f565b6118fe8484846001611805565b808604821115611910576119106119b6565b02949350505050565b6000816000190483118215151615611933576119336119b6565b500290565b60008282101561194a5761194a6119b6565b500390565b60005b8381101561196a578181015183820152602001611952565b838111156110b35750506000910152565b600181811c9082168061198f57607f821691505b602082108114156119b057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfea264697066735822122087a4cf94b60298ab62502e9ba194decca177ea1e5097594d2ee44686c8af72f164736f6c63430008030033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000023ddd3e3692d1861ed57ede224608875809e127f
-----Decoded View---------------
Arg [0] : _usdt (address): 0xdAC17F958D2ee523a2206206994597C13D831ec7
Arg [1] : _locker (address): 0x23Ddd3e3692d1861Ed57EDE224608875809e127f
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7
Arg [1] : 00000000000000000000000023ddd3e3692d1861ed57ede224608875809e127f
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.