ERC-20
Overview
Max Total Supply
2,333,575,451,865.484160968111329694 ELMNT
Holders
702
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
1,703,297,727.179070100448452 ELMNTValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Source Code Verified (Exact Match)
Contract Name:
Element280
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.24; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "@openzeppelin/contracts/interfaces/IERC165.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/access/Ownable2Step.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol"; import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol"; import "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol"; import "./interfaces/IElementNFT.sol"; import "./interfaces/ITITANX.sol"; import "./interfaces/IWETH9.sol"; import "./lib/constants.sol"; /// @title Element 280 Token Contract contract Element280 is ERC20, Ownable2Step, IERC165 { using SafeERC20 for IERC20; using EnumerableSet for EnumerableSet.UintSet; // --------------------------- STATE VARIABLES --------------------------- // struct UserPurchase { uint256 timestamp; uint256 amount; } address public treasury; address public devWallet; address public E280NFT; address public HOLDER_VAULT; address public BUY_AND_BURN; /// @notice Total number of liqudity pools created for Element 280 protocol tokens uint8 public totalLPsCreated; /// @notice Purchases of ecosystem tokens are in progress bool public lpPurchaseStarted; /// @notice Purchases of ecosystem tokens are done bool public lpPurchaseFinished; /// @notice Trading is disabled until all LPs are created. Enables automatically with the creation of the last LP. bool public tradingEnabled; /// @notice TitanX tokens designated for ecosystem token purchases. uint256 public lpPool; /// @notice TitanX tokens used for ecosystem token purchases. uint256 public totalLpPoolUsed; /// @notice Total ELMT tokens burned to date. uint256 public totalBurned; /// @notice Timestamp in seconds of the presale end date. uint256 public presaleEnd; uint256 private _currentPurchaseId; /// @notice Purchase information for a specific purchase ID. /// @return timestamp The time when the purchase was made (as a Unix timestamp). /// @return amount The amount of Element 280 toknes of the purchase. mapping(uint256 purchaseId => UserPurchase) public purchases; /// @notice Returns the total amount of ecosystem tokens purchased for LP creation for a specific token. /// @return The total amount of the specified token allocated to the LP pool (in WEI). mapping(address token => uint256) public tokenPool; /// @notice Percent of the lpPool to calculate the allocation per ecosystem token purchases. mapping(address token => uint8) public tokenLpPercent; /// @notice Are transcations to provided address whitelisted. mapping(address => bool) public whitelistTo; /// @notice Are transcations from provided address whitelisted. mapping(address => bool) public whitelistFrom; /// @notice Total number of purchases per each ecosystem token. 5 per token is required. mapping(address token => uint8) public lpPurchases; mapping(address user => EnumerableSet.UintSet) private _userPurchases; // --------------------------- EVENTS & MODIFIERS --------------------------- // event PresaleStarted(); modifier onlyPresale() { require(isPresaleActive(), "Presale not active"); _; } modifier onlyNftContract() { require(msg.sender == E280NFT, "Unauthorized"); _; } // --------------------------- CONSTRUCTOR --------------------------- // constructor( address _owner, address _devWallet, address _treasury, address[] memory _ecosystemTokens, uint8[] memory _lpPercentages ) ERC20("Element 280", "ELMNT") Ownable(_owner) { require(_ecosystemTokens.length == NUM_ECOSYSTEM_TOKENS, "Incorrect number of tokens"); require(_lpPercentages.length == NUM_ECOSYSTEM_TOKENS, "Incorrect number of tokens"); require(_owner != address(0), "Owner wallet not provided"); require(_devWallet != address(0), "Dev wallet address not provided"); require(_treasury != address(0), "Treasury address not provided"); devWallet = _devWallet; treasury = _treasury; whitelistFrom[address(0)] = true; whitelistTo[address(0)] = true; uint8 totalPercentage; for (uint256 i = 0; i < _ecosystemTokens.length; i++) { address token = _ecosystemTokens[i]; uint8 allocation = _lpPercentages[i]; require(token != address(0), "Incorrect token address"); require(allocation > 0, "Incorrect percentage value"); require(tokenLpPercent[token] == 0, "Duplicate token"); tokenLpPercent[token] = allocation; totalPercentage += allocation; } require(totalPercentage == 100, "Percentages do not add to 100"); } // --------------------------- PUBLIC FUNCTIONS --------------------------- // /// @notice Allows users to purchase tokens during the presale using TitanX tokens. /// @param amount The amount of TitanX tokens to spend. function purchaseWithTitanX(uint256 amount) external onlyPresale { require(amount > 0, "Cannot purchase 0 tokens"); IERC20(TITANX).safeTransferFrom(msg.sender, address(this), amount); _writePurchaseData(amount, msg.sender); } /// @notice Allows users to purchase tokens during the presale using ETH. /// @param minAmount The minimum amount of Element 280 tokens to purchase. function purchaseWithETH(uint256 minAmount, uint256 deadline) external payable onlyPresale { require(minAmount > 0, "Cannot purchase 0 tokens"); uint256 swappedAmount = _swapETHForTitanX(minAmount, deadline); _writePurchaseData(swappedAmount, msg.sender); } /// @notice Allows users to claim their purchased tokens after the cooldown period. /// @param purchaseId The ID of the purchase to claim. function claimPurchase(uint256 purchaseId) external { require(_userPurchases[msg.sender].contains(purchaseId), "Cannot claim"); UserPurchase memory purchase = purchases[purchaseId]; require(purchase.timestamp + COOLDOWN_PERIOD < block.timestamp, "Cooldown is active"); _userPurchases[msg.sender].remove(purchaseId); _mint(msg.sender, purchase.amount); } /// @notice Transfers TitanX allocation to Element 280 Buy&Burn contract. /// @dev Can only be called when there is an allocation for buy and burn. function distributeBuyAndBurn() external { uint256 allocation = getBuyBurnAllocation(); require(allocation > 0, "Nothing to distribute"); IERC20(TITANX).safeTransfer(BUY_AND_BURN, allocation); } /// @notice Burns the specified amount of tokens from the user's balance. /// @param value The amount of tokens in wei. function burn(uint256 value) public virtual { totalBurned += value; _burn(_msgSender(), value); } // --------------------------- PRESALE MANAGEMENT FUNCTIONS --------------------------- // /// @notice Starts the presale for the token. function startPresale() external onlyOwner { require(E280NFT != address(0), "NFT not set"); require(presaleEnd == 0, "Can only be done once"); unchecked { presaleEnd = block.timestamp + PRESALE_LENGTH; } IElementNFT(E280NFT).startPresale(presaleEnd); emit PresaleStarted(); } /// @notice Begins the liquidity pool creation process after the presale has either ended or accumulated more than 200B TitanX. function startLpPurchases() external onlyOwner { require(presaleEnd != 0, "Presale not started yet"); require(!lpPurchaseStarted, "LP creation already started"); uint256 availableBalance = IERC20(TITANX).balanceOf(address(this)); require(availableBalance > 0, "No TitanX available"); if (availableBalance < LP_POOL_SIZE) { require(block.timestamp >= presaleEnd, "Presale not finished yet"); _registerLPPool(availableBalance); } else { _registerLPPool(LP_POOL_SIZE); } lpPurchaseStarted = true; } /// @notice Executes token purchase of the ecosystem tokens for the liquidity pool based on the allocation. /// @param target The target token to purchase. /// @param minAmountOut Minimum amout to be received after swap. /// @dev Can only be called by the contract owner during the LP purchase phase. function purchaseTokenForLP(address target, uint256 minAmountOut, uint256 deadline) external onlyOwner { require(lpPurchaseStarted && !lpPurchaseFinished, "LP phase not active"); require(lpPurchases[target] < 5, "All purchases have been made for target token"); uint8 allocation = tokenLpPercent[target]; require(allocation > 0, "Incorrect target token"); uint256 amount = lpPool * allocation / 500; totalLpPoolUsed += amount; uint256 swappedAmount = _swapTitanXToToken(target, amount, minAmountOut, deadline); unchecked { tokenPool[target] += swappedAmount; lpPurchases[target]++; // account for rounding error if (totalLpPoolUsed >= lpPool - NUM_ECOSYSTEM_TOKENS * 5) lpPurchaseFinished = true; } } /// @notice Deploys the liquidity pool for a specific ecosystem token. /// @param target The token for which the liquidity pool will be deployed. /// @dev Can only be called by the contract owner after the LP phase has completed. function deployLP(address target, uint256 minTokenAmount, uint256 minE280Amount) external onlyOwner { require(lpPurchaseFinished, "Not all tokens have been purchased"); uint8 allocation = tokenLpPercent[target]; require(allocation > 0, "Incorrect target token"); uint256 e280Amount = lpPool * allocation / 100; uint256 tokenAmount = tokenPool[target]; require(tokenAmount > 0, "Pool already deployed"); _deployLiqudityPool(target, tokenAmount, e280Amount, minTokenAmount, minE280Amount); unchecked { totalLPsCreated++; } if (totalLPsCreated == NUM_ECOSYSTEM_TOKENS) _enableTrading(); } // --------------------------- ADMINISTRATIVE FUNCTIONS --------------------------- // /// @notice Sets the required addresses for the Element 280 protocol. /// @param nftAddress The address of the Element 280 NFT contract. /// @param vaultAddress The address of the Element 280 Holder Vault contract. /// @param buyAndBurn The address of the Element 280 Buy&Burn contract. /// @dev Can only be set once and can only be called by the owner. function setProtocolAddresses(address nftAddress, address vaultAddress, address buyAndBurn) external onlyOwner { require(E280NFT == address(0), "Can only be done once"); require(nftAddress != address(0), "NFT address not provided"); require(vaultAddress != address(0), "Holder Vault address not provided"); require(buyAndBurn != address(0), "Buy&Burn address not provided"); E280NFT = nftAddress; HOLDER_VAULT = vaultAddress; BUY_AND_BURN = buyAndBurn; whitelistFrom[HOLDER_VAULT] = true; whitelistTo[BUY_AND_BURN] = true; } /// @notice Sets the treasury address. /// @param _address The address of the treasury. /// @dev Can only be called by the owner. function setTreasury(address _address) external onlyOwner { require(_address != address(0), "Treasury address not provided"); treasury = _address; } /// @notice Sets the whitelist status for transfers to a specified address. /// @param _address The address which whitelist status will be modified. /// @param enabled Will the address be whitelisted. /// @dev Can only be called by the owner. function setWhitelistTo(address _address, bool enabled) external onlyOwner { whitelistTo[_address] = enabled; } /// @notice Sets the whitelist status for transfers from a specified address. /// @param _address The address which whitelist status will be modified. /// @param enabled Will the address be whitelisted. /// @dev Can only be called by the owner. function setWhitelistFrom(address _address, bool enabled) external onlyOwner { whitelistFrom[_address] = enabled; } // --------------------------- VIEW FUNCTIONS --------------------------- // /// @notice Checks if the presale is currently active. /// @return A boolean indicating whether the presale is still active. function isPresaleActive() public view returns (bool) { return presaleEnd > block.timestamp; } /// @notice Returns all purchase IDs associated with a specific user. /// @param account The address of the user. /// @return An array of purchase IDs owned by the user. function getUserPurchaseIds(address account) external view returns (uint256[] memory) { return _userPurchases[account].values(); } /// @notice Returns the available TitanX tokens for Element 280 Buy&Burn contract. /// @return The amount of TitanX tokens allocated (in WEI). /// @dev Requires that trading has been enabled. function getBuyBurnAllocation() public view returns (uint256) { require(tradingEnabled, "Trading is not enabled yet"); return IERC20(TITANX).balanceOf(address(this)); } function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165) returns (bool) { return interfaceId == INTERFACE_ID_ERC165 || interfaceId == INTERFACE_ID_ERC20; } // --------------------------- INTERNAL FUNCTIONS --------------------------- // /// @notice Handles the redemption process, applying tax and distributing the remaining amount. /// @param amount The amount to redeem. /// @param receiver The address to receive the redeemed amount after tax. /// @dev This function is only callable by the NFT contract. function handleRedeem(uint256 amount, address receiver) external onlyNftContract { (uint256 taxAmount, uint256 amountAfterTax) = _processTax(amount, NFT_REDEEM_TAX_PERCENTAGE); _mint(HOLDER_VAULT, taxAmount); _mint(receiver, amountAfterTax); } function _enableTrading() internal { tradingEnabled = true; } function _update(address from, address to, uint256 amount) internal override { if (!tradingEnabled) { if (from == address(this) || from == address(0)) { super._update(from, to, amount); } else { revert("Trading is disabled"); } } else { if (whitelistTo[to] || whitelistFrom[from]) { super._update(from, to, amount); } else { uint256 taxPercentage = isPresaleActive() ? PRESALE_TRANSFER_TAX_PERCENTAGE : TRANSFER_TAX_PERCENTAGE; (uint256 taxAmount, uint256 amountAfterTax) = _processTax(amount, taxPercentage); super._update(from, HOLDER_VAULT, taxAmount); super._update(from, to, amountAfterTax); } } } function _writePurchaseData(uint256 amount, address to) internal { purchases[_currentPurchaseId] = UserPurchase(block.timestamp, amount); _userPurchases[to].add(_currentPurchaseId); unchecked { _currentPurchaseId++; } } function _processTax(uint256 amount, uint256 percentage) internal pure returns (uint256 taxAmount, uint256 amountAfterTax) { unchecked { taxAmount = (amount * percentage) / 100; amountAfterTax = amount - taxAmount; } } function _registerLPPool(uint256 amount) internal { uint256 devAmount = amount * DEV_PERCENT / 100; uint256 treasuryAmount = amount * TREASURY_PERCENT / 100; IERC20(TITANX).safeTransfer(devWallet, devAmount); IERC20(TITANX).safeTransfer(treasury, treasuryAmount); lpPool = amount - devAmount - treasuryAmount; lpPurchases[TITANX] = 5; uint256 titanXPool = lpPool * tokenLpPercent[TITANX] / 100; tokenPool[TITANX] = titanXPool; totalLpPoolUsed += titanXPool; } function _deployLiqudityPool(address tokenAddress, uint256 tokenAmount, uint256 e280Amount, uint256 minTokenAmount, uint256 minE280Amount) internal { (uint256 pairBalance, address pairAddress) = _checkPoolValidity(tokenAddress); if (pairBalance > 0) _fixPool(pairAddress, tokenAmount, e280Amount, pairBalance); _mint(address(this), e280Amount); IERC20(address(this)).safeIncreaseAllowance(UNISWAP_V2_ROUTER, e280Amount); IERC20(tokenAddress).safeIncreaseAllowance(UNISWAP_V2_ROUTER, tokenAmount); IUniswapV2Router02(UNISWAP_V2_ROUTER).addLiquidity( address(this), tokenAddress, e280Amount, tokenAmount, minE280Amount, minTokenAmount, address(0), //send governance tokens directly to zero address block.timestamp ); tokenPool[tokenAddress] = 0; } function _checkPoolValidity(address target) internal view returns (uint256, address) { address pairAddress = IUniswapV2Factory(UNISWAP_V2_FACTORY).getPair(address(this), target); if (pairAddress == address(0)) return (0, pairAddress); IUniswapV2Pair pair = IUniswapV2Pair(pairAddress); (uint112 reserve0, uint112 reserve1, ) = pair.getReserves(); if (reserve0 != 0) return (reserve0, pairAddress); if (reserve1 != 0) return (reserve1, pairAddress); return (0, pairAddress); } function _fixPool(address pairAddress, uint256 tokenAmount, uint256 e280Amount, uint256 currentBalance) internal { uint256 requiredE280 = currentBalance * e280Amount / tokenAmount; _mint(pairAddress, requiredE280); IUniswapV2Pair(pairAddress).sync(); } function _swapETHForTitanX(uint256 minAmountOut, uint256 deadline) internal returns (uint256) { IWETH9(WETH9).deposit{value: msg.value}(); ISwapRouter.ExactInputSingleParams memory params = ISwapRouter.ExactInputSingleParams({ tokenIn: WETH9, tokenOut: TITANX, fee: POOL_FEE_1PERCENT, recipient: address(this), deadline: deadline, amountIn: msg.value, amountOutMinimum: minAmountOut, sqrtPriceLimitX96: 0 }); IERC20(WETH9).safeIncreaseAllowance(UNISWAP_V3_ROUTER, msg.value); uint256 amountOut = ISwapRouter(UNISWAP_V3_ROUTER).exactInputSingle(params); return amountOut; } function _swapTitanXToToken(address outputToken, uint256 amount, uint256 minAmountOut, uint256 deadline) internal returns (uint256) { if (outputToken == BLAZE_ADDRESS) return _swapUniswapV2Pool(outputToken, amount, minAmountOut, deadline); if (outputToken == BDX_ADDRESS || outputToken == HYDRA_ADDRESS || outputToken == AWESOMEX_ADDRESS) { return _swapMultihop(outputToken, DRAGONX_ADDRESS, amount, minAmountOut, deadline); } if (outputToken == FLUX_ADDRESS) { return _swapMultihop(outputToken, INFERNO_ADDRESS, amount, minAmountOut, deadline); } return _swapUniswapV3Pool(outputToken, amount, minAmountOut, deadline); } function _swapUniswapV3Pool(address outputToken, uint256 amountIn, uint256 minAmountOut, uint256 deadline) internal returns (uint256) { ISwapRouter.ExactInputSingleParams memory params = ISwapRouter.ExactInputSingleParams({ tokenIn: TITANX, tokenOut: outputToken, fee: POOL_FEE_1PERCENT, recipient: address(this), deadline: deadline, amountIn: amountIn, amountOutMinimum: minAmountOut, sqrtPriceLimitX96: 0 }); IERC20(TITANX).safeIncreaseAllowance(UNISWAP_V3_ROUTER, amountIn); uint256 amountOut = ISwapRouter(UNISWAP_V3_ROUTER).exactInputSingle(params); return amountOut; } function _swapUniswapV2Pool(address outputToken, uint256 amountIn, uint256 minAmountOut, uint256 deadline) internal returns (uint256) { require(minAmountOut > 0, "minAmountOut not provided"); IERC20(TITANX).safeIncreaseAllowance(UNISWAP_V2_ROUTER, amountIn); address[] memory path = new address[](2); path[0] = TITANX; path[1] = outputToken; uint256[] memory amounts = IUniswapV2Router02(UNISWAP_V2_ROUTER).swapExactTokensForTokens( amountIn, minAmountOut, path, address(this), deadline ); return amounts[1]; } function _swapMultihop( address outputToken, address midToken, uint256 amountIn, uint256 minAmountOut, uint256 deadline ) internal returns (uint256) { bytes memory path = abi.encodePacked(TITANX, POOL_FEE_1PERCENT, midToken, POOL_FEE_1PERCENT, outputToken); ISwapRouter.ExactInputParams memory params = ISwapRouter.ExactInputParams({ path: path, recipient: address(this), deadline: deadline, amountIn: amountIn, amountOutMinimum: minAmountOut }); IERC20(TITANX).safeIncreaseAllowance(UNISWAP_V3_ROUTER, amountIn); uint256 amoutOut = ISwapRouter(UNISWAP_V3_ROUTER).exactInput(params); return amoutOut; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../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. * * The initial owner is set to the address provided by the deployer. 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; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling 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 { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _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 (last updated v5.0.0) (access/Ownable2Step.sol) pragma solidity ^0.8.20; import {Ownable} from "./Ownable.sol"; /** * @dev Contract module which provides access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is specified at deployment time in the constructor for `Ownable`. This * can later be changed with {transferOwnership} and {acceptOwnership}. * * This module is used through inheritance. It will make available all functions * from parent (Ownable). */ abstract contract Ownable2Step is Ownable { address private _pendingOwner; event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner); /** * @dev Returns the address of the pending owner. */ function pendingOwner() public view virtual returns (address) { return _pendingOwner; } /** * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual override onlyOwner { _pendingOwner = newOwner; emit OwnershipTransferStarted(owner(), newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual override { delete _pendingOwner; super._transferOwnership(newOwner); } /** * @dev The new owner accepts the ownership transfer. */ function acceptOwnership() public virtual { address sender = _msgSender(); if (pendingOwner() != sender) { revert OwnableUnauthorizedAccount(sender); } _transferOwnership(sender); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "../utils/introspection/IERC165.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../token/ERC20/IERC20.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "./IERC20.sol"; import {IERC20Metadata} from "./extensions/IERC20Metadata.sol"; import {Context} from "../../utils/Context.sol"; import {IERC20Errors} from "../../interfaces/draft-IERC6093.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}. * * TIP: For a detailed writeup see our guide * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * The default value of {decimals} is 18. To change this, you should override * this function so it returns a different value. * * 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. */ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors { mapping(address account => uint256) private _balances; mapping(address account => mapping(address spender => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * 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 returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual 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 default value returned by this function, unless * it's 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 returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual 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 `value`. */ function transfer(address to, uint256 value) public virtual returns (bool) { address owner = _msgSender(); _transfer(owner, to, value); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `value` 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 value) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, value); 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 `value`. * - the caller must have allowance for ``from``'s tokens of at least * `value`. */ function transferFrom(address from, address to, uint256 value) public virtual returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, value); _transfer(from, to, value); return true; } /** * @dev Moves a `value` amount of tokens from `from` to `to`. * * 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. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _transfer(address from, address to, uint256 value) internal { if (from == address(0)) { revert ERC20InvalidSender(address(0)); } if (to == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(from, to, value); } /** * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from` * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding * this function. * * Emits a {Transfer} event. */ function _update(address from, address to, uint256 value) internal virtual { if (from == address(0)) { // Overflow check required: The rest of the code assumes that totalSupply never overflows _totalSupply += value; } else { uint256 fromBalance = _balances[from]; if (fromBalance < value) { revert ERC20InsufficientBalance(from, fromBalance, value); } unchecked { // Overflow not possible: value <= fromBalance <= totalSupply. _balances[from] = fromBalance - value; } } if (to == address(0)) { unchecked { // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply. _totalSupply -= value; } } else { unchecked { // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256. _balances[to] += value; } } emit Transfer(from, to, value); } /** * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0). * Relies on the `_update` mechanism * * Emits a {Transfer} event with `from` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _mint(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(address(0), account, value); } /** * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply. * Relies on the `_update` mechanism. * * Emits a {Transfer} event with `to` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead */ function _burn(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidSender(address(0)); } _update(account, address(0), value); } /** * @dev Sets `value` 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. * * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. */ function _approve(address owner, address spender, uint256 value) internal { _approve(owner, spender, value, true); } /** * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event. * * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any * `Approval` event during `transferFrom` operations. * * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to * true using the following override: * ``` * function _approve(address owner, address spender, uint256 value, bool) internal virtual override { * super._approve(owner, spender, value, true); * } * ``` * * Requirements are the same as {_approve}. */ function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual { if (owner == address(0)) { revert ERC20InvalidApprover(address(0)); } if (spender == address(0)) { revert ERC20InvalidSpender(address(0)); } _allowances[owner][spender] = value; if (emitEvent) { emit Approval(owner, spender, value); } } /** * @dev Updates `owner` s allowance for `spender` based on spent `value`. * * Does not update the allowance value in case of infinite allowance. * Revert if not enough allowance is available. * * Does not emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 value) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { if (currentAllowance < value) { revert ERC20InsufficientAllowance(spender, currentAllowance, value); } unchecked { _approve(owner, spender, currentAllowance - value, false); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. */ 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 (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` 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 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; import {IERC20Permit} from "../extensions/IERC20Permit.sol"; import {Address} from "../../../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; /** * @dev An operation with an ERC20 token failed. */ error SafeERC20FailedOperation(address token); /** * @dev Indicates a failed `decreaseAllowance` request. */ error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease); /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value))); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value))); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); forceApprove(token, spender, oldAllowance + value); } /** * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no * value, non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal { unchecked { uint256 currentAllowance = token.allowance(address(this), spender); if (currentAllowance < requestedDecrease) { revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease); } forceApprove(token, spender, currentAllowance - requestedDecrease); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value)); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0))); _callOptionalReturn(token, approvalCall); } } /** * @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); if (returndata.length != 0 && !abi.decode(returndata, (bool))) { revert SafeERC20FailedOperation(address(token)); } } /** * @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). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // 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 cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol) pragma solidity ^0.8.20; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error AddressInsufficientBalance(address account); /** * @dev There's no code at `target` (it is not a contract). */ error AddressEmptyCode(address target); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedInnerCall(); /** * @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://consensys.net/diligence/blog/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.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { if (address(this).balance < amount) { revert AddressInsufficientBalance(address(this)); } (bool success,) = recipient.call{value: amount}(""); if (!success) { revert FailedInnerCall(); } } /** * @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 or custom error, it is bubbled * up by this function (like regular Solidity function calls). However, if * the call reverted with no returned reason, this function reverts with a * {FailedInnerCall} error. * * 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. */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0); } /** * @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`. */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { if (address(this).balance < value) { revert AddressInsufficientBalance(address(this)); } (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an * unsuccessful call. */ function verifyCallResultFromTarget(address target, bool success, bytes memory returndata) internal view returns (bytes memory) { if (!success) { _revert(returndata); } else { // only check if target is a contract if the call was successful and the return data is empty // otherwise we already know that it was a contract if (returndata.length == 0 && target.code.length == 0) { revert AddressEmptyCode(target); } return returndata; } } /** * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the * revert reason or with a default {FailedInnerCall} error. */ function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) { if (!success) { _revert(returndata); } else { return returndata; } } /** * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}. */ function _revert(bytes memory returndata) private pure { // 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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert FailedInnerCall(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @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 // OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.20; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ```solidity * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position is the index of the value in the `values` array plus 1. // Position 0 is used to mean a value is not in the set. mapping(bytes32 value => uint256) _positions; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._positions[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We cache the value's position to prevent multiple reads from the same storage slot uint256 position = set._positions[value]; if (position != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 valueIndex = position - 1; uint256 lastIndex = set._values.length - 1; if (valueIndex != lastIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the lastValue to the index where the value to delete is set._values[valueIndex] = lastValue; // Update the tracked position of the lastValue (that was just moved) set._positions[lastValue] = position; } // Delete the slot where the moved value was stored set._values.pop(); // Delete the tracked position for the deleted slot delete set._positions[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._positions[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
pragma solidity >=0.5.0; interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint256); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint256) external view returns (address pair); function allPairsLength() external view returns (uint256); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; }
pragma solidity >=0.5.0; interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint256); function balanceOf(address owner) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 value) external returns (bool); function transfer(address to, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint256); function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint256 amount0, uint256 amount1); event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to); event Swap( address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint256); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint256); function price1CumulativeLast() external view returns (uint256); function kLast() external view returns (uint256); function mint(address to) external returns (uint256 liquidity); function burn(address to) external returns (uint256 amount0, uint256 amount1); function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; }
pragma solidity >=0.6.2; interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns (uint256 amountA, uint256 amountB, uint256 liquidity); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); function removeLiquidity( address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns (uint256 amountA, uint256 amountB); function removeLiquidityETH( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external returns (uint256 amountToken, uint256 amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountA, uint256 amountB); function removeLiquidityETHWithPermit( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountToken, uint256 amountETH); function swapExactTokensForTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapTokensForExactTokens( uint256 amountOut, uint256 amountInMax, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapExactETHForTokens(uint256 amountOutMin, address[] calldata path, address to, uint256 deadline) external payable returns (uint256[] memory amounts); function swapTokensForExactETH( uint256 amountOut, uint256 amountInMax, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapExactTokensForETH( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapETHForExactTokens(uint256 amountOut, address[] calldata path, address to, uint256 deadline) external payable returns (uint256[] memory amounts); function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB); function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut) external pure returns (uint256 amountOut); function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut) external pure returns (uint256 amountIn); function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns (uint256[] memory amounts); function getAmountsIn(uint256 amountOut, address[] calldata path) external view returns (uint256[] memory amounts); }
pragma solidity >=0.6.2; import "./IUniswapV2Router01.sol"; interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external returns (uint256 amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Callback for IUniswapV3PoolActions#swap /// @notice Any contract that calls IUniswapV3PoolActions#swap must implement this interface interface IUniswapV3SwapCallback { /// @notice Called to `msg.sender` after executing a swap via IUniswapV3Pool#swap. /// @dev In the implementation you must pay the pool tokens owed for the swap. /// The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory. /// amount0Delta and amount1Delta can both be 0 if no tokens were swapped. /// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by /// the end of the swap. If positive, the callback must send that amount of token0 to the pool. /// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by /// the end of the swap. If positive, the callback must send that amount of token1 to the pool. /// @param data Any data passed through by the caller via the IUniswapV3PoolActions#swap call function uniswapV3SwapCallback(int256 amount0Delta, int256 amount1Delta, bytes calldata data) external; }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.7.5; pragma abicoder v2; import "@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol"; /// @title Router token swapping functionality /// @notice Functions for swapping tokens via Uniswap V3 interface ISwapRouter is IUniswapV3SwapCallback { struct ExactInputSingleParams { address tokenIn; address tokenOut; uint24 fee; address recipient; uint256 deadline; uint256 amountIn; uint256 amountOutMinimum; uint160 sqrtPriceLimitX96; } /// @notice Swaps `amountIn` of one token for as much as possible of another token /// @param params The parameters necessary for the swap, encoded as `ExactInputSingleParams` in calldata /// @return amountOut The amount of the received token function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut); struct ExactInputParams { bytes path; address recipient; uint256 deadline; uint256 amountIn; uint256 amountOutMinimum; } /// @notice Swaps `amountIn` of one token for as much as possible of another along the specified path /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactInputParams` in calldata /// @return amountOut The amount of the received token function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut); struct ExactOutputSingleParams { address tokenIn; address tokenOut; uint24 fee; address recipient; uint256 deadline; uint256 amountOut; uint256 amountInMaximum; uint160 sqrtPriceLimitX96; } /// @notice Swaps as little as possible of one token for `amountOut` of another token /// @param params The parameters necessary for the swap, encoded as `ExactOutputSingleParams` in calldata /// @return amountIn The amount of the input token function exactOutputSingle(ExactOutputSingleParams calldata params) external payable returns (uint256 amountIn); struct ExactOutputParams { bytes path; address recipient; uint256 deadline; uint256 amountOut; uint256 amountInMaximum; } /// @notice Swaps as little as possible of one token for `amountOut` of another along the specified path (reversed) /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactOutputParams` in calldata /// @return amountIn The amount of the input token function exactOutput(ExactOutputParams calldata params) external payable returns (uint256 amountIn); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; interface IElementNFT { function startPresale(uint256 _presaleEnd) external; function multiplierPool() external returns (uint256); function getBatchedTokensData(uint256[] calldata tokenIds, address owner) external view returns (uint256[] memory timestamps, uint16[] memory multipliers); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.10; interface ITitanOnBurn { function onBurn(address user, uint256 amount) external; }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.10; interface ITITANX { error TitanX_InvalidAmount(); error TitanX_InsufficientBalance(); error TitanX_NotSupportedContract(); error TitanX_InsufficientProtocolFees(); error TitanX_FailedToSendAmount(); error TitanX_NotAllowed(); error TitanX_NoCycleRewardToClaim(); error TitanX_NoSharesExist(); error TitanX_EmptyUndistributeFees(); error TitanX_InvalidBurnRewardPercent(); error TitanX_InvalidBatchCount(); error TitanX_InvalidMintLadderInterval(); error TitanX_InvalidMintLadderRange(); error TitanX_MaxedWalletMints(); error TitanX_LPTokensHasMinted(); error TitanX_InvalidAddress(); error TitanX_InsufficientBurnAllowance(); function getBalance() external; /** * @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); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` 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 value) external returns (bool); function burnTokensToPayAddress( address user, uint256 amount, uint256 userRebatePercentage, uint256 rewardPaybackPercentage, address rewardPaybackAddress ) external; function burnTokens(address user, uint256 amount, uint256 userRebatePercentage, uint256 rewardPaybackPercentage) external; function userBurnTokens(uint256 amount) external; }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.10; import "@openzeppelin/contracts/interfaces/IERC20.sol"; /// @title Interface for WETH9 interface IWETH9 is IERC20 { /// @notice Deposit ether to get wrapped ether function deposit() external payable; /// @notice Withdraw wrapped ether to get ether function withdraw(uint256) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import "../interfaces/ITitanOnBurn.sol"; import "@openzeppelin/contracts/interfaces/IERC20.sol"; // ===================== Contract Addresses ===================================== uint8 constant NUM_ECOSYSTEM_TOKENS = 14; address constant WETH9 = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address constant TITANX = 0xF19308F923582A6f7c465e5CE7a9Dc1BEC6665B1; address constant HYPER_ADDRESS = 0xE2cfD7a01ec63875cd9Da6C7c1B7025166c2fA2F; address constant HELIOS_ADDRESS = 0x2614f29C39dE46468A921Fd0b41fdd99A01f2EDf; address constant DRAGONX_ADDRESS = 0x96a5399D07896f757Bd4c6eF56461F58DB951862; address constant BDX_ADDRESS = 0x9f278Dc799BbC61ecB8e5Fb8035cbfA29803623B; address constant BLAZE_ADDRESS = 0xfcd7cceE4071aA4ecFAC1683b7CC0aFeCAF42A36; address constant INFERNO_ADDRESS = 0x00F116ac0c304C570daAA68FA6c30a86A04B5C5F; address constant HYDRA_ADDRESS = 0xCC7ed2ab6c3396DdBc4316D2d7C1b59ff9d2091F; address constant AWESOMEX_ADDRESS = 0xa99AFcC6Aa4530d01DFFF8E55ec66E4C424c048c; address constant FLUX_ADDRESS = 0xBFDE5ac4f5Adb419A931a5bF64B0f3BB5a623d06; address constant DRAGONX_BURN_ADDRESS = 0x1d59429571d8Fde785F45bf593E94F2Da6072Edb; // ===================== Presale ================================================ uint256 constant PRESALE_LENGTH = 28 days; uint256 constant COOLDOWN_PERIOD = 48 hours; uint256 constant LP_POOL_SIZE = 200_000_000_000 ether; // ===================== Fees =================================================== uint256 constant DEV_PERCENT = 6; uint256 constant TREASURY_PERCENT = 4; uint256 constant BURN_PERCENT = 10; // ===================== Sell Tax =============================================== uint256 constant PRESALE_TRANSFER_TAX_PERCENTAGE = 16; uint256 constant TRANSFER_TAX_PERCENTAGE = 4; uint256 constant NFT_REDEEM_TAX_PERCENTAGE = 3; // ===================== Holder Vault =========================================== uint16 constant MAX_CYCLES_PER_CLAIM = 100; uint32 constant CYCLE_INTERVAL = 7 days; // ===================== UNISWAP Interface ====================================== address constant UNISWAP_V2_FACTORY = 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f; address constant UNISWAP_V2_ROUTER = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address constant UNISWAP_V3_ROUTER = 0xE592427A0AEce92De3Edee1F18E0157C05861564; uint24 constant POOL_FEE_1PERCENT = 10000; // ===================== Interface IDs ========================================== bytes4 constant INTERFACE_ID_ERC165 = 0x01ffc9a7; bytes4 constant INTERFACE_ID_ERC20 = type(IERC20).interfaceId; bytes4 constant INTERFACE_ID_ERC721 = 0x80ac58cd; bytes4 constant INTERFACE_ID_ERC721Metadata = 0x5b5e139f; bytes4 constant INTERFACE_ID_ITITANONBURN = type(ITitanOnBurn).interfaceId;
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_devWallet","type":"address"},{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"address[]","name":"_ecosystemTokens","type":"address[]"},{"internalType":"uint8[]","name":"_lpPercentages","type":"uint8[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"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":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","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":[],"name":"PresaleStarted","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":"BUY_AND_BURN","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"E280NFT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"HOLDER_VAULT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","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":"value","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":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"purchaseId","type":"uint256"}],"name":"claimPurchase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"minTokenAmount","type":"uint256"},{"internalType":"uint256","name":"minE280Amount","type":"uint256"}],"name":"deployLP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"devWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"distributeBuyAndBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getBuyBurnAllocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getUserPurchaseIds","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"handleRedeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isPresaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpPurchaseFinished","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpPurchaseStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"lpPurchases","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","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":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleEnd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"minAmountOut","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"purchaseTokenForLP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"minAmount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"purchaseWithETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"purchaseWithTitanX","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"purchaseId","type":"uint256"}],"name":"purchases","outputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"nftAddress","type":"address"},{"internalType":"address","name":"vaultAddress","type":"address"},{"internalType":"address","name":"buyAndBurn","type":"address"}],"name":"setProtocolAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setWhitelistFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setWhitelistTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startLpPurchases","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startPresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"tokenLpPercent","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"tokenPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBurned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalLPsCreated","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalLpPoolUsed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tradingEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","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":"value","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":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistTo","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162004087380380620040878339810160408190526200003491620006a2565b846040518060400160405280600b81526020016a0456c656d656e74203238360ac1b81525060405180604001604052806005815260200164115313539560da1b81525081600390816200008891906200083c565b5060046200009782826200083c565b5050506001600160a01b038116620000ca57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b620000d5816200051e565b508151600e14620001295760405162461bcd60e51b815260206004820152601a60248201527f496e636f7272656374206e756d626572206f6620746f6b656e730000000000006044820152606401620000c1565b8051600e146200017c5760405162461bcd60e51b815260206004820152601a60248201527f496e636f7272656374206e756d626572206f6620746f6b656e730000000000006044820152606401620000c1565b6001600160a01b038516620001d45760405162461bcd60e51b815260206004820152601960248201527f4f776e65722077616c6c6574206e6f742070726f7669646564000000000000006044820152606401620000c1565b6001600160a01b0384166200022c5760405162461bcd60e51b815260206004820152601f60248201527f4465762077616c6c65742061646472657373206e6f742070726f7669646564006044820152606401620000c1565b6001600160a01b038316620002845760405162461bcd60e51b815260206004820152601d60248201527f54726561737572792061646472657373206e6f742070726f76696465640000006044820152606401620000c1565b600880546001600160a01b038087166001600160a01b031992831617909255600780549286169290911691909117905560008080527fa31547ce6245cdb9ecea19cf8c7eb9f5974025bb4075011409251ae855b30aed805460ff19908116600190811790925560146020527f4f26c3876aa9f4b92579780beea1161a61f87ebf1ec6ee865b299e447ecba99c80549091169091179055805b8351811015620004bc5760008482815181106200033d576200033d62000908565b6020026020010151905060008483815181106200035e576200035e62000908565b6020026020010151905060006001600160a01b0316826001600160a01b031603620003cc5760405162461bcd60e51b815260206004820152601760248201527f496e636f727265637420746f6b656e20616464726573730000000000000000006044820152606401620000c1565b60008160ff1611620004215760405162461bcd60e51b815260206004820152601a60248201527f496e636f72726563742070657263656e746167652076616c75650000000000006044820152606401620000c1565b6001600160a01b03821660009081526013602052604090205460ff16156200047e5760405162461bcd60e51b815260206004820152600f60248201526e223ab83634b1b0ba32903a37b5b2b760891b6044820152606401620000c1565b6001600160a01b0382166000908152601360205260409020805460ff191660ff8316179055620004af81856200091e565b935050506001016200031c565b508060ff16606414620005125760405162461bcd60e51b815260206004820152601d60248201527f50657263656e746167657320646f206e6f742061646420746f203130300000006044820152606401620000c1565b5050505050506200094c565b600680546001600160a01b031916905562000539816200053c565b50565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b0381168114620005a657600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715620005ec57620005ec620005ab565b604052919050565b60006001600160401b03821115620006105762000610620005ab565b5060051b60200190565b600082601f8301126200062c57600080fd5b81516020620006456200063f83620005f4565b620005c1565b8083825260208201915060208460051b8701019350868411156200066857600080fd5b602086015b848110156200069757805160ff81168114620006895760008081fd5b83529183019183016200066d565b509695505050505050565b600080600080600060a08688031215620006bb57600080fd5b620006c6866200058e565b94506020620006d78188016200058e565b9450620006e7604088016200058e565b60608801519094506001600160401b03808211156200070557600080fd5b818901915089601f8301126200071a57600080fd5b81516200072b6200063f82620005f4565b81815260059190911b8301840190848101908c8311156200074b57600080fd5b938501935b82851015620007745762000764856200058e565b8252938501939085019062000750565b60808c015190975094505050808311156200078e57600080fd5b50506200079e888289016200061a565b9150509295509295909350565b600181811c90821680620007c057607f821691505b602082108103620007e157634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000837576000816000526020600020601f850160051c81016020861015620008125750805b601f850160051c820191505b8181101562000833578281556001016200081e565b5050505b505050565b81516001600160401b03811115620008585762000858620005ab565b6200087081620008698454620007ab565b84620007e7565b602080601f831160018114620008a857600084156200088f5750858301515b600019600386901b1c1916600185901b17855562000833565b600085815260208120601f198616915b82811015620008d957888601518255948401946001909101908401620008b8565b5085821015620008f85787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b60ff81811683821601908111156200094657634e487b7160e01b600052601160045260246000fd5b92915050565b61372b806200095c6000396000f3fe6080604052600436106102e45760003560e01c806361d027b311610190578063a0b46483116100dc578063dd62ed3e11610095578063f0883d101161006f578063f0883d101461093b578063f0f442601461094e578063f2fde38b1461096e578063f468fa071461098e57600080fd5b8063dd62ed3e146108a7578063e30c3978146108ed578063eefc1ea81461090b57600080fd5b8063a0b4648314610807578063a9059cbb1461081c578063b21bf59c1461083c578063d159fc7d14610851578063d3179ec214610871578063d89135cd1461089157600080fd5b80637dfe5bc4116101495780638da5cb5b116101235780638da5cb5b1461079f5780638ea5220f146107bd57806395ccbfbb146107dd57806395d89b41146107f257600080fd5b80637dfe5bc4146107095780638238e9da146107295780638392fe311461075657600080fd5b806361d027b3146106495780636ec791a01461066957806370a0823114610689578063715018a6146106bf578063747a9ff4146106d457806379ba5097146106f457600080fd5b806333c922831161024f5780634ada218b116102085780635d61456d116101e25780635d61456d146105da5780635d6b17a2146105fb5780635ee2230a1461061c57806360d938dc1461063257600080fd5b80634ada218b146105795780634b4473a11461059a57806351410bef146105ba57600080fd5b806333c922831461048b57806336a1e6e6146104c35780633737bcb4146104e35780633d5e6a3f146104f957806342966c681461052957806343684b211461054957600080fd5b806316b627d1116102a157806316b627d1146103b757806318160ddd146103e7578063229f3e291461040657806323b872dd1461041c5780632927ae6e1461043c578063313ce5671461046957600080fd5b806301ffc9a7146102e957806304c98b2b1461031e57806306fdde0314610335578063095ea7b3146103575780630d761bc9146103775780631056305e14610397575b600080fd5b3480156102f557600080fd5b5061030961030436600461302f565b6109af565b60405190151581526020015b60405180910390f35b34801561032a57600080fd5b506103336109e6565b005b34801561034157600080fd5b5061034a610b14565b60405161031591906130a9565b34801561036357600080fd5b506103096103723660046130d1565b610ba6565b34801561038357600080fd5b506103336103923660046130fd565b610bbe565b3480156103a357600080fd5b506103336103b236600461312d565b610c39565b3480156103c357600080fd5b506103096103d2366004613178565b60146020526000908152604090205460ff1681565b3480156103f357600080fd5b506002545b604051908152602001610315565b34801561041257600080fd5b506103f8600f5481565b34801561042857600080fd5b50610309610437366004613195565b610e17565b34801561044857600080fd5b5061045c610457366004613178565b610e3d565b60405161031591906131d6565b34801561047557600080fd5b5060125b60405160ff9091168152602001610315565b34801561049757600080fd5b50600a546104ab906001600160a01b031681565b6040516001600160a01b039091168152602001610315565b3480156104cf57600080fd5b506103336104de366004613228565b610e61565b3480156104ef57600080fd5b506103f8600c5481565b34801561050557600080fd5b50610479610514366004613178565b60166020526000908152604090205460ff1681565b34801561053557600080fd5b50610333610544366004613256565b610e94565b34801561055557600080fd5b50610309610564366004613178565b60156020526000908152604090205460ff1681565b34801561058557600080fd5b50600b5461030990600160b81b900460ff1681565b3480156105a657600080fd5b50600b546104ab906001600160a01b031681565b3480156105c657600080fd5b506103336105d536600461326f565b610eb9565b3480156105e657600080fd5b50600b5461047990600160a01b900460ff1681565b34801561060757600080fd5b50600b5461030990600160a81b900460ff1681565b34801561062857600080fd5b506103f8600d5481565b34801561063e57600080fd5b50600f544210610309565b34801561065557600080fd5b506007546104ab906001600160a01b031681565b34801561067557600080fd5b50610333610684366004613256565b6110bd565b34801561069557600080fd5b506103f86106a4366004613178565b6001600160a01b031660009081526020819052604090205490565b3480156106cb57600080fd5b506103336111bb565b3480156106e057600080fd5b506103336106ef36600461326f565b6111cf565b34801561070057600080fd5b50610333611376565b34801561071557600080fd5b506009546104ab906001600160a01b031681565b34801561073557600080fd5b506103f8610744366004613178565b60126020526000908152604090205481565b34801561076257600080fd5b5061078a610771366004613256565b6011602052600090815260409020805460019091015482565b60408051928352602083019190915201610315565b3480156107ab57600080fd5b506005546001600160a01b03166104ab565b3480156107c957600080fd5b506008546104ab906001600160a01b031681565b3480156107e957600080fd5b506103f86113b7565b3480156107fe57600080fd5b5061034a611485565b34801561081357600080fd5b50610333611494565b34801561082857600080fd5b506103096108373660046130d1565b6116a1565b34801561084857600080fd5b506103336116af565b34801561085d57600080fd5b5061033361086c366004613228565b611729565b34801561087d57600080fd5b5061033361088c366004613256565b61175c565b34801561089d57600080fd5b506103f8600e5481565b3480156108b357600080fd5b506103f86108c23660046132a4565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3480156108f957600080fd5b506006546001600160a01b03166104ab565b34801561091757600080fd5b50610479610926366004613178565b60136020526000908152604090205460ff1681565b6103336109493660046132d2565b611811565b34801561095a57600080fd5b50610333610969366004613178565b6118bf565b34801561097a57600080fd5b50610333610989366004613178565b61193f565b34801561099a57600080fd5b50600b5461030990600160b01b900460ff1681565b60006001600160e01b031982166301ffc9a760e01b14806109e057506001600160e01b031982166336372b0760e01b145b92915050565b6109ee6119b0565b6009546001600160a01b0316610a395760405162461bcd60e51b815260206004820152600b60248201526a139195081b9bdd081cd95d60aa1b60448201526064015b60405180910390fd5b600f5415610a815760405162461bcd60e51b815260206004820152601560248201527443616e206f6e6c7920626520646f6e65206f6e636560581b6044820152606401610a30565b6224ea004201600f81905560095460405163a132aad160e01b815260048101929092526001600160a01b03169063a132aad190602401600060405180830381600087803b158015610ad157600080fd5b505af1158015610ae5573d6000803e3d6000fd5b50506040517f17c3338141363aab2512c08f8a7764328ca95979f7057663eb93f7e250139b4c925060009150a1565b606060038054610b23906132f4565b80601f0160208091040260200160405190810160405280929190818152602001828054610b4f906132f4565b8015610b9c5780601f10610b7157610100808354040283529160200191610b9c565b820191906000526020600020905b815481529060010190602001808311610b7f57829003601f168201915b5050505050905090565b600033610bb48185856119dd565b5060019392505050565b6009546001600160a01b03163314610c075760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b6044820152606401610a30565b600a54606460038402049081840390610c29906001600160a01b0316836119ea565b610c3383826119ea565b50505050565b610c416119b0565b6009546001600160a01b031615610c925760405162461bcd60e51b815260206004820152601560248201527443616e206f6e6c7920626520646f6e65206f6e636560581b6044820152606401610a30565b6001600160a01b038316610ce85760405162461bcd60e51b815260206004820152601860248201527f4e46542061646472657373206e6f742070726f766964656400000000000000006044820152606401610a30565b6001600160a01b038216610d485760405162461bcd60e51b815260206004820152602160248201527f486f6c646572205661756c742061646472657373206e6f742070726f766964656044820152601960fa1b6064820152608401610a30565b6001600160a01b038116610d9e5760405162461bcd60e51b815260206004820152601d60248201527f427579264275726e2061646472657373206e6f742070726f76696465640000006044820152606401610a30565b600980546001600160a01b03199081166001600160a01b0395861617909155600a805482169385169384179055600b80549091169184169190911781556000918252601560209081526040808420805460ff19908116600190811790925593549095168452601490915290912080549091169091179055565b600033610e25858285611a20565b610e30858585611a98565b60019150505b9392505050565b6001600160a01b03811660009081526017602052604090206060906109e090611af7565b610e696119b0565b6001600160a01b03919091166000908152601460205260409020805460ff1916911515919091179055565b80600e6000828254610ea69190613344565b90915550610eb690503382611b04565b50565b610ec16119b0565b600b54600160a81b900460ff168015610ee45750600b54600160b01b900460ff16155b610f265760405162461bcd60e51b81526020600482015260136024820152724c50207068617365206e6f742061637469766560681b6044820152606401610a30565b6001600160a01b038316600090815260166020526040902054600560ff90911610610fa95760405162461bcd60e51b815260206004820152602d60248201527f416c6c207075726368617365732068617665206265656e206d61646520666f7260448201526c103a30b933b2ba103a37b5b2b760991b6064820152608401610a30565b6001600160a01b03831660009081526013602052604090205460ff168061100b5760405162461bcd60e51b815260206004820152601660248201527524b731b7b93932b1ba103a30b933b2ba103a37b5b2b760511b6044820152606401610a30565b60006101f48260ff16600c546110219190613357565b61102b919061336e565b905080600d600082825461103f9190613344565b909155506000905061105386838787611b3a565b6001600160a01b038716600090815260126020908152604080832080548501905560169091529020805460ff8082166001011660ff19909116179055600c54600d5491925060451901116110b557600b805460ff60b01b1916600160b01b1790555b505050505050565b3360009081526017602052604090206110d69082611c64565b6111115760405162461bcd60e51b815260206004820152600c60248201526b43616e6e6f7420636c61696d60a01b6044820152606401610a30565b6000818152601160209081526040918290208251808401909352805480845260019091015491830191909152429061114d906202a30090613344565b1061118f5760405162461bcd60e51b8152602060048201526012602482015271436f6f6c646f776e2069732061637469766560701b6044820152606401610a30565b3360009081526017602052604090206111a89083611c7c565b506111b73382602001516119ea565b5050565b6111c36119b0565b6111cd6000611c88565b565b6111d76119b0565b600b54600160b01b900460ff1661123b5760405162461bcd60e51b815260206004820152602260248201527f4e6f7420616c6c20746f6b656e732068617665206265656e2070757263686173604482015261195960f21b6064820152608401610a30565b6001600160a01b03831660009081526013602052604090205460ff168061129d5760405162461bcd60e51b815260206004820152601660248201527524b731b7b93932b1ba103a30b933b2ba103a37b5b2b760511b6044820152606401610a30565b600060648260ff16600c546112b29190613357565b6112bc919061336e565b6001600160a01b0386166000908152601260205260409020549091508061131d5760405162461bcd60e51b8152602060048201526015602482015274141bdbdb08185b1c9958591e4819195c1b1bde5959605a1b6044820152606401610a30565b61132a8682848888611ca1565b600b805460ff60a01b198116600160a01b9182900460ff908116600101811683029190911792839055910416600d19016110b5576110b5600b805460ff60b81b1916600160b81b179055565b60065433906001600160a01b031681146113ae5760405163118cdaa760e01b81526001600160a01b0382166004820152602401610a30565b610eb681611c88565b600b54600090600160b81b900460ff166114135760405162461bcd60e51b815260206004820152601a60248201527f54726164696e67206973206e6f7420656e61626c6564207965740000000000006044820152606401610a30565b6040516370a0823160e01b81523060048201526000805160206136d6833981519152906370a0823190602401602060405180830381865afa15801561145c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114809190613390565b905090565b606060048054610b23906132f4565b61149c6119b0565b600f546000036114ee5760405162461bcd60e51b815260206004820152601760248201527f50726573616c65206e6f742073746172746564207965740000000000000000006044820152606401610a30565b600b54600160a81b900460ff16156115485760405162461bcd60e51b815260206004820152601b60248201527f4c50206372656174696f6e20616c7265616479207374617274656400000000006044820152606401610a30565b6040516370a0823160e01b81523060048201526000906000805160206136d6833981519152906370a0823190602401602060405180830381865afa158015611594573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115b89190613390565b9050600081116116005760405162461bcd60e51b81526020600482015260136024820152724e6f20546974616e5820617661696c61626c6560681b6044820152606401610a30565b6c02863c1f5cdae42f954000000081101561167557600f544210156116675760405162461bcd60e51b815260206004820152601860248201527f50726573616c65206e6f742066696e69736865642079657400000000000000006044820152606401610a30565b61167081611de7565b61168b565b61168b6c02863c1f5cdae42f9540000000611de7565b50600b805460ff60a81b1916600160a81b179055565b600033610bb4818585611a98565b60006116b96113b7565b9050600081116117035760405162461bcd60e51b81526020600482015260156024820152744e6f7468696e6720746f206469737472696275746560581b6044820152606401610a30565b600b54610eb6906000805160206136d6833981519152906001600160a01b031683611f69565b6117316119b0565b6001600160a01b03919091166000908152601560205260409020805460ff1916911515919091179055565b600f5442106117a25760405162461bcd60e51b815260206004820152601260248201527150726573616c65206e6f742061637469766560701b6044820152606401610a30565b600081116117ed5760405162461bcd60e51b815260206004820152601860248201527743616e6e6f74207075726368617365203020746f6b656e7360401b6044820152606401610a30565b6118076000805160206136d6833981519152333084611fc8565b610eb68133612001565b600f5442106118575760405162461bcd60e51b815260206004820152601260248201527150726573616c65206e6f742061637469766560701b6044820152606401610a30565b600082116118a25760405162461bcd60e51b815260206004820152601860248201527743616e6e6f74207075726368617365203020746f6b656e7360401b6044820152606401610a30565b60006118ae8383612061565b90506118ba8133612001565b505050565b6118c76119b0565b6001600160a01b03811661191d5760405162461bcd60e51b815260206004820152601d60248201527f54726561737572792061646472657373206e6f742070726f76696465640000006044820152606401610a30565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b6119476119b0565b600680546001600160a01b0383166001600160a01b031990911681179091556119786005546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6005546001600160a01b031633146111cd5760405163118cdaa760e01b8152336004820152602401610a30565b6118ba83838360016121d8565b6001600160a01b038216611a145760405163ec442f0560e01b815260006004820152602401610a30565b6111b7600083836122ad565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198114610c335781811015611a8957604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610a30565b610c33848484840360006121d8565b6001600160a01b038316611ac257604051634b637e8f60e11b815260006004820152602401610a30565b6001600160a01b038216611aec5760405163ec442f0560e01b815260006004820152602401610a30565b6118ba8383836122ad565b60606000610e36836123c5565b6001600160a01b038216611b2e57604051634b637e8f60e11b815260006004820152602401610a30565b6111b7826000836122ad565b600073fcd7ccee4071aa4ecfac1683b7cc0afecaf42a35196001600160a01b03861601611b7457611b6d85858585612421565b9050611c5c565b6001600160a01b038516739f278dc799bbc61ecb8e5fb8035cbfa29803623b1480611bbb57506001600160a01b03851673cc7ed2ab6c3396ddbc4316d2d7c1b59ff9d2091f145b80611be257506001600160a01b03851673a99afcc6aa4530d01dfff8e55ec66e4c424c048c145b15611c0857611b6d857396a5399d07896f757bd4c6ef56461f58db9518628686866125e0565b73bfde5ac4f5adb419a931a5bf64b0f3bb5a623d05196001600160a01b03861601611c4d57611b6d8572f116ac0c304c570daaa68fa6c30a86a04b5c5f8686866125e0565b611c598585858561272a565b90505b949350505050565b60008181526001830160205260408120541515610e36565b6000610e36838361282c565b600680546001600160a01b0319169055610eb68161291f565b600080611cad87612971565b90925090508115611cc457611cc481878785612add565b611cce30866119ea565b611ced30737a250d5630b4cf539739df2c5dacb4c659f2488d87612b5a565b611d156001600160a01b038816737a250d5630b4cf539739df2c5dacb4c659f2488d88612b5a565b60405162e8e33760e81b81523060048201526001600160a01b038816602482015260448101869052606481018790526084810184905260a48101859052600060c48201524260e4820152737a250d5630b4cf539739df2c5dacb4c659f2488d9063e8e3370090610104016060604051808303816000875af1158015611d9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dc291906133a9565b5050506001600160a01b03909616600090815260126020526040812055505050505050565b60006064611df6600684613357565b611e00919061336e565b905060006064611e11600485613357565b611e1b919061336e565b600854909150611e44906000805160206136d6833981519152906001600160a01b031684611f69565b600754611e6a906000805160206136d6833981519152906001600160a01b031683611f69565b80611e7583856133d7565b611e7f91906133d7565b600c8190556000805160206136d683398151915260009081527fadc5d8297f4d8242f844350f6c88dfb1591a841f7771fb5a638ea17158464db4805460ff1916600517905560136020527fe0392139129918f139800299d5bac327dd79450cbfd0dfff1a679e12fd75022d549091606491611f009160ff9190911690613357565b611f0a919061336e565b6000805160206136d6833981519152600090815260126020527fd47ac8835ac20c1ee162f9cf7ad6aeba54a41a0425f073b6593905e4f93d7caa829055600d80549293508392909190611f5e908490613344565b909155505050505050565b6040516001600160a01b038381166024830152604482018390526118ba91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050612be4565b6040516001600160a01b038481166024830152838116604483015260648201839052610c339186918216906323b872dd90608401611f96565b60408051808201825242815260208082018581526010805460009081526011845285812094518555915160019094019390935591546001600160a01b0385168352601790915291902061205391612c47565b505060108054600101905550565b600073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b1580156120b257600080fd5b505af11580156120c6573d6000803e3d6000fd5b5050604080516101008101825273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28082526000805160206136d6833981519152602083015261271092820192909252306060820152608081018790523460a0820181905260c08201899052600060e0830152909450612152935090915073e592427a0aece92de3edee1f18e0157c0586156490612b5a565b60405163414bf38960e01b815260009073e592427a0aece92de3edee1f18e0157c058615649063414bf3899061218c9085906004016133ea565b6020604051808303816000875af11580156121ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121cf9190613390565b95945050505050565b6001600160a01b0384166122025760405163e602df0560e01b815260006004820152602401610a30565b6001600160a01b03831661222c57604051634a1406b160e11b815260006004820152602401610a30565b6001600160a01b0380851660009081526001602090815260408083209387168352929052208290558015610c3357826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161229f91815260200190565b60405180910390a350505050565b600b54600160b81b900460ff1661232a576001600160a01b0383163014806122dc57506001600160a01b038316155b156122ec576118ba838383612c53565b60405162461bcd60e51b8152602060048201526013602482015272151c98591a5b99c81a5cc8191a5cd8589b1959606a1b6044820152606401610a30565b6001600160a01b03821660009081526014602052604090205460ff168061236957506001600160a01b03831660009081526015602052604090205460ff165b15612379576118ba838383612c53565b6000612386600f54421090565b612391576004612394565b60105b600a5490915060648383020490818403906123ba9087906001600160a01b031684612c53565b6110b5868683612c53565b60608160000180548060200260200160405190810160405280929190818152602001828054801561241557602002820191906000526020600020905b815481526020019060010190808311612401575b50505050509050919050565b60008083116124725760405162461bcd60e51b815260206004820152601960248201527f6d696e416d6f756e744f7574206e6f742070726f7669646564000000000000006044820152606401610a30565b61249f6000805160206136d6833981519152737a250d5630b4cf539739df2c5dacb4c659f2488d86612b5a565b6040805160028082526060820183526000926020830190803683370190505090506000805160206136d6833981519152816000815181106124e2576124e2613469565b60200260200101906001600160a01b031690816001600160a01b031681525050858160018151811061251657612516613469565b6001600160a01b03909216602092830291909101909101526040516338ed173960e01b8152600090737a250d5630b4cf539739df2c5dacb4c659f2488d906338ed1739906125709089908990879030908b9060040161347f565b6000604051808303816000875af115801561258f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526125b791908101906134f2565b9050806001815181106125cc576125cc613469565b602002602001015192505050949350505050565b60405173f19308f923582a6f7c465e5ce7a9dc1bec6665b160601b602082015261027160ec1b60348201819052606086811b6bffffffffffffffffffffffff199081166037850152604b84019290925287901b16604e820152600090819060620160408051601f1981840301815260a083018252808352306020840152908201859052606082018790526080820186905291506126a06000805160206136d683398151915273e592427a0aece92de3edee1f18e0157c0586156488612b5a565b60405163c04b8d5960e01b815260009073e592427a0aece92de3edee1f18e0157c058615649063c04b8d59906126da9085906004016135b0565b6020604051808303816000875af11580156126f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061271d9190613390565b9998505050505050505050565b60408051610100810182526000805160206136d68339815191528082526001600160a01b0387166020830152612710928201929092523060608201526080810183905260a0810185905260c08101849052600060e08201819052916127a49073e592427a0aece92de3edee1f18e0157c0586156487612b5a565b60405163414bf38960e01b815260009073e592427a0aece92de3edee1f18e0157c058615649063414bf389906127de9085906004016133ea565b6020604051808303816000875af11580156127fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128219190613390565b979650505050505050565b600081815260018301602052604081205480156129155760006128506001836133d7565b8554909150600090612864906001906133d7565b90508082146128c957600086600001828154811061288457612884613469565b90600052602060002001549050808760000184815481106128a7576128a7613469565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806128da576128da613608565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506109e0565b60009150506109e0565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60405163e6a4390560e01b81523060048201526001600160a01b038216602482015260009081908190735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f9063e6a4390590604401602060405180830381865afa1580156129d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129fa919061361e565b90506001600160a01b038116612a1557600094909350915050565b6000819050600080826001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa158015612a5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a7f9190613657565b5091509150816001600160701b0316600014612aaa57506001600160701b0316959194509092505050565b6001600160701b03811615612ace576001600160701b031696929550919350505050565b50600096929550919350505050565b600083612aea8484613357565b612af4919061336e565b9050612b0085826119ea565b846001600160a01b031663fff6cae96040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612b3b57600080fd5b505af1158015612b4f573d6000803e3d6000fd5b505050505050505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526000919085169063dd62ed3e90604401602060405180830381865afa158015612baa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bce9190613390565b9050610c338484612bdf8585613344565b612d7d565b6000612bf96001600160a01b03841683612e0d565b90508051600014158015612c1e575080806020019051810190612c1c919061369c565b155b156118ba57604051635274afe760e01b81526001600160a01b0384166004820152602401610a30565b6000610e368383612e1b565b6001600160a01b038316612c7e578060026000828254612c739190613344565b90915550612cf09050565b6001600160a01b03831660009081526020819052604090205481811015612cd15760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610a30565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b038216612d0c57600280548290039055612d2b565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051612d7091815260200190565b60405180910390a3505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052612dce8482612e6a565b610c33576040516001600160a01b03848116602483015260006044830152612e0391869182169063095ea7b390606401611f96565b610c338482612be4565b6060610e3683836000612f0d565b6000818152600183016020526040812054612e62575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556109e0565b5060006109e0565b6000806000846001600160a01b031684604051612e8791906136b9565b6000604051808303816000865af19150503d8060008114612ec4576040519150601f19603f3d011682016040523d82523d6000602084013e612ec9565b606091505b5091509150818015612ef3575080511580612ef3575080806020019051810190612ef3919061369c565b80156121cf5750505050506001600160a01b03163b151590565b606081471015612f325760405163cd78605960e01b8152306004820152602401610a30565b600080856001600160a01b03168486604051612f4e91906136b9565b60006040518083038185875af1925050503d8060008114612f8b576040519150601f19603f3d011682016040523d82523d6000602084013e612f90565b606091505b5091509150612fa0868383612faa565b9695505050505050565b606082612fbf57612fba82613006565b610e36565b8151158015612fd657506001600160a01b0384163b155b15612fff57604051639996b31560e01b81526001600160a01b0385166004820152602401610a30565b5080610e36565b8051156130165780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b60006020828403121561304157600080fd5b81356001600160e01b031981168114610e3657600080fd5b60005b8381101561307457818101518382015260200161305c565b50506000910152565b60008151808452613095816020860160208601613059565b601f01601f19169290920160200192915050565b602081526000610e36602083018461307d565b6001600160a01b0381168114610eb657600080fd5b600080604083850312156130e457600080fd5b82356130ef816130bc565b946020939093013593505050565b6000806040838503121561311057600080fd5b823591506020830135613122816130bc565b809150509250929050565b60008060006060848603121561314257600080fd5b833561314d816130bc565b9250602084013561315d816130bc565b9150604084013561316d816130bc565b809150509250925092565b60006020828403121561318a57600080fd5b8135610e36816130bc565b6000806000606084860312156131aa57600080fd5b83356131b5816130bc565b925060208401356131c5816130bc565b929592945050506040919091013590565b6020808252825182820181905260009190848201906040850190845b8181101561320e578351835292840192918401916001016131f2565b50909695505050505050565b8015158114610eb657600080fd5b6000806040838503121561323b57600080fd5b8235613246816130bc565b915060208301356131228161321a565b60006020828403121561326857600080fd5b5035919050565b60008060006060848603121561328457600080fd5b833561328f816130bc565b95602085013595506040909401359392505050565b600080604083850312156132b757600080fd5b82356132c2816130bc565b91506020830135613122816130bc565b600080604083850312156132e557600080fd5b50508035926020909101359150565b600181811c9082168061330857607f821691505b60208210810361332857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156109e0576109e061332e565b80820281158282048414176109e0576109e061332e565b60008261338b57634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156133a257600080fd5b5051919050565b6000806000606084860312156133be57600080fd5b8351925060208401519150604084015190509250925092565b818103818111156109e0576109e061332e565b81516001600160a01b03908116825260208084015182169083015260408084015162ffffff16908301526060808401518216908301526080808401519083015260a0838101519083015260c0808401519083015260e09283015116918101919091526101000190565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600060a08201878352602087602085015260a0604085015281875180845260c08601915060208901935060005b818110156134d15784516001600160a01b0316835293830193918301916001016134ac565b50506001600160a01b03969096166060850152505050608001529392505050565b6000602080838503121561350557600080fd5b825167ffffffffffffffff8082111561351d57600080fd5b818501915085601f83011261353157600080fd5b81518181111561354357613543613453565b8060051b604051601f19603f8301168101818110858211171561356857613568613453565b60405291825284820192508381018501918883111561358657600080fd5b938501935b828510156135a45784518452938501939285019261358b565b98975050505050505050565b602081526000825160a060208401526135cc60c084018261307d565b905060018060a01b0360208501511660408401526040840151606084015260608401516080840152608084015160a08401528091505092915050565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561363057600080fd5b8151610e36816130bc565b80516001600160701b038116811461365257600080fd5b919050565b60008060006060848603121561366c57600080fd5b6136758461363b565b92506136836020850161363b565b9150604084015163ffffffff8116811461316d57600080fd5b6000602082840312156136ae57600080fd5b8151610e368161321a565b600082516136cb818460208701613059565b919091019291505056fe000000000000000000000000f19308f923582a6f7c465e5ce7a9dc1bec6665b1a2646970667358221220d6232243218f8cf86d17f6a9e557456239479fc914690fdae307d6453bd1600264736f6c63430008180033000000000000000000000000d71f00133f2fb35793ac96fa5a2f0df9bff81f0f00000000000000000000000047e126330f9ef54fc9ce64a672166c974a17abde00000000000000000000000015e5b9b9adf208cc7ca3ae1e6a49506eb5f397dd00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000280000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000f19308f923582a6f7c465e5ce7a9dc1bec6665b1000000000000000000000000e2cfd7a01ec63875cd9da6c7c1b7025166c2fa2f0000000000000000000000002614f29c39de46468a921fd0b41fdd99a01f2edf00000000000000000000000096a5399d07896f757bd4c6ef56461f58db9518620000000000000000000000009f278dc799bbc61ecb8e5fb8035cbfa29803623b000000000000000000000000cc7ed2ab6c3396ddbc4316d2d7c1b59ff9d2091f000000000000000000000000a99afcc6aa4530d01dfff8e55ec66e4c424c048c000000000000000000000000fcd7ccee4071aa4ecfac1683b7cc0afecaf42a3600000000000000000000000000f116ac0c304c570daaa68fa6c30a86a04b5c5f000000000000000000000000bfde5ac4f5adb419a931a5bf64b0f3bb5a623d0600000000000000000000000066b5228cfd34d9f4d9f03188d67816286c7c0b74000000000000000000000000d60abfb751db36514a592963fd71dd50c6cf9ba9000000000000000000000000db04fb08378129621634c151e9b61fef569479200000000000000000000000006532b3f1e4dbff542fbd6befe5ed7041c10b385a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000009000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000005
Deployed Bytecode
0x6080604052600436106102e45760003560e01c806361d027b311610190578063a0b46483116100dc578063dd62ed3e11610095578063f0883d101161006f578063f0883d101461093b578063f0f442601461094e578063f2fde38b1461096e578063f468fa071461098e57600080fd5b8063dd62ed3e146108a7578063e30c3978146108ed578063eefc1ea81461090b57600080fd5b8063a0b4648314610807578063a9059cbb1461081c578063b21bf59c1461083c578063d159fc7d14610851578063d3179ec214610871578063d89135cd1461089157600080fd5b80637dfe5bc4116101495780638da5cb5b116101235780638da5cb5b1461079f5780638ea5220f146107bd57806395ccbfbb146107dd57806395d89b41146107f257600080fd5b80637dfe5bc4146107095780638238e9da146107295780638392fe311461075657600080fd5b806361d027b3146106495780636ec791a01461066957806370a0823114610689578063715018a6146106bf578063747a9ff4146106d457806379ba5097146106f457600080fd5b806333c922831161024f5780634ada218b116102085780635d61456d116101e25780635d61456d146105da5780635d6b17a2146105fb5780635ee2230a1461061c57806360d938dc1461063257600080fd5b80634ada218b146105795780634b4473a11461059a57806351410bef146105ba57600080fd5b806333c922831461048b57806336a1e6e6146104c35780633737bcb4146104e35780633d5e6a3f146104f957806342966c681461052957806343684b211461054957600080fd5b806316b627d1116102a157806316b627d1146103b757806318160ddd146103e7578063229f3e291461040657806323b872dd1461041c5780632927ae6e1461043c578063313ce5671461046957600080fd5b806301ffc9a7146102e957806304c98b2b1461031e57806306fdde0314610335578063095ea7b3146103575780630d761bc9146103775780631056305e14610397575b600080fd5b3480156102f557600080fd5b5061030961030436600461302f565b6109af565b60405190151581526020015b60405180910390f35b34801561032a57600080fd5b506103336109e6565b005b34801561034157600080fd5b5061034a610b14565b60405161031591906130a9565b34801561036357600080fd5b506103096103723660046130d1565b610ba6565b34801561038357600080fd5b506103336103923660046130fd565b610bbe565b3480156103a357600080fd5b506103336103b236600461312d565b610c39565b3480156103c357600080fd5b506103096103d2366004613178565b60146020526000908152604090205460ff1681565b3480156103f357600080fd5b506002545b604051908152602001610315565b34801561041257600080fd5b506103f8600f5481565b34801561042857600080fd5b50610309610437366004613195565b610e17565b34801561044857600080fd5b5061045c610457366004613178565b610e3d565b60405161031591906131d6565b34801561047557600080fd5b5060125b60405160ff9091168152602001610315565b34801561049757600080fd5b50600a546104ab906001600160a01b031681565b6040516001600160a01b039091168152602001610315565b3480156104cf57600080fd5b506103336104de366004613228565b610e61565b3480156104ef57600080fd5b506103f8600c5481565b34801561050557600080fd5b50610479610514366004613178565b60166020526000908152604090205460ff1681565b34801561053557600080fd5b50610333610544366004613256565b610e94565b34801561055557600080fd5b50610309610564366004613178565b60156020526000908152604090205460ff1681565b34801561058557600080fd5b50600b5461030990600160b81b900460ff1681565b3480156105a657600080fd5b50600b546104ab906001600160a01b031681565b3480156105c657600080fd5b506103336105d536600461326f565b610eb9565b3480156105e657600080fd5b50600b5461047990600160a01b900460ff1681565b34801561060757600080fd5b50600b5461030990600160a81b900460ff1681565b34801561062857600080fd5b506103f8600d5481565b34801561063e57600080fd5b50600f544210610309565b34801561065557600080fd5b506007546104ab906001600160a01b031681565b34801561067557600080fd5b50610333610684366004613256565b6110bd565b34801561069557600080fd5b506103f86106a4366004613178565b6001600160a01b031660009081526020819052604090205490565b3480156106cb57600080fd5b506103336111bb565b3480156106e057600080fd5b506103336106ef36600461326f565b6111cf565b34801561070057600080fd5b50610333611376565b34801561071557600080fd5b506009546104ab906001600160a01b031681565b34801561073557600080fd5b506103f8610744366004613178565b60126020526000908152604090205481565b34801561076257600080fd5b5061078a610771366004613256565b6011602052600090815260409020805460019091015482565b60408051928352602083019190915201610315565b3480156107ab57600080fd5b506005546001600160a01b03166104ab565b3480156107c957600080fd5b506008546104ab906001600160a01b031681565b3480156107e957600080fd5b506103f86113b7565b3480156107fe57600080fd5b5061034a611485565b34801561081357600080fd5b50610333611494565b34801561082857600080fd5b506103096108373660046130d1565b6116a1565b34801561084857600080fd5b506103336116af565b34801561085d57600080fd5b5061033361086c366004613228565b611729565b34801561087d57600080fd5b5061033361088c366004613256565b61175c565b34801561089d57600080fd5b506103f8600e5481565b3480156108b357600080fd5b506103f86108c23660046132a4565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3480156108f957600080fd5b506006546001600160a01b03166104ab565b34801561091757600080fd5b50610479610926366004613178565b60136020526000908152604090205460ff1681565b6103336109493660046132d2565b611811565b34801561095a57600080fd5b50610333610969366004613178565b6118bf565b34801561097a57600080fd5b50610333610989366004613178565b61193f565b34801561099a57600080fd5b50600b5461030990600160b01b900460ff1681565b60006001600160e01b031982166301ffc9a760e01b14806109e057506001600160e01b031982166336372b0760e01b145b92915050565b6109ee6119b0565b6009546001600160a01b0316610a395760405162461bcd60e51b815260206004820152600b60248201526a139195081b9bdd081cd95d60aa1b60448201526064015b60405180910390fd5b600f5415610a815760405162461bcd60e51b815260206004820152601560248201527443616e206f6e6c7920626520646f6e65206f6e636560581b6044820152606401610a30565b6224ea004201600f81905560095460405163a132aad160e01b815260048101929092526001600160a01b03169063a132aad190602401600060405180830381600087803b158015610ad157600080fd5b505af1158015610ae5573d6000803e3d6000fd5b50506040517f17c3338141363aab2512c08f8a7764328ca95979f7057663eb93f7e250139b4c925060009150a1565b606060038054610b23906132f4565b80601f0160208091040260200160405190810160405280929190818152602001828054610b4f906132f4565b8015610b9c5780601f10610b7157610100808354040283529160200191610b9c565b820191906000526020600020905b815481529060010190602001808311610b7f57829003601f168201915b5050505050905090565b600033610bb48185856119dd565b5060019392505050565b6009546001600160a01b03163314610c075760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b6044820152606401610a30565b600a54606460038402049081840390610c29906001600160a01b0316836119ea565b610c3383826119ea565b50505050565b610c416119b0565b6009546001600160a01b031615610c925760405162461bcd60e51b815260206004820152601560248201527443616e206f6e6c7920626520646f6e65206f6e636560581b6044820152606401610a30565b6001600160a01b038316610ce85760405162461bcd60e51b815260206004820152601860248201527f4e46542061646472657373206e6f742070726f766964656400000000000000006044820152606401610a30565b6001600160a01b038216610d485760405162461bcd60e51b815260206004820152602160248201527f486f6c646572205661756c742061646472657373206e6f742070726f766964656044820152601960fa1b6064820152608401610a30565b6001600160a01b038116610d9e5760405162461bcd60e51b815260206004820152601d60248201527f427579264275726e2061646472657373206e6f742070726f76696465640000006044820152606401610a30565b600980546001600160a01b03199081166001600160a01b0395861617909155600a805482169385169384179055600b80549091169184169190911781556000918252601560209081526040808420805460ff19908116600190811790925593549095168452601490915290912080549091169091179055565b600033610e25858285611a20565b610e30858585611a98565b60019150505b9392505050565b6001600160a01b03811660009081526017602052604090206060906109e090611af7565b610e696119b0565b6001600160a01b03919091166000908152601460205260409020805460ff1916911515919091179055565b80600e6000828254610ea69190613344565b90915550610eb690503382611b04565b50565b610ec16119b0565b600b54600160a81b900460ff168015610ee45750600b54600160b01b900460ff16155b610f265760405162461bcd60e51b81526020600482015260136024820152724c50207068617365206e6f742061637469766560681b6044820152606401610a30565b6001600160a01b038316600090815260166020526040902054600560ff90911610610fa95760405162461bcd60e51b815260206004820152602d60248201527f416c6c207075726368617365732068617665206265656e206d61646520666f7260448201526c103a30b933b2ba103a37b5b2b760991b6064820152608401610a30565b6001600160a01b03831660009081526013602052604090205460ff168061100b5760405162461bcd60e51b815260206004820152601660248201527524b731b7b93932b1ba103a30b933b2ba103a37b5b2b760511b6044820152606401610a30565b60006101f48260ff16600c546110219190613357565b61102b919061336e565b905080600d600082825461103f9190613344565b909155506000905061105386838787611b3a565b6001600160a01b038716600090815260126020908152604080832080548501905560169091529020805460ff8082166001011660ff19909116179055600c54600d5491925060451901116110b557600b805460ff60b01b1916600160b01b1790555b505050505050565b3360009081526017602052604090206110d69082611c64565b6111115760405162461bcd60e51b815260206004820152600c60248201526b43616e6e6f7420636c61696d60a01b6044820152606401610a30565b6000818152601160209081526040918290208251808401909352805480845260019091015491830191909152429061114d906202a30090613344565b1061118f5760405162461bcd60e51b8152602060048201526012602482015271436f6f6c646f776e2069732061637469766560701b6044820152606401610a30565b3360009081526017602052604090206111a89083611c7c565b506111b73382602001516119ea565b5050565b6111c36119b0565b6111cd6000611c88565b565b6111d76119b0565b600b54600160b01b900460ff1661123b5760405162461bcd60e51b815260206004820152602260248201527f4e6f7420616c6c20746f6b656e732068617665206265656e2070757263686173604482015261195960f21b6064820152608401610a30565b6001600160a01b03831660009081526013602052604090205460ff168061129d5760405162461bcd60e51b815260206004820152601660248201527524b731b7b93932b1ba103a30b933b2ba103a37b5b2b760511b6044820152606401610a30565b600060648260ff16600c546112b29190613357565b6112bc919061336e565b6001600160a01b0386166000908152601260205260409020549091508061131d5760405162461bcd60e51b8152602060048201526015602482015274141bdbdb08185b1c9958591e4819195c1b1bde5959605a1b6044820152606401610a30565b61132a8682848888611ca1565b600b805460ff60a01b198116600160a01b9182900460ff908116600101811683029190911792839055910416600d19016110b5576110b5600b805460ff60b81b1916600160b81b179055565b60065433906001600160a01b031681146113ae5760405163118cdaa760e01b81526001600160a01b0382166004820152602401610a30565b610eb681611c88565b600b54600090600160b81b900460ff166114135760405162461bcd60e51b815260206004820152601a60248201527f54726164696e67206973206e6f7420656e61626c6564207965740000000000006044820152606401610a30565b6040516370a0823160e01b81523060048201526000805160206136d6833981519152906370a0823190602401602060405180830381865afa15801561145c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114809190613390565b905090565b606060048054610b23906132f4565b61149c6119b0565b600f546000036114ee5760405162461bcd60e51b815260206004820152601760248201527f50726573616c65206e6f742073746172746564207965740000000000000000006044820152606401610a30565b600b54600160a81b900460ff16156115485760405162461bcd60e51b815260206004820152601b60248201527f4c50206372656174696f6e20616c7265616479207374617274656400000000006044820152606401610a30565b6040516370a0823160e01b81523060048201526000906000805160206136d6833981519152906370a0823190602401602060405180830381865afa158015611594573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115b89190613390565b9050600081116116005760405162461bcd60e51b81526020600482015260136024820152724e6f20546974616e5820617661696c61626c6560681b6044820152606401610a30565b6c02863c1f5cdae42f954000000081101561167557600f544210156116675760405162461bcd60e51b815260206004820152601860248201527f50726573616c65206e6f742066696e69736865642079657400000000000000006044820152606401610a30565b61167081611de7565b61168b565b61168b6c02863c1f5cdae42f9540000000611de7565b50600b805460ff60a81b1916600160a81b179055565b600033610bb4818585611a98565b60006116b96113b7565b9050600081116117035760405162461bcd60e51b81526020600482015260156024820152744e6f7468696e6720746f206469737472696275746560581b6044820152606401610a30565b600b54610eb6906000805160206136d6833981519152906001600160a01b031683611f69565b6117316119b0565b6001600160a01b03919091166000908152601560205260409020805460ff1916911515919091179055565b600f5442106117a25760405162461bcd60e51b815260206004820152601260248201527150726573616c65206e6f742061637469766560701b6044820152606401610a30565b600081116117ed5760405162461bcd60e51b815260206004820152601860248201527743616e6e6f74207075726368617365203020746f6b656e7360401b6044820152606401610a30565b6118076000805160206136d6833981519152333084611fc8565b610eb68133612001565b600f5442106118575760405162461bcd60e51b815260206004820152601260248201527150726573616c65206e6f742061637469766560701b6044820152606401610a30565b600082116118a25760405162461bcd60e51b815260206004820152601860248201527743616e6e6f74207075726368617365203020746f6b656e7360401b6044820152606401610a30565b60006118ae8383612061565b90506118ba8133612001565b505050565b6118c76119b0565b6001600160a01b03811661191d5760405162461bcd60e51b815260206004820152601d60248201527f54726561737572792061646472657373206e6f742070726f76696465640000006044820152606401610a30565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b6119476119b0565b600680546001600160a01b0383166001600160a01b031990911681179091556119786005546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6005546001600160a01b031633146111cd5760405163118cdaa760e01b8152336004820152602401610a30565b6118ba83838360016121d8565b6001600160a01b038216611a145760405163ec442f0560e01b815260006004820152602401610a30565b6111b7600083836122ad565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198114610c335781811015611a8957604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610a30565b610c33848484840360006121d8565b6001600160a01b038316611ac257604051634b637e8f60e11b815260006004820152602401610a30565b6001600160a01b038216611aec5760405163ec442f0560e01b815260006004820152602401610a30565b6118ba8383836122ad565b60606000610e36836123c5565b6001600160a01b038216611b2e57604051634b637e8f60e11b815260006004820152602401610a30565b6111b7826000836122ad565b600073fcd7ccee4071aa4ecfac1683b7cc0afecaf42a35196001600160a01b03861601611b7457611b6d85858585612421565b9050611c5c565b6001600160a01b038516739f278dc799bbc61ecb8e5fb8035cbfa29803623b1480611bbb57506001600160a01b03851673cc7ed2ab6c3396ddbc4316d2d7c1b59ff9d2091f145b80611be257506001600160a01b03851673a99afcc6aa4530d01dfff8e55ec66e4c424c048c145b15611c0857611b6d857396a5399d07896f757bd4c6ef56461f58db9518628686866125e0565b73bfde5ac4f5adb419a931a5bf64b0f3bb5a623d05196001600160a01b03861601611c4d57611b6d8572f116ac0c304c570daaa68fa6c30a86a04b5c5f8686866125e0565b611c598585858561272a565b90505b949350505050565b60008181526001830160205260408120541515610e36565b6000610e36838361282c565b600680546001600160a01b0319169055610eb68161291f565b600080611cad87612971565b90925090508115611cc457611cc481878785612add565b611cce30866119ea565b611ced30737a250d5630b4cf539739df2c5dacb4c659f2488d87612b5a565b611d156001600160a01b038816737a250d5630b4cf539739df2c5dacb4c659f2488d88612b5a565b60405162e8e33760e81b81523060048201526001600160a01b038816602482015260448101869052606481018790526084810184905260a48101859052600060c48201524260e4820152737a250d5630b4cf539739df2c5dacb4c659f2488d9063e8e3370090610104016060604051808303816000875af1158015611d9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dc291906133a9565b5050506001600160a01b03909616600090815260126020526040812055505050505050565b60006064611df6600684613357565b611e00919061336e565b905060006064611e11600485613357565b611e1b919061336e565b600854909150611e44906000805160206136d6833981519152906001600160a01b031684611f69565b600754611e6a906000805160206136d6833981519152906001600160a01b031683611f69565b80611e7583856133d7565b611e7f91906133d7565b600c8190556000805160206136d683398151915260009081527fadc5d8297f4d8242f844350f6c88dfb1591a841f7771fb5a638ea17158464db4805460ff1916600517905560136020527fe0392139129918f139800299d5bac327dd79450cbfd0dfff1a679e12fd75022d549091606491611f009160ff9190911690613357565b611f0a919061336e565b6000805160206136d6833981519152600090815260126020527fd47ac8835ac20c1ee162f9cf7ad6aeba54a41a0425f073b6593905e4f93d7caa829055600d80549293508392909190611f5e908490613344565b909155505050505050565b6040516001600160a01b038381166024830152604482018390526118ba91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050612be4565b6040516001600160a01b038481166024830152838116604483015260648201839052610c339186918216906323b872dd90608401611f96565b60408051808201825242815260208082018581526010805460009081526011845285812094518555915160019094019390935591546001600160a01b0385168352601790915291902061205391612c47565b505060108054600101905550565b600073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b1580156120b257600080fd5b505af11580156120c6573d6000803e3d6000fd5b5050604080516101008101825273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28082526000805160206136d6833981519152602083015261271092820192909252306060820152608081018790523460a0820181905260c08201899052600060e0830152909450612152935090915073e592427a0aece92de3edee1f18e0157c0586156490612b5a565b60405163414bf38960e01b815260009073e592427a0aece92de3edee1f18e0157c058615649063414bf3899061218c9085906004016133ea565b6020604051808303816000875af11580156121ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121cf9190613390565b95945050505050565b6001600160a01b0384166122025760405163e602df0560e01b815260006004820152602401610a30565b6001600160a01b03831661222c57604051634a1406b160e11b815260006004820152602401610a30565b6001600160a01b0380851660009081526001602090815260408083209387168352929052208290558015610c3357826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161229f91815260200190565b60405180910390a350505050565b600b54600160b81b900460ff1661232a576001600160a01b0383163014806122dc57506001600160a01b038316155b156122ec576118ba838383612c53565b60405162461bcd60e51b8152602060048201526013602482015272151c98591a5b99c81a5cc8191a5cd8589b1959606a1b6044820152606401610a30565b6001600160a01b03821660009081526014602052604090205460ff168061236957506001600160a01b03831660009081526015602052604090205460ff165b15612379576118ba838383612c53565b6000612386600f54421090565b612391576004612394565b60105b600a5490915060648383020490818403906123ba9087906001600160a01b031684612c53565b6110b5868683612c53565b60608160000180548060200260200160405190810160405280929190818152602001828054801561241557602002820191906000526020600020905b815481526020019060010190808311612401575b50505050509050919050565b60008083116124725760405162461bcd60e51b815260206004820152601960248201527f6d696e416d6f756e744f7574206e6f742070726f7669646564000000000000006044820152606401610a30565b61249f6000805160206136d6833981519152737a250d5630b4cf539739df2c5dacb4c659f2488d86612b5a565b6040805160028082526060820183526000926020830190803683370190505090506000805160206136d6833981519152816000815181106124e2576124e2613469565b60200260200101906001600160a01b031690816001600160a01b031681525050858160018151811061251657612516613469565b6001600160a01b03909216602092830291909101909101526040516338ed173960e01b8152600090737a250d5630b4cf539739df2c5dacb4c659f2488d906338ed1739906125709089908990879030908b9060040161347f565b6000604051808303816000875af115801561258f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526125b791908101906134f2565b9050806001815181106125cc576125cc613469565b602002602001015192505050949350505050565b60405173f19308f923582a6f7c465e5ce7a9dc1bec6665b160601b602082015261027160ec1b60348201819052606086811b6bffffffffffffffffffffffff199081166037850152604b84019290925287901b16604e820152600090819060620160408051601f1981840301815260a083018252808352306020840152908201859052606082018790526080820186905291506126a06000805160206136d683398151915273e592427a0aece92de3edee1f18e0157c0586156488612b5a565b60405163c04b8d5960e01b815260009073e592427a0aece92de3edee1f18e0157c058615649063c04b8d59906126da9085906004016135b0565b6020604051808303816000875af11580156126f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061271d9190613390565b9998505050505050505050565b60408051610100810182526000805160206136d68339815191528082526001600160a01b0387166020830152612710928201929092523060608201526080810183905260a0810185905260c08101849052600060e08201819052916127a49073e592427a0aece92de3edee1f18e0157c0586156487612b5a565b60405163414bf38960e01b815260009073e592427a0aece92de3edee1f18e0157c058615649063414bf389906127de9085906004016133ea565b6020604051808303816000875af11580156127fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128219190613390565b979650505050505050565b600081815260018301602052604081205480156129155760006128506001836133d7565b8554909150600090612864906001906133d7565b90508082146128c957600086600001828154811061288457612884613469565b90600052602060002001549050808760000184815481106128a7576128a7613469565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806128da576128da613608565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506109e0565b60009150506109e0565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60405163e6a4390560e01b81523060048201526001600160a01b038216602482015260009081908190735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f9063e6a4390590604401602060405180830381865afa1580156129d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129fa919061361e565b90506001600160a01b038116612a1557600094909350915050565b6000819050600080826001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa158015612a5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a7f9190613657565b5091509150816001600160701b0316600014612aaa57506001600160701b0316959194509092505050565b6001600160701b03811615612ace576001600160701b031696929550919350505050565b50600096929550919350505050565b600083612aea8484613357565b612af4919061336e565b9050612b0085826119ea565b846001600160a01b031663fff6cae96040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612b3b57600080fd5b505af1158015612b4f573d6000803e3d6000fd5b505050505050505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526000919085169063dd62ed3e90604401602060405180830381865afa158015612baa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bce9190613390565b9050610c338484612bdf8585613344565b612d7d565b6000612bf96001600160a01b03841683612e0d565b90508051600014158015612c1e575080806020019051810190612c1c919061369c565b155b156118ba57604051635274afe760e01b81526001600160a01b0384166004820152602401610a30565b6000610e368383612e1b565b6001600160a01b038316612c7e578060026000828254612c739190613344565b90915550612cf09050565b6001600160a01b03831660009081526020819052604090205481811015612cd15760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610a30565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b038216612d0c57600280548290039055612d2b565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051612d7091815260200190565b60405180910390a3505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052612dce8482612e6a565b610c33576040516001600160a01b03848116602483015260006044830152612e0391869182169063095ea7b390606401611f96565b610c338482612be4565b6060610e3683836000612f0d565b6000818152600183016020526040812054612e62575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556109e0565b5060006109e0565b6000806000846001600160a01b031684604051612e8791906136b9565b6000604051808303816000865af19150503d8060008114612ec4576040519150601f19603f3d011682016040523d82523d6000602084013e612ec9565b606091505b5091509150818015612ef3575080511580612ef3575080806020019051810190612ef3919061369c565b80156121cf5750505050506001600160a01b03163b151590565b606081471015612f325760405163cd78605960e01b8152306004820152602401610a30565b600080856001600160a01b03168486604051612f4e91906136b9565b60006040518083038185875af1925050503d8060008114612f8b576040519150601f19603f3d011682016040523d82523d6000602084013e612f90565b606091505b5091509150612fa0868383612faa565b9695505050505050565b606082612fbf57612fba82613006565b610e36565b8151158015612fd657506001600160a01b0384163b155b15612fff57604051639996b31560e01b81526001600160a01b0385166004820152602401610a30565b5080610e36565b8051156130165780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b60006020828403121561304157600080fd5b81356001600160e01b031981168114610e3657600080fd5b60005b8381101561307457818101518382015260200161305c565b50506000910152565b60008151808452613095816020860160208601613059565b601f01601f19169290920160200192915050565b602081526000610e36602083018461307d565b6001600160a01b0381168114610eb657600080fd5b600080604083850312156130e457600080fd5b82356130ef816130bc565b946020939093013593505050565b6000806040838503121561311057600080fd5b823591506020830135613122816130bc565b809150509250929050565b60008060006060848603121561314257600080fd5b833561314d816130bc565b9250602084013561315d816130bc565b9150604084013561316d816130bc565b809150509250925092565b60006020828403121561318a57600080fd5b8135610e36816130bc565b6000806000606084860312156131aa57600080fd5b83356131b5816130bc565b925060208401356131c5816130bc565b929592945050506040919091013590565b6020808252825182820181905260009190848201906040850190845b8181101561320e578351835292840192918401916001016131f2565b50909695505050505050565b8015158114610eb657600080fd5b6000806040838503121561323b57600080fd5b8235613246816130bc565b915060208301356131228161321a565b60006020828403121561326857600080fd5b5035919050565b60008060006060848603121561328457600080fd5b833561328f816130bc565b95602085013595506040909401359392505050565b600080604083850312156132b757600080fd5b82356132c2816130bc565b91506020830135613122816130bc565b600080604083850312156132e557600080fd5b50508035926020909101359150565b600181811c9082168061330857607f821691505b60208210810361332857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156109e0576109e061332e565b80820281158282048414176109e0576109e061332e565b60008261338b57634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156133a257600080fd5b5051919050565b6000806000606084860312156133be57600080fd5b8351925060208401519150604084015190509250925092565b818103818111156109e0576109e061332e565b81516001600160a01b03908116825260208084015182169083015260408084015162ffffff16908301526060808401518216908301526080808401519083015260a0838101519083015260c0808401519083015260e09283015116918101919091526101000190565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600060a08201878352602087602085015260a0604085015281875180845260c08601915060208901935060005b818110156134d15784516001600160a01b0316835293830193918301916001016134ac565b50506001600160a01b03969096166060850152505050608001529392505050565b6000602080838503121561350557600080fd5b825167ffffffffffffffff8082111561351d57600080fd5b818501915085601f83011261353157600080fd5b81518181111561354357613543613453565b8060051b604051601f19603f8301168101818110858211171561356857613568613453565b60405291825284820192508381018501918883111561358657600080fd5b938501935b828510156135a45784518452938501939285019261358b565b98975050505050505050565b602081526000825160a060208401526135cc60c084018261307d565b905060018060a01b0360208501511660408401526040840151606084015260608401516080840152608084015160a08401528091505092915050565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561363057600080fd5b8151610e36816130bc565b80516001600160701b038116811461365257600080fd5b919050565b60008060006060848603121561366c57600080fd5b6136758461363b565b92506136836020850161363b565b9150604084015163ffffffff8116811461316d57600080fd5b6000602082840312156136ae57600080fd5b8151610e368161321a565b600082516136cb818460208701613059565b919091019291505056fe000000000000000000000000f19308f923582a6f7c465e5ce7a9dc1bec6665b1a2646970667358221220d6232243218f8cf86d17f6a9e557456239479fc914690fdae307d6453bd1600264736f6c63430008180033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000d71f00133f2fb35793ac96fa5a2f0df9bff81f0f00000000000000000000000047e126330f9ef54fc9ce64a672166c974a17abde00000000000000000000000015e5b9b9adf208cc7ca3ae1e6a49506eb5f397dd00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000280000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000f19308f923582a6f7c465e5ce7a9dc1bec6665b1000000000000000000000000e2cfd7a01ec63875cd9da6c7c1b7025166c2fa2f0000000000000000000000002614f29c39de46468a921fd0b41fdd99a01f2edf00000000000000000000000096a5399d07896f757bd4c6ef56461f58db9518620000000000000000000000009f278dc799bbc61ecb8e5fb8035cbfa29803623b000000000000000000000000cc7ed2ab6c3396ddbc4316d2d7c1b59ff9d2091f000000000000000000000000a99afcc6aa4530d01dfff8e55ec66e4c424c048c000000000000000000000000fcd7ccee4071aa4ecfac1683b7cc0afecaf42a3600000000000000000000000000f116ac0c304c570daaa68fa6c30a86a04b5c5f000000000000000000000000bfde5ac4f5adb419a931a5bf64b0f3bb5a623d0600000000000000000000000066b5228cfd34d9f4d9f03188d67816286c7c0b74000000000000000000000000d60abfb751db36514a592963fd71dd50c6cf9ba9000000000000000000000000db04fb08378129621634c151e9b61fef569479200000000000000000000000006532b3f1e4dbff542fbd6befe5ed7041c10b385a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000009000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000005
-----Decoded View---------------
Arg [0] : _owner (address): 0xD71f00133F2FB35793Ac96FA5A2f0dF9Bff81f0f
Arg [1] : _devWallet (address): 0x47E126330f9eF54FC9Ce64A672166C974A17ABDE
Arg [2] : _treasury (address): 0x15E5B9B9Adf208cC7CA3aE1e6a49506eB5f397Dd
Arg [3] : _ecosystemTokens (address[]): 0xF19308F923582A6f7c465e5CE7a9Dc1BEC6665B1,0xE2cfD7a01ec63875cd9Da6C7c1B7025166c2fA2F,0x2614f29C39dE46468A921Fd0b41fdd99A01f2EDf,0x96a5399D07896f757Bd4c6eF56461F58DB951862,0x9f278Dc799BbC61ecB8e5Fb8035cbfA29803623B,0xCC7ed2ab6c3396DdBc4316D2d7C1b59ff9d2091F,0xa99AFcC6Aa4530d01DFFF8E55ec66E4C424c048c,0xfcd7cceE4071aA4ecFAC1683b7CC0aFeCAF42A36,0x00F116ac0c304C570daAA68FA6c30a86A04B5C5F,0xBFDE5ac4f5Adb419A931a5bF64B0f3BB5a623d06,0x66b5228CfD34d9f4d9f03188d67816286C7c0b74,0xD60ABFB751dB36514a592963fD71DD50c6CF9Ba9,0xDB04fb08378129621634C151E9b61FEf56947920,0x6532B3F1e4DBff542fbD6befE5Ed7041c10B385a
Arg [4] : _lpPercentages (uint8[]): 8,8,8,12,8,8,3,8,10,5,9,3,5,5
-----Encoded View---------------
35 Constructor Arguments found :
Arg [0] : 000000000000000000000000d71f00133f2fb35793ac96fa5a2f0df9bff81f0f
Arg [1] : 00000000000000000000000047e126330f9ef54fc9ce64a672166c974a17abde
Arg [2] : 00000000000000000000000015e5b9b9adf208cc7ca3ae1e6a49506eb5f397dd
Arg [3] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000280
Arg [5] : 000000000000000000000000000000000000000000000000000000000000000e
Arg [6] : 000000000000000000000000f19308f923582a6f7c465e5ce7a9dc1bec6665b1
Arg [7] : 000000000000000000000000e2cfd7a01ec63875cd9da6c7c1b7025166c2fa2f
Arg [8] : 0000000000000000000000002614f29c39de46468a921fd0b41fdd99a01f2edf
Arg [9] : 00000000000000000000000096a5399d07896f757bd4c6ef56461f58db951862
Arg [10] : 0000000000000000000000009f278dc799bbc61ecb8e5fb8035cbfa29803623b
Arg [11] : 000000000000000000000000cc7ed2ab6c3396ddbc4316d2d7c1b59ff9d2091f
Arg [12] : 000000000000000000000000a99afcc6aa4530d01dfff8e55ec66e4c424c048c
Arg [13] : 000000000000000000000000fcd7ccee4071aa4ecfac1683b7cc0afecaf42a36
Arg [14] : 00000000000000000000000000f116ac0c304c570daaa68fa6c30a86a04b5c5f
Arg [15] : 000000000000000000000000bfde5ac4f5adb419a931a5bf64b0f3bb5a623d06
Arg [16] : 00000000000000000000000066b5228cfd34d9f4d9f03188d67816286c7c0b74
Arg [17] : 000000000000000000000000d60abfb751db36514a592963fd71dd50c6cf9ba9
Arg [18] : 000000000000000000000000db04fb08378129621634c151e9b61fef56947920
Arg [19] : 0000000000000000000000006532b3f1e4dbff542fbd6befe5ed7041c10b385a
Arg [20] : 000000000000000000000000000000000000000000000000000000000000000e
Arg [21] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [22] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [23] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [24] : 000000000000000000000000000000000000000000000000000000000000000c
Arg [25] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [26] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [27] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [28] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [29] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [30] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [31] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [32] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [33] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [34] : 0000000000000000000000000000000000000000000000000000000000000005
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.