Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- Token
- Optimization enabled
- true
- Compiler version
- v0.8.20+commit.a1b79de6
- Optimization runs
- 1
- EVM Version
- paris
- Verified at
- 2024-05-28T05:15:51.908478Z
Constructor Arguments
0x00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000004626262620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000026161000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000152d02c7e14af68000000000000000000000000000000000000000000000000000056bc75e2d63100000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000020f72dcf9141e1b6014c835b6d0709e32d806f1000000000000000000000000099c2d4937756cf66d04f7db362b87604f430396900000000000000000000000020f72dcf9141e1b6014c835b6d0709e32d806f100000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000012c0000000000000000000000000000000000000000000000000000000000000190000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001f4
contracts/Token.sol
// ██████╗██████╗ ███████╗ █████╗ ████████╗███████╗██████╗ ██████╗ ███╗ ██╗ █████╗ ██████╗ ██████╗ █████╗ ██╗███╗ ██╗ ██████╗██╗ ██╗ ██╗ ██████╗
// ██╔════╝██╔══██╗██╔════╝██╔══██╗╚══██╔══╝██╔════╝██╔══██╗ ██╔═══██╗████╗ ██║ ██╔══██╗██╔══██╗██╔══██╗██╔══██╗██║████╗ ██║██╔════╝██║ ██║ ██║██╔═══██╗
// ██║ ██████╔╝█████╗ ███████║ ██║ █████╗ ██║ ██║ ██║ ██║██╔██╗ ██║ ███████║██████╔╝██████╔╝╚██████║██║██╔██╗ ██║██║ ███████║ ██║██║ ██║
// ██║ ██╔══██╗██╔══╝ ██╔══██║ ██║ ██╔══╝ ██║ ██║ ██║ ██║██║╚██╗██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚═══██║██║██║╚██╗██║██║ ██╔══██║ ██║██║ ██║
// ╚██████╗██║ ██║███████╗██║ ██║ ██║ ███████╗██████╔╝ ╚██████╔╝██║ ╚████║ ██║ ██║██║ ██║██╗ █████╔╝██║██║ ╚████║╚██████╗██║ ██║██╗██║╚██████╔╝
// ╚═════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═╝ ╚══════╝╚═════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚════╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝╚═╝ ╚═╝╚═╝╚═╝ ╚═════╝
// Website:
// Telegram:
// X:
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}
// File @openzeppelin/contracts/access/Ownable.sol@v4.9.6
// Original license: SPDX_License_Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.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);
}
}
// File @openzeppelin/contracts/token/ERC20/IERC20.sol@v4.9.6
// Original license: SPDX_License_Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
/**
* @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);
}
// File @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol@v4.9.6
// Original license: SPDX_License_Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.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);
}
// File @openzeppelin/contracts/token/ERC20/ERC20.sol@v4.9.6
// Original license: SPDX_License_Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.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 {}
}
// File @openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol@v4.9.6
// Original license: SPDX_License_Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)
/**
* @dev Extension of {ERC20} that allows token holders to destroy both their own
* tokens and those that they have an allowance for, in a way that can be
* recognized off-chain (via event analysis).
*/
abstract contract ERC20Burnable is Context, ERC20 {
/**
* @dev Destroys `amount` tokens from the caller.
*
* See {ERC20-_burn}.
*/
function burn(uint256 amount) public virtual {
_burn(_msgSender(), amount);
}
/**
* @dev Destroys `amount` tokens from `account`, deducting from the caller's
* allowance.
*
* See {ERC20-_burn} and {ERC20-allowance}.
*
* Requirements:
*
* - the caller must have allowance for ``accounts``'s tokens of at least
* `amount`.
*/
function burnFrom(address account, uint256 amount) public virtual {
_spendAllowance(account, _msgSender(), amount);
_burn(account, amount);
}
}
// File contracts/interfaces/INineInchRouter01.sol
// Original license: SPDX_License_Identifier: GPLv3
interface INineInchRouter01 {
function factory() external view returns (address);
function WETH() external view returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
)
external
payable
returns (uint amountToken, uint amountETH, uint liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB);
function removeLiquidityETH(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountToken, uint amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint amountA, uint amountB);
function removeLiquidityETHWithPermit(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint amountToken, uint amountETH);
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapTokensForExactTokens(
uint amountOut,
uint amountInMax,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapExactETHForTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable returns (uint[] memory amounts);
function swapTokensForExactETH(
uint amountOut,
uint amountInMax,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapExactTokensForETH(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapETHForExactTokens(
uint amountOut,
address[] calldata path,
address to,
uint deadline
) external payable returns (uint[] memory amounts);
function quote(
uint amountA,
uint reserveA,
uint reserveB
) external pure returns (uint amountB);
function getAmountOut(
uint amountIn,
uint reserveIn,
uint reserveOut
) external pure returns (uint amountOut);
function getAmountIn(
uint amountOut,
uint reserveIn,
uint reserveOut
) external pure returns (uint amountIn);
function getAmountsOut(
uint amountIn,
address[] calldata path
) external view returns (uint[] memory amounts);
function getAmountsIn(
uint amountOut,
address[] calldata path
) external view returns (uint[] memory amounts);
}
// File contracts/interfaces/INineInchRouter02.sol
// Original license: SPDX_License_Identifier: GPLv3
interface INineInchRouter02 is INineInchRouter01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
// File contracts/interfaces/IDividendTracker.sol
// Original license: SPDX_License_Identifier: MIT
interface IDividendTracker {
function excludeFromDividends(address account) external;
function setBalance(address payable account, uint256 newBalance) external;
function process(uint256 gas) external returns (uint256, uint256, uint256);
function distributeDividends(uint256 amount) external;
function rewardsToken() external view returns (address);
}
// File contracts/interfaces/INineInchFactory.sol
// Original license: SPDX_License_Identifier: MIT
interface INineInchFactory {
event PairCreated(
address indexed token0,
address indexed token1,
address pair,
uint
);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(
address tokenA,
address tokenB
) external view returns (address pair);
function allPairs(uint) external view returns (address pair);
function allPairsLength() external view returns (uint);
function createPair(
address tokenA,
address tokenB
) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
// File contracts/Token.sol
contract Token is ERC20Burnable, Ownable {
// ADDRESSESS -------------------------------------------------------------------------------------------
address public lpPair; // Liquidity token address
address public treasuryAddress; // owner fee wallet address
address public dividendTokenAddress; // dividend token address
address public dividentTokenBridgeAddress; // dividend token bridge address
address private launchPad = 0xf221cEEfd6D194Cf97Bb249c50cb2A33aEbb6AB2;
// VALUES -----------------------------------------------------------------------------------------------
uint256 public swapThreshold; // swap tokens limit
uint256 public constant TAX_DIVISOR = 10000; // divisor | 0.0001 max presition fee
uint256 public gasForProcessing;
uint256 public distributionRewardsPercent;
uint256 public burnPercent;
// BOOLEANS ---------------------------------------------------------------------------------------------
bool public inSwap; // used for dont take fee on swaps
// MAPPINGS
mapping(address => bool) public _isExcludedFromFee; // list of users excluded from fee
mapping(address => bool) public automatedMarketMakerPairs;
// STRUCTS ----------------------------------------------------------------------------------------------
struct Fees {
uint16 buyFee; // fee when people BUY tokens
uint16 sellFee; // fee when people SELL tokens
uint16 transferFee; // fee when people TRANSFER tokens
}
// OBJECTS ----------------------------------------------------------------------------------------------
INineInchRouter02 public router;
IDividendTracker public tokenDividendTracker;
Fees public _feesRates;
// MODIFIERS --------------------------------------------------------------------------------------------
modifier swapping() {
inSwap = true;
_;
inSwap = false;
}
// EVENTS -----------------------------------------------------------------------------------------------
event ProcessedDividendTracker(
uint256 iterations,
uint256 claims,
uint256 lastProcessedIndex,
bool indexed automatic,
uint256 gas,
address indexed processor
);
event SendDividends(uint256 tokensSwapped, uint256 amount);
// CONSTRUCTOR ------------------------------------------------------------------------------------------
constructor(
string memory _tokenName,
string memory _tokenSymbol,
uint256[] memory _amounts, // total supply, amount for pool
address[] memory _addresses, // owner, routerAddress, treasuryAddress
uint16[] memory _percents // buyFee, sellFee, transfer, burnPercent
) ERC20(_tokenName, _tokenSymbol) {
require(_amounts.length == 2, "Invalid amounts argument");
require(_amounts[0] > 0, "Invalid total supply");
require(_amounts[0] > _amounts[1], "Amount for pool is too hight");
require(_addresses.length == 3, "Invalid address argument");
require(_percents.length == 4, "Invalid percent argument");
require(
_percents[0] <= 1000 &&
_percents[1] <= 1000 &&
_percents[2] <= 1000,
"Too hight tax"
);
uint256 _totalSupply = _amounts[0];
uint256 _amountForPool = _amounts[1];
treasuryAddress = _addresses[1];
_mint(_addresses[0], _totalSupply - _amountForPool);
if (_amountForPool > 0) {
_mint(launchPad, _amountForPool);
}
_feesRates = Fees({
buyFee: _percents[0],
sellFee: _percents[1],
transferFee: _percents[2]
});
burnPercent = _percents[3];
router = INineInchRouter02(_addresses[1]);
lpPair = INineInchFactory(router.factory()).createPair(
address(this),
router.WETH()
);
automatedMarketMakerPairs[lpPair] = true;
//_approve(msg.sender, address(router), type(uint256).max);
// exclude from fees
_isExcludedFromFee[_addresses[0]] = true;
_isExcludedFromFee[treasuryAddress] = true;
_isExcludedFromFee[address(this)] = true;
// contract do swap when have 1k tokens balance
swapThreshold = 1000 ether;
// gas for process distribution
gasForProcessing = 300000;
}
function updateDividentTokenBridgeAddress(
address newAddress
) public onlyOwner {
require(
newAddress != dividentTokenBridgeAddress,
"The dividend tracker already has that address"
);
require(newAddress != address(0), "new address is Zero address");
dividentTokenBridgeAddress = newAddress;
}
function updateDividendTracker(
address newAddress,
uint256 percent,
address bridgeToken
) public onlyOwner {
require(newAddress != address(0), "new address is Zero address");
require(percent <= 5000, "invalid percent");
//dividendTokenAddress = newAddress;
tokenDividendTracker = IDividendTracker(newAddress);
// exclude from receiving dividends
tokenDividendTracker.excludeFromDividends(newAddress);
tokenDividendTracker.excludeFromDividends(address(this));
tokenDividendTracker.excludeFromDividends(owner());
tokenDividendTracker.excludeFromDividends(address(router));
tokenDividendTracker.excludeFromDividends(lpPair);
dividentTokenBridgeAddress = bridgeToken;
_isExcludedFromFee[newAddress] = true;
distributionRewardsPercent = percent;
dividendTokenAddress = tokenDividendTracker.rewardsToken();
}
receive() external payable {}
// Set fees
function setTaxes(
uint16 buyFee,
uint16 sellFee,
uint16 transferFee
) external virtual onlyOwner {
require(
buyFee <= 1000 && sellFee <= 1000 && transferFee <= 1000,
"Too hight tax"
);
_feesRates.buyFee = buyFee;
_feesRates.sellFee = sellFee;
_feesRates.transferFee = transferFee;
}
function setDistributionRewardsPercent(
uint16 newPercent
) external onlyOwner {
require(
newPercent +
_feesRates.buyFee +
_feesRates.sellFee +
_feesRates.transferFee +
burnPercent <=
TAX_DIVISOR,
"Percent cant be higher than 100%"
);
distributionRewardsPercent = newPercent;
}
// this function will be called every buy, sell or transfer
function _transfer(
address from,
address to,
uint256 amount
) internal virtual override {
if (inSwap) {
super._transfer(from, to, amount);
return;
}
if (contractMustSwap(from, to)) {
doSwap();
}
_finalizeTransfer(from, to, amount);
if (address(tokenDividendTracker) != address(0)) {
try
tokenDividendTracker.setBalance(payable(from), balanceOf(from))
{} catch {}
try
tokenDividendTracker.setBalance(payable(to), balanceOf(to))
{} catch {}
if (!inSwap) {
processDividendTracker(gasForProcessing);
}
}
}
function processDividendTracker(uint256 gas) internal {
try tokenDividendTracker.process(gas) returns (
uint256 iterations,
uint256 claims,
uint256 lastProcessedIndex
) {
emit ProcessedDividendTracker(
iterations,
claims,
lastProcessedIndex,
true,
gas,
tx.origin
);
} catch {}
}
function doSwap() internal swapping {
uint256 numTokensToSwap = balanceOf(address(this));
uint256 tokensForTreasury = (numTokensToSwap *
burnPercent +
distributionRewardsPercent) / TAX_DIVISOR;
if (tokensForTreasury > 0) {
swapTokensForNative(tokensForTreasury, treasuryAddress);
}
if (burnPercent > 0) {
uint256 tokenForBurn = (numTokensToSwap * burnPercent) /
TAX_DIVISOR;
if (tokenForBurn > 0) {
super._burn(address(this), tokenForBurn);
}
}
if (distributionRewardsPercent > 0) {
uint256 tokensForDistribution = (numTokensToSwap *
distributionRewardsPercent) / TAX_DIVISOR;
if (tokensForDistribution > 0) {
swapAndSendDividends(
(numTokensToSwap * distributionRewardsPercent) / TAX_DIVISOR
);
}
}
}
function swapTokensForTokens(
address _fromTokenAddress,
address _toTokenAddress,
uint256 tokenAmount,
address _to
) private {
address[] memory path = new address[](3);
path[0] = _fromTokenAddress;
path[1] = dividentTokenBridgeAddress;
path[2] = _toTokenAddress;
_approve(address(this), address(router), tokenAmount);
router.swapExactTokensForTokensSupportingFeeOnTransferTokens(
tokenAmount,
0,
path,
_to,
block.timestamp + 1000
);
}
function swapAndSendDividends(uint256 tokenAmount) private {
swapTokensForTokens(
address(this), // swap token
dividendTokenAddress, // for dividend token
tokenAmount, // amount
address(this) // to this contract
);
uint256 dividends = IERC20(dividendTokenAddress).balanceOf(
address(this)
);
bool success = IERC20(dividendTokenAddress).transfer(
address(tokenDividendTracker),
dividends
);
if (success) {
tokenDividendTracker.distributeDividends(dividends);
emit SendDividends(tokenAmount, dividends);
}
}
function swapTokensForNative(uint256 tokenAmount, address to) private {
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = router.WETH();
uint256 deadline = block.timestamp;
_approve(address(this), address(router), tokenAmount);
router.swapExactTokensForETHSupportingFeeOnTransferTokens(
tokenAmount,
0,
path,
to,
deadline
);
}
function _finalizeTransfer(
address from,
address to,
uint256 amount
) internal virtual {
// by default receiver receive 100% of sended amount
uint256 amountReceived = amount;
uint256 feeAmount = 0; // received fee amount is zero
// If takeFee is false there is 0% fee
bool takeFee = true;
if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) {
takeFee = false;
}
// check if we need take fee or not
if (takeFee) {
// if we need take fee
// calc how much we need take
feeAmount = calcBuySellTransferFee(from, to, amount);
// we substract fee amount from recipient amount
amountReceived = amount - feeAmount;
// and transfer fee to contract
super._transfer(from, address(this), feeAmount);
}
// finally send remaining tokens to recipient
super._transfer(from, to, amountReceived);
}
function calcBuySellTransferFee(
address from,
address to,
uint256 amount
) internal view virtual returns (uint256) {
// by default we take zero fee
uint256 totalFeePercent = 0;
uint256 feeAmount = 0;
// BUY -> FROM == LP ADDRESS
if (automatedMarketMakerPairs[from]) {
totalFeePercent += _feesRates.buyFee;
}
// SELL -> TO == LP ADDRESS
else if (automatedMarketMakerPairs[to]) {
totalFeePercent += _feesRates.sellFee;
}
// TRANSFER
else {
totalFeePercent += _feesRates.transferFee;
}
// CALC FEES AMOUT
if (totalFeePercent > 0) {
feeAmount = (amount * totalFeePercent) / TAX_DIVISOR;
}
return feeAmount;
}
function contractMustSwap(
address from,
address to
) internal view virtual returns (bool) {
uint256 contractTokenBalance = balanceOf(address(this));
return
contractTokenBalance >= swapThreshold &&
!inSwap &&
from != lpPair &&
balanceOf(lpPair) > 0 &&
!_isExcludedFromFee[to] &&
!_isExcludedFromFee[from];
}
function isExcludedFromFee(
address account
) public view virtual returns (bool) {
return _isExcludedFromFee[account];
}
function excludeFromFee(
address account,
bool val
) public virtual onlyOwner {
_isExcludedFromFee[account] = val;
}
function setSwapThreshold(uint256 value) public virtual onlyOwner {
swapThreshold = value;
}
function addLiquidity(
uint256 ethAmount,
uint256 tokenAmount
) external payable {
_addLiquidity(ethAmount, tokenAmount);
}
function _addLiquidity(uint256 ethAmount, uint256 tokenAmount) private {
transferFrom(msg.sender, address(this), tokenAmount);
_approve(address(this), address(router), tokenAmount);
router.addLiquidityETH{value: ethAmount}(
address(this),
tokenAmount,
0,
0,
msg.sender,
block.timestamp + 300
);
}
}
Compiler Settings
{"outputSelection":{"*":{"*":["*"],"":["*"]}},"optimizer":{"runs":1,"enabled":true},"libraries":{},"evmVersion":"paris"}
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"string","name":"_tokenName","internalType":"string"},{"type":"string","name":"_tokenSymbol","internalType":"string"},{"type":"uint256[]","name":"_amounts","internalType":"uint256[]"},{"type":"address[]","name":"_addresses","internalType":"address[]"},{"type":"uint16[]","name":"_percents","internalType":"uint16[]"}]},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"spender","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"ProcessedDividendTracker","inputs":[{"type":"uint256","name":"iterations","internalType":"uint256","indexed":false},{"type":"uint256","name":"claims","internalType":"uint256","indexed":false},{"type":"uint256","name":"lastProcessedIndex","internalType":"uint256","indexed":false},{"type":"bool","name":"automatic","internalType":"bool","indexed":true},{"type":"uint256","name":"gas","internalType":"uint256","indexed":false},{"type":"address","name":"processor","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"SendDividends","inputs":[{"type":"uint256","name":"tokensSwapped","internalType":"uint256","indexed":false},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"TAX_DIVISOR","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint16","name":"buyFee","internalType":"uint16"},{"type":"uint16","name":"sellFee","internalType":"uint16"},{"type":"uint16","name":"transferFee","internalType":"uint16"}],"name":"_feesRates","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"_isExcludedFromFee","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"addLiquidity","inputs":[{"type":"uint256","name":"ethAmount","internalType":"uint256"},{"type":"uint256","name":"tokenAmount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"allowance","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"address","name":"spender","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"approve","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"automatedMarketMakerPairs","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"burn","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"burnFrom","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"burnPercent","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"decimals","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"decreaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"subtractedValue","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"distributionRewardsPercent","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"dividendTokenAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"dividentTokenBridgeAddress","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"excludeFromFee","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"bool","name":"val","internalType":"bool"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"gasForProcessing","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"inSwap","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"increaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"addedValue","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isExcludedFromFee","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"lpPair","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract INineInchRouter02"}],"name":"router","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setDistributionRewardsPercent","inputs":[{"type":"uint16","name":"newPercent","internalType":"uint16"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setSwapThreshold","inputs":[{"type":"uint256","name":"value","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setTaxes","inputs":[{"type":"uint16","name":"buyFee","internalType":"uint16"},{"type":"uint16","name":"sellFee","internalType":"uint16"},{"type":"uint16","name":"transferFee","internalType":"uint16"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"swapThreshold","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IDividendTracker"}],"name":"tokenDividendTracker","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transfer","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"treasuryAddress","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateDividendTracker","inputs":[{"type":"address","name":"newAddress","internalType":"address"},{"type":"uint256","name":"percent","internalType":"uint256"},{"type":"address","name":"bridgeToken","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateDividentTokenBridgeAddress","inputs":[{"type":"address","name":"newAddress","internalType":"address"}]},{"type":"receive","stateMutability":"payable"}]
Contract Creation Code
0x6080604052600a80546001600160a01b03191673f221ceefd6d194cf97bb249c50cb2a33aebb6ab21790553480156200003757600080fd5b50604051620030ff380380620030ff8339810160408190526200005a9162000b1c565b848460036200006a838262000c8b565b50600462000079828262000c8b565b50505062000096620000906200079360201b60201c565b62000797565b8251600214620000ed5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420616d6f756e747320617267756d656e74000000000000000060448201526064015b60405180910390fd5b60008360008151811062000105576200010562000d57565b6020026020010151116200015c5760405162461bcd60e51b815260206004820152601460248201527f496e76616c696420746f74616c20737570706c790000000000000000000000006044820152606401620000e4565b8260018151811062000172576200017262000d57565b60200260200101518360008151811062000190576200019062000d57565b602002602001015111620001e75760405162461bcd60e51b815260206004820152601c60248201527f416d6f756e7420666f7220706f6f6c20697320746f6f206869676874000000006044820152606401620000e4565b81516003146200023a5760405162461bcd60e51b815260206004820152601860248201527f496e76616c6964206164647265737320617267756d656e7400000000000000006044820152606401620000e4565b80516004146200028d5760405162461bcd60e51b815260206004820152601860248201527f496e76616c69642070657263656e7420617267756d656e7400000000000000006044820152606401620000e4565b6103e881600081518110620002a657620002a662000d57565b602002602001015161ffff1611158015620002e457506103e881600181518110620002d557620002d562000d57565b602002602001015161ffff1611155b80156200031457506103e88160028151811062000305576200030562000d57565b602002602001015161ffff1611155b620003525760405162461bcd60e51b815260206004820152600d60248201526c0a8dede40d0d2ced0e840e8c2f609b1b6044820152606401620000e4565b6000836000815181106200036a576200036a62000d57565b602002602001015190506000846001815181106200038c576200038c62000d57565b6020026020010151905083600181518110620003ac57620003ac62000d57565b6020026020010151600760006101000a8154816001600160a01b0302191690836001600160a01b031602179055506200041084600081518110620003f457620003f462000d57565b602002602001015182846200040a919062000d83565b620007e9565b80156200042f57600a546200042f906001600160a01b031682620007e9565b60405180606001604052808460008151811062000450576200045062000d57565b602002602001015161ffff1681526020018460018151811062000477576200047762000d57565b602002602001015161ffff168152602001846002815181106200049e576200049e62000d57565b60209081029190910181015161ffff9081169092528251601480549285015160409095015184166401000000000261ffff60201b19958516620100000263ffffffff19909416929094169190911791909117929092161790558251839060039081106200050f576200050f62000d57565b602002602001015161ffff16600e819055508360018151811062000537576200053762000d57565b602090810291909101810151601280546001600160a01b0319166001600160a01b0390921691821790556040805163c45a015560e01b81529051919263c45a0155926004808401938290030181865afa15801562000599573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620005bf919062000d9f565b6001600160a01b031663c9c6539630601260009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000622573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000648919062000d9f565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af115801562000696573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620006bc919062000d9f565b600680546001600160a01b0319166001600160a01b039290921691821790556000908152601160205260408120805460ff19166001908117909155855190916010918790829062000711576200071162000d57565b6020908102919091018101516001600160a01b0390811683528282019390935260409182016000908120805495151560ff19968716179055600754909316835260109052808220805484166001908117909155308352912080549092161790555050683635c9adc5dea00000600b555050620493e0600c555062000dda915050565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038216620008415760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401620000e4565b806002600082825462000855919062000dc4565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715620008f257620008f2620008b1565b604052919050565b600082601f8301126200090c57600080fd5b81516001600160401b03811115620009285762000928620008b1565b60206200093e601f8301601f19168201620008c7565b82815285828487010111156200095357600080fd5b60005b838110156200097357858101830151828201840152820162000956565b506000928101909101919091529392505050565b60006001600160401b03821115620009a357620009a3620008b1565b5060051b60200190565b600082601f830112620009bf57600080fd5b81516020620009d8620009d28362000987565b620008c7565b82815260059290921b84018101918181019086841115620009f857600080fd5b8286015b8481101562000a155780518352918301918301620009fc565b509695505050505050565b80516001600160a01b038116811462000a3857600080fd5b919050565b600082601f83011262000a4f57600080fd5b8151602062000a62620009d28362000987565b82815260059290921b8401810191818101908684111562000a8257600080fd5b8286015b8481101562000a155762000a9a8162000a20565b835291830191830162000a86565b600082601f83011262000aba57600080fd5b8151602062000acd620009d28362000987565b82815260059290921b8401810191818101908684111562000aed57600080fd5b8286015b8481101562000a1557805161ffff8116811462000b0e5760008081fd5b835291830191830162000af1565b600080600080600060a0868803121562000b3557600080fd5b85516001600160401b038082111562000b4d57600080fd5b62000b5b89838a01620008fa565b9650602088015191508082111562000b7257600080fd5b62000b8089838a01620008fa565b9550604088015191508082111562000b9757600080fd5b62000ba589838a01620009ad565b9450606088015191508082111562000bbc57600080fd5b62000bca89838a0162000a3d565b9350608088015191508082111562000be157600080fd5b5062000bf08882890162000aa8565b9150509295509295909350565b600181811c9082168062000c1257607f821691505b60208210810362000c3357634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620008ac57600081815260208120601f850160051c8101602086101562000c625750805b601f850160051c820191505b8181101562000c835782815560010162000c6e565b505050505050565b81516001600160401b0381111562000ca75762000ca7620008b1565b62000cbf8162000cb8845462000bfd565b8462000c39565b602080601f83116001811462000cf7576000841562000cde5750858301515b600019600386901b1c1916600185901b17855562000c83565b600085815260208120601f198616915b8281101562000d285788860151825594840194600190910190840162000d07565b508582101562000d475787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111562000d995762000d9962000d6d565b92915050565b60006020828403121562000db257600080fd5b62000dbd8262000a20565b9392505050565b8082018082111562000d995762000d9962000d6d565b6123158062000dea6000396000f3fe6080604052600436106101c45760003560e01c806303807ee5146101d05780630445b667146101f957806306fdde031461020f578063095ea7b31461023157806318160ddd146102615780631c06a7e1146102765780631e94ed07146102cb57806323b872dd146102e1578063313ce5671461030157806332cde6641461031d57806335dcb05e1461033f578063395093511461036c57806342966c681461038c578063452ed4f1146103ac57806345b1b441146103cc5780635342acb4146103ec57806354fb8e401461042557806370a0823114610445578063715018a614610465578063768dc7101461047a57806379cc6790146104aa578063883bfec4146104ca5780638da5cb5b146104ea57806395d89b41146104ff5780639c1b8af5146105145780639cd441da1461052a5780639d0014b11461053d578063a335d4ff1461055d578063a457c2d714610573578063a9059cbb14610593578063b559f9b6146105b3578063b62496f5146105d3578063c5f956af14610603578063c788e83814610623578063d830678614610643578063dd62ed3e1461065d578063df8408fe1461067d578063f2fde38b1461069d578063f887ea40146106bd57600080fd5b366101cb57005b600080fd5b3480156101dc57600080fd5b506101e6600e5481565b6040519081526020015b60405180910390f35b34801561020557600080fd5b506101e6600b5481565b34801561021b57600080fd5b506102246106dd565b6040516101f09190611e29565b34801561023d57600080fd5b5061025161024c366004611e8c565b61076f565b60405190151581526020016101f0565b34801561026d57600080fd5b506002546101e6565b34801561028257600080fd5b506014546102a69061ffff80821691620100008104821691600160201b9091041683565b6040805161ffff948516815292841660208401529216918101919091526060016101f0565b3480156102d757600080fd5b506101e6600d5481565b3480156102ed57600080fd5b506102516102fc366004611eb8565b610789565b34801561030d57600080fd5b50604051601281526020016101f0565b34801561032957600080fd5b5061033d610338366004611f10565b6107ad565b005b34801561034b57600080fd5b5060085461035f906001600160a01b031681565b6040516101f09190611f53565b34801561037857600080fd5b50610251610387366004611e8c565b610861565b34801561039857600080fd5b5061033d6103a7366004611f67565b610883565b3480156103b857600080fd5b5060065461035f906001600160a01b031681565b3480156103d857600080fd5b5061033d6103e7366004611f80565b610890565b3480156103f857600080fd5b50610251610407366004611fa2565b6001600160a01b031660009081526010602052604090205460ff1690565b34801561043157600080fd5b5061033d610440366004611fa2565b61093d565b34801561045157600080fd5b506101e6610460366004611fa2565b610a01565b34801561047157600080fd5b5061033d610a1c565b34801561048657600080fd5b50610251610495366004611fa2565b60106020526000908152604090205460ff1681565b3480156104b657600080fd5b5061033d6104c5366004611e8c565b610a30565b3480156104d657600080fd5b5060095461035f906001600160a01b031681565b3480156104f657600080fd5b5061035f610a49565b34801561050b57600080fd5b50610224610a58565b34801561052057600080fd5b506101e6600c5481565b61033d610538366004611fbf565b610a67565b34801561054957600080fd5b5061033d610558366004611f67565b610a71565b34801561056957600080fd5b506101e661271081565b34801561057f57600080fd5b5061025161058e366004611e8c565b610a7e565b34801561059f57600080fd5b506102516105ae366004611e8c565b610af9565b3480156105bf57600080fd5b5060135461035f906001600160a01b031681565b3480156105df57600080fd5b506102516105ee366004611fa2565b60116020526000908152604090205460ff1681565b34801561060f57600080fd5b5060075461035f906001600160a01b031681565b34801561062f57600080fd5b5061033d61063e366004611fe1565b610b07565b34801561064f57600080fd5b50600f546102519060ff1681565b34801561066957600080fd5b506101e6610678366004612023565b610e4c565b34801561068957600080fd5b5061033d61069836600461206a565b610e77565b3480156106a957600080fd5b5061033d6106b8366004611fa2565b610eaa565b3480156106c957600080fd5b5060125461035f906001600160a01b031681565b6060600380546106ec90612098565b80601f016020809104026020016040519081016040528092919081815260200182805461071890612098565b80156107655780601f1061073a57610100808354040283529160200191610765565b820191906000526020600020905b81548152906001019060200180831161074857829003601f168201915b5050505050905090565b60003361077d818585610f20565b60019150505b92915050565b600033610797858285611044565b6107a28585856110be565b506001949350505050565b6107b56111e9565b6103e88361ffff16111580156107d157506103e88261ffff1611155b80156107e357506103e88161ffff1611155b6108245760405162461bcd60e51b815260206004820152600d60248201526c0a8dede40d0d2ced0e840e8c2f609b1b60448201526064015b60405180910390fd5b6014805461ffff94851663ffffffff199091161762010000938516939093029290921761ffff60201b1916600160201b9190931602919091179055565b60003361077d8185856108748383610e4c565b61087e91906120e8565b610f20565b61088d3382611248565b50565b6108986111e9565b600e54601454612710919061ffff600160201b82048116916201000081048216916108c49116866120fb565b6108ce91906120fb565b6108d891906120fb565b61ffff166108e691906120e8565b11156109345760405162461bcd60e51b815260206004820181905260248201527f50657263656e742063616e7420626520686967686572207468616e2031303025604482015260640161081b565b61ffff16600d55565b6109456111e9565b6009546001600160a01b03908116908216036109b95760405162461bcd60e51b815260206004820152602d60248201527f546865206469766964656e6420747261636b657220616c72656164792068617360448201526c2074686174206164647265737360981b606482015260840161081b565b6001600160a01b0381166109df5760405162461bcd60e51b815260040161081b9061211d565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b031660009081526020819052604090205490565b610a246111e9565b610a2e6000611368565b565b610a3b823383611044565b610a458282611248565b5050565b6005546001600160a01b031690565b6060600480546106ec90612098565b610a4582826113ba565b610a796111e9565b600b55565b60003381610a8c8286610e4c565b905083811015610aec5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161081b565b6107a28286868403610f20565b60003361077d8185856110be565b610b0f6111e9565b6001600160a01b038316610b355760405162461bcd60e51b815260040161081b9061211d565b611388821115610b795760405162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a59081c195c98d95b9d608a1b604482015260640161081b565b601380546001600160a01b0319166001600160a01b03851690811790915560405163031e79db60e41b81526331e79db090610bb8908690600401611f53565b600060405180830381600087803b158015610bd257600080fd5b505af1158015610be6573d6000803e3d6000fd5b505060135460405163031e79db60e41b81526001600160a01b0390911692506331e79db09150610c1a903090600401611f53565b600060405180830381600087803b158015610c3457600080fd5b505af1158015610c48573d6000803e3d6000fd5b50506013546001600160a01b031691506331e79db09050610c67610a49565b6040518263ffffffff1660e01b8152600401610c839190611f53565b600060405180830381600087803b158015610c9d57600080fd5b505af1158015610cb1573d6000803e3d6000fd5b505060135460125460405163031e79db60e41b81526001600160a01b0392831694506331e79db09350610cea9290911690600401611f53565b600060405180830381600087803b158015610d0457600080fd5b505af1158015610d18573d6000803e3d6000fd5b505060135460065460405163031e79db60e41b81526001600160a01b0392831694506331e79db09350610d519290911690600401611f53565b600060405180830381600087803b158015610d6b57600080fd5b505af1158015610d7f573d6000803e3d6000fd5b5050600980546001600160a01b0319166001600160a01b0385811691909117909155858116600090815260106020908152604091829020805460ff19166001179055600d879055601354825163d1af0c7d60e01b815292519316945063d1af0c7d935060048083019391928290030181865afa158015610e03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e279190612152565b600880546001600160a01b0319166001600160a01b0392909216919091179055505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610e7f6111e9565b6001600160a01b03919091166000908152601060205260409020805460ff1916911515919091179055565b610eb26111e9565b6001600160a01b038116610f175760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161081b565b61088d81611368565b6001600160a01b038316610f825760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161081b565b6001600160a01b038216610fe35760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161081b565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006110508484610e4c565b905060001981146110b857818110156110ab5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161081b565b6110b88484848403610f20565b50505050565b600f5460ff16156110d9576110d483838361149b565b505050565b6110e3838361162d565b156110f0576110f06116dd565b6110fb8383836117d9565b6013546001600160a01b0316156110d4576013546001600160a01b031663e30443bc8461112781610a01565b6040518363ffffffff1660e01b815260040161114492919061216f565b600060405180830381600087803b15801561115e57600080fd5b505af192505050801561116f575060015b506013546001600160a01b031663e30443bc8361118b81610a01565b6040518363ffffffff1660e01b81526004016111a892919061216f565b600060405180830381600087803b1580156111c257600080fd5b505af19250505080156111d3575060015b50600f5460ff166110d4576110d4600c54611864565b336111f2610a49565b6001600160a01b031614610a2e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161081b565b6001600160a01b0382166112a85760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161081b565b6001600160a01b0382166000908152602081905260409020548181101561131c5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161081b565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192916000805160206122c0833981519152910160405180910390a3505050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6113c5333083610789565b506012546113de9030906001600160a01b031683610f20565b6012546001600160a01b031663f305d719833084600080336114024261012c6120e8565b60405160e089901b6001600160e01b03191681526001600160a01b039687166004820152602481019590955260448501939093526064840191909152909216608482015260a481019190915260c40160606040518083038185885af115801561146f573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906114949190612188565b5050505050565b6001600160a01b0383166114ff5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161081b565b6001600160a01b0382166115615760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161081b565b6001600160a01b038316600090815260208190526040902054818110156115d95760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161081b565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290926000805160206122c0833981519152910160405180910390a36110b8565b60008061163930610a01565b9050600b5481101580156116505750600f5460ff16155b801561166a57506006546001600160a01b03858116911614155b801561168b5750600654600090611689906001600160a01b0316610a01565b115b80156116b057506001600160a01b03831660009081526010602052604090205460ff16155b80156116d557506001600160a01b03841660009081526010602052604090205460ff16155b949350505050565b600f805460ff1916600117905560006116f530610a01565b90506000612710600d54600e548461170d91906121b6565b61171791906120e8565b61172191906121cd565b90508015611740576007546117409082906001600160a01b0316611926565b600e5415611779576000612710600e548461175b91906121b6565b61176591906121cd565b90508015611777576117773082611248565b505b600d54156117cb576000612710600d548461179491906121b6565b61179e91906121cd565b905080156117c9576117c9612710600d54856117ba91906121b6565b6117c491906121cd565b611a84565b505b5050600f805460ff19169055565b6001600160a01b03831660009081526010602052604081205482919060019060ff168061181e57506001600160a01b03851660009081526010602052604090205460ff165b15611827575060005b801561185157611838868686611c33565b915061184482856121ef565b925061185186308461149b565b61185c86868561149b565b505050505050565b6013546040516001624d3b8760e01b03198152600481018390526001600160a01b039091169063ffb2c479906024016060604051808303816000875af19250505080156118ce575060408051601f3d908101601f191682019092526118cb91810190612188565b60015b1561088d5760408051848152602081018490529081018290526060810185905232906001907fc864333d6121033635ab41b29ae52f10a22cf4438c3e4f1c4c68518feb2f8a989060800160405180910390a350505050565b604080516002808252606082018352600092602083019080368337019050509050308160008151811061195b5761195b612202565b6001600160a01b03928316602091820292909201810191909152601254604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa1580156119b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119d89190612152565b816001815181106119eb576119eb612202565b6001600160a01b0392831660209182029290920101526012544291611a139130911686610f20565b60125460405163791ac94760e01b81526001600160a01b039091169063791ac94790611a4c908790600090879089908890600401612218565b600060405180830381600087803b158015611a6657600080fd5b505af1158015611a7a573d6000803e3d6000fd5b5050505050505050565b600854611a9d9030906001600160a01b03168382611cec565b6008546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611ace903090600401611f53565b602060405180830381865afa158015611aeb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b0f9190612289565b60085460135460405163a9059cbb60e01b81529293506000926001600160a01b039283169263a9059cbb92611b4b92911690869060040161216f565b6020604051808303816000875af1158015611b6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b8e91906122a2565b905080156110d457601354604051633243c79160e01b8152600481018490526001600160a01b0390911690633243c79190602401600060405180830381600087803b158015611bdc57600080fd5b505af1158015611bf0573d6000803e3d6000fd5b505060408051868152602081018690527f80195cc573b02cc48460cbca6e6e4cc85ddb91959d946e1c3025ea3d87942dc3935001905060405180910390a1505050565b6001600160a01b0383166000908152601160205260408120548190819060ff1615611c7057601454611c699061ffff16836120e8565b9150611cc3565b6001600160a01b03851660009081526011602052604090205460ff1615611ca857601454611c699062010000900461ffff16836120e8565b601454611cc090600160201b900461ffff16836120e8565b91505b8115611ce357612710611cd683866121b6565b611ce091906121cd565b90505b95945050505050565b60408051600380825260808201909252600091602082016060803683370190505090508481600081518110611d2357611d23612202565b6001600160a01b039283166020918202929092010152600954825191169082906001908110611d5457611d54612202565b60200260200101906001600160a01b031690816001600160a01b0316815250508381600281518110611d8857611d88612202565b6001600160a01b039283166020918202929092010152601254611dae9130911685610f20565b6012546001600160a01b0316635c11d7958460008486611dd0426103e86120e8565b6040518663ffffffff1660e01b8152600401611df0959493929190612218565b600060405180830381600087803b158015611e0a57600080fd5b505af1158015611e1e573d6000803e3d6000fd5b505050505050505050565b600060208083528351808285015260005b81811015611e5657858101830151858201604001528201611e3a565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b038116811461088d57600080fd5b60008060408385031215611e9f57600080fd5b8235611eaa81611e77565b946020939093013593505050565b600080600060608486031215611ecd57600080fd5b8335611ed881611e77565b92506020840135611ee881611e77565b929592945050506040919091013590565b803561ffff81168114611f0b57600080fd5b919050565b600080600060608486031215611f2557600080fd5b611f2e84611ef9565b9250611f3c60208501611ef9565b9150611f4a60408501611ef9565b90509250925092565b6001600160a01b0391909116815260200190565b600060208284031215611f7957600080fd5b5035919050565b600060208284031215611f9257600080fd5b611f9b82611ef9565b9392505050565b600060208284031215611fb457600080fd5b8135611f9b81611e77565b60008060408385031215611fd257600080fd5b50508035926020909101359150565b600080600060608486031215611ff657600080fd5b833561200181611e77565b925060208401359150604084013561201881611e77565b809150509250925092565b6000806040838503121561203657600080fd5b823561204181611e77565b9150602083013561205181611e77565b809150509250929050565b801515811461088d57600080fd5b6000806040838503121561207d57600080fd5b823561208881611e77565b915060208301356120518161205c565b600181811c908216806120ac57607f821691505b6020821081036120cc57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610783576107836120d2565b61ffff818116838216019080821115612116576121166120d2565b5092915050565b6020808252601b908201527a6e65772061646472657373206973205a65726f206164647265737360281b604082015260600190565b60006020828403121561216457600080fd5b8151611f9b81611e77565b6001600160a01b03929092168252602082015260400190565b60008060006060848603121561219d57600080fd5b8351925060208401519150604084015190509250925092565b8082028115828204841417610783576107836120d2565b6000826121ea57634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115610783576107836120d2565b634e487b7160e01b600052603260045260246000fd5b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156122685784516001600160a01b031683529383019391830191600101612243565b50506001600160a01b03969096166060850152505050608001529392505050565b60006020828403121561229b57600080fd5b5051919050565b6000602082840312156122b457600080fd5b8151611f9b8161205c56feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122034dcea0feef170aec559c36423f6a96390b271a63bd9f83bba634fab47b66ab164736f6c6343000814003300000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000004626262620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000026161000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000152d02c7e14af68000000000000000000000000000000000000000000000000000056bc75e2d63100000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000020f72dcf9141e1b6014c835b6d0709e32d806f1000000000000000000000000099c2d4937756cf66d04f7db362b87604f430396900000000000000000000000020f72dcf9141e1b6014c835b6d0709e32d806f100000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000012c0000000000000000000000000000000000000000000000000000000000000190000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001f4
Deployed ByteCode
0x6080604052600436106101c45760003560e01c806303807ee5146101d05780630445b667146101f957806306fdde031461020f578063095ea7b31461023157806318160ddd146102615780631c06a7e1146102765780631e94ed07146102cb57806323b872dd146102e1578063313ce5671461030157806332cde6641461031d57806335dcb05e1461033f578063395093511461036c57806342966c681461038c578063452ed4f1146103ac57806345b1b441146103cc5780635342acb4146103ec57806354fb8e401461042557806370a0823114610445578063715018a614610465578063768dc7101461047a57806379cc6790146104aa578063883bfec4146104ca5780638da5cb5b146104ea57806395d89b41146104ff5780639c1b8af5146105145780639cd441da1461052a5780639d0014b11461053d578063a335d4ff1461055d578063a457c2d714610573578063a9059cbb14610593578063b559f9b6146105b3578063b62496f5146105d3578063c5f956af14610603578063c788e83814610623578063d830678614610643578063dd62ed3e1461065d578063df8408fe1461067d578063f2fde38b1461069d578063f887ea40146106bd57600080fd5b366101cb57005b600080fd5b3480156101dc57600080fd5b506101e6600e5481565b6040519081526020015b60405180910390f35b34801561020557600080fd5b506101e6600b5481565b34801561021b57600080fd5b506102246106dd565b6040516101f09190611e29565b34801561023d57600080fd5b5061025161024c366004611e8c565b61076f565b60405190151581526020016101f0565b34801561026d57600080fd5b506002546101e6565b34801561028257600080fd5b506014546102a69061ffff80821691620100008104821691600160201b9091041683565b6040805161ffff948516815292841660208401529216918101919091526060016101f0565b3480156102d757600080fd5b506101e6600d5481565b3480156102ed57600080fd5b506102516102fc366004611eb8565b610789565b34801561030d57600080fd5b50604051601281526020016101f0565b34801561032957600080fd5b5061033d610338366004611f10565b6107ad565b005b34801561034b57600080fd5b5060085461035f906001600160a01b031681565b6040516101f09190611f53565b34801561037857600080fd5b50610251610387366004611e8c565b610861565b34801561039857600080fd5b5061033d6103a7366004611f67565b610883565b3480156103b857600080fd5b5060065461035f906001600160a01b031681565b3480156103d857600080fd5b5061033d6103e7366004611f80565b610890565b3480156103f857600080fd5b50610251610407366004611fa2565b6001600160a01b031660009081526010602052604090205460ff1690565b34801561043157600080fd5b5061033d610440366004611fa2565b61093d565b34801561045157600080fd5b506101e6610460366004611fa2565b610a01565b34801561047157600080fd5b5061033d610a1c565b34801561048657600080fd5b50610251610495366004611fa2565b60106020526000908152604090205460ff1681565b3480156104b657600080fd5b5061033d6104c5366004611e8c565b610a30565b3480156104d657600080fd5b5060095461035f906001600160a01b031681565b3480156104f657600080fd5b5061035f610a49565b34801561050b57600080fd5b50610224610a58565b34801561052057600080fd5b506101e6600c5481565b61033d610538366004611fbf565b610a67565b34801561054957600080fd5b5061033d610558366004611f67565b610a71565b34801561056957600080fd5b506101e661271081565b34801561057f57600080fd5b5061025161058e366004611e8c565b610a7e565b34801561059f57600080fd5b506102516105ae366004611e8c565b610af9565b3480156105bf57600080fd5b5060135461035f906001600160a01b031681565b3480156105df57600080fd5b506102516105ee366004611fa2565b60116020526000908152604090205460ff1681565b34801561060f57600080fd5b5060075461035f906001600160a01b031681565b34801561062f57600080fd5b5061033d61063e366004611fe1565b610b07565b34801561064f57600080fd5b50600f546102519060ff1681565b34801561066957600080fd5b506101e6610678366004612023565b610e4c565b34801561068957600080fd5b5061033d61069836600461206a565b610e77565b3480156106a957600080fd5b5061033d6106b8366004611fa2565b610eaa565b3480156106c957600080fd5b5060125461035f906001600160a01b031681565b6060600380546106ec90612098565b80601f016020809104026020016040519081016040528092919081815260200182805461071890612098565b80156107655780601f1061073a57610100808354040283529160200191610765565b820191906000526020600020905b81548152906001019060200180831161074857829003601f168201915b5050505050905090565b60003361077d818585610f20565b60019150505b92915050565b600033610797858285611044565b6107a28585856110be565b506001949350505050565b6107b56111e9565b6103e88361ffff16111580156107d157506103e88261ffff1611155b80156107e357506103e88161ffff1611155b6108245760405162461bcd60e51b815260206004820152600d60248201526c0a8dede40d0d2ced0e840e8c2f609b1b60448201526064015b60405180910390fd5b6014805461ffff94851663ffffffff199091161762010000938516939093029290921761ffff60201b1916600160201b9190931602919091179055565b60003361077d8185856108748383610e4c565b61087e91906120e8565b610f20565b61088d3382611248565b50565b6108986111e9565b600e54601454612710919061ffff600160201b82048116916201000081048216916108c49116866120fb565b6108ce91906120fb565b6108d891906120fb565b61ffff166108e691906120e8565b11156109345760405162461bcd60e51b815260206004820181905260248201527f50657263656e742063616e7420626520686967686572207468616e2031303025604482015260640161081b565b61ffff16600d55565b6109456111e9565b6009546001600160a01b03908116908216036109b95760405162461bcd60e51b815260206004820152602d60248201527f546865206469766964656e6420747261636b657220616c72656164792068617360448201526c2074686174206164647265737360981b606482015260840161081b565b6001600160a01b0381166109df5760405162461bcd60e51b815260040161081b9061211d565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b031660009081526020819052604090205490565b610a246111e9565b610a2e6000611368565b565b610a3b823383611044565b610a458282611248565b5050565b6005546001600160a01b031690565b6060600480546106ec90612098565b610a4582826113ba565b610a796111e9565b600b55565b60003381610a8c8286610e4c565b905083811015610aec5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161081b565b6107a28286868403610f20565b60003361077d8185856110be565b610b0f6111e9565b6001600160a01b038316610b355760405162461bcd60e51b815260040161081b9061211d565b611388821115610b795760405162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a59081c195c98d95b9d608a1b604482015260640161081b565b601380546001600160a01b0319166001600160a01b03851690811790915560405163031e79db60e41b81526331e79db090610bb8908690600401611f53565b600060405180830381600087803b158015610bd257600080fd5b505af1158015610be6573d6000803e3d6000fd5b505060135460405163031e79db60e41b81526001600160a01b0390911692506331e79db09150610c1a903090600401611f53565b600060405180830381600087803b158015610c3457600080fd5b505af1158015610c48573d6000803e3d6000fd5b50506013546001600160a01b031691506331e79db09050610c67610a49565b6040518263ffffffff1660e01b8152600401610c839190611f53565b600060405180830381600087803b158015610c9d57600080fd5b505af1158015610cb1573d6000803e3d6000fd5b505060135460125460405163031e79db60e41b81526001600160a01b0392831694506331e79db09350610cea9290911690600401611f53565b600060405180830381600087803b158015610d0457600080fd5b505af1158015610d18573d6000803e3d6000fd5b505060135460065460405163031e79db60e41b81526001600160a01b0392831694506331e79db09350610d519290911690600401611f53565b600060405180830381600087803b158015610d6b57600080fd5b505af1158015610d7f573d6000803e3d6000fd5b5050600980546001600160a01b0319166001600160a01b0385811691909117909155858116600090815260106020908152604091829020805460ff19166001179055600d879055601354825163d1af0c7d60e01b815292519316945063d1af0c7d935060048083019391928290030181865afa158015610e03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e279190612152565b600880546001600160a01b0319166001600160a01b0392909216919091179055505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610e7f6111e9565b6001600160a01b03919091166000908152601060205260409020805460ff1916911515919091179055565b610eb26111e9565b6001600160a01b038116610f175760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161081b565b61088d81611368565b6001600160a01b038316610f825760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161081b565b6001600160a01b038216610fe35760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161081b565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006110508484610e4c565b905060001981146110b857818110156110ab5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161081b565b6110b88484848403610f20565b50505050565b600f5460ff16156110d9576110d483838361149b565b505050565b6110e3838361162d565b156110f0576110f06116dd565b6110fb8383836117d9565b6013546001600160a01b0316156110d4576013546001600160a01b031663e30443bc8461112781610a01565b6040518363ffffffff1660e01b815260040161114492919061216f565b600060405180830381600087803b15801561115e57600080fd5b505af192505050801561116f575060015b506013546001600160a01b031663e30443bc8361118b81610a01565b6040518363ffffffff1660e01b81526004016111a892919061216f565b600060405180830381600087803b1580156111c257600080fd5b505af19250505080156111d3575060015b50600f5460ff166110d4576110d4600c54611864565b336111f2610a49565b6001600160a01b031614610a2e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161081b565b6001600160a01b0382166112a85760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161081b565b6001600160a01b0382166000908152602081905260409020548181101561131c5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161081b565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192916000805160206122c0833981519152910160405180910390a3505050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6113c5333083610789565b506012546113de9030906001600160a01b031683610f20565b6012546001600160a01b031663f305d719833084600080336114024261012c6120e8565b60405160e089901b6001600160e01b03191681526001600160a01b039687166004820152602481019590955260448501939093526064840191909152909216608482015260a481019190915260c40160606040518083038185885af115801561146f573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906114949190612188565b5050505050565b6001600160a01b0383166114ff5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161081b565b6001600160a01b0382166115615760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161081b565b6001600160a01b038316600090815260208190526040902054818110156115d95760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161081b565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290926000805160206122c0833981519152910160405180910390a36110b8565b60008061163930610a01565b9050600b5481101580156116505750600f5460ff16155b801561166a57506006546001600160a01b03858116911614155b801561168b5750600654600090611689906001600160a01b0316610a01565b115b80156116b057506001600160a01b03831660009081526010602052604090205460ff16155b80156116d557506001600160a01b03841660009081526010602052604090205460ff16155b949350505050565b600f805460ff1916600117905560006116f530610a01565b90506000612710600d54600e548461170d91906121b6565b61171791906120e8565b61172191906121cd565b90508015611740576007546117409082906001600160a01b0316611926565b600e5415611779576000612710600e548461175b91906121b6565b61176591906121cd565b90508015611777576117773082611248565b505b600d54156117cb576000612710600d548461179491906121b6565b61179e91906121cd565b905080156117c9576117c9612710600d54856117ba91906121b6565b6117c491906121cd565b611a84565b505b5050600f805460ff19169055565b6001600160a01b03831660009081526010602052604081205482919060019060ff168061181e57506001600160a01b03851660009081526010602052604090205460ff165b15611827575060005b801561185157611838868686611c33565b915061184482856121ef565b925061185186308461149b565b61185c86868561149b565b505050505050565b6013546040516001624d3b8760e01b03198152600481018390526001600160a01b039091169063ffb2c479906024016060604051808303816000875af19250505080156118ce575060408051601f3d908101601f191682019092526118cb91810190612188565b60015b1561088d5760408051848152602081018490529081018290526060810185905232906001907fc864333d6121033635ab41b29ae52f10a22cf4438c3e4f1c4c68518feb2f8a989060800160405180910390a350505050565b604080516002808252606082018352600092602083019080368337019050509050308160008151811061195b5761195b612202565b6001600160a01b03928316602091820292909201810191909152601254604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa1580156119b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119d89190612152565b816001815181106119eb576119eb612202565b6001600160a01b0392831660209182029290920101526012544291611a139130911686610f20565b60125460405163791ac94760e01b81526001600160a01b039091169063791ac94790611a4c908790600090879089908890600401612218565b600060405180830381600087803b158015611a6657600080fd5b505af1158015611a7a573d6000803e3d6000fd5b5050505050505050565b600854611a9d9030906001600160a01b03168382611cec565b6008546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611ace903090600401611f53565b602060405180830381865afa158015611aeb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b0f9190612289565b60085460135460405163a9059cbb60e01b81529293506000926001600160a01b039283169263a9059cbb92611b4b92911690869060040161216f565b6020604051808303816000875af1158015611b6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b8e91906122a2565b905080156110d457601354604051633243c79160e01b8152600481018490526001600160a01b0390911690633243c79190602401600060405180830381600087803b158015611bdc57600080fd5b505af1158015611bf0573d6000803e3d6000fd5b505060408051868152602081018690527f80195cc573b02cc48460cbca6e6e4cc85ddb91959d946e1c3025ea3d87942dc3935001905060405180910390a1505050565b6001600160a01b0383166000908152601160205260408120548190819060ff1615611c7057601454611c699061ffff16836120e8565b9150611cc3565b6001600160a01b03851660009081526011602052604090205460ff1615611ca857601454611c699062010000900461ffff16836120e8565b601454611cc090600160201b900461ffff16836120e8565b91505b8115611ce357612710611cd683866121b6565b611ce091906121cd565b90505b95945050505050565b60408051600380825260808201909252600091602082016060803683370190505090508481600081518110611d2357611d23612202565b6001600160a01b039283166020918202929092010152600954825191169082906001908110611d5457611d54612202565b60200260200101906001600160a01b031690816001600160a01b0316815250508381600281518110611d8857611d88612202565b6001600160a01b039283166020918202929092010152601254611dae9130911685610f20565b6012546001600160a01b0316635c11d7958460008486611dd0426103e86120e8565b6040518663ffffffff1660e01b8152600401611df0959493929190612218565b600060405180830381600087803b158015611e0a57600080fd5b505af1158015611e1e573d6000803e3d6000fd5b505050505050505050565b600060208083528351808285015260005b81811015611e5657858101830151858201604001528201611e3a565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b038116811461088d57600080fd5b60008060408385031215611e9f57600080fd5b8235611eaa81611e77565b946020939093013593505050565b600080600060608486031215611ecd57600080fd5b8335611ed881611e77565b92506020840135611ee881611e77565b929592945050506040919091013590565b803561ffff81168114611f0b57600080fd5b919050565b600080600060608486031215611f2557600080fd5b611f2e84611ef9565b9250611f3c60208501611ef9565b9150611f4a60408501611ef9565b90509250925092565b6001600160a01b0391909116815260200190565b600060208284031215611f7957600080fd5b5035919050565b600060208284031215611f9257600080fd5b611f9b82611ef9565b9392505050565b600060208284031215611fb457600080fd5b8135611f9b81611e77565b60008060408385031215611fd257600080fd5b50508035926020909101359150565b600080600060608486031215611ff657600080fd5b833561200181611e77565b925060208401359150604084013561201881611e77565b809150509250925092565b6000806040838503121561203657600080fd5b823561204181611e77565b9150602083013561205181611e77565b809150509250929050565b801515811461088d57600080fd5b6000806040838503121561207d57600080fd5b823561208881611e77565b915060208301356120518161205c565b600181811c908216806120ac57607f821691505b6020821081036120cc57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610783576107836120d2565b61ffff818116838216019080821115612116576121166120d2565b5092915050565b6020808252601b908201527a6e65772061646472657373206973205a65726f206164647265737360281b604082015260600190565b60006020828403121561216457600080fd5b8151611f9b81611e77565b6001600160a01b03929092168252602082015260400190565b60008060006060848603121561219d57600080fd5b8351925060208401519150604084015190509250925092565b8082028115828204841417610783576107836120d2565b6000826121ea57634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115610783576107836120d2565b634e487b7160e01b600052603260045260246000fd5b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156122685784516001600160a01b031683529383019391830191600101612243565b50506001600160a01b03969096166060850152505050608001529392505050565b60006020828403121561229b57600080fd5b5051919050565b6000602082840312156122b457600080fd5b8151611f9b8161205c56feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122034dcea0feef170aec559c36423f6a96390b271a63bd9f83bba634fab47b66ab164736f6c63430008140033