ERC-20
Overview
Max Total Supply
20,241,534.455329817 IERC-V1
Holders
28
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 9 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
IERCSwapV1
Compiler Version
v0.8.12+commit.f00d7308
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.12; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; contract IERCSwapV1 is ERC20, Ownable, ReentrancyGuard { uint256 public constant TICK_DECIMAL = 8; uint256 public MINIMUM_LIQUIDITY = 1000 * 10 ** TICK_DECIMAL; // minimum amount (denominated in wei) uint256 public treasuryFee = 10; // treasury rate for lp (e.g. 10 = 1%) uint256 public swapFeeRate = 3; //swap fee rate (e.g. 3 = 0.3%) uint256 private swapFee; // swap fee amount that was not claimed bytes4 public constant tick = "ethi"; uint256 private reserve0; // uses single storage slot, accessible via getReserves uint256 private reserve1; // uses single storage slot, accessible via getReserves uint256 public kLast; // reserve0 * reserve1, as of immediately after the most recent liquidity event uint256 private unlocked = 1; modifier lock() { require(unlocked == 1, "IERCSwapV1: LOCKED"); unlocked = 0; _; unlocked = 1; } mapping(address => bool) public signers; mapping(uint256 => uint256) public claimedTx; event Mint(address indexed to, uint256 amount0, uint256 amount1); event Burn(address indexed to, uint256 amount0, uint256 amount1); event Swap( address indexed to, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out ); event TicketUsed( address indexed from, bytes4 tick, uint256 amount, uint256 txId ); event TickTransfer(address indexed to, bytes4 tick, uint256 amount); constructor() ERC20("IERCswap V1", "IERC-V1") {} function claimTicket( uint256 txId, uint256 amount, address to, bytes4 tick_, bytes memory signature ) public nonReentrant { require(amount > 0, "Invalid amount"); require(claimedTx[txId] == 0, "claimed"); require(tick == tick_, "Invalid tick"); address signer = ECDSA.recover( getMessageHash(txId, amount, msg.sender, to, tick), signature ); require(signers[signer], "Signer is not valid"); claimedTx[txId] = amount; emit TicketUsed(msg.sender, tick_, amount, txId); emit TickTransfer(msg.sender, tick_, amount); } function initPool( uint256 txId, uint256 amount, address to, bytes4 tick_, bytes memory signature ) public payable onlyOwner { require(amount > 0, "Invalid amount"); require(claimedTx[txId] == 0, "claimed"); require(tick == tick_, "Invalid tick"); require(reserve0 == 0, "initialnized"); address signer = ECDSA.recover( getMessageHash(txId, amount, msg.sender, to, tick), signature ); require(signers[signer], "Signer is not valid"); claimedTx[txId] = amount; uint256 amount0In = amount; uint256 amount1In = msg.value; reserve0 = amount0In; reserve1 = amount1In; uint256 liquidity = Math.sqrt(amount0In * amount1In); require(liquidity > 0, "IERCSwapV1: INSUFFICIENT_LIQUIDITY_MINTED"); _mint(to, liquidity); kLast = reserve0 * reserve1; // reserve0 and reserve1 are up-to-date emit TicketUsed(msg.sender, tick_, amount, txId); emit Mint(msg.sender, amount0In, amount1In); } function addLiquidity( uint256 txId, uint256 amount, address to, bytes4 tick_, bytes memory signature ) public payable nonReentrant { require(amount >= MINIMUM_LIQUIDITY, "Insufficient amount"); require(claimedTx[txId] == 0, "claimed"); require(tick == tick_, "Invalid tick"); address signer = ECDSA.recover( getMessageHash(txId, amount, msg.sender, to, tick), signature ); require(signers[signer], "Signer is not valid"); claimedTx[txId] = amount; uint256 amount0In = amount; uint256 ethMin = mint(msg.sender, amount0In); emit TicketUsed(msg.sender, tick_, amount, txId); refundIfOver(ethMin); } function removeLiquidity(uint256 amount) public nonReentrant { require(amount > 0, "Invalid amount"); transfer(address(this), amount); burn(msg.sender); } function getAmountOut( uint256 amountIn, uint256 reserveIn, uint256 reserveOut ) public view returns (uint256 amountOut) { require(amountIn > 0, "IERCSwapV1: INSUFFICIENT_INPUT_AMOUNT"); require( reserveIn > 0 && reserveOut > 0, "IERCSwapV1: INSUFFICIENT_LIQUIDITY" ); uint256 amountInWithFee = amountIn * (1000 - treasuryFee); uint256 numerator = amountInWithFee * reserveOut; uint256 denominator = reserveIn * 1000 + amountInWithFee; amountOut = numerator / denominator; } function mint( address to, uint256 amount0In //ethi ) internal lock returns (uint256 ethMin) { ethMin = (amount0In * reserve1) / reserve0; uint256 liquidity = Math.sqrt(amount0In * ethMin); require(liquidity > 0, "IERCSwapV1: INSUFFICIENT_LIQUIDITY_MINTED"); _mint(to, liquidity); reserve0 += amount0In; reserve1 += ethMin; kLast = reserve0 * reserve1; // reserve0 and reserve1 are up-to-date emit Mint(to, amount0In, ethMin); } function burn( address to ) internal lock returns (uint256 amount0, uint256 amount1) { // gas savings uint256 liquidity = balanceOf(address(this)); uint256 _totalSupply = totalSupply(); // gas savings, must be defined here since totalSupply can update in _mintFee amount0 = (liquidity * reserve0) / _totalSupply; // using balances ensures pro-rata distribution amount1 = (liquidity * reserve1) / _totalSupply; // using balances ensures pro-rata distribution require( amount0 > 0 && amount1 > 0, "IERCSwapV1: INSUFFICIENT_LIQUIDITY_BURNED" ); _burn(address(this), liquidity); _safeTransferETH(to, amount1); reserve0 -= amount0; reserve1 -= amount1; kLast = reserve0 * reserve1; // reserve0 and reserve1 are up-to-date emit Burn(to, amount0, amount1); emit TickTransfer(to, tick, amount0); } function swapExact0For1( uint256 txId, uint256 amount, address to, bytes4 tick_, bytes memory signature, uint256 amount1OutMin ) public nonReentrant { require(amount > 0, "Invalid amount"); require(claimedTx[txId] == 0, "claimed"); require(tick == tick_, "Invalid tick"); address signer = ECDSA.recover( getMessageHash(txId, amount, msg.sender, to, tick), signature ); require(signers[signer], "Signer is not valid"); claimedTx[txId] = amount; uint256 amount0In = amount; uint256 amount1Out = getAmountOut(amount0In, reserve0, reserve1); require(amount1Out >= amount1OutMin, "Invalid amount out"); swap(true, amount0In, 0, 0, amount1Out, msg.sender, tick); emit TicketUsed(msg.sender, tick_, amount, txId); } function swapExact1For0(uint256 amount0OutMin) public payable nonReentrant { uint256 amount = msg.value; uint256 fee = amount * swapFeeRate / 1000; swapFee += fee; uint256 amount1In = amount - fee; require(amount1In > 0, "Invalid value"); uint256 amount0Out = getAmountOut(amount1In, reserve1, reserve0); require(amount0Out >= amount0OutMin, "Invalid amount out"); swap(false, 0, amount1In, amount0Out, 0, msg.sender, tick); } function swap( bool isSwap0For1, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address to, bytes4 tick_ ) internal lock { require( amount0Out > 0 || amount1Out > 0, "IERCSwapV1: INSUFFICIENT_OUTPUT_AMOUNT" ); require( amount0Out < reserve0 && amount1Out < reserve1, "IERCSwapV1: INSUFFICIENT_LIQUIDITY" ); (uint256 _reserve0, uint256 _reserve1) = getReserves(); // gas savings if (amount0Out > 0) emit TickTransfer(to, tick_, amount0Out); // optimistically transfer tokens if (amount1Out > 0) { uint256 fee = amount1Out * swapFeeRate / 1000; swapFee += fee; _safeTransferETH(to, amount1Out - fee); // optimistically transfer tokens } require( amount0In > 0 || amount1In > 0, "IERCSwapV1: INSUFFICIENT_INPUT_AMOUNT" ); if (isSwap0For1) { reserve0 += amount0In; reserve1 -= amount1Out; } else { reserve0 -= amount0Out; reserve1 += amount1In; } require( (reserve0 * reserve1) >= uint256(_reserve0 * _reserve1), "IERCSwapV1: K" ); emit Swap(to, amount0In, amount1In, amount0Out, amount1Out); } function getReserves() public view returns (uint256 _reserve0, uint256 _reserve1) { _reserve0 = reserve0; _reserve1 = reserve1; } function emergencyWithdraw(uint256 amount) public onlyOwner { _safeTransferETH(msg.sender, amount); } function claimSwapFee() public onlyOwner { _safeTransferETH(msg.sender, swapFee); swapFee = 0; } function setMinLiqAmount(uint256 _minLiqAmount) public onlyOwner { require(_minLiqAmount > 0, "Must be superior to 0"); MINIMUM_LIQUIDITY = _minLiqAmount; } function setTreasuryFee(uint256 _treasuryFee) public onlyOwner { treasuryFee = _treasuryFee; } function setSwapFee(uint256 _fee) public onlyOwner { swapFeeRate = _fee; } function recoverToken(address _token, uint256 _amount) public onlyOwner { IERC20(_token).transfer(address(msg.sender), _amount); } function setSigner(address signer, bool b) public onlyOwner { signers[signer] = b; } receive() external payable {} function getMessageHash( uint256 txId, uint256 amount, address from, address to, bytes4 tick_ ) public pure returns (bytes32) { return keccak256( abi.encodePacked( "\x19Ethereum Signed Message:\n32", keccak256(abi.encodePacked(txId, amount, from, to, tick_)) ) ); } function _safeTransferETH(address to, uint256 value) internal { (bool success, ) = to.call{value: value}(new bytes(0)); require(success, "ETH_TRANSFER_FAILED"); } function refundIfOver(uint256 price) private { require(msg.value >= price, "Need to send more ETH."); if (msg.value > price) { payable(msg.sender).transfer(msg.value - price); } } function decimals() public view virtual override returns (uint8) { return 9; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev 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 { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @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 { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.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. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the 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 override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `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. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer(address from, address to, uint256 amount) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by // decrementing then incrementing. _balances[to] += amount; } emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; unchecked { // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above. _balances[account] += amount; } emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; // Overflow not possible: amount <= accountBalance <= totalSupply. _totalSupply -= amount; } emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @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 amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV // Deprecated in v4.8 } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) { // 32 is the length in bytes of hash, // enforced by the type signature above /// @solidity memory-safe-assembly assembly { mstore(0x00, "\x19Ethereum Signed Message:\n32") mstore(0x1c, hash) message := keccak256(0x00, 0x3c) } } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) { /// @solidity memory-safe-assembly assembly { let ptr := mload(0x40) mstore(ptr, "\x19\x01") mstore(add(ptr, 0x02), domainSeparator) mstore(add(ptr, 0x22), structHash) data := keccak256(ptr, 0x42) } } /** * @dev Returns an Ethereum Signed Data with intended validator, created from a * `validator` and `data` according to the version 0 of EIP-191. * * See {recover}. */ function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x00", validator, data)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; import "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value)))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount0Out","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1Out","type":"uint256"}],"name":"Swap","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"bytes4","name":"tick","type":"bytes4"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TickTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"bytes4","name":"tick","type":"bytes4"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"txId","type":"uint256"}],"name":"TicketUsed","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":"MINIMUM_LIQUIDITY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TICK_DECIMAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"txId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes4","name":"tick_","type":"bytes4"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"addLiquidity","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimSwapFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"txId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes4","name":"tick_","type":"bytes4"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"claimTicket","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimedTx","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"reserveIn","type":"uint256"},{"internalType":"uint256","name":"reserveOut","type":"uint256"}],"name":"getAmountOut","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"txId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes4","name":"tick_","type":"bytes4"}],"name":"getMessageHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getReserves","outputs":[{"internalType":"uint256","name":"_reserve0","type":"uint256"},{"internalType":"uint256","name":"_reserve1","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"txId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes4","name":"tick_","type":"bytes4"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"initPool","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"kLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"recoverToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"removeLiquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minLiqAmount","type":"uint256"}],"name":"setMinLiqAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"bool","name":"b","type":"bool"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setSwapFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_treasuryFee","type":"uint256"}],"name":"setTreasuryFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"signers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"txId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes4","name":"tick_","type":"bytes4"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"uint256","name":"amount1OutMin","type":"uint256"}],"name":"swapExact0For1","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount0OutMin","type":"uint256"}],"name":"swapExact1For0","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"swapFeeRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tick","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
6080604052620000126008600a620002e1565b62000020906103e8620002f6565b600755600a60085560036009556001600e553480156200003f57600080fd5b50604080518082018252600b81526a494552437377617020563160a81b602080830191825283518085019094526007845266494552432d563160c81b908401528151919291620000929160039162000126565b508051620000a890600490602084019062000126565b505050620000c5620000bf620000d060201b60201c565b620000d4565b600160065562000355565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001349062000318565b90600052602060002090601f016020900481019282620001585760008555620001a3565b82601f106200017357805160ff1916838001178555620001a3565b82800160010185558215620001a3579182015b82811115620001a357825182559160200191906001019062000186565b50620001b1929150620001b5565b5090565b5b80821115620001b15760008155600101620001b6565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111562000223578160001904821115620002075762000207620001cc565b808516156200021557918102915b93841c9390800290620001e7565b509250929050565b6000826200023c57506001620002db565b816200024b57506000620002db565b81600181146200026457600281146200026f576200028f565b6001915050620002db565b60ff841115620002835762000283620001cc565b50506001821b620002db565b5060208310610133831016604e8410600b8410161715620002b4575081810a620002db565b620002c08383620001e2565b8060001904821115620002d757620002d7620001cc565b0290505b92915050565b6000620002ef83836200022b565b9392505050565b6000816000190483118215151615620003135762000313620001cc565b500290565b600181811c908216806200032d57607f821691505b602082108114156200034f57634e487b7160e01b600052602260045260246000fd5b50919050565b612bcc80620003656000396000f3fe6080604052600436106102295760003560e01c806370a08231116101235780639c8f9f23116100ab578063cc32d1761161006f578063cc32d17614610646578063d46343381461065c578063dd62ed3e1461067c578063f2fde38b1461069c578063fd8fd095146106bc57600080fd5b80639c8f9f23146105b0578063a457c2d7146105d0578063a9059cbb146105f0578063b29a814014610610578063ba9a7a561461063057600080fd5b806377e741c7116100f257806377e741c7146105295780637a376cd514610549578063826e468d1461055e5780638da5cb5b1461057357806395d89b411461059b57600080fd5b806370a0823114610498578063715018a6146104ce578063736c0d5b146104e35780637464fc3d1461051357600080fd5b8063313ce567116101b15780633a04801d116101755780633a04801d146104085780633eaf5d9f1461041e5780635312ea8e14610452578063651c82fc14610472578063662eda9e1461048557600080fd5b8063313ce5671461036c57806331cb61051461038857806334e19907146103a857806336a48124146103c857806339509351146103e857600080fd5b80630b34f8b2116101f85780630b34f8b2146102e257806318160ddd1461030457806320484aed1461031957806323b872dd1461032c5780632d7377941461034c57600080fd5b8063054d50d41461023557806306fdde03146102685780630902f1ac1461028a578063095ea7b3146102b257600080fd5b3661023057005b600080fd5b34801561024157600080fd5b506102556102503660046124df565b6106e9565b6040519081526020015b60405180910390f35b34801561027457600080fd5b5061027d61079b565b60405161025f9190612537565b34801561029657600080fd5b50600b54600c546040805192835260208301919091520161025f565b3480156102be57600080fd5b506102d26102cd366004612586565b61082d565b604051901515815260200161025f565b3480156102ee57600080fd5b506103026102fd36600461266b565b610845565b005b34801561031057600080fd5b50600254610255565b6103026103273660046126dd565b6109b7565b34801561033857600080fd5b506102d26103473660046126f6565b610ac8565b34801561035857600080fd5b506103026103673660046126dd565b610aec565b34801561037857600080fd5b506040516009815260200161025f565b34801561039457600080fd5b506103026103a3366004612740565b610b41565b3480156103b457600080fd5b506103026103c33660046126dd565b610b74565b3480156103d457600080fd5b506103026103e3366004612777565b610b81565b3480156103f457600080fd5b506102d2610403366004612586565b610d2c565b34801561041457600080fd5b5061025560095481565b34801561042a57600080fd5b50610439636574686960e01b81565b6040516001600160e01b0319909116815260200161025f565b34801561045e57600080fd5b5061030261046d3660046126dd565b610d4e565b61030261048036600461266b565b610d60565b61030261049336600461266b565b610ec8565b3480156104a457600080fd5b506102556104b33660046127f1565b6001600160a01b031660009081526020819052604090205490565b3480156104da57600080fd5b506103026110c0565b3480156104ef57600080fd5b506102d26104fe3660046127f1565b600f6020526000908152604090205460ff1681565b34801561051f57600080fd5b50610255600d5481565b34801561053557600080fd5b506103026105443660046126dd565b6110d4565b34801561055557600080fd5b50610255600881565b34801561056a57600080fd5b506103026110e1565b34801561057f57600080fd5b506005546040516001600160a01b03909116815260200161025f565b3480156105a757600080fd5b5061027d6110fc565b3480156105bc57600080fd5b506103026105cb3660046126dd565b61110b565b3480156105dc57600080fd5b506102d26105eb366004612586565b611153565b3480156105fc57600080fd5b506102d261060b366004612586565b6111ce565b34801561061c57600080fd5b5061030261062b366004612586565b6111dc565b34801561063c57600080fd5b5061025560075481565b34801561065257600080fd5b5061025560085481565b34801561066857600080fd5b5061025561067736600461280c565b61125a565b34801561068857600080fd5b50610255610697366004612863565b611300565b3480156106a857600080fd5b506103026106b73660046127f1565b61132b565b3480156106c857600080fd5b506102556106d73660046126dd565b60106020526000908152604090205481565b60008084116107135760405162461bcd60e51b815260040161070a90612896565b60405180910390fd5b6000831180156107235750600082115b61073f5760405162461bcd60e51b815260040161070a906128db565b60006008546103e86107519190612933565b61075b908661294a565b90506000610769848361294a565b905060008261077a876103e861294a565b6107849190612969565b90506107908183612997565b979650505050505050565b6060600380546107aa906129b9565b80601f01602080910402602001604051908101604052809291908181526020018280546107d6906129b9565b80156108235780601f106107f857610100808354040283529160200191610823565b820191906000526020600020905b81548152906001019060200180831161080657829003601f168201915b5050505050905090565b60003361083b8185856113a1565b5060019392505050565b61084d6114c5565b6000841161086d5760405162461bcd60e51b815260040161070a906129f4565b600085815260106020526040902054156108995760405162461bcd60e51b815260040161070a90612a1c565b636574686960e01b6001600160e01b03198316146108c95760405162461bcd60e51b815260040161070a90612a3d565b60006108e86108e287873388636574686960e01b61125a565b8361151f565b6001600160a01b0381166000908152600f602052604090205490915060ff166109235760405162461bcd60e51b815260040161070a90612a63565b60008681526010602052604090819020869055513390600080516020612b778339815191529061095890869089908b90612a90565b60405180910390a2604080516001600160e01b0319851681526020810187905233917fdebdd87b2b023547564582998a711eaa10ae47c02ae47a8bc216b03147a81b8b910160405180910390a2506109b06001600655565b5050505050565b6109bf6114c5565b60095434906000906103e8906109d5908461294a565b6109df9190612997565b905080600a60008282546109f39190612969565b9091555060009050610a058284612933565b905060008111610a475760405162461bcd60e51b815260206004820152600d60248201526c496e76616c69642076616c756560981b604482015260640161070a565b6000610a5882600c54600b546106e9565b905084811015610a9f5760405162461bcd60e51b8152602060048201526012602482015271125b9d985b1a5908185b5bdd5b9d081bdd5d60721b604482015260640161070a565b610ab76000808484600033636574686960e01b611543565b50505050610ac56001600655565b50565b600033610ad6858285611810565b610ae185858561188a565b506001949350505050565b610af4611a2e565b60008111610b3c5760405162461bcd60e51b815260206004820152601560248201527404d757374206265207375706572696f7220746f203605c1b604482015260640161070a565b600755565b610b49611a2e565b6001600160a01b03919091166000908152600f60205260409020805460ff1916911515919091179055565b610b7c611a2e565b600955565b610b896114c5565b60008511610ba95760405162461bcd60e51b815260040161070a906129f4565b60008681526010602052604090205415610bd55760405162461bcd60e51b815260040161070a90612a1c565b636574686960e01b6001600160e01b0319841614610c055760405162461bcd60e51b815260040161070a90612a3d565b6000610c24610c1e88883389636574686960e01b61125a565b8461151f565b6001600160a01b0381166000908152600f602052604090205490915060ff16610c5f5760405162461bcd60e51b815260040161070a90612a63565b6000878152601060205260408120879055600b54600c54889291610c85918491906106e9565b905083811015610ccc5760405162461bcd60e51b8152602060048201526012602482015271125b9d985b1a5908185b5bdd5b9d081bdd5d60721b604482015260640161070a565b610ce46001836000808533636574686960e01b611543565b336001600160a01b0316600080516020612b77833981519152878a8c604051610d0f93929190612a90565b60405180910390a2505050610d246001600655565b505050505050565b60003361083b818585610d3f8383611300565b610d499190612969565b6113a1565b610d56611a2e565b610ac53382611a88565b610d686114c5565b600754841015610db05760405162461bcd60e51b8152602060048201526013602482015272125b9cdd59999a58da595b9d08185b5bdd5b9d606a1b604482015260640161070a565b60008581526010602052604090205415610ddc5760405162461bcd60e51b815260040161070a90612a1c565b636574686960e01b6001600160e01b0319831614610e0c5760405162461bcd60e51b815260040161070a90612a3d565b6000610e256108e287873388636574686960e01b61125a565b6001600160a01b0381166000908152600f602052604090205490915060ff16610e605760405162461bcd60e51b815260040161070a90612a63565b60008681526010602052604081208690558590610e7d3383611b3b565b9050336001600160a01b0316600080516020612b7783398151915286898b604051610eaa93929190612a90565b60405180910390a2610ebb81611c4e565b5050506109b06001600655565b610ed0611a2e565b60008411610ef05760405162461bcd60e51b815260040161070a906129f4565b60008581526010602052604090205415610f1c5760405162461bcd60e51b815260040161070a90612a1c565b636574686960e01b6001600160e01b0319831614610f4c5760405162461bcd60e51b815260040161070a90612a3d565b600b5415610f8b5760405162461bcd60e51b815260206004820152600c60248201526b1a5b9a5d1a585b1b9a5e995960a21b604482015260640161070a565b6000610fa46108e287873388636574686960e01b61125a565b6001600160a01b0381166000908152600f602052604090205490915060ff16610fdf5760405162461bcd60e51b815260040161070a90612a63565b6000868152601060205260408120869055600b86905534600c819055869161100f61100a838561294a565b611cd9565b9050600081116110315760405162461bcd60e51b815260040161070a90612ab2565b61103b8782611dc5565b600c54600b5461104b919061294a565b600d556040513390600080516020612b77833981519152906110729089908c908e90612a90565b60405180910390a2604080518481526020810184905233917f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f910160405180910390a2505050505050505050565b6110c8611a2e565b6110d26000611e84565b565b6110dc611a2e565b600855565b6110e9611a2e565b6110f533600a54611a88565b6000600a55565b6060600480546107aa906129b9565b6111136114c5565b600081116111335760405162461bcd60e51b815260040161070a906129f4565b61113d30826111ce565b5061114733611ed6565b5050610ac56001600655565b600033816111618286611300565b9050838110156111c15760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161070a565b610ae182868684036113a1565b60003361083b81858561188a565b6111e4611a2e565b60405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0383169063a9059cbb906044016020604051808303816000875af1158015611231573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112559190612afb565b505050565b60408051602080820197909752808201959095526bffffffffffffffffffffffff19606094851b8116858701529290931b90911660748401526001600160e01b03191660888301528051808303606c018152608c830182528051908401207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060ac84015260c8808401919091528151808403909101815260e89092019052805191012090565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b611333611a2e565b6001600160a01b0381166113985760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161070a565b610ac581611e84565b6001600160a01b0383166114035760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161070a565b6001600160a01b0382166114645760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161070a565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600260065414156115185760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161070a565b6002600655565b600080600061152e85856120aa565b9150915061153b816120f0565b509392505050565b600e546001146115655760405162461bcd60e51b815260040161070a90612b18565b6000600e55831515806115785750600083115b6115d35760405162461bcd60e51b815260206004820152602660248201527f494552435377617056313a20494e53554646494349454e545f4f55545055545f604482015265105353d5539560d21b606482015260840161070a565b600b54841080156115e55750600c5483105b6116015760405162461bcd60e51b815260040161070a906128db565b600080611611600b54600c549091565b9092509050851561166b57604080516001600160e01b031985168152602081018890526001600160a01b038616917fdebdd87b2b023547564582998a711eaa10ae47c02ae47a8bc216b03147a81b8b910160405180910390a25b84156116bd5760006103e860095487611684919061294a565b61168e9190612997565b905080600a60008282546116a29190612969565b909155506116bb9050856116b68389612933565b611a88565b505b60008811806116cc5750600087115b6116e85760405162461bcd60e51b815260040161070a90612896565b88156117245787600b60008282546117009190612969565b9250508190555084600c60008282546117199190612933565b909155506117559050565b85600b60008282546117369190612933565b9250508190555086600c600082825461174f9190612969565b90915550505b61175f818361294a565b600c54600b5461176f919061294a565b10156117ad5760405162461bcd60e51b815260206004820152600d60248201526c494552435377617056313a204b60981b604482015260640161070a565b6040805189815260208101899052908101879052606081018690526001600160a01b038516907f49926bbebe8474393f434dfa4f78694c0923efa07d19f2284518bfabd06eb7379060800160405180910390a250506001600e5550505050505050565b600061181c8484611300565b9050600019811461188457818110156118775760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161070a565b61188484848484036113a1565b50505050565b6001600160a01b0383166118ee5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161070a565b6001600160a01b0382166119505760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161070a565b6001600160a01b038316600090815260208190526040902054818110156119c85760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161070a565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3611884565b6005546001600160a01b031633146110d25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161070a565b604080516000808252602082019092526001600160a01b038416908390604051611ab29190612b44565b60006040518083038185875af1925050503d8060008114611aef576040519150601f19603f3d011682016040523d82523d6000602084013e611af4565b606091505b50509050806112555760405162461bcd60e51b815260206004820152601360248201527211551217d514905394d1915497d19052531151606a1b604482015260640161070a565b6000600e54600114611b5f5760405162461bcd60e51b815260040161070a90612b18565b6000600e55600b54600c54611b74908461294a565b611b7e9190612997565b90506000611b8f61100a838561294a565b905060008111611bb15760405162461bcd60e51b815260040161070a90612ab2565b611bbb8482611dc5565b82600b6000828254611bcd9190612969565b9250508190555081600c6000828254611be69190612969565b9091555050600c54600b54611bfb919061294a565b600d5560408051848152602081018490526001600160a01b038616917f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f910160405180910390a2506001600e5592915050565b80341015611c975760405162461bcd60e51b81526020600482015260166024820152752732b2b2103a379039b2b7321036b7b9329022aa241760511b604482015260640161070a565b80341115610ac557336108fc611cad8334612933565b6040518115909202916000818181858888f19350505050158015611cd5573d6000803e3d6000fd5b5050565b600081611ce857506000919050565b60006001611cf58461223e565b901c6001901b90506001818481611d0e57611d0e612981565b048201901c90506001818481611d2657611d26612981565b048201901c90506001818481611d3e57611d3e612981565b048201901c90506001818481611d5657611d56612981565b048201901c90506001818481611d6e57611d6e612981565b048201901c90506001818481611d8657611d86612981565b048201901c90506001818481611d9e57611d9e612981565b048201901c9050611dbe81828581611db857611db8612981565b046122d3565b9392505050565b6001600160a01b038216611e1b5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161070a565b8060026000828254611e2d9190612969565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600080600e54600114611efb5760405162461bcd60e51b815260040161070a90612b18565b6000600e81905530815260208190526040902054600254600b548190611f21908461294a565b611f2b9190612997565b935080600c5483611f3c919061294a565b611f469190612997565b9250600084118015611f585750600083115b611fb65760405162461bcd60e51b815260206004820152602960248201527f494552435377617056313a20494e53554646494349454e545f4c495155494449604482015268151657d0955493915160ba1b606482015260840161070a565b611fc030836122e9565b611fca8584611a88565b83600b6000828254611fdc9190612933565b9250508190555082600c6000828254611ff59190612933565b9091555050600c54600b5461200a919061294a565b600d5560408051858152602081018590526001600160a01b038716917f49995e5dd6158cf69ad3e9777c46755a1a826a446c6416992167462dad033b2a910160405180910390a260408051636574686960e01b8152602081018690526001600160a01b038716917fdebdd87b2b023547564582998a711eaa10ae47c02ae47a8bc216b03147a81b8b910160405180910390a250506001600e559092909150565b6000808251604114156120e15760208301516040840151606085015160001a6120d58782858561241b565b945094505050506120e9565b506000905060025b9250929050565b600081600481111561210457612104612b60565b141561210d5750565b600181600481111561212157612121612b60565b141561216f5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161070a565b600281600481111561218357612183612b60565b14156121d15760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161070a565b60038160048111156121e5576121e5612b60565b1415610ac55760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161070a565b600080608083901c1561225357608092831c92015b604083901c1561226557604092831c92015b602083901c1561227757602092831c92015b601083901c1561228957601092831c92015b600883901c1561229b57600892831c92015b600483901c156122ad57600492831c92015b600283901c156122bf57600292831c92015b600183901c156122cd576001015b92915050565b60008183106122e25781611dbe565b5090919050565b6001600160a01b0382166123495760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161070a565b6001600160a01b038216600090815260208190526040902054818110156123bd5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161070a565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561245257506000905060036124d6565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156124a6573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166124cf576000600192509250506124d6565b9150600090505b94509492505050565b6000806000606084860312156124f457600080fd5b505081359360208301359350604090920135919050565b60005b8381101561252657818101518382015260200161250e565b838111156118845750506000910152565b602081526000825180602084015261255681604085016020870161250b565b601f01601f19169190910160400192915050565b80356001600160a01b038116811461258157600080fd5b919050565b6000806040838503121561259957600080fd5b6125a28361256a565b946020939093013593505050565b80356001600160e01b03198116811461258157600080fd5b634e487b7160e01b600052604160045260246000fd5b600082601f8301126125ef57600080fd5b813567ffffffffffffffff8082111561260a5761260a6125c8565b604051601f8301601f19908116603f01168101908282118183101715612632576126326125c8565b8160405283815286602085880101111561264b57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a0868803121561268357600080fd5b853594506020860135935061269a6040870161256a565b92506126a8606087016125b0565b9150608086013567ffffffffffffffff8111156126c457600080fd5b6126d0888289016125de565b9150509295509295909350565b6000602082840312156126ef57600080fd5b5035919050565b60008060006060848603121561270b57600080fd5b6127148461256a565b92506127226020850161256a565b9150604084013590509250925092565b8015158114610ac557600080fd5b6000806040838503121561275357600080fd5b61275c8361256a565b9150602083013561276c81612732565b809150509250929050565b60008060008060008060c0878903121561279057600080fd5b86359550602087013594506127a76040880161256a565b93506127b5606088016125b0565b9250608087013567ffffffffffffffff8111156127d157600080fd5b6127dd89828a016125de565b92505060a087013590509295509295509295565b60006020828403121561280357600080fd5b611dbe8261256a565b600080600080600060a0868803121561282457600080fd5b853594506020860135935061283b6040870161256a565b92506128496060870161256a565b9150612857608087016125b0565b90509295509295909350565b6000806040838503121561287657600080fd5b61287f8361256a565b915061288d6020840161256a565b90509250929050565b60208082526025908201527f494552435377617056313a20494e53554646494349454e545f494e5055545f416040820152641353d5539560da1b606082015260800190565b60208082526022908201527f494552435377617056313a20494e53554646494349454e545f4c495155494449604082015261545960f01b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b6000828210156129455761294561291d565b500390565b60008160001904831182151516156129645761296461291d565b500290565b6000821982111561297c5761297c61291d565b500190565b634e487b7160e01b600052601260045260246000fd5b6000826129b457634e487b7160e01b600052601260045260246000fd5b500490565b600181811c908216806129cd57607f821691505b602082108114156129ee57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600e908201526d125b9d985b1a5908185b5bdd5b9d60921b604082015260600190565b60208082526007908201526618db185a5b595960ca1b604082015260600190565b6020808252600c908201526b496e76616c6964207469636b60a01b604082015260600190565b60208082526013908201527214da59db995c881a5cc81b9bdd081d985b1a59606a1b604082015260600190565b6001600160e01b03199390931683526020830191909152604082015260600190565b60208082526029908201527f494552435377617056313a20494e53554646494349454e545f4c495155494449604082015268151657d3525395115160ba1b606082015260800190565b600060208284031215612b0d57600080fd5b8151611dbe81612732565b60208082526012908201527112515490d4ddd85c158c4e881313d0d2d15160721b604082015260600190565b60008251612b5681846020870161250b565b9190910192915050565b634e487b7160e01b600052602160045260246000fdfef180eb1c6d87491f31bc1708c3410821a2f20a23d347773f8381abe16f15b460a2646970667358221220f17f3e01134e70a75bfc56daac35ed170f3bd58df66ad59f1cf03faeba1cb88764736f6c634300080c0033
Deployed Bytecode
0x6080604052600436106102295760003560e01c806370a08231116101235780639c8f9f23116100ab578063cc32d1761161006f578063cc32d17614610646578063d46343381461065c578063dd62ed3e1461067c578063f2fde38b1461069c578063fd8fd095146106bc57600080fd5b80639c8f9f23146105b0578063a457c2d7146105d0578063a9059cbb146105f0578063b29a814014610610578063ba9a7a561461063057600080fd5b806377e741c7116100f257806377e741c7146105295780637a376cd514610549578063826e468d1461055e5780638da5cb5b1461057357806395d89b411461059b57600080fd5b806370a0823114610498578063715018a6146104ce578063736c0d5b146104e35780637464fc3d1461051357600080fd5b8063313ce567116101b15780633a04801d116101755780633a04801d146104085780633eaf5d9f1461041e5780635312ea8e14610452578063651c82fc14610472578063662eda9e1461048557600080fd5b8063313ce5671461036c57806331cb61051461038857806334e19907146103a857806336a48124146103c857806339509351146103e857600080fd5b80630b34f8b2116101f85780630b34f8b2146102e257806318160ddd1461030457806320484aed1461031957806323b872dd1461032c5780632d7377941461034c57600080fd5b8063054d50d41461023557806306fdde03146102685780630902f1ac1461028a578063095ea7b3146102b257600080fd5b3661023057005b600080fd5b34801561024157600080fd5b506102556102503660046124df565b6106e9565b6040519081526020015b60405180910390f35b34801561027457600080fd5b5061027d61079b565b60405161025f9190612537565b34801561029657600080fd5b50600b54600c546040805192835260208301919091520161025f565b3480156102be57600080fd5b506102d26102cd366004612586565b61082d565b604051901515815260200161025f565b3480156102ee57600080fd5b506103026102fd36600461266b565b610845565b005b34801561031057600080fd5b50600254610255565b6103026103273660046126dd565b6109b7565b34801561033857600080fd5b506102d26103473660046126f6565b610ac8565b34801561035857600080fd5b506103026103673660046126dd565b610aec565b34801561037857600080fd5b506040516009815260200161025f565b34801561039457600080fd5b506103026103a3366004612740565b610b41565b3480156103b457600080fd5b506103026103c33660046126dd565b610b74565b3480156103d457600080fd5b506103026103e3366004612777565b610b81565b3480156103f457600080fd5b506102d2610403366004612586565b610d2c565b34801561041457600080fd5b5061025560095481565b34801561042a57600080fd5b50610439636574686960e01b81565b6040516001600160e01b0319909116815260200161025f565b34801561045e57600080fd5b5061030261046d3660046126dd565b610d4e565b61030261048036600461266b565b610d60565b61030261049336600461266b565b610ec8565b3480156104a457600080fd5b506102556104b33660046127f1565b6001600160a01b031660009081526020819052604090205490565b3480156104da57600080fd5b506103026110c0565b3480156104ef57600080fd5b506102d26104fe3660046127f1565b600f6020526000908152604090205460ff1681565b34801561051f57600080fd5b50610255600d5481565b34801561053557600080fd5b506103026105443660046126dd565b6110d4565b34801561055557600080fd5b50610255600881565b34801561056a57600080fd5b506103026110e1565b34801561057f57600080fd5b506005546040516001600160a01b03909116815260200161025f565b3480156105a757600080fd5b5061027d6110fc565b3480156105bc57600080fd5b506103026105cb3660046126dd565b61110b565b3480156105dc57600080fd5b506102d26105eb366004612586565b611153565b3480156105fc57600080fd5b506102d261060b366004612586565b6111ce565b34801561061c57600080fd5b5061030261062b366004612586565b6111dc565b34801561063c57600080fd5b5061025560075481565b34801561065257600080fd5b5061025560085481565b34801561066857600080fd5b5061025561067736600461280c565b61125a565b34801561068857600080fd5b50610255610697366004612863565b611300565b3480156106a857600080fd5b506103026106b73660046127f1565b61132b565b3480156106c857600080fd5b506102556106d73660046126dd565b60106020526000908152604090205481565b60008084116107135760405162461bcd60e51b815260040161070a90612896565b60405180910390fd5b6000831180156107235750600082115b61073f5760405162461bcd60e51b815260040161070a906128db565b60006008546103e86107519190612933565b61075b908661294a565b90506000610769848361294a565b905060008261077a876103e861294a565b6107849190612969565b90506107908183612997565b979650505050505050565b6060600380546107aa906129b9565b80601f01602080910402602001604051908101604052809291908181526020018280546107d6906129b9565b80156108235780601f106107f857610100808354040283529160200191610823565b820191906000526020600020905b81548152906001019060200180831161080657829003601f168201915b5050505050905090565b60003361083b8185856113a1565b5060019392505050565b61084d6114c5565b6000841161086d5760405162461bcd60e51b815260040161070a906129f4565b600085815260106020526040902054156108995760405162461bcd60e51b815260040161070a90612a1c565b636574686960e01b6001600160e01b03198316146108c95760405162461bcd60e51b815260040161070a90612a3d565b60006108e86108e287873388636574686960e01b61125a565b8361151f565b6001600160a01b0381166000908152600f602052604090205490915060ff166109235760405162461bcd60e51b815260040161070a90612a63565b60008681526010602052604090819020869055513390600080516020612b778339815191529061095890869089908b90612a90565b60405180910390a2604080516001600160e01b0319851681526020810187905233917fdebdd87b2b023547564582998a711eaa10ae47c02ae47a8bc216b03147a81b8b910160405180910390a2506109b06001600655565b5050505050565b6109bf6114c5565b60095434906000906103e8906109d5908461294a565b6109df9190612997565b905080600a60008282546109f39190612969565b9091555060009050610a058284612933565b905060008111610a475760405162461bcd60e51b815260206004820152600d60248201526c496e76616c69642076616c756560981b604482015260640161070a565b6000610a5882600c54600b546106e9565b905084811015610a9f5760405162461bcd60e51b8152602060048201526012602482015271125b9d985b1a5908185b5bdd5b9d081bdd5d60721b604482015260640161070a565b610ab76000808484600033636574686960e01b611543565b50505050610ac56001600655565b50565b600033610ad6858285611810565b610ae185858561188a565b506001949350505050565b610af4611a2e565b60008111610b3c5760405162461bcd60e51b815260206004820152601560248201527404d757374206265207375706572696f7220746f203605c1b604482015260640161070a565b600755565b610b49611a2e565b6001600160a01b03919091166000908152600f60205260409020805460ff1916911515919091179055565b610b7c611a2e565b600955565b610b896114c5565b60008511610ba95760405162461bcd60e51b815260040161070a906129f4565b60008681526010602052604090205415610bd55760405162461bcd60e51b815260040161070a90612a1c565b636574686960e01b6001600160e01b0319841614610c055760405162461bcd60e51b815260040161070a90612a3d565b6000610c24610c1e88883389636574686960e01b61125a565b8461151f565b6001600160a01b0381166000908152600f602052604090205490915060ff16610c5f5760405162461bcd60e51b815260040161070a90612a63565b6000878152601060205260408120879055600b54600c54889291610c85918491906106e9565b905083811015610ccc5760405162461bcd60e51b8152602060048201526012602482015271125b9d985b1a5908185b5bdd5b9d081bdd5d60721b604482015260640161070a565b610ce46001836000808533636574686960e01b611543565b336001600160a01b0316600080516020612b77833981519152878a8c604051610d0f93929190612a90565b60405180910390a2505050610d246001600655565b505050505050565b60003361083b818585610d3f8383611300565b610d499190612969565b6113a1565b610d56611a2e565b610ac53382611a88565b610d686114c5565b600754841015610db05760405162461bcd60e51b8152602060048201526013602482015272125b9cdd59999a58da595b9d08185b5bdd5b9d606a1b604482015260640161070a565b60008581526010602052604090205415610ddc5760405162461bcd60e51b815260040161070a90612a1c565b636574686960e01b6001600160e01b0319831614610e0c5760405162461bcd60e51b815260040161070a90612a3d565b6000610e256108e287873388636574686960e01b61125a565b6001600160a01b0381166000908152600f602052604090205490915060ff16610e605760405162461bcd60e51b815260040161070a90612a63565b60008681526010602052604081208690558590610e7d3383611b3b565b9050336001600160a01b0316600080516020612b7783398151915286898b604051610eaa93929190612a90565b60405180910390a2610ebb81611c4e565b5050506109b06001600655565b610ed0611a2e565b60008411610ef05760405162461bcd60e51b815260040161070a906129f4565b60008581526010602052604090205415610f1c5760405162461bcd60e51b815260040161070a90612a1c565b636574686960e01b6001600160e01b0319831614610f4c5760405162461bcd60e51b815260040161070a90612a3d565b600b5415610f8b5760405162461bcd60e51b815260206004820152600c60248201526b1a5b9a5d1a585b1b9a5e995960a21b604482015260640161070a565b6000610fa46108e287873388636574686960e01b61125a565b6001600160a01b0381166000908152600f602052604090205490915060ff16610fdf5760405162461bcd60e51b815260040161070a90612a63565b6000868152601060205260408120869055600b86905534600c819055869161100f61100a838561294a565b611cd9565b9050600081116110315760405162461bcd60e51b815260040161070a90612ab2565b61103b8782611dc5565b600c54600b5461104b919061294a565b600d556040513390600080516020612b77833981519152906110729089908c908e90612a90565b60405180910390a2604080518481526020810184905233917f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f910160405180910390a2505050505050505050565b6110c8611a2e565b6110d26000611e84565b565b6110dc611a2e565b600855565b6110e9611a2e565b6110f533600a54611a88565b6000600a55565b6060600480546107aa906129b9565b6111136114c5565b600081116111335760405162461bcd60e51b815260040161070a906129f4565b61113d30826111ce565b5061114733611ed6565b5050610ac56001600655565b600033816111618286611300565b9050838110156111c15760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161070a565b610ae182868684036113a1565b60003361083b81858561188a565b6111e4611a2e565b60405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0383169063a9059cbb906044016020604051808303816000875af1158015611231573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112559190612afb565b505050565b60408051602080820197909752808201959095526bffffffffffffffffffffffff19606094851b8116858701529290931b90911660748401526001600160e01b03191660888301528051808303606c018152608c830182528051908401207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060ac84015260c8808401919091528151808403909101815260e89092019052805191012090565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b611333611a2e565b6001600160a01b0381166113985760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161070a565b610ac581611e84565b6001600160a01b0383166114035760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161070a565b6001600160a01b0382166114645760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161070a565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600260065414156115185760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161070a565b6002600655565b600080600061152e85856120aa565b9150915061153b816120f0565b509392505050565b600e546001146115655760405162461bcd60e51b815260040161070a90612b18565b6000600e55831515806115785750600083115b6115d35760405162461bcd60e51b815260206004820152602660248201527f494552435377617056313a20494e53554646494349454e545f4f55545055545f604482015265105353d5539560d21b606482015260840161070a565b600b54841080156115e55750600c5483105b6116015760405162461bcd60e51b815260040161070a906128db565b600080611611600b54600c549091565b9092509050851561166b57604080516001600160e01b031985168152602081018890526001600160a01b038616917fdebdd87b2b023547564582998a711eaa10ae47c02ae47a8bc216b03147a81b8b910160405180910390a25b84156116bd5760006103e860095487611684919061294a565b61168e9190612997565b905080600a60008282546116a29190612969565b909155506116bb9050856116b68389612933565b611a88565b505b60008811806116cc5750600087115b6116e85760405162461bcd60e51b815260040161070a90612896565b88156117245787600b60008282546117009190612969565b9250508190555084600c60008282546117199190612933565b909155506117559050565b85600b60008282546117369190612933565b9250508190555086600c600082825461174f9190612969565b90915550505b61175f818361294a565b600c54600b5461176f919061294a565b10156117ad5760405162461bcd60e51b815260206004820152600d60248201526c494552435377617056313a204b60981b604482015260640161070a565b6040805189815260208101899052908101879052606081018690526001600160a01b038516907f49926bbebe8474393f434dfa4f78694c0923efa07d19f2284518bfabd06eb7379060800160405180910390a250506001600e5550505050505050565b600061181c8484611300565b9050600019811461188457818110156118775760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161070a565b61188484848484036113a1565b50505050565b6001600160a01b0383166118ee5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161070a565b6001600160a01b0382166119505760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161070a565b6001600160a01b038316600090815260208190526040902054818110156119c85760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161070a565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3611884565b6005546001600160a01b031633146110d25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161070a565b604080516000808252602082019092526001600160a01b038416908390604051611ab29190612b44565b60006040518083038185875af1925050503d8060008114611aef576040519150601f19603f3d011682016040523d82523d6000602084013e611af4565b606091505b50509050806112555760405162461bcd60e51b815260206004820152601360248201527211551217d514905394d1915497d19052531151606a1b604482015260640161070a565b6000600e54600114611b5f5760405162461bcd60e51b815260040161070a90612b18565b6000600e55600b54600c54611b74908461294a565b611b7e9190612997565b90506000611b8f61100a838561294a565b905060008111611bb15760405162461bcd60e51b815260040161070a90612ab2565b611bbb8482611dc5565b82600b6000828254611bcd9190612969565b9250508190555081600c6000828254611be69190612969565b9091555050600c54600b54611bfb919061294a565b600d5560408051848152602081018490526001600160a01b038616917f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f910160405180910390a2506001600e5592915050565b80341015611c975760405162461bcd60e51b81526020600482015260166024820152752732b2b2103a379039b2b7321036b7b9329022aa241760511b604482015260640161070a565b80341115610ac557336108fc611cad8334612933565b6040518115909202916000818181858888f19350505050158015611cd5573d6000803e3d6000fd5b5050565b600081611ce857506000919050565b60006001611cf58461223e565b901c6001901b90506001818481611d0e57611d0e612981565b048201901c90506001818481611d2657611d26612981565b048201901c90506001818481611d3e57611d3e612981565b048201901c90506001818481611d5657611d56612981565b048201901c90506001818481611d6e57611d6e612981565b048201901c90506001818481611d8657611d86612981565b048201901c90506001818481611d9e57611d9e612981565b048201901c9050611dbe81828581611db857611db8612981565b046122d3565b9392505050565b6001600160a01b038216611e1b5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161070a565b8060026000828254611e2d9190612969565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600080600e54600114611efb5760405162461bcd60e51b815260040161070a90612b18565b6000600e81905530815260208190526040902054600254600b548190611f21908461294a565b611f2b9190612997565b935080600c5483611f3c919061294a565b611f469190612997565b9250600084118015611f585750600083115b611fb65760405162461bcd60e51b815260206004820152602960248201527f494552435377617056313a20494e53554646494349454e545f4c495155494449604482015268151657d0955493915160ba1b606482015260840161070a565b611fc030836122e9565b611fca8584611a88565b83600b6000828254611fdc9190612933565b9250508190555082600c6000828254611ff59190612933565b9091555050600c54600b5461200a919061294a565b600d5560408051858152602081018590526001600160a01b038716917f49995e5dd6158cf69ad3e9777c46755a1a826a446c6416992167462dad033b2a910160405180910390a260408051636574686960e01b8152602081018690526001600160a01b038716917fdebdd87b2b023547564582998a711eaa10ae47c02ae47a8bc216b03147a81b8b910160405180910390a250506001600e559092909150565b6000808251604114156120e15760208301516040840151606085015160001a6120d58782858561241b565b945094505050506120e9565b506000905060025b9250929050565b600081600481111561210457612104612b60565b141561210d5750565b600181600481111561212157612121612b60565b141561216f5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161070a565b600281600481111561218357612183612b60565b14156121d15760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161070a565b60038160048111156121e5576121e5612b60565b1415610ac55760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161070a565b600080608083901c1561225357608092831c92015b604083901c1561226557604092831c92015b602083901c1561227757602092831c92015b601083901c1561228957601092831c92015b600883901c1561229b57600892831c92015b600483901c156122ad57600492831c92015b600283901c156122bf57600292831c92015b600183901c156122cd576001015b92915050565b60008183106122e25781611dbe565b5090919050565b6001600160a01b0382166123495760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161070a565b6001600160a01b038216600090815260208190526040902054818110156123bd5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161070a565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561245257506000905060036124d6565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156124a6573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166124cf576000600192509250506124d6565b9150600090505b94509492505050565b6000806000606084860312156124f457600080fd5b505081359360208301359350604090920135919050565b60005b8381101561252657818101518382015260200161250e565b838111156118845750506000910152565b602081526000825180602084015261255681604085016020870161250b565b601f01601f19169190910160400192915050565b80356001600160a01b038116811461258157600080fd5b919050565b6000806040838503121561259957600080fd5b6125a28361256a565b946020939093013593505050565b80356001600160e01b03198116811461258157600080fd5b634e487b7160e01b600052604160045260246000fd5b600082601f8301126125ef57600080fd5b813567ffffffffffffffff8082111561260a5761260a6125c8565b604051601f8301601f19908116603f01168101908282118183101715612632576126326125c8565b8160405283815286602085880101111561264b57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a0868803121561268357600080fd5b853594506020860135935061269a6040870161256a565b92506126a8606087016125b0565b9150608086013567ffffffffffffffff8111156126c457600080fd5b6126d0888289016125de565b9150509295509295909350565b6000602082840312156126ef57600080fd5b5035919050565b60008060006060848603121561270b57600080fd5b6127148461256a565b92506127226020850161256a565b9150604084013590509250925092565b8015158114610ac557600080fd5b6000806040838503121561275357600080fd5b61275c8361256a565b9150602083013561276c81612732565b809150509250929050565b60008060008060008060c0878903121561279057600080fd5b86359550602087013594506127a76040880161256a565b93506127b5606088016125b0565b9250608087013567ffffffffffffffff8111156127d157600080fd5b6127dd89828a016125de565b92505060a087013590509295509295509295565b60006020828403121561280357600080fd5b611dbe8261256a565b600080600080600060a0868803121561282457600080fd5b853594506020860135935061283b6040870161256a565b92506128496060870161256a565b9150612857608087016125b0565b90509295509295909350565b6000806040838503121561287657600080fd5b61287f8361256a565b915061288d6020840161256a565b90509250929050565b60208082526025908201527f494552435377617056313a20494e53554646494349454e545f494e5055545f416040820152641353d5539560da1b606082015260800190565b60208082526022908201527f494552435377617056313a20494e53554646494349454e545f4c495155494449604082015261545960f01b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b6000828210156129455761294561291d565b500390565b60008160001904831182151516156129645761296461291d565b500290565b6000821982111561297c5761297c61291d565b500190565b634e487b7160e01b600052601260045260246000fd5b6000826129b457634e487b7160e01b600052601260045260246000fd5b500490565b600181811c908216806129cd57607f821691505b602082108114156129ee57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600e908201526d125b9d985b1a5908185b5bdd5b9d60921b604082015260600190565b60208082526007908201526618db185a5b595960ca1b604082015260600190565b6020808252600c908201526b496e76616c6964207469636b60a01b604082015260600190565b60208082526013908201527214da59db995c881a5cc81b9bdd081d985b1a59606a1b604082015260600190565b6001600160e01b03199390931683526020830191909152604082015260600190565b60208082526029908201527f494552435377617056313a20494e53554646494349454e545f4c495155494449604082015268151657d3525395115160ba1b606082015260800190565b600060208284031215612b0d57600080fd5b8151611dbe81612732565b60208082526012908201527112515490d4ddd85c158c4e881313d0d2d15160721b604082015260600190565b60008251612b5681846020870161250b565b9190910192915050565b634e487b7160e01b600052602160045260246000fdfef180eb1c6d87491f31bc1708c3410821a2f20a23d347773f8381abe16f15b460a2646970667358221220f17f3e01134e70a75bfc56daac35ed170f3bd58df66ad59f1cf03faeba1cb88764736f6c634300080c0033
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.