Contract Address Details
0x4369b719e505b1a829065BFe33B1f927573190f1
- Token
- BabyKibby (BabyKibby)
- Creator
- 0xb8445c–b38aed at 0x03b784–5a21cb
- Balance
- 1.098970290290054403 Doge
- Tokens
-
Fetching tokens...
- Transactions
- 187 Transactions
- Transfers
- 4,459 Transfers
- Gas Used
- 21,638,795
- Last Balance Update
- 27537494
Transactions
Token Transfers
Tokens
Internal Transactions
Coin Balance History
Logs
Code
Read Contract
Write Contract
Contract is not verified. However, we found a verified contract with the same bytecode in Blockscout DB 0xe20d3e4027288ea2a5b3b96d23dc5772c4e3e4a9.
All metadata displayed below is from that contract. In order to verify current contract, click Verify & Publish button
Verify & Publish
All metadata displayed below is from that contract. In order to verify current contract, click Verify & Publish button
- Contract name:
- BABYTOKEN
- Optimization enabled
- true
- Compiler version
- v0.8.4+commit.c7e474f2
- Optimization runs
- 200
- Verified at
- 2023-02-25T20:19:40.737225Z
Contract source code
// Sources flattened with hardhat v2.9.3 https://hardhat.org // File @openzeppelin/contracts/token/ERC20/IERC20.sol@v4.6.0 // SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.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); } // File @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol@v4.6.0 // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; /** * @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/utils/Context.sol@v4.6.0 // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } // File @openzeppelin/contracts/token/ERC20/ERC20.sol@v4.6.0 // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, 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 `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; } _balances[to] += amount; emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev 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/access/Ownable.sol@v4.6.0 // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } // File @openzeppelin/contracts/utils/math/SafeMath.sol@v4.6.0 // OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } } // File @openzeppelin/contracts/proxy/Clones.sol@v4.6.0 // OpenZeppelin Contracts v4.4.1 (proxy/Clones.sol) pragma solidity ^0.8.0; /** * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for * deploying minimal proxy contracts, also known as "clones". * * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies * > a minimal bytecode implementation that delegates all calls to a known, fixed address. * * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2` * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the * deterministic method. * * _Available since v3.4._ */ library Clones { /** * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. * * This function uses the create opcode, which should never revert. */ function clone(address implementation) internal returns (address instance) { assembly { let ptr := mload(0x40) mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(ptr, 0x14), shl(0x60, implementation)) mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000) instance := create(0, ptr, 0x37) } require(instance != address(0), "ERC1167: create failed"); } /** * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. * * This function uses the create2 opcode and a `salt` to deterministically deploy * the clone. Using the same `implementation` and `salt` multiple time will revert, since * the clones cannot be deployed twice at the same address. */ function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) { assembly { let ptr := mload(0x40) mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(ptr, 0x14), shl(0x60, implementation)) mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000) instance := create2(0, ptr, 0x37, salt) } require(instance != address(0), "ERC1167: create2 failed"); } /** * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. */ function predictDeterministicAddress( address implementation, bytes32 salt, address deployer ) internal pure returns (address predicted) { assembly { let ptr := mload(0x40) mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(ptr, 0x14), shl(0x60, implementation)) mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf3ff00000000000000000000000000000000) mstore(add(ptr, 0x38), shl(0x60, deployer)) mstore(add(ptr, 0x4c), salt) mstore(add(ptr, 0x6c), keccak256(ptr, 0x37)) predicted := keccak256(add(ptr, 0x37), 0x55) } } /** * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. */ function predictDeterministicAddress(address implementation, bytes32 salt) internal view returns (address predicted) { return predictDeterministicAddress(implementation, salt, address(this)); } } // File contracts/interfaces/IUniswapV2Factory.sol pragma solidity >=0.5.0; interface IUniswapV2Factory { event PairCreated( address indexed token0, address indexed token1, address pair, uint256 ); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint256) external view returns (address pair); function allPairsLength() external view returns (uint256); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } // File contracts/interfaces/IUniswapV2Router02.sol pragma solidity >=0.6.2; interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns ( uint256 amountA, uint256 amountB, uint256 liquidity ); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); function removeLiquidity( address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns (uint256 amountA, uint256 amountB); function removeLiquidityETH( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external returns (uint256 amountToken, uint256 amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountA, uint256 amountB); function removeLiquidityETHWithPermit( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountToken, uint256 amountETH); function swapExactTokensForTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapTokensForExactTokens( uint256 amountOut, uint256 amountInMax, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapExactETHForTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable returns (uint256[] memory amounts); function swapTokensForExactETH( uint256 amountOut, uint256 amountInMax, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapExactTokensForETH( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapETHForExactTokens( uint256 amountOut, address[] calldata path, address to, uint256 deadline ) external payable returns (uint256[] memory amounts); function quote( uint256 amountA, uint256 reserveA, uint256 reserveB ) external pure returns (uint256 amountB); function getAmountOut( uint256 amountIn, uint256 reserveIn, uint256 reserveOut ) external pure returns (uint256 amountOut); function getAmountIn( uint256 amountOut, uint256 reserveIn, uint256 reserveOut ) external pure returns (uint256 amountIn); function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns (uint256[] memory amounts); function getAmountsIn(uint256 amountOut, address[] calldata path) external view returns (uint256[] memory amounts); } interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external returns (uint256 amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } // File @openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol@v4.6.0 // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @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-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol@v4.6.0 // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20MetadataUpgradeable is IERC20Upgradeable { /** * @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-upgradeable/utils/AddressUpgradeable.sol@v4.6.0 // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } // File @openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol@v4.6.0 // OpenZeppelin Contracts (last updated v4.6.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`. */ modifier initializer() { bool isTopLevelCall = _setInitializedVersion(1); if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original * initialization step. This is essential to configure modules that are added through upgrades and that require * initialization. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. */ modifier reinitializer(uint8 version) { bool isTopLevelCall = _setInitializedVersion(version); if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(version); } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. */ function _disableInitializers() internal virtual { _setInitializedVersion(type(uint8).max); } function _setInitializedVersion(uint8 version) private returns (bool) { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, and for the lowest level // of initializers, because in other contexts the contract may have been reentered. if (_initializing) { require( version == 1 && !AddressUpgradeable.isContract(address(this)), "Initializable: contract is already initialized" ); return false; } else { require(_initialized < version, "Initializable: contract is already initialized"); _initialized = version; return true; } } } // File @openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol@v4.6.0 // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; } // File @openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol@v4.6.0 // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing { __ERC20_init_unchained(name_, symbol_); } function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, 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 `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; } _balances[to] += amount; emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev 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 {} /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[45] private __gap; } // File @openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol@v4.6.0 // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; /** * @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 OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; } // File contracts/interfaces/IUniswapV2Pair.sol pragma solidity >=0.5.0; interface IUniswapV2Pair { event Approval( address indexed owner, address indexed spender, uint256 value ); event Transfer(address indexed from, address indexed to, uint256 value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint256); function balanceOf(address owner) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 value) external returns (bool); function transfer(address to, uint256 value) external returns (bool); function transferFrom( address from, address to, uint256 value ) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint256); function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; event Mint(address indexed sender, uint256 amount0, uint256 amount1); event Burn( address indexed sender, uint256 amount0, uint256 amount1, address indexed to ); event Swap( address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint256); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns ( uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast ); function price0CumulativeLast() external view returns (uint256); function price1CumulativeLast() external view returns (uint256); function kLast() external view returns (uint256); function mint(address to) external returns (uint256 liquidity); function burn(address to) external returns (uint256 amount0, uint256 amount1); function swap( uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data ) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } // File contracts/libs/SafeMathInt.sol pragma solidity =0.8.4; /** * @title SafeMathInt * @dev Math operations for int256 with overflow safety checks. */ library SafeMathInt { int256 private constant MIN_INT256 = int256(1) << 255; int256 private constant MAX_INT256 = ~(int256(1) << 255); /** * @dev Multiplies two int256 variables and fails on overflow. */ function mul(int256 a, int256 b) internal pure returns (int256) { int256 c = a * b; // Detect overflow when multiplying MIN_INT256 with -1 require(c != MIN_INT256 || (a & MIN_INT256) != (b & MIN_INT256)); require((b == 0) || (c / b == a)); return c; } /** * @dev Division of two int256 variables and fails on overflow. */ function div(int256 a, int256 b) internal pure returns (int256) { // Prevent overflow when dividing MIN_INT256 by -1 require(b != -1 || a != MIN_INT256); // Solidity already throws when dividing by 0. return a / b; } /** * @dev Subtracts two int256 variables and fails on overflow. */ function sub(int256 a, int256 b) internal pure returns (int256) { int256 c = a - b; require((b >= 0 && c <= a) || (b < 0 && c > a)); return c; } /** * @dev Adds two int256 variables and fails on overflow. */ function add(int256 a, int256 b) internal pure returns (int256) { int256 c = a + b; require((b >= 0 && c >= a) || (b < 0 && c < a)); return c; } /** * @dev Converts to absolute value, and fails on overflow. */ function abs(int256 a) internal pure returns (int256) { require(a != MIN_INT256); return a < 0 ? -a : a; } function toUint256Safe(int256 a) internal pure returns (uint256) { require(a >= 0); return uint256(a); } } // File contracts/libs/SafeMathUint.sol pragma solidity =0.8.4; /** * @title SafeMathUint * @dev Math operations with safety checks that revert on error */ library SafeMathUint { function toInt256Safe(uint256 a) internal pure returns (int256) { int256 b = int256(a); require(b >= 0); return b; } } // File contracts/baby/IterableMapping.sol pragma solidity =0.8.4; library IterableMapping { // Iterable mapping from address to uint; struct Map { address[] keys; mapping(address => uint256) values; mapping(address => uint256) indexOf; mapping(address => bool) inserted; } function get(Map storage map, address key) public view returns (uint256) { return map.values[key]; } function getIndexOfKey(Map storage map, address key) public view returns (int256) { if (!map.inserted[key]) { return -1; } return int256(map.indexOf[key]); } function getKeyAtIndex(Map storage map, uint256 index) public view returns (address) { return map.keys[index]; } function size(Map storage map) public view returns (uint256) { return map.keys.length; } function set( Map storage map, address key, uint256 val ) public { if (map.inserted[key]) { map.values[key] = val; } else { map.inserted[key] = true; map.values[key] = val; map.indexOf[key] = map.keys.length; map.keys.push(key); } } function remove(Map storage map, address key) public { if (!map.inserted[key]) { return; } delete map.inserted[key]; delete map.values[key]; uint256 index = map.indexOf[key]; uint256 lastIndex = map.keys.length - 1; address lastKey = map.keys[lastIndex]; map.indexOf[lastKey] = index; delete map.indexOf[key]; map.keys[index] = lastKey; map.keys.pop(); } } // File contracts/baby/BabyTokenDividendTracker.sol pragma solidity =0.8.4; /// @title Dividend-Paying Token Interface /// @author Roger Wu (https://github.com/roger-wu) /// @dev An interface for a dividend-paying token contract. interface DividendPayingTokenInterface { /// @notice View the amount of dividend in wei that an address can withdraw. /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` can withdraw. function dividendOf(address _owner) external view returns (uint256); /// @notice Withdraws the ether distributed to the sender. /// @dev SHOULD transfer `dividendOf(msg.sender)` wei to `msg.sender`, and `dividendOf(msg.sender)` SHOULD be 0 after the transfer. /// MUST emit a `DividendWithdrawn` event if the amount of ether transferred is greater than 0. function withdrawDividend() external; /// @dev This event MUST emit when ether is distributed to token holders. /// @param from The address which sends ether to this contract. /// @param weiAmount The amount of distributed ether in wei. event DividendsDistributed(address indexed from, uint256 weiAmount); /// @dev This event MUST emit when an address withdraws their dividend. /// @param to The address which withdraws ether from this contract. /// @param weiAmount The amount of withdrawn ether in wei. event DividendWithdrawn(address indexed to, uint256 weiAmount); } /// @title Dividend-Paying Token Optional Interface /// @author Roger Wu (https://github.com/roger-wu) /// @dev OPTIONAL functions for a dividend-paying token contract. interface DividendPayingTokenOptionalInterface { /// @notice View the amount of dividend in wei that an address can withdraw. /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` can withdraw. function withdrawableDividendOf(address _owner) external view returns (uint256); /// @notice View the amount of dividend in wei that an address has withdrawn. /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` has withdrawn. function withdrawnDividendOf(address _owner) external view returns (uint256); /// @notice View the amount of dividend in wei that an address has earned in total. /// @dev accumulativeDividendOf(_owner) = withdrawableDividendOf(_owner) + withdrawnDividendOf(_owner) /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` has earned in total. function accumulativeDividendOf(address _owner) external view returns (uint256); } /// @title Dividend-Paying Token /// @author Roger Wu (https://github.com/roger-wu) /// @dev A mintable ERC20 token that allows anyone to pay and distribute ether /// to token holders as dividends and allows token holders to withdraw their dividends. /// Reference: the source code of PoWH3D: https://etherscan.io/address/0xB3775fB83F7D12A36E0475aBdD1FCA35c091efBe#code contract DividendPayingToken is ERC20Upgradeable, OwnableUpgradeable, DividendPayingTokenInterface, DividendPayingTokenOptionalInterface { using SafeMath for uint256; using SafeMathUint for uint256; using SafeMathInt for int256; address public rewardToken; // With `magnitude`, we can properly distribute dividends even if the amount of received ether is small. // For more discussion about choosing the value of `magnitude`, // see https://github.com/ethereum/EIPs/issues/1726#issuecomment-472352728 uint256 internal constant magnitude = 2**128; uint256 internal magnifiedDividendPerShare; // About dividendCorrection: // If the token balance of a `_user` is never changed, the dividend of `_user` can be computed with: // `dividendOf(_user) = dividendPerShare * balanceOf(_user)`. // When `balanceOf(_user)` is changed (via minting/burning/transferring tokens), // `dividendOf(_user)` should not be changed, // but the computed value of `dividendPerShare * balanceOf(_user)` is changed. // To keep the `dividendOf(_user)` unchanged, we add a correction term: // `dividendOf(_user) = dividendPerShare * balanceOf(_user) + dividendCorrectionOf(_user)`, // where `dividendCorrectionOf(_user)` is updated whenever `balanceOf(_user)` is changed: // `dividendCorrectionOf(_user) = dividendPerShare * (old balanceOf(_user)) - (new balanceOf(_user))`. // So now `dividendOf(_user)` returns the same value before and after `balanceOf(_user)` is changed. mapping(address => int256) internal magnifiedDividendCorrections; mapping(address => uint256) internal withdrawnDividends; uint256 public totalDividendsDistributed; function __DividendPayingToken_init( address _rewardToken, string memory _name, string memory _symbol ) internal initializer { __Ownable_init(); __ERC20_init(_name, _symbol); rewardToken = _rewardToken; } function distributeCAKEDividends(uint256 amount) public onlyOwner { require(totalSupply() > 0); if (amount > 0) { magnifiedDividendPerShare = magnifiedDividendPerShare.add( (amount).mul(magnitude) / totalSupply() ); emit DividendsDistributed(msg.sender, amount); totalDividendsDistributed = totalDividendsDistributed.add(amount); } } /// @notice Withdraws the ether distributed to the sender. /// @dev It emits a `DividendWithdrawn` event if the amount of withdrawn ether is greater than 0. function withdrawDividend() public virtual override { _withdrawDividendOfUser(payable(msg.sender)); } /// @notice Withdraws the ether distributed to the sender. /// @dev It emits a `DividendWithdrawn` event if the amount of withdrawn ether is greater than 0. function _withdrawDividendOfUser(address payable user) internal returns (uint256) { uint256 _withdrawableDividend = withdrawableDividendOf(user); if (_withdrawableDividend > 0) { withdrawnDividends[user] = withdrawnDividends[user].add( _withdrawableDividend ); emit DividendWithdrawn(user, _withdrawableDividend); bool success = IERC20(rewardToken).transfer( user, _withdrawableDividend ); if (!success) { withdrawnDividends[user] = withdrawnDividends[user].sub( _withdrawableDividend ); return 0; } return _withdrawableDividend; } return 0; } /// @notice View the amount of dividend in wei that an address can withdraw. /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` can withdraw. function dividendOf(address _owner) public view override returns (uint256) { return withdrawableDividendOf(_owner); } /// @notice View the amount of dividend in wei that an address can withdraw. /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` can withdraw. function withdrawableDividendOf(address _owner) public view override returns (uint256) { return accumulativeDividendOf(_owner).sub(withdrawnDividends[_owner]); } /// @notice View the amount of dividend in wei that an address has withdrawn. /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` has withdrawn. function withdrawnDividendOf(address _owner) public view override returns (uint256) { return withdrawnDividends[_owner]; } /// @notice View the amount of dividend in wei that an address has earned in total. /// @dev accumulativeDividendOf(_owner) = withdrawableDividendOf(_owner) + withdrawnDividendOf(_owner) /// = (magnifiedDividendPerShare * balanceOf(_owner) + magnifiedDividendCorrections[_owner]) / magnitude /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` has earned in total. function accumulativeDividendOf(address _owner) public view override returns (uint256) { return magnifiedDividendPerShare .mul(balanceOf(_owner)) .toInt256Safe() .add(magnifiedDividendCorrections[_owner]) .toUint256Safe() / magnitude; } /// @dev Internal function that transfer tokens from one address to another. /// Update magnifiedDividendCorrections to keep dividends unchanged. /// @param from The address to transfer from. /// @param to The address to transfer to. /// @param value The amount to be transferred. function _transfer( address from, address to, uint256 value ) internal virtual override { require(false); int256 _magCorrection = magnifiedDividendPerShare .mul(value) .toInt256Safe(); magnifiedDividendCorrections[from] = magnifiedDividendCorrections[from] .add(_magCorrection); magnifiedDividendCorrections[to] = magnifiedDividendCorrections[to].sub( _magCorrection ); } /// @dev Internal function that mints tokens to an account. /// Update magnifiedDividendCorrections to keep dividends unchanged. /// @param account The account that will receive the created tokens. /// @param value The amount that will be created. function _mint(address account, uint256 value) internal override { super._mint(account, value); magnifiedDividendCorrections[account] = magnifiedDividendCorrections[ account ].sub((magnifiedDividendPerShare.mul(value)).toInt256Safe()); } /// @dev Internal function that burns an amount of the token of a given account. /// Update magnifiedDividendCorrections to keep dividends unchanged. /// @param account The account whose tokens will be burnt. /// @param value The amount that will be burnt. function _burn(address account, uint256 value) internal override { super._burn(account, value); magnifiedDividendCorrections[account] = magnifiedDividendCorrections[ account ].add((magnifiedDividendPerShare.mul(value)).toInt256Safe()); } function _setBalance(address account, uint256 newBalance) internal { uint256 currentBalance = balanceOf(account); if (newBalance > currentBalance) { uint256 mintAmount = newBalance.sub(currentBalance); _mint(account, mintAmount); } else if (newBalance < currentBalance) { uint256 burnAmount = currentBalance.sub(newBalance); _burn(account, burnAmount); } } } contract BABYTOKENDividendTracker is OwnableUpgradeable, DividendPayingToken { using SafeMath for uint256; using SafeMathInt for int256; using IterableMapping for IterableMapping.Map; IterableMapping.Map private tokenHoldersMap; uint256 public lastProcessedIndex; mapping(address => bool) public excludedFromDividends; mapping(address => uint256) public lastClaimTimes; uint256 public claimWait; uint256 public minimumTokenBalanceForDividends; event ExcludeFromDividends(address indexed account); event ClaimWaitUpdated(uint256 indexed newValue, uint256 indexed oldValue); event Claim( address indexed account, uint256 amount, bool indexed automatic ); constructor(address rewardToken_, uint256 minimumTokenBalanceForDividends_) { DividendPayingToken.__DividendPayingToken_init( rewardToken_, "DIVIDEND_TRACKER", "DIVIDEND_TRACKER" ); claimWait = 3600; minimumTokenBalanceForDividends = minimumTokenBalanceForDividends_; } function _transfer( address, address, uint256 ) internal pure override { require(false, "Dividend_Tracker: No transfers allowed"); } function withdrawDividend() public pure override { require( false, "Dividend_Tracker: withdrawDividend disabled. Use the 'claim' function on the main BABYTOKEN contract." ); } function excludeFromDividends(address account) external onlyOwner { require(!excludedFromDividends[account]); excludedFromDividends[account] = true; _setBalance(account, 0); tokenHoldersMap.remove(account); emit ExcludeFromDividends(account); } function isExcludedFromDividends(address account) public view returns (bool) { return excludedFromDividends[account]; } function updateClaimWait(uint256 newClaimWait) external onlyOwner { require( newClaimWait >= 3600 && newClaimWait <= 86400, "Dividend_Tracker: claimWait must be updated to between 1 and 24 hours" ); require( newClaimWait != claimWait, "Dividend_Tracker: Cannot update claimWait to same value" ); emit ClaimWaitUpdated(newClaimWait, claimWait); claimWait = newClaimWait; } function updateMinimumTokenBalanceForDividends(uint256 amount) external onlyOwner { minimumTokenBalanceForDividends = amount; } function getLastProcessedIndex() external view returns (uint256) { return lastProcessedIndex; } function getNumberOfTokenHolders() external view returns (uint256) { return tokenHoldersMap.keys.length; } function getAccount(address _account) public view returns ( address account, int256 index, int256 iterationsUntilProcessed, uint256 withdrawableDividends, uint256 totalDividends, uint256 lastClaimTime, uint256 nextClaimTime, uint256 secondsUntilAutoClaimAvailable ) { account = _account; index = tokenHoldersMap.getIndexOfKey(account); iterationsUntilProcessed = -1; if (index >= 0) { if (uint256(index) > lastProcessedIndex) { iterationsUntilProcessed = index.sub( int256(lastProcessedIndex) ); } else { uint256 processesUntilEndOfArray = tokenHoldersMap.keys.length > lastProcessedIndex ? tokenHoldersMap.keys.length.sub(lastProcessedIndex) : 0; iterationsUntilProcessed = index.add( int256(processesUntilEndOfArray) ); } } withdrawableDividends = withdrawableDividendOf(account); totalDividends = accumulativeDividendOf(account); lastClaimTime = lastClaimTimes[account]; nextClaimTime = lastClaimTime > 0 ? lastClaimTime.add(claimWait) : 0; secondsUntilAutoClaimAvailable = nextClaimTime > block.timestamp ? nextClaimTime.sub(block.timestamp) : 0; } function getAccountAtIndex(uint256 index) public view returns ( address, int256, int256, uint256, uint256, uint256, uint256, uint256 ) { if (index >= tokenHoldersMap.size()) { return (address(0), -1, -1, 0, 0, 0, 0, 0); } address account = tokenHoldersMap.getKeyAtIndex(index); return getAccount(account); } function canAutoClaim(uint256 lastClaimTime) private view returns (bool) { if (lastClaimTime > block.timestamp) { return false; } return block.timestamp.sub(lastClaimTime) >= claimWait; } function setBalance(address payable account, uint256 newBalance) external onlyOwner { if (excludedFromDividends[account]) { return; } if (newBalance >= minimumTokenBalanceForDividends) { _setBalance(account, newBalance); tokenHoldersMap.set(account, newBalance); } else { _setBalance(account, 0); tokenHoldersMap.remove(account); } processAccount(account, true); } function process(uint256 gas) public returns ( uint256, uint256, uint256 ) { uint256 numberOfTokenHolders = tokenHoldersMap.keys.length; if (numberOfTokenHolders == 0) { return (0, 0, lastProcessedIndex); } uint256 _lastProcessedIndex = lastProcessedIndex; uint256 gasUsed = 0; uint256 gasLeft = gasleft(); uint256 iterations = 0; uint256 claims = 0; while (gasUsed < gas && iterations < numberOfTokenHolders) { _lastProcessedIndex++; if (_lastProcessedIndex >= tokenHoldersMap.keys.length) { _lastProcessedIndex = 0; } address account = tokenHoldersMap.keys[_lastProcessedIndex]; if (canAutoClaim(lastClaimTimes[account])) { if (processAccount(payable(account), true)) { claims++; } } iterations++; uint256 newGasLeft = gasleft(); if (gasLeft > newGasLeft) { gasUsed = gasUsed.add(gasLeft.sub(newGasLeft)); } gasLeft = newGasLeft; } lastProcessedIndex = _lastProcessedIndex; return (iterations, claims, lastProcessedIndex); } function processAccount(address payable account, bool automatic) public onlyOwner returns (bool) { uint256 amount = _withdrawDividendOfUser(account); if (amount > 0) { lastClaimTimes[account] = block.timestamp; emit Claim(account, amount, automatic); return true; } return false; } } // File contracts/BaseToken.sol pragma solidity =0.8.4; enum TokenType { standard, antiBotStandard, liquidityGenerator, antiBotLiquidityGenerator, baby, antiBotBaby, buybackBaby, antiBotBuybackBaby } abstract contract BaseToken { event TokenCreated( address indexed owner, address indexed token, TokenType tokenType, uint256 version ); } // File contracts/tokens/BabyToken.sol pragma solidity =0.8.4; contract BABYTOKEN is ERC20, Ownable, BaseToken { using SafeMath for uint256; uint256 public constant VERSION = 1; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private swapping; BABYTOKENDividendTracker public dividendTracker; address public rewardToken; uint256 public swapTokensAtAmount; uint256 public tokenRewardsFee; uint256 public liquidityFee; uint256 public marketingFee; uint256 public totalFees; address public _marketingWalletAddress; uint256 public gasForProcessing; // exlcude from fees and max transaction amount mapping(address => bool) private _isExcludedFromFees; // store addresses that a automatic market maker pairs. Any transfer *to* these addresses // could be subject to a maximum transfer amount mapping(address => bool) public automatedMarketMakerPairs; event UpdateDividendTracker( address indexed newAddress, address indexed oldAddress ); event UpdateUniswapV2Router( address indexed newAddress, address indexed oldAddress ); event ExcludeFromFees(address indexed account, bool isExcluded); event ExcludeMultipleAccountsFromFees(address[] accounts, bool isExcluded); event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event LiquidityWalletUpdated( address indexed newLiquidityWallet, address indexed oldLiquidityWallet ); event GasForProcessingUpdated( uint256 indexed newValue, uint256 indexed oldValue ); event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiqudity ); event SendDividends(uint256 tokensSwapped, uint256 amount); event ProcessedDividendTracker( uint256 iterations, uint256 claims, uint256 lastProcessedIndex, bool indexed automatic, uint256 gas, address indexed processor ); constructor( string memory name_, string memory symbol_, uint256 totalSupply_, address[3] memory addrs, // reward, router, marketing wallet uint256[3] memory feeSettings, // rewards, liquidity, marketing uint256 minimumTokenBalanceForDividends_, address serviceFeeReceiver_, uint256 serviceFee_ ) payable ERC20(name_, symbol_) { rewardToken = addrs[0]; _marketingWalletAddress = addrs[2]; require( msg.sender != _marketingWalletAddress, "Owner and marketing wallet cannot be the same" ); tokenRewardsFee = feeSettings[0]; liquidityFee = feeSettings[1]; marketingFee = feeSettings[2]; totalFees = tokenRewardsFee.add(liquidityFee).add(marketingFee); require(totalFees <= 25, "Total fee is over 25%"); swapTokensAtAmount = totalSupply_.mul(2).div(10**6); // 0.002% // use by default 300,000 gas to process auto-claiming dividends gasForProcessing = 300000; dividendTracker = new BABYTOKENDividendTracker( rewardToken, minimumTokenBalanceForDividends_ ); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(addrs[1]); // Create a uniswap pair for this new token address _uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = _uniswapV2Pair; _setAutomatedMarketMakerPair(_uniswapV2Pair, true); // exclude from receiving dividends dividendTracker.excludeFromDividends(address(dividendTracker)); dividendTracker.excludeFromDividends(address(this)); dividendTracker.excludeFromDividends(owner()); dividendTracker.excludeFromDividends(address(0xdead)); dividendTracker.excludeFromDividends(address(_uniswapV2Router)); // exclude from paying fees or having max transaction amount excludeFromFees(owner(), true); excludeFromFees(_marketingWalletAddress, true); excludeFromFees(address(this), true); /* _mint is an internal function in ERC20.sol that is only called here, and CANNOT be called ever again */ _mint(owner(), totalSupply_); emit TokenCreated(owner(), address(this), TokenType.baby, VERSION); payable(serviceFeeReceiver_).transfer(serviceFee_); } receive() external payable {} function setSwapTokensAtAmount(uint256 amount) external onlyOwner { swapTokensAtAmount = amount; } function updateDividendTracker(address newAddress) public onlyOwner { require( newAddress != address(dividendTracker), "BABYTOKEN: The dividend tracker already has that address" ); BABYTOKENDividendTracker newDividendTracker = BABYTOKENDividendTracker( payable(newAddress) ); require( newDividendTracker.owner() == address(this), "BABYTOKEN: The new dividend tracker must be owned by the BABYTOKEN token contract" ); newDividendTracker.excludeFromDividends(address(newDividendTracker)); newDividendTracker.excludeFromDividends(address(this)); newDividendTracker.excludeFromDividends(owner()); newDividendTracker.excludeFromDividends(address(uniswapV2Router)); emit UpdateDividendTracker(newAddress, address(dividendTracker)); dividendTracker = newDividendTracker; } function updateUniswapV2Router(address newAddress) public onlyOwner { require( newAddress != address(uniswapV2Router), "BABYTOKEN: The router already has that address" ); emit UpdateUniswapV2Router(newAddress, address(uniswapV2Router)); uniswapV2Router = IUniswapV2Router02(newAddress); address _uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()) .createPair(address(this), uniswapV2Router.WETH()); uniswapV2Pair = _uniswapV2Pair; } function excludeFromFees(address account, bool excluded) public onlyOwner { require( _isExcludedFromFees[account] != excluded, "BABYTOKEN: Account is already the value of 'excluded'" ); _isExcludedFromFees[account] = excluded; emit ExcludeFromFees(account, excluded); } function excludeMultipleAccountsFromFees( address[] calldata accounts, bool excluded ) public onlyOwner { for (uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFees[accounts[i]] = excluded; } emit ExcludeMultipleAccountsFromFees(accounts, excluded); } function setMarketingWallet(address payable wallet) external onlyOwner { _marketingWalletAddress = wallet; } function setTokenRewardsFee(uint256 value) external onlyOwner { tokenRewardsFee = value; totalFees = tokenRewardsFee.add(liquidityFee).add(marketingFee); require(totalFees <= 25, "Total fee is over 25%"); } function setLiquiditFee(uint256 value) external onlyOwner { liquidityFee = value; totalFees = tokenRewardsFee.add(liquidityFee).add(marketingFee); require(totalFees <= 25, "Total fee is over 25%"); } function setMarketingFee(uint256 value) external onlyOwner { marketingFee = value; totalFees = tokenRewardsFee.add(liquidityFee).add(marketingFee); require(totalFees <= 25, "Total fee is over 25%"); } function setAutomatedMarketMakerPair(address pair, bool value) public onlyOwner { require( pair != uniswapV2Pair, "BABYTOKEN: The PancakeSwap pair cannot be removed from automatedMarketMakerPairs" ); _setAutomatedMarketMakerPair(pair, value); } function _setAutomatedMarketMakerPair(address pair, bool value) private { require( automatedMarketMakerPairs[pair] != value, "BABYTOKEN: Automated market maker pair is already set to that value" ); automatedMarketMakerPairs[pair] = value; if (value) { dividendTracker.excludeFromDividends(pair); } emit SetAutomatedMarketMakerPair(pair, value); } function updateGasForProcessing(uint256 newValue) public onlyOwner { require( newValue >= 200000 && newValue <= 500000, "BABYTOKEN: gasForProcessing must be between 200,000 and 500,000" ); require( newValue != gasForProcessing, "BABYTOKEN: Cannot update gasForProcessing to same value" ); emit GasForProcessingUpdated(newValue, gasForProcessing); gasForProcessing = newValue; } function updateClaimWait(uint256 claimWait) external onlyOwner { dividendTracker.updateClaimWait(claimWait); } function getClaimWait() external view returns (uint256) { return dividendTracker.claimWait(); } function updateMinimumTokenBalanceForDividends(uint256 amount) external onlyOwner { dividendTracker.updateMinimumTokenBalanceForDividends(amount); } function getMinimumTokenBalanceForDividends() external view returns (uint256) { return dividendTracker.minimumTokenBalanceForDividends(); } function getTotalDividendsDistributed() external view returns (uint256) { return dividendTracker.totalDividendsDistributed(); } function isExcludedFromFees(address account) public view returns (bool) { return _isExcludedFromFees[account]; } function withdrawableDividendOf(address account) public view returns (uint256) { return dividendTracker.withdrawableDividendOf(account); } function dividendTokenBalanceOf(address account) public view returns (uint256) { return dividendTracker.balanceOf(account); } function excludeFromDividends(address account) external onlyOwner { dividendTracker.excludeFromDividends(account); } function isExcludedFromDividends(address account) public view returns (bool) { return dividendTracker.isExcludedFromDividends(account); } function getAccountDividendsInfo(address account) external view returns ( address, int256, int256, uint256, uint256, uint256, uint256, uint256 ) { return dividendTracker.getAccount(account); } function getAccountDividendsInfoAtIndex(uint256 index) external view returns ( address, int256, int256, uint256, uint256, uint256, uint256, uint256 ) { return dividendTracker.getAccountAtIndex(index); } function processDividendTracker(uint256 gas) external { ( uint256 iterations, uint256 claims, uint256 lastProcessedIndex ) = dividendTracker.process(gas); emit ProcessedDividendTracker( iterations, claims, lastProcessedIndex, false, gas, tx.origin ); } function claim() external { dividendTracker.processAccount(payable(msg.sender), false); } function getLastProcessedIndex() external view returns (uint256) { return dividendTracker.getLastProcessedIndex(); } function getNumberOfDividendTokenHolders() external view returns (uint256) { return dividendTracker.getNumberOfTokenHolders(); } function _transfer( address from, address to, uint256 amount ) internal override { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); if (amount == 0) { super._transfer(from, to, 0); return; } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= swapTokensAtAmount; if ( canSwap && !swapping && !automatedMarketMakerPairs[from] && from != owner() && to != owner() ) { swapping = true; uint256 marketingTokens = contractTokenBalance .mul(marketingFee) .div(totalFees); swapAndSendToFee(marketingTokens); uint256 swapTokens = contractTokenBalance.mul(liquidityFee).div( totalFees ); swapAndLiquify(swapTokens); uint256 sellTokens = balanceOf(address(this)); swapAndSendDividends(sellTokens); swapping = false; } bool takeFee = !swapping; // if any account belongs to _isExcludedFromFee account then remove the fee if (_isExcludedFromFees[from] || _isExcludedFromFees[to]) { takeFee = false; } if (takeFee) { uint256 fees = amount.mul(totalFees).div(100); if (automatedMarketMakerPairs[to]) { fees += amount.mul(1).div(100); } amount = amount.sub(fees); super._transfer(from, address(this), fees); } super._transfer(from, to, amount); try dividendTracker.setBalance(payable(from), balanceOf(from)) {} catch {} try dividendTracker.setBalance(payable(to), balanceOf(to)) {} catch {} if (!swapping) { uint256 gas = gasForProcessing; try dividendTracker.process(gas) returns ( uint256 iterations, uint256 claims, uint256 lastProcessedIndex ) { emit ProcessedDividendTracker( iterations, claims, lastProcessedIndex, true, gas, tx.origin ); } catch {} } } function swapAndSendToFee(uint256 tokens) private { uint256 initialCAKEBalance = IERC20(rewardToken).balanceOf( address(this) ); swapTokensForCake(tokens); uint256 newBalance = (IERC20(rewardToken).balanceOf(address(this))).sub( initialCAKEBalance ); IERC20(rewardToken).transfer(_marketingWalletAddress, newBalance); } function swapAndLiquify(uint256 tokens) private { // split the contract balance into halves uint256 half = tokens.div(2); uint256 otherHalf = tokens.sub(half); // capture the contract's current ETH balance. // this is so that we can capture exactly the amount of ETH that the // swap creates, and not make the liquidity event include any ETH that // has been manually sent to the contract uint256 initialBalance = address(this).balance; // swap tokens for ETH swapTokensForEth(half); // <- this breaks the ETH -> HATE swap when swap+liquify is triggered // how much ETH did we just swap into? uint256 newBalance = address(this).balance.sub(initialBalance); // add liquidity to uniswap addLiquidity(otherHalf, newBalance); emit SwapAndLiquify(half, newBalance, otherHalf); } function swapTokensForEth(uint256 tokenAmount) private { // generate the uniswap pair path of token -> weth address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); // make the swap uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, // accept any amount of ETH path, address(this), block.timestamp ); } function swapTokensForCake(uint256 tokenAmount) private { address[] memory path = new address[](3); path[0] = address(this); path[1] = uniswapV2Router.WETH(); path[2] = rewardToken; _approve(address(this), address(uniswapV2Router), tokenAmount); // make the swap uniswapV2Router.swapExactTokensForTokensSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { // approve token transfer to cover all possible scenarios _approve(address(this), address(uniswapV2Router), tokenAmount); // add the liquidity uniswapV2Router.addLiquidityETH{value: ethAmount}( address(this), tokenAmount, 0, // slippage is unavoidable 0, // slippage is unavoidable address(0), block.timestamp ); } function swapAndSendDividends(uint256 tokens) private { swapTokensForCake(tokens); uint256 dividends = IERC20(rewardToken).balanceOf(address(this)); bool success = IERC20(rewardToken).transfer( address(dividendTracker), dividends ); if (success) { dividendTracker.distributeCAKEDividends(dividends); emit SendDividends(tokens, dividends); } } }
Contract ABI
[{"type":"constructor","inputs":[{"type":"string","name":"name_","internalType":"string"},{"type":"string","name":"symbol_","internalType":"string"},{"type":"uint256","name":"totalSupply_","internalType":"uint256"},{"type":"address[3]","name":"addrs","internalType":"address[3]"},{"type":"uint256[3]","name":"feeSettings","internalType":"uint256[3]"},{"type":"uint256","name":"minimumTokenBalanceForDividends_","internalType":"uint256"},{"type":"address","name":"serviceFeeReceiver_","internalType":"address"},{"type":"uint256","name":"serviceFee_","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"VERSION","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"_marketingWalletAddress","inputs":[]},{"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":"claim","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":"dividendTokenBalanceOf","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract BABYTOKENDividendTracker"}],"name":"dividendTracker","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"excludeFromDividends","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"excludeFromFees","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"bool","name":"excluded","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"excludeMultipleAccountsFromFees","inputs":[{"type":"address[]","name":"accounts","internalType":"address[]"},{"type":"bool","name":"excluded","internalType":"bool"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"gasForProcessing","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"},{"type":"int256","name":"","internalType":"int256"},{"type":"int256","name":"","internalType":"int256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"}],"name":"getAccountDividendsInfo","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"},{"type":"int256","name":"","internalType":"int256"},{"type":"int256","name":"","internalType":"int256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"}],"name":"getAccountDividendsInfoAtIndex","inputs":[{"type":"uint256","name":"index","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getClaimWait","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getLastProcessedIndex","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getMinimumTokenBalanceForDividends","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getNumberOfDividendTokenHolders","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getTotalDividendsDistributed","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":"isExcludedFromDividends","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isExcludedFromFees","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"liquidityFee","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"marketingFee","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":"processDividendTracker","inputs":[{"type":"uint256","name":"gas","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"rewardToken","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setAutomatedMarketMakerPair","inputs":[{"type":"address","name":"pair","internalType":"address"},{"type":"bool","name":"value","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setLiquiditFee","inputs":[{"type":"uint256","name":"value","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setMarketingFee","inputs":[{"type":"uint256","name":"value","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setMarketingWallet","inputs":[{"type":"address","name":"wallet","internalType":"address payable"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setSwapTokensAtAmount","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setTokenRewardsFee","inputs":[{"type":"uint256","name":"value","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"swapTokensAtAmount","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"tokenRewardsFee","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalFees","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":"uniswapV2Pair","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IUniswapV2Router02"}],"name":"uniswapV2Router","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateClaimWait","inputs":[{"type":"uint256","name":"claimWait","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateDividendTracker","inputs":[{"type":"address","name":"newAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateGasForProcessing","inputs":[{"type":"uint256","name":"newValue","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateMinimumTokenBalanceForDividends","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateUniswapV2Router","inputs":[{"type":"address","name":"newAddress","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"withdrawableDividendOf","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","indexed":true},{"type":"address","name":"spender","indexed":true},{"type":"uint256","name":"value","indexed":false}],"anonymous":false},{"type":"event","name":"ExcludeFromFees","inputs":[{"type":"address","name":"account","indexed":true},{"type":"bool","name":"isExcluded","indexed":false}],"anonymous":false},{"type":"event","name":"ExcludeMultipleAccountsFromFees","inputs":[{"type":"address[]","name":"accounts","indexed":false},{"type":"bool","name":"isExcluded","indexed":false}],"anonymous":false},{"type":"event","name":"GasForProcessingUpdated","inputs":[{"type":"uint256","name":"newValue","indexed":true},{"type":"uint256","name":"oldValue","indexed":true}],"anonymous":false},{"type":"event","name":"LiquidityWalletUpdated","inputs":[{"type":"address","name":"newLiquidityWallet","indexed":true},{"type":"address","name":"oldLiquidityWallet","indexed":true}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","indexed":true},{"type":"address","name":"newOwner","indexed":true}],"anonymous":false},{"type":"event","name":"ProcessedDividendTracker","inputs":[{"type":"uint256","name":"iterations","indexed":false},{"type":"uint256","name":"claims","indexed":false},{"type":"uint256","name":"lastProcessedIndex","indexed":false},{"type":"bool","name":"automatic","indexed":true},{"type":"uint256","name":"gas","indexed":false},{"type":"address","name":"processor","indexed":true}],"anonymous":false},{"type":"event","name":"SendDividends","inputs":[{"type":"uint256","name":"tokensSwapped","indexed":false},{"type":"uint256","name":"amount","indexed":false}],"anonymous":false},{"type":"event","name":"SetAutomatedMarketMakerPair","inputs":[{"type":"address","name":"pair","indexed":true},{"type":"bool","name":"value","indexed":true}],"anonymous":false},{"type":"event","name":"SwapAndLiquify","inputs":[{"type":"uint256","name":"tokensSwapped","indexed":false},{"type":"uint256","name":"ethReceived","indexed":false},{"type":"uint256","name":"tokensIntoLiqudity","indexed":false}],"anonymous":false},{"type":"event","name":"TokenCreated","inputs":[{"type":"address","name":"owner","indexed":true},{"type":"address","name":"token","indexed":true},{"type":"uint8","name":"tokenType","indexed":false},{"type":"uint256","name":"version","indexed":false}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","indexed":true},{"type":"address","name":"to","indexed":true},{"type":"uint256","name":"value","indexed":false}],"anonymous":false},{"type":"event","name":"UpdateDividendTracker","inputs":[{"type":"address","name":"newAddress","indexed":true},{"type":"address","name":"oldAddress","indexed":true}],"anonymous":false},{"type":"event","name":"UpdateUniswapV2Router","inputs":[{"type":"address","name":"newAddress","indexed":true},{"type":"address","name":"oldAddress","indexed":true}],"anonymous":false},{"type":"receive"}]
Contract Creation Code
0x608060405260405162006cfb38038062006cfb833981016040819052620000269162000d4b565b8751889088906200003f90600390602085019062000b71565b5080516200005590600490602084019062000b71565b505050620000726200006c6200073560201b60201c565b62000739565b8451600980546001600160a01b03199081166001600160a01b03938416179091556040870151600f805490921692169182179055331415620001115760405162461bcd60e51b815260206004820152602d60248201527f4f776e657220616e64206d61726b6574696e672077616c6c65742063616e6e6f60448201526c74206265207468652073616d6560981b60648201526084015b60405180910390fd5b8351600b819055602080860151600c8190556040870151600d8190556200015d93909262000149929062001f276200078b821b17901c565b6200078b60201b62001f271790919060201c565b600e81905560191015620001b45760405162461bcd60e51b815260206004820152601560248201527f546f74616c20666565206973206f766572203235250000000000000000000000604482015260640162000108565b620001eb620f4240620001d7600289620007a060201b62001f3a1790919060201c565b620007ae60201b62001f461790919060201c565b600a55620493e06010556009546040516001600160a01b03909116908490620002149062000c00565b6001600160a01b0390921682526020820152604001604051809103906000f08015801562000246573d6000803e3d6000fd5b50600880546001600160a01b0319166001600160a01b03929092169190911790556000856001602002015190506000816001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015620002af57600080fd5b505afa158015620002c4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002ea919062000d2e565b6001600160a01b031663c9c6539630846001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156200033357600080fd5b505afa15801562000348573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200036e919062000d2e565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b158015620003b757600080fd5b505af1158015620003cc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003f2919062000d2e565b600680546001600160a01b038086166001600160a01b0319928316179092556007805492841692909116919091179055905062000431816001620007bc565b60085460405163031e79db60e41b81526001600160a01b0390911660048201819052906331e79db090602401600060405180830381600087803b1580156200047857600080fd5b505af11580156200048d573d6000803e3d6000fd5b505060085460405163031e79db60e41b81523060048201526001600160a01b0390911692506331e79db09150602401600060405180830381600087803b158015620004d757600080fd5b505af1158015620004ec573d6000803e3d6000fd5b50506008546001600160a01b031691506331e79db09050620005166005546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401600060405180830381600087803b1580156200055857600080fd5b505af11580156200056d573d6000803e3d6000fd5b505060085460405163031e79db60e41b815261dead60048201526001600160a01b0390911692506331e79db09150602401600060405180830381600087803b158015620005b957600080fd5b505af1158015620005ce573d6000803e3d6000fd5b505060085460405163031e79db60e41b81526001600160a01b03868116600483015290911692506331e79db09150602401600060405180830381600087803b1580156200061a57600080fd5b505af11580156200062f573d6000803e3d6000fd5b505050506200064f620006476200092b60201b60201c565b60016200093a565b600f5462000668906001600160a01b031660016200093a565b620006753060016200093a565b620006936200068c6005546001600160a01b031690565b8962000a8c565b30620006a76005546001600160a01b031690565b6001600160a01b03167f56358b41df5fa59f5639228f0930994cbdde383c8a8fd74e06c04e1deebe356260046001604051620006e592919062000e5b565b60405180910390a36040516001600160a01b0385169084156108fc029085906000818181858888f1935050505015801562000724573d6000803e3d6000fd5b505050505050505050505062000fad565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600062000799828462000ee6565b9392505050565b600062000799828462000f22565b600062000799828462000f01565b6001600160a01b03821660009081526012602052604090205460ff16151581151514156200085f5760405162461bcd60e51b815260206004820152604360248201527f42414259544f4b454e3a204175746f6d61746564206d61726b6574206d616b6560448201527f72207061697220697320616c72656164792073657420746f20746861742076616064820152626c756560e81b608482015260a40162000108565b6001600160a01b0382166000908152601260205260409020805460ff19168215801591909117909155620008ef5760085460405163031e79db60e41b81526001600160a01b038481166004830152909116906331e79db090602401600060405180830381600087803b158015620008d557600080fd5b505af1158015620008ea573d6000803e3d6000fd5b505050505b604051811515906001600160a01b038416907fffa9187bf1f18bf477bd0ea1bcbb64e93b6a98132473929edfce215cd9b16fab90600090a35050565b6005546001600160a01b031690565b6005546001600160a01b03163314620009965760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640162000108565b6001600160a01b03821660009081526011602052604090205460ff161515811515141562000a2d5760405162461bcd60e51b815260206004820152603560248201527f42414259544f4b454e3a204163636f756e7420697320616c726561647920746860448201527f652076616c7565206f6620276578636c75646564270000000000000000000000606482015260840162000108565b6001600160a01b038216600081815260116020908152604091829020805460ff191685151590811790915591519182527f9d8f7706ea1113d1a167b526eca956215946dd36cc7df39eb16180222d8b5df7910160405180910390a25050565b6001600160a01b03821662000ae45760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640162000108565b806002600082825462000af8919062000ee6565b90915550506001600160a01b0382166000908152602081905260408120805483929062000b2790849062000ee6565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b82805462000b7f9062000f44565b90600052602060002090601f01602090048101928262000ba3576000855562000bee565b82601f1062000bbe57805160ff191683800117855562000bee565b8280016001018555821562000bee579182015b8281111562000bee57825182559160200191906001019062000bd1565b5062000bfc92915062000c0e565b5090565b6127c8806200453383390190565b5b8082111562000bfc576000815560010162000c0f565b80516001600160a01b038116811462000c3d57600080fd5b919050565b600082601f83011262000c53578081fd5b62000c5d62000e88565b80838560608601111562000c6f578384fd5b835b600381101562000c9257815184526020938401939091019060010162000c71565b509095945050505050565b600082601f83011262000cae578081fd5b81516001600160401b0381111562000cca5762000cca62000f97565b602062000ce0601f8301601f1916820162000eb3565b828152858284870101111562000cf4578384fd5b835b8381101562000d1357858101830151828201840152820162000cf6565b8381111562000d2457848385840101525b5095945050505050565b60006020828403121562000d40578081fd5b620007998262000c25565b600080600080600080600080610180898b03121562000d68578384fd5b88516001600160401b038082111562000d7f578586fd5b62000d8d8c838d0162000c9d565b995060209150818b01518181111562000da4578687fd5b62000db28d828e0162000c9d565b9950505060408a015196508a607f8b011262000dcc578485fd5b62000dd662000e88565b8060608c0160c08d018e81111562000dec578889fd5b885b600381101562000e165762000e038362000c25565b8552938501939185019160010162000dee565b5082995062000e268f8262000c42565b98505050505050610120890151925062000e446101408a0162000c25565b915061016089015190509295985092959890939650565b604081016008841062000e7e57634e487b7160e01b600052602160045260246000fd5b9281526020015290565b604051606081016001600160401b038111828210171562000ead5762000ead62000f97565b60405290565b604051601f8201601f191681016001600160401b038111828210171562000ede5762000ede62000f97565b604052919050565b6000821982111562000efc5762000efc62000f81565b500190565b60008262000f1d57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161562000f3f5762000f3f62000f81565b500290565b600181811c9082168062000f5957607f821691505b6020821081141562000f7b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6135768062000fbd6000396000f3fe6080604052600436106103395760003560e01c806388bdd9be116101ab578063b62496f5116100f7578063e708a0f911610095578063f27fd2541161006f578063f27fd254146109a7578063f2fde38b146109c7578063f7c618c1146109e7578063ffa1ad7414610a0757600080fd5b8063e708a0f91461095c578063e7841ec014610972578063e98030c71461098757600080fd5b8063c492f046116100d1578063c492f046146108e6578063c705c56914610906578063dd62ed3e14610926578063e2f456051461094657600080fd5b8063b62496f514610881578063bdd4f29f146108b1578063c0246668146108c657600080fd5b8063a26579ad11610164578063a9059cbb1161013e578063a9059cbb146107bc578063ad56c13c146107dc578063adefd90c14610841578063afa4f3b21461086157600080fd5b8063a26579ad14610767578063a457c2d71461077c578063a8b9d2401461079c57600080fd5b806388bdd9be146106c85780638da5cb5b146106e857806395d89b411461070657806398118cb41461071b5780639a7a23d6146107315780639c1b8af51461075157600080fd5b806349bd5a5e1161028557806365b8dbc011610223578063700bb191116101fd578063700bb1911461063d57806370a082311461065d578063715018a614610693578063871c128d146106a857600080fd5b806365b8dbc0146105e75780636843cd84146106075780636b67c4df1461062757600080fd5b80634fbee1931161025f5780634fbee193146105595780635d098b3814610592578063625e764c146105b257806364b0f653146105d257600080fd5b806349bd5a5e146105045780634e71d92d146105245780634ed080c71461053957600080fd5b806323b872dd116102f2578063313ce567116102cc578063313ce5671461048857806331e79db0146104a457806339509351146104c45780634144d9e4146104e457600080fd5b806323b872dd146104335780632c1f52161461045357806330bb4cff1461047357600080fd5b806306fdde0314610345578063095ea7b3146103705780630dcb2e89146103a057806313114a9d146103c25780631694505e146103e657806318160ddd1461041e57600080fd5b3661034057005b600080fd5b34801561035157600080fd5b5061035a610a1c565b60405161036791906132c3565b60405180910390f35b34801561037c57600080fd5b5061039061038b366004613145565b610aae565b6040519015158152602001610367565b3480156103ac57600080fd5b506103c06103bb36600461320d565b610ac6565b005b3480156103ce57600080fd5b506103d8600e5481565b604051908152602001610367565b3480156103f257600080fd5b50600654610406906001600160a01b031681565b6040516001600160a01b039091168152602001610367565b34801561042a57600080fd5b506002546103d8565b34801561043f57600080fd5b5061039061044e36600461306f565b610b5b565b34801561045f57600080fd5b50600854610406906001600160a01b031681565b34801561047f57600080fd5b506103d8610b7f565b34801561049457600080fd5b5060405160128152602001610367565b3480156104b057600080fd5b506103c06104bf366004612fff565b610c01565b3480156104d057600080fd5b506103906104df366004613145565b610c5d565b3480156104f057600080fd5b50600f54610406906001600160a01b031681565b34801561051057600080fd5b50600754610406906001600160a01b031681565b34801561053057600080fd5b506103c0610c7f565b34801561054557600080fd5b506103c061055436600461320d565b610d06565b34801561056557600080fd5b50610390610574366004612fff565b6001600160a01b031660009081526011602052604090205460ff1690565b34801561059e57600080fd5b506103c06105ad366004612fff565b610d9e565b3480156105be57600080fd5b506103c06105cd36600461320d565b610dea565b3480156105de57600080fd5b506103d8610e2e565b3480156105f357600080fd5b506103c0610602366004612fff565b610e73565b34801561061357600080fd5b506103d8610622366004612fff565b611115565b34801561063357600080fd5b506103d8600d5481565b34801561064957600080fd5b506103c061065836600461320d565b61119a565b34801561066957600080fd5b506103d8610678366004612fff565b6001600160a01b031660009081526020819052604090205490565b34801561069f57600080fd5b506103c061127b565b3480156106b457600080fd5b506103c06106c336600461320d565b6112b1565b3480156106d457600080fd5b506103c06106e3366004612fff565b61140e565b3480156106f457600080fd5b506005546001600160a01b0316610406565b34801561071257600080fd5b5061035a6117bd565b34801561072757600080fd5b506103d8600c5481565b34801561073d57600080fd5b506103c061074c3660046130af565b6117cc565b34801561075d57600080fd5b506103d860105481565b34801561077357600080fd5b506103d86118a1565b34801561078857600080fd5b50610390610797366004613145565b6118e6565b3480156107a857600080fd5b506103d86107b7366004612fff565b611961565b3480156107c857600080fd5b506103906107d7366004613145565b611994565b3480156107e857600080fd5b506107fc6107f7366004612fff565b6119a2565b604080516001600160a01b0390991689526020890197909752958701949094526060860192909252608085015260a084015260c083015260e082015261010001610367565b34801561084d57600080fd5b506103c061085c36600461320d565b611a4c565b34801561086d57600080fd5b506103c061087c36600461320d565b611a90565b34801561088d57600080fd5b5061039061089c366004612fff565b60126020526000908152604090205460ff1681565b3480156108bd57600080fd5b506103d8611abf565b3480156108d257600080fd5b506103c06108e13660046130af565b611b04565b3480156108f257600080fd5b506103c0610901366004613170565b611c1a565b34801561091257600080fd5b50610390610921366004612fff565b611d04565b34801561093257600080fd5b506103d8610941366004613037565b611d82565b34801561095257600080fd5b506103d8600a5481565b34801561096857600080fd5b506103d8600b5481565b34801561097e57600080fd5b506103d8611dad565b34801561099357600080fd5b506103c06109a236600461320d565b611df2565b3480156109b357600080fd5b506107fc6109c236600461320d565b611e4d565b3480156109d357600080fd5b506103c06109e2366004612fff565b611e8f565b3480156109f357600080fd5b50600954610406906001600160a01b031681565b348015610a1357600080fd5b506103d8600181565b606060038054610a2b906134b1565b80601f0160208091040260200160405190810160405280929190818152602001828054610a57906134b1565b8015610aa45780601f10610a7957610100808354040283529160200191610aa4565b820191906000526020600020905b815481529060010190602001808311610a8757829003601f168201915b5050505050905090565b600033610abc818585611f52565b5060019392505050565b6005546001600160a01b03163314610af95760405162461bcd60e51b8152600401610af090613359565b60405180910390fd5b600854604051630dcb2e8960e01b8152600481018390526001600160a01b0390911690630dcb2e89906024015b600060405180830381600087803b158015610b4057600080fd5b505af1158015610b54573d6000803e3d6000fd5b5050505050565b600033610b69858285612076565b610b748585856120f0565b506001949350505050565b600854604080516342d359d760e11b815290516000926001600160a01b0316916385a6b3ae916004808301926020929190829003018186803b158015610bc457600080fd5b505afa158015610bd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bfc9190613225565b905090565b6005546001600160a01b03163314610c2b5760405162461bcd60e51b8152600401610af090613359565b60085460405163031e79db60e41b81526001600160a01b038381166004830152909116906331e79db090602401610b26565b600033610abc818585610c708383611d82565b610c7a9190613443565b611f52565b60085460405163bc4c4b3760e01b8152336004820152600060248201526001600160a01b039091169063bc4c4b3790604401602060405180830381600087803b158015610ccb57600080fd5b505af1158015610cdf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0391906131f1565b50565b6005546001600160a01b03163314610d305760405162461bcd60e51b8152600401610af090613359565b600b819055600d54600c54610d519190610d4b908490611f27565b90611f27565b600e81905560191015610d035760405162461bcd60e51b8152602060048201526015602482015274546f74616c20666565206973206f7665722032352560581b6044820152606401610af0565b6005546001600160a01b03163314610dc85760405162461bcd60e51b8152600401610af090613359565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b03163314610e145760405162461bcd60e51b8152600401610af090613359565b600d819055600c54600b54610d51918391610d4b91611f27565b600854604080516304ddf6ef60e11b815290516000926001600160a01b0316916309bbedde916004808301926020929190829003018186803b158015610bc457600080fd5b6005546001600160a01b03163314610e9d5760405162461bcd60e51b8152600401610af090613359565b6006546001600160a01b0382811691161415610f125760405162461bcd60e51b815260206004820152602e60248201527f42414259544f4b454e3a2054686520726f7574657220616c726561647920686160448201526d732074686174206164647265737360901b6064820152608401610af0565b6006546040516001600160a01b03918216918316907f8fc842bbd331dfa973645f4ed48b11683d501ebf1352708d77a5da2ab49a576e90600090a3600680546001600160a01b0319166001600160a01b0383169081179091556040805163c45a015560e01b815290516000929163c45a0155916004808301926020929190829003018186803b158015610fa457600080fd5b505afa158015610fb8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fdc919061301b565b6001600160a01b031663c9c6539630600660009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561103957600080fd5b505afa15801561104d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611071919061301b565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156110b957600080fd5b505af11580156110cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f1919061301b565b600780546001600160a01b0319166001600160a01b03929092169190911790555050565b6008546040516370a0823160e01b81526001600160a01b03838116600483015260009216906370a08231906024015b60206040518083038186803b15801561115c57600080fd5b505afa158015611170573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111949190613225565b92915050565b6008546040516001624d3b8760e01b0319815260048101839052600091829182916001600160a01b03169063ffb2c47990602401606060405180830381600087803b1580156111e857600080fd5b505af11580156111fc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611220919061323d565b604080518481526020810184905290810182905260608101889052929550909350915032906000907fc864333d6121033635ab41b29ae52f10a22cf4438c3e4f1c4c68518feb2f8a989060800160405180910390a350505050565b6005546001600160a01b031633146112a55760405162461bcd60e51b8152600401610af090613359565b6112af600061254d565b565b6005546001600160a01b031633146112db5760405162461bcd60e51b8152600401610af090613359565b62030d4081101580156112f157506207a1208111155b6113635760405162461bcd60e51b815260206004820152603f60248201527f42414259544f4b454e3a20676173466f7250726f63657373696e67206d75737460448201527f206265206265747765656e203230302c30303020616e64203530302c303030006064820152608401610af0565b6010548114156113db5760405162461bcd60e51b815260206004820152603760248201527f42414259544f4b454e3a2043616e6e6f742075706461746520676173466f725060448201527f726f63657373696e6720746f2073616d652076616c75650000000000000000006064820152608401610af0565b60105460405182907f40d7e40e79af4e8e5a9b3c57030d8ea93f13d669c06d448c4d631d4ae7d23db790600090a3601055565b6005546001600160a01b031633146114385760405162461bcd60e51b8152600401610af090613359565b6008546001600160a01b03828116911614156114bc5760405162461bcd60e51b815260206004820152603860248201527f42414259544f4b454e3a20546865206469766964656e6420747261636b65722060448201527f616c7265616479206861732074686174206164647265737300000000000000006064820152608401610af0565b6000819050306001600160a01b0316816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561150457600080fd5b505afa158015611518573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061153c919061301b565b6001600160a01b0316146115d25760405162461bcd60e51b815260206004820152605160248201527f42414259544f4b454e3a20546865206e6577206469766964656e64207472616360448201527f6b6572206d757374206265206f776e6564206279207468652042414259544f4b6064820152701153881d1bdad95b8818dbdb9d1c9858dd607a1b608482015260a401610af0565b60405163031e79db60e41b81526001600160a01b03821660048201819052906331e79db090602401600060405180830381600087803b15801561161457600080fd5b505af1158015611628573d6000803e3d6000fd5b505060405163031e79db60e41b81523060048201526001600160a01b03841692506331e79db09150602401600060405180830381600087803b15801561166d57600080fd5b505af1158015611681573d6000803e3d6000fd5b50505050806001600160a01b03166331e79db06116a66005546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401600060405180830381600087803b1580156116e757600080fd5b505af11580156116fb573d6000803e3d6000fd5b505060065460405163031e79db60e41b81526001600160a01b03918216600482015290841692506331e79db09150602401600060405180830381600087803b15801561174657600080fd5b505af115801561175a573d6000803e3d6000fd5b50506008546040516001600160a01b03918216935090851691507f90c7d74461c613da5efa97d90740869367d74ab3aa5837aa4ae9a975f954b7a890600090a3600880546001600160a01b0319166001600160a01b039290921691909117905550565b606060048054610a2b906134b1565b6005546001600160a01b031633146117f65760405162461bcd60e51b8152600401610af090613359565b6007546001600160a01b03838116911614156118935760405162461bcd60e51b815260206004820152605060248201527f42414259544f4b454e3a205468652050616e63616b655377617020706169722060448201527f63616e6e6f742062652072656d6f7665642066726f6d206175746f6d6174656460648201526f4d61726b65744d616b6572506169727360801b608482015260a401610af0565b61189d828261259f565b5050565b60085460408051631bc9e27b60e21b815290516000926001600160a01b031691636f2789ec916004808301926020929190829003018186803b158015610bc457600080fd5b600033816118f48286611d82565b9050838110156119545760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610af0565b610b748286868403611f52565b6008546040516302a2e74960e61b81526001600160a01b038381166004830152600092169063a8b9d24090602401611144565b600033610abc8185856120f0565b60085460405163fbcbc0f160e01b81526001600160a01b038381166004830152600092839283928392839283928392839291169063fbcbc0f1906024015b6101006040518083038186803b1580156119f957600080fd5b505afa158015611a0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a3191906130dc565b97509750975097509750975097509750919395975091939597565b6005546001600160a01b03163314611a765760405162461bcd60e51b8152600401610af090613359565b600c819055600d54600b54610d519190610d4b9084611f27565b6005546001600160a01b03163314611aba5760405162461bcd60e51b8152600401610af090613359565b600a55565b60085460408051632f842d8560e21b815290516000926001600160a01b03169163be10b614916004808301926020929190829003018186803b158015610bc457600080fd5b6005546001600160a01b03163314611b2e5760405162461bcd60e51b8152600401610af090613359565b6001600160a01b03821660009081526011602052604090205460ff1615158115151415611bbb5760405162461bcd60e51b815260206004820152603560248201527f42414259544f4b454e3a204163636f756e7420697320616c7265616479207468604482015274652076616c7565206f6620276578636c756465642760581b6064820152608401610af0565b6001600160a01b038216600081815260116020908152604091829020805460ff191685151590811790915591519182527f9d8f7706ea1113d1a167b526eca956215946dd36cc7df39eb16180222d8b5df7910160405180910390a25050565b6005546001600160a01b03163314611c445760405162461bcd60e51b8152600401610af090613359565b60005b82811015611cc3578160116000868685818110611c7457634e487b7160e01b600052603260045260246000fd5b9050602002016020810190611c899190612fff565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580611cbb816134ec565b915050611c47565b507f7fdaf542373fa84f4ee8d662c642f44e4c2276a217d7d29e548b6eb29a233b35838383604051611cf79392919061326a565b60405180910390a1505050565b60085460405163c705c56960e01b81526001600160a01b038381166004830152600092169063c705c5699060240160206040518083038186803b158015611d4a57600080fd5b505afa158015611d5e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119491906131f1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6008546040805163039e107b60e61b815290516000926001600160a01b03169163e7841ec0916004808301926020929190829003018186803b158015610bc457600080fd5b6005546001600160a01b03163314611e1c5760405162461bcd60e51b8152600401610af090613359565b60085460405163e98030c760e01b8152600481018390526001600160a01b039091169063e98030c790602401610b26565b600854604051635183d6fd60e01b81526004810183905260009182918291829182918291829182916001600160a01b0390911690635183d6fd906024016119e0565b6005546001600160a01b03163314611eb95760405162461bcd60e51b8152600401610af090613359565b6001600160a01b038116611f1e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610af0565b610d038161254d565b6000611f338284613443565b9392505050565b6000611f33828461347b565b6000611f33828461345b565b6001600160a01b038316611fb45760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610af0565b6001600160a01b0382166120155760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610af0565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006120828484611d82565b905060001981146120ea57818110156120dd5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610af0565b6120ea8484848403611f52565b50505050565b6001600160a01b0383166121165760405162461bcd60e51b8152600401610af09061338e565b6001600160a01b03821661213c5760405162461bcd60e51b8152600401610af090613316565b806121525761214d83836000612709565b505050565b30600090815260208190526040902054600a54811080159081906121805750600754600160a01b900460ff16155b80156121a557506001600160a01b03851660009081526012602052604090205460ff16155b80156121bf57506005546001600160a01b03868116911614155b80156121d957506005546001600160a01b03858116911614155b1561226c576007805460ff60a01b1916600160a01b179055600e54600d5460009161220f91612209908690611f3a565b90611f46565b905061221a8161285d565b6000612237600e54612209600c5487611f3a90919063ffffffff16565b9050612242816129f6565b3060009081526020819052604090205461225b81612a7d565b50506007805460ff60a01b19169055505b6007546001600160a01b03861660009081526011602052604090205460ff600160a01b9092048216159116806122ba57506001600160a01b03851660009081526011602052604090205460ff165b156122c3575060005b801561233f5760006122e56064612209600e5488611f3a90919063ffffffff16565b6001600160a01b03871660009081526012602052604090205490915060ff1615612326576123196064612209876001611f3a565b6123239082613443565b90505b6123308582612c2d565b945061233d873083612709565b505b61234a868686612709565b6008546001600160a01b031663e30443bc8761237b816001600160a01b031660009081526020819052604090205490565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156123c157600080fd5b505af19250505080156123d2575060015b506008546001600160a01b031663e30443bc86612404816001600160a01b031660009081526020819052604090205490565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561244a57600080fd5b505af192505050801561245b575060015b50600754600160a01b900460ff16612545576010546008546040516001624d3b8760e01b03198152600481018390526001600160a01b039091169063ffb2c47990602401606060405180830381600087803b1580156124b957600080fd5b505af19250505080156124e9575060408051601f3d908101601f191682019092526124e69181019061323d565b60015b6124f257612543565b60408051848152602081018490529081018290526060810185905232906001907fc864333d6121033635ab41b29ae52f10a22cf4438c3e4f1c4c68518feb2f8a989060800160405180910390a35050505b505b505050505050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b03821660009081526012602052604090205460ff16151581151514156126405760405162461bcd60e51b815260206004820152604360248201527f42414259544f4b454e3a204175746f6d61746564206d61726b6574206d616b6560448201527f72207061697220697320616c72656164792073657420746f20746861742076616064820152626c756560e81b608482015260a401610af0565b6001600160a01b0382166000908152601260205260409020805460ff191682158015919091179091556126cd5760085460405163031e79db60e41b81526001600160a01b038481166004830152909116906331e79db090602401600060405180830381600087803b1580156126b457600080fd5b505af11580156126c8573d6000803e3d6000fd5b505050505b604051811515906001600160a01b038416907fffa9187bf1f18bf477bd0ea1bcbb64e93b6a98132473929edfce215cd9b16fab90600090a35050565b6001600160a01b03831661272f5760405162461bcd60e51b8152600401610af09061338e565b6001600160a01b0382166127555760405162461bcd60e51b8152600401610af090613316565b6001600160a01b038316600090815260208190526040902054818110156127cd5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610af0565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290612804908490613443565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161285091815260200190565b60405180910390a36120ea565b6009546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156128a157600080fd5b505afa1580156128b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128d99190613225565b90506128e482612c39565b6009546040516370a0823160e01b815230600482015260009161296c9184916001600160a01b0316906370a082319060240160206040518083038186803b15801561292e57600080fd5b505afa158015612942573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129669190613225565b90612c2d565b600954600f5460405163a9059cbb60e01b81526001600160a01b03918216600482015260248101849052929350169063a9059cbb90604401602060405180830381600087803b1580156129be57600080fd5b505af11580156129d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120ea91906131f1565b6000612a03826002611f46565b90506000612a118383612c2d565b905047612a1d83612df7565b6000612a294783612c2d565b9050612a358382612f46565b60408051858152602081018390529081018490527f17bbfb9a6069321b6ded73bd96327c9e6b7212a5cd51ff219cd61370acafb5619060600160405180910390a15050505050565b612a8681612c39565b6009546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015612aca57600080fd5b505afa158015612ade573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b029190613225565b60095460085460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810184905292935060009291169063a9059cbb90604401602060405180830381600087803b158015612b5857600080fd5b505af1158015612b6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b9091906131f1565b9050801561214d5760085460405163ba72a95560e01b8152600481018490526001600160a01b039091169063ba72a95590602401600060405180830381600087803b158015612bde57600080fd5b505af1158015612bf2573d6000803e3d6000fd5b505060408051868152602081018690527f80195cc573b02cc48460cbca6e6e4cc85ddb91959d946e1c3025ea3d87942dc39350019050611cf7565b6000611f33828461349a565b60408051600380825260808201909252600091602082016060803683370190505090503081600081518110612c7e57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152600654604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b158015612cd257600080fd5b505afa158015612ce6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d0a919061301b565b81600181518110612d2b57634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600954825191169082906002908110612d6a57634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600654612d909130911684611f52565b600654604051635c11d79560e01b81526001600160a01b0390911690635c11d79590612dc99085906000908690309042906004016133d3565b600060405180830381600087803b158015612de357600080fd5b505af1158015612545573d6000803e3d6000fd5b6040805160028082526060820183526000926020830190803683370190505090503081600081518110612e3a57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152600654604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b158015612e8e57600080fd5b505afa158015612ea2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ec6919061301b565b81600181518110612ee757634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600654612f0d9130911684611f52565b60065460405163791ac94760e01b81526001600160a01b039091169063791ac94790612dc99085906000908690309042906004016133d3565b600654612f5e9030906001600160a01b031684611f52565b60065460405163f305d71960e01b8152306004820152602481018490526000604482018190526064820181905260848201524260a48201526001600160a01b039091169063f305d71990839060c4016060604051808303818588803b158015612fc657600080fd5b505af1158015612fda573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b54919061323d565b600060208284031215613010578081fd5b8135611f338161351d565b60006020828403121561302c578081fd5b8151611f338161351d565b60008060408385031215613049578081fd5b82356130548161351d565b915060208301356130648161351d565b809150509250929050565b600080600060608486031215613083578081fd5b833561308e8161351d565b9250602084013561309e8161351d565b929592945050506040919091013590565b600080604083850312156130c1578182fd5b82356130cc8161351d565b9150602083013561306481613532565b600080600080600080600080610100898b0312156130f8578384fd5b88516131038161351d565b809850506020890151965060408901519550606089015194506080890151935060a0890151925060c0890151915060e089015190509295985092959890939650565b60008060408385031215613157578182fd5b82356131628161351d565b946020939093013593505050565b600080600060408486031215613184578283fd5b833567ffffffffffffffff8082111561319b578485fd5b818601915086601f8301126131ae578485fd5b8135818111156131bc578586fd5b8760208260051b85010111156131d0578586fd5b602092830195509350508401356131e681613532565b809150509250925092565b600060208284031215613202578081fd5b8151611f3381613532565b60006020828403121561321e578081fd5b5035919050565b600060208284031215613236578081fd5b5051919050565b600080600060608486031215613251578283fd5b8351925060208401519150604084015190509250925092565b6040808252810183905260008460608301825b868110156132ad5782356132908161351d565b6001600160a01b031682526020928301929091019060010161327d565b5080925050508215156020830152949350505050565b6000602080835283518082850152825b818110156132ef578581018301518582016040015282016132d3565b818111156133005783604083870101525b50601f01601f1916929092016040019392505050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b818110156134225784516001600160a01b0316835293830193918301916001016133fd565b50506001600160a01b03969096166060850152505050608001529392505050565b6000821982111561345657613456613507565b500190565b60008261347657634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561349557613495613507565b500290565b6000828210156134ac576134ac613507565b500390565b600181811c908216806134c557607f821691505b602082108114156134e657634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561350057613500613507565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114610d0357600080fd5b8015158114610d0357600080fdfea26469706673582212204375139c033246d2c696b674d3fd8651d973f67a370316e99530c8c0d2f4743c64736f6c6343000804003360806040523480156200001157600080fd5b50604051620027c8380380620027c8833981016040819052620000349162000531565b6200009c826040518060400160405280601081526020016f2224ab24a222a7222faa2920a1a5a2a960811b8152506040518060400160405280601081526020016f2224ab24a222a7222faa2920a1a5a2a960811b815250620000ac60201b620013061760201c565b610e1060a35560a45550620005a8565b6000620000ba600162000151565b90508015620000d3576000805461ff0019166101001790555b620000dd62000263565b620000e98383620002cb565b609780546001600160a01b0319166001600160a01b03861617905580156200014b576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b60008054610100900460ff1615620001ea578160ff1660011480156200018a575062000188306200033760201b620013a31760201c565b155b620001e25760405162461bcd60e51b815260206004820152602e60248201526000805160206200278883398151915260448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b506000919050565b60005460ff808416911610620002495760405162461bcd60e51b815260206004820152602e60248201526000805160206200278883398151915260448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401620001d9565b506000805460ff191660ff92909216919091179055600190565b600054610100900460ff16620002bf5760405162461bcd60e51b815260206004820152602b6024820152600080516020620027a883398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620001d9565b620002c962000346565b565b600054610100900460ff16620003275760405162461bcd60e51b815260206004820152602b6024820152600080516020620027a883398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620001d9565b620003338282620003ad565b5050565b6001600160a01b03163b151590565b600054610100900460ff16620003a25760405162461bcd60e51b815260206004820152602b6024820152600080516020620027a883398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620001d9565b620002c93362000439565b600054610100900460ff16620004095760405162461bcd60e51b815260206004820152602b6024820152600080516020620027a883398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620001d9565b81516200041e9060369060208501906200048b565b508051620004349060379060208401906200048b565b505050565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b82805462000499906200056b565b90600052602060002090601f016020900481019282620004bd576000855562000508565b82601f10620004d857805160ff191683800117855562000508565b8280016001018555821562000508579182015b8281111562000508578251825591602001919060010190620004eb565b50620005169291506200051a565b5090565b5b808211156200051657600081556001016200051b565b6000806040838503121562000544578182fd5b82516001600160a01b03811681146200055b578283fd5b6020939093015192949293505050565b600181811c908216806200058057607f821691505b60208210811415620005a257634e487b7160e01b600052602260045260246000fd5b50919050565b6121d080620005b86000396000f3fe608060405234801561001057600080fd5b50600436106102325760003560e01c80638da5cb5b11610130578063be10b614116100b8578063e98030c71161007c578063e98030c71461051c578063f2fde38b1461052f578063f7c618c114610542578063fbcbc0f114610555578063ffb2c4791461056857600080fd5b8063be10b614146104b9578063c705c569146104c2578063dd62ed3e146104ee578063e30443bc14610501578063e7841ec01461051457600080fd5b8063a8b9d240116100ff578063a8b9d24014610444578063a9059cbb14610457578063aafd847a1461046a578063ba72a95514610493578063bc4c4b37146104a657600080fd5b80638da5cb5b146103f157806391b89fba1461041657806395d89b4114610429578063a457c2d71461043157600080fd5b8063313ce567116101be5780636a474002116101825780636a474002146103a65780636f2789ec146103ae57806370a08231146103b7578063715018a6146103e057806385a6b3ae146103e857600080fd5b8063313ce567146102f657806331e79db01461030557806339509351146103185780634e7b827f1461032b5780635183d6fd1461034e57600080fd5b806318160ddd1161020557806318160ddd1461029f578063226cfa3d146102a757806323b872dd146102c757806327ce0147146102da5780633009a609146102ed57600080fd5b806306fdde0314610237578063095ea7b31461025557806309bbedde146102785780630dcb2e891461028a575b600080fd5b61023f610596565b60405161024c9190611efc565b60405180910390f35b610268610263366004611e18565b610628565b604051901515815260200161024c565b609c545b60405190815260200161024c565b61029d610298366004611ee4565b610642565b005b60355461027c565b61027c6102b5366004611da8565b60a26020526000908152604090205481565b6102686102d5366004611e70565b61067a565b61027c6102e8366004611da8565b61069e565b61027c60a05481565b6040516012815260200161024c565b61029d610313366004611da8565b6106fb565b610268610326366004611e18565b610822565b610268610339366004611da8565b60a16020526000908152604090205460ff1681565b61036161035c366004611ee4565b610844565b604080516001600160a01b0390991689526020890197909752958701949094526060860192909252608085015260a084015260c083015260e08201526101000161024c565b61029d6109b6565b61027c60a35481565b61027c6103c5366004611da8565b6001600160a01b031660009081526033602052604090205490565b61029d610a5a565b61027c609b5481565b6065546001600160a01b03165b6040516001600160a01b03909116815260200161024c565b61027c610424366004611da8565b610a8e565b61023f610a99565b61026861043f366004611e18565b610aa8565b61027c610452366004611da8565b610b23565b610268610465366004611e18565b610b4f565b61027c610478366004611da8565b6001600160a01b03166000908152609a602052604090205490565b61029d6104a1366004611ee4565b610b5d565b6102686104b4366004611de0565b610c1b565b61027c60a45481565b6102686104d0366004611da8565b6001600160a01b0316600090815260a1602052604090205460ff1690565b61027c6104fc366004611e43565b610cc9565b61029d61050f366004611e18565b610cf4565b60a05461027c565b61029d61052a366004611ee4565b610e63565b61029d61053d366004611da8565b610fcd565b6097546103fe906001600160a01b031681565b610361610563366004611da8565b611065565b61057b610576366004611ee4565b6111dd565b6040805193845260208401929092529082015260600161024c565b6060603680546105a59061210b565b80601f01602080910402602001604051908101604052809291908181526020018280546105d19061210b565b801561061e5780601f106105f35761010080835404028352916020019161061e565b820191906000526020600020905b81548152906001019060200180831161060157829003601f168201915b5050505050905090565b6000336106368185856113b2565b60019150505b92915050565b6065546001600160a01b031633146106755760405162461bcd60e51b815260040161066c90611f9d565b60405180910390fd5b60a455565b6000336106888582856114d6565b61069385858561154a565b506001949350505050565b6001600160a01b0381166000908152609960209081526040808320546033909252822054609854600160801b926106f1926106ec926106e6916106e191906115a1565b6115b4565b906115c4565b611602565b61063c9190612076565b6065546001600160a01b031633146107255760405162461bcd60e51b815260040161066c90611f9d565b6001600160a01b038116600090815260a1602052604090205460ff161561074b57600080fd5b6001600160a01b038116600090815260a160205260408120805460ff19166001179055610779908290611615565b60405163131836e760e21b8152609c60048201526001600160a01b038216602482015273cff15055c04cd00744da56690f55c2723786277190634c60db9c9060440160006040518083038186803b1580156107d357600080fd5b505af41580156107e7573d6000803e3d6000fd5b50506040516001600160a01b03841692507fa878b31040b2e6d0a9a3d3361209db3908ba62014b0dca52adbaee451d128b259150600090a250565b6000336106368185856108358383610cc9565b61083f919061205e565b6113b2565b600080600080600080600080609c73cff15055c04cd00744da56690f55c2723786277163deb3d89690916040518263ffffffff1660e01b815260040161088c91815260200190565b60206040518083038186803b1580156108a457600080fd5b505af41580156108b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108dc9190611ecc565b89106109015750600096506000199550859450869350839250829150819050806109ab565b6040516368d54f3f60e11b8152609c6004820152602481018a905260009073cff15055c04cd00744da56690f55c272378627719063d1aa9e7e9060440160206040518083038186803b15801561095657600080fd5b505af415801561096a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061098e9190611dc4565b905061099981611065565b98509850985098509850985098509850505b919395975091939597565b60405162461bcd60e51b815260206004820152606560248201527f4469766964656e645f547261636b65723a20776974686472617744697669646560448201527f6e642064697361626c65642e20557365207468652027636c61696d272066756e60648201527f6374696f6e206f6e20746865206d61696e2042414259544f4b454e20636f6e746084820152643930b1ba1760d91b60a482015260c40161066c565b565b6065546001600160a01b03163314610a845760405162461bcd60e51b815260040161066c90611f9d565b610a586000611674565b600061063c82610b23565b6060603780546105a59061210b565b60003381610ab68286610cc9565b905083811015610b165760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161066c565b61069382868684036113b2565b6001600160a01b0381166000908152609a602052604081205461063c90610b498461069e565b906116c6565b60003361063681858561154a565b6065546001600160a01b03163314610b875760405162461bcd60e51b815260040161066c90611f9d565b6000610b9260355490565b11610b9c57600080fd5b8015610c1857610bcf610bae60355490565b610bbc83600160801b6115a1565b610bc69190612076565b609854906116d2565b60985560405181815233907fa493a9229478c3fcd73f66d2cdeb7f94fd0f341da924d1054236d784541165119060200160405180910390a2609b54610c1490826116d2565b609b555b50565b6065546000906001600160a01b03163314610c485760405162461bcd60e51b815260040161066c90611f9d565b6000610c53846116de565b90508015610cbf576001600160a01b038416600081815260a26020526040908190204290555184151591907fa2c38e2d2fb7e3e1912d937fd1ca11ed6d51864dee4cfa7a7bf02becd7acf09290610cad9085815260200190565b60405180910390a3600191505061063c565b5060009392505050565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b6065546001600160a01b03163314610d1e5760405162461bcd60e51b815260040161066c90611f9d565b6001600160a01b038216600090815260a1602052604090205460ff1615610d43575050565b60a4548110610dd457610d568282611615565b604051632f0ad01760e21b8152609c60048201526001600160a01b03831660248201526044810182905273cff15055c04cd00744da56690f55c272378627719063bc2b405c9060640160006040518083038186803b158015610db757600080fd5b505af4158015610dcb573d6000803e3d6000fd5b50505050610e52565b610ddf826000611615565b60405163131836e760e21b8152609c60048201526001600160a01b038316602482015273cff15055c04cd00744da56690f55c2723786277190634c60db9c9060440160006040518083038186803b158015610e3957600080fd5b505af4158015610e4d573d6000803e3d6000fd5b505050505b610e5d826001610c1b565b505b5050565b6065546001600160a01b03163314610e8d5760405162461bcd60e51b815260040161066c90611f9d565b610e108110158015610ea25750620151808111155b610f225760405162461bcd60e51b815260206004820152604560248201527f4469766964656e645f547261636b65723a20636c61696d57616974206d75737460448201527f206265207570646174656420746f206265747765656e203120616e6420323420606482015264686f75727360d81b608482015260a40161066c565b60a354811415610f9a5760405162461bcd60e51b815260206004820152603760248201527f4469766964656e645f547261636b65723a2043616e6e6f74207570646174652060448201527f636c61696d5761697420746f2073616d652076616c7565000000000000000000606482015260840161066c565b60a35460405182907f474ea64804364a1e29a4487ddb63c3342a2dd826ccd8acf48825e680a0e6f20f90600090a360a355565b6065546001600160a01b03163314610ff75760405162461bcd60e51b815260040161066c90611f9d565b6001600160a01b03811661105c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161066c565b610c1881611674565b6040516317e142d160e01b8152609c60048201526001600160a01b0382166024820152819060009081908190819081908190819073cff15055c04cd00744da56690f55c27237862771906317e142d19060440160206040518083038186803b1580156110d057600080fd5b505af41580156110e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111089190611ecc565b965060001995506000871261116a5760a0548711156111365760a05461112f908890611852565b955061116a565b60a054609c546000911061114b57600061115a565b60a054609c5461115a916116c6565b905061116688826115c4565b9650505b61117388610b23565b945061117e8861069e565b6001600160a01b038916600090815260a260205260409020549094509250826111a85760006111b6565b60a3546111b69084906116d2565b91504282116111c65760006111d0565b6111d082426116c6565b9050919395975091939597565b609c5460009081908190806111fd57505060a054600092508291506112ff565b60a0546000805a90506000805b898410801561121857508582105b156112ee578461122781612146565b609c549096508610905061123a57600094505b6000609c600001868154811061126057634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b031680835260a29091526040909120549091506112919061188f565b156112b4576112a1816001610c1b565b156112b457816112b081612146565b9250505b826112be81612146565b93505060005a9050808511156112e5576112e26112db86836116c6565b87906116d2565b95505b935061120a9050565b60a085905590975095509193505050505b9193909250565b600061131260016118b6565b9050801561132a576000805461ff0019166101001790555b61133261193e565b61133c838361196d565b609780546001600160a01b0319166001600160a01b038616179055801561139d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b6001600160a01b03163b151590565b6001600160a01b0383166114145760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161066c565b6001600160a01b0382166114755760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161066c565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006114e28484610cc9565b9050600019811461139d578181101561153d5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161066c565b61139d84848484036113b2565b60405162461bcd60e51b815260206004820152602660248201527f4469766964656e645f547261636b65723a204e6f207472616e736665727320616044820152651b1b1bddd95960d21b606482015260840161066c565b60006115ad8284612096565b9392505050565b6000818181121561063c57600080fd5b6000806115d1838561201d565b9050600083121580156115e45750838112155b806115f957506000831280156115f957508381125b6115ad57600080fd5b60008082121561161157600080fd5b5090565b6001600160a01b0382166000908152603360205260409020548082111561165457600061164283836116c6565b905061164e848261199e565b50610e5d565b80821015610e5d57600061166882846116c6565b905061139d8482611a02565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006115ad82846120f4565b60006115ad828461205e565b6000806116ea83610b23565b90508015611849576001600160a01b0383166000908152609a602052604090205461171590826116d2565b6001600160a01b0384166000818152609a6020526040908190209290925590517fee503bee2bb6a87e57bc57db795f98137327401a0e7b7ce42e37926cc1a9ca4d906117649084815260200190565b60405180910390a260975460405163a9059cbb60e01b81526001600160a01b03858116600483015260248201849052600092169063a9059cbb90604401602060405180830381600087803b1580156117bb57600080fd5b505af11580156117cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117f39190611eb0565b905080611842576001600160a01b0384166000908152609a602052604090205461181d90836116c6565b6001600160a01b039094166000908152609a6020526040812094909455509192915050565b5092915050565b50600092915050565b60008061185f83856120b5565b9050600083121580156118725750838113155b806115f957506000831280156115f957508381136115ad57600080fd5b6000428211156118a157506000919050565b60a3546118ae42846116c6565b101592915050565b60008054610100900460ff16156118fd578160ff1660011480156118d95750303b155b6118f55760405162461bcd60e51b815260040161066c90611f4f565b506000919050565b60005460ff8084169116106119245760405162461bcd60e51b815260040161066c90611f4f565b506000805460ff191660ff92909216919091179055600190565b600054610100900460ff166119655760405162461bcd60e51b815260040161066c90611fd2565b610a58611a46565b600054610100900460ff166119945760405162461bcd60e51b815260040161066c90611fd2565b610e5f8282611a76565b6119a88282611ac4565b6119e26119c36106e1836098546115a190919063ffffffff16565b6001600160a01b03841660009081526099602052604090205490611852565b6001600160a01b0390921660009081526099602052604090209190915550565b611a0c8282611bb7565b6119e2611a276106e1836098546115a190919063ffffffff16565b6001600160a01b038416600090815260996020526040902054906115c4565b600054610100900460ff16611a6d5760405162461bcd60e51b815260040161066c90611fd2565b610a5833611674565b600054610100900460ff16611a9d5760405162461bcd60e51b815260040161066c90611fd2565b8151611ab0906036906020850190611d18565b508051610e5d906037906020840190611d18565b6001600160a01b038216611b1a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161066c565b611b2660008383610e5d565b8060356000828254611b38919061205e565b90915550506001600160a01b03821660009081526033602052604081208054839290611b6590849061205e565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3610e5f60008383610e5d565b6001600160a01b038216611c175760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161066c565b611c2382600083610e5d565b6001600160a01b03821660009081526033602052604090205481811015611c975760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161066c565b6001600160a01b0383166000908152603360205260408120838303905560358054849290611cc69084906120f4565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3610e5d83600084610e5d565b828054611d249061210b565b90600052602060002090601f016020900481019282611d465760008555611d8c565b82601f10611d5f57805160ff1916838001178555611d8c565b82800160010185558215611d8c579182015b82811115611d8c578251825591602001919060010190611d71565b506116119291505b808211156116115760008155600101611d94565b600060208284031215611db9578081fd5b81356115ad81612177565b600060208284031215611dd5578081fd5b81516115ad81612177565b60008060408385031215611df2578081fd5b8235611dfd81612177565b91506020830135611e0d8161218c565b809150509250929050565b60008060408385031215611e2a578182fd5b8235611e3581612177565b946020939093013593505050565b60008060408385031215611e55578182fd5b8235611e6081612177565b91506020830135611e0d81612177565b600080600060608486031215611e84578081fd5b8335611e8f81612177565b92506020840135611e9f81612177565b929592945050506040919091013590565b600060208284031215611ec1578081fd5b81516115ad8161218c565b600060208284031215611edd578081fd5b5051919050565b600060208284031215611ef5578081fd5b5035919050565b6000602080835283518082850152825b81811015611f2857858101830151858201604001528201611f0c565b81811115611f395783604083870101525b50601f01601f1916929092016040019392505050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600080821280156001600160ff1b038490038513161561203f5761203f612161565b600160ff1b839003841281161561205857612058612161565b50500190565b6000821982111561207157612071612161565b500190565b60008261209157634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156120b0576120b0612161565b500290565b60008083128015600160ff1b8501841216156120d3576120d3612161565b6001600160ff1b03840183138116156120ee576120ee612161565b50500390565b60008282101561210657612106612161565b500390565b600181811c9082168061211f57607f821691505b6020821081141561214057634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561215a5761215a612161565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114610c1857600080fd5b8015158114610c1857600080fdfea2646970667358221220ba05942d6d079fdd0db6278d1abad74b87de6655b0879bc37be87138295cce9164736f6c63430008040033496e697469616c697a61626c653a20636f6e747261637420697320616c726561496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000d3c21bcecceda100000000000000000000000000000072ab1babed0502b08225fa1ef777fa673d82ee3e0000000000000000000000006258c967337d3faf0c2ba3adae5656ba95419d5f00000000000000000000000060ecffcd16b527bf77e6c6d2b02bc5b127123dbe0000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000008ac7230489e80000000000000000000000000000de28c7c4f0021f165681ff7f1c507d3d1e3a223000000000000000000000000000000000000000000000000d8d726b7177a800000000000000000000000000000000000000000000000000000000000000000009426162794b6962627900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009426162794b696262790000000000000000000000000000000000000000000000
Deployed ByteCode
0x6080604052600436106103395760003560e01c806388bdd9be116101ab578063b62496f5116100f7578063e708a0f911610095578063f27fd2541161006f578063f27fd254146109a7578063f2fde38b146109c7578063f7c618c1146109e7578063ffa1ad7414610a0757600080fd5b8063e708a0f91461095c578063e7841ec014610972578063e98030c71461098757600080fd5b8063c492f046116100d1578063c492f046146108e6578063c705c56914610906578063dd62ed3e14610926578063e2f456051461094657600080fd5b8063b62496f514610881578063bdd4f29f146108b1578063c0246668146108c657600080fd5b8063a26579ad11610164578063a9059cbb1161013e578063a9059cbb146107bc578063ad56c13c146107dc578063adefd90c14610841578063afa4f3b21461086157600080fd5b8063a26579ad14610767578063a457c2d71461077c578063a8b9d2401461079c57600080fd5b806388bdd9be146106c85780638da5cb5b146106e857806395d89b411461070657806398118cb41461071b5780639a7a23d6146107315780639c1b8af51461075157600080fd5b806349bd5a5e1161028557806365b8dbc011610223578063700bb191116101fd578063700bb1911461063d57806370a082311461065d578063715018a614610693578063871c128d146106a857600080fd5b806365b8dbc0146105e75780636843cd84146106075780636b67c4df1461062757600080fd5b80634fbee1931161025f5780634fbee193146105595780635d098b3814610592578063625e764c146105b257806364b0f653146105d257600080fd5b806349bd5a5e146105045780634e71d92d146105245780634ed080c71461053957600080fd5b806323b872dd116102f2578063313ce567116102cc578063313ce5671461048857806331e79db0146104a457806339509351146104c45780634144d9e4146104e457600080fd5b806323b872dd146104335780632c1f52161461045357806330bb4cff1461047357600080fd5b806306fdde0314610345578063095ea7b3146103705780630dcb2e89146103a057806313114a9d146103c25780631694505e146103e657806318160ddd1461041e57600080fd5b3661034057005b600080fd5b34801561035157600080fd5b5061035a610a1c565b60405161036791906132c3565b60405180910390f35b34801561037c57600080fd5b5061039061038b366004613145565b610aae565b6040519015158152602001610367565b3480156103ac57600080fd5b506103c06103bb36600461320d565b610ac6565b005b3480156103ce57600080fd5b506103d8600e5481565b604051908152602001610367565b3480156103f257600080fd5b50600654610406906001600160a01b031681565b6040516001600160a01b039091168152602001610367565b34801561042a57600080fd5b506002546103d8565b34801561043f57600080fd5b5061039061044e36600461306f565b610b5b565b34801561045f57600080fd5b50600854610406906001600160a01b031681565b34801561047f57600080fd5b506103d8610b7f565b34801561049457600080fd5b5060405160128152602001610367565b3480156104b057600080fd5b506103c06104bf366004612fff565b610c01565b3480156104d057600080fd5b506103906104df366004613145565b610c5d565b3480156104f057600080fd5b50600f54610406906001600160a01b031681565b34801561051057600080fd5b50600754610406906001600160a01b031681565b34801561053057600080fd5b506103c0610c7f565b34801561054557600080fd5b506103c061055436600461320d565b610d06565b34801561056557600080fd5b50610390610574366004612fff565b6001600160a01b031660009081526011602052604090205460ff1690565b34801561059e57600080fd5b506103c06105ad366004612fff565b610d9e565b3480156105be57600080fd5b506103c06105cd36600461320d565b610dea565b3480156105de57600080fd5b506103d8610e2e565b3480156105f357600080fd5b506103c0610602366004612fff565b610e73565b34801561061357600080fd5b506103d8610622366004612fff565b611115565b34801561063357600080fd5b506103d8600d5481565b34801561064957600080fd5b506103c061065836600461320d565b61119a565b34801561066957600080fd5b506103d8610678366004612fff565b6001600160a01b031660009081526020819052604090205490565b34801561069f57600080fd5b506103c061127b565b3480156106b457600080fd5b506103c06106c336600461320d565b6112b1565b3480156106d457600080fd5b506103c06106e3366004612fff565b61140e565b3480156106f457600080fd5b506005546001600160a01b0316610406565b34801561071257600080fd5b5061035a6117bd565b34801561072757600080fd5b506103d8600c5481565b34801561073d57600080fd5b506103c061074c3660046130af565b6117cc565b34801561075d57600080fd5b506103d860105481565b34801561077357600080fd5b506103d86118a1565b34801561078857600080fd5b50610390610797366004613145565b6118e6565b3480156107a857600080fd5b506103d86107b7366004612fff565b611961565b3480156107c857600080fd5b506103906107d7366004613145565b611994565b3480156107e857600080fd5b506107fc6107f7366004612fff565b6119a2565b604080516001600160a01b0390991689526020890197909752958701949094526060860192909252608085015260a084015260c083015260e082015261010001610367565b34801561084d57600080fd5b506103c061085c36600461320d565b611a4c565b34801561086d57600080fd5b506103c061087c36600461320d565b611a90565b34801561088d57600080fd5b5061039061089c366004612fff565b60126020526000908152604090205460ff1681565b3480156108bd57600080fd5b506103d8611abf565b3480156108d257600080fd5b506103c06108e13660046130af565b611b04565b3480156108f257600080fd5b506103c0610901366004613170565b611c1a565b34801561091257600080fd5b50610390610921366004612fff565b611d04565b34801561093257600080fd5b506103d8610941366004613037565b611d82565b34801561095257600080fd5b506103d8600a5481565b34801561096857600080fd5b506103d8600b5481565b34801561097e57600080fd5b506103d8611dad565b34801561099357600080fd5b506103c06109a236600461320d565b611df2565b3480156109b357600080fd5b506107fc6109c236600461320d565b611e4d565b3480156109d357600080fd5b506103c06109e2366004612fff565b611e8f565b3480156109f357600080fd5b50600954610406906001600160a01b031681565b348015610a1357600080fd5b506103d8600181565b606060038054610a2b906134b1565b80601f0160208091040260200160405190810160405280929190818152602001828054610a57906134b1565b8015610aa45780601f10610a7957610100808354040283529160200191610aa4565b820191906000526020600020905b815481529060010190602001808311610a8757829003601f168201915b5050505050905090565b600033610abc818585611f52565b5060019392505050565b6005546001600160a01b03163314610af95760405162461bcd60e51b8152600401610af090613359565b60405180910390fd5b600854604051630dcb2e8960e01b8152600481018390526001600160a01b0390911690630dcb2e89906024015b600060405180830381600087803b158015610b4057600080fd5b505af1158015610b54573d6000803e3d6000fd5b5050505050565b600033610b69858285612076565b610b748585856120f0565b506001949350505050565b600854604080516342d359d760e11b815290516000926001600160a01b0316916385a6b3ae916004808301926020929190829003018186803b158015610bc457600080fd5b505afa158015610bd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bfc9190613225565b905090565b6005546001600160a01b03163314610c2b5760405162461bcd60e51b8152600401610af090613359565b60085460405163031e79db60e41b81526001600160a01b038381166004830152909116906331e79db090602401610b26565b600033610abc818585610c708383611d82565b610c7a9190613443565b611f52565b60085460405163bc4c4b3760e01b8152336004820152600060248201526001600160a01b039091169063bc4c4b3790604401602060405180830381600087803b158015610ccb57600080fd5b505af1158015610cdf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0391906131f1565b50565b6005546001600160a01b03163314610d305760405162461bcd60e51b8152600401610af090613359565b600b819055600d54600c54610d519190610d4b908490611f27565b90611f27565b600e81905560191015610d035760405162461bcd60e51b8152602060048201526015602482015274546f74616c20666565206973206f7665722032352560581b6044820152606401610af0565b6005546001600160a01b03163314610dc85760405162461bcd60e51b8152600401610af090613359565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b03163314610e145760405162461bcd60e51b8152600401610af090613359565b600d819055600c54600b54610d51918391610d4b91611f27565b600854604080516304ddf6ef60e11b815290516000926001600160a01b0316916309bbedde916004808301926020929190829003018186803b158015610bc457600080fd5b6005546001600160a01b03163314610e9d5760405162461bcd60e51b8152600401610af090613359565b6006546001600160a01b0382811691161415610f125760405162461bcd60e51b815260206004820152602e60248201527f42414259544f4b454e3a2054686520726f7574657220616c726561647920686160448201526d732074686174206164647265737360901b6064820152608401610af0565b6006546040516001600160a01b03918216918316907f8fc842bbd331dfa973645f4ed48b11683d501ebf1352708d77a5da2ab49a576e90600090a3600680546001600160a01b0319166001600160a01b0383169081179091556040805163c45a015560e01b815290516000929163c45a0155916004808301926020929190829003018186803b158015610fa457600080fd5b505afa158015610fb8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fdc919061301b565b6001600160a01b031663c9c6539630600660009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561103957600080fd5b505afa15801561104d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611071919061301b565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156110b957600080fd5b505af11580156110cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f1919061301b565b600780546001600160a01b0319166001600160a01b03929092169190911790555050565b6008546040516370a0823160e01b81526001600160a01b03838116600483015260009216906370a08231906024015b60206040518083038186803b15801561115c57600080fd5b505afa158015611170573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111949190613225565b92915050565b6008546040516001624d3b8760e01b0319815260048101839052600091829182916001600160a01b03169063ffb2c47990602401606060405180830381600087803b1580156111e857600080fd5b505af11580156111fc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611220919061323d565b604080518481526020810184905290810182905260608101889052929550909350915032906000907fc864333d6121033635ab41b29ae52f10a22cf4438c3e4f1c4c68518feb2f8a989060800160405180910390a350505050565b6005546001600160a01b031633146112a55760405162461bcd60e51b8152600401610af090613359565b6112af600061254d565b565b6005546001600160a01b031633146112db5760405162461bcd60e51b8152600401610af090613359565b62030d4081101580156112f157506207a1208111155b6113635760405162461bcd60e51b815260206004820152603f60248201527f42414259544f4b454e3a20676173466f7250726f63657373696e67206d75737460448201527f206265206265747765656e203230302c30303020616e64203530302c303030006064820152608401610af0565b6010548114156113db5760405162461bcd60e51b815260206004820152603760248201527f42414259544f4b454e3a2043616e6e6f742075706461746520676173466f725060448201527f726f63657373696e6720746f2073616d652076616c75650000000000000000006064820152608401610af0565b60105460405182907f40d7e40e79af4e8e5a9b3c57030d8ea93f13d669c06d448c4d631d4ae7d23db790600090a3601055565b6005546001600160a01b031633146114385760405162461bcd60e51b8152600401610af090613359565b6008546001600160a01b03828116911614156114bc5760405162461bcd60e51b815260206004820152603860248201527f42414259544f4b454e3a20546865206469766964656e6420747261636b65722060448201527f616c7265616479206861732074686174206164647265737300000000000000006064820152608401610af0565b6000819050306001600160a01b0316816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561150457600080fd5b505afa158015611518573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061153c919061301b565b6001600160a01b0316146115d25760405162461bcd60e51b815260206004820152605160248201527f42414259544f4b454e3a20546865206e6577206469766964656e64207472616360448201527f6b6572206d757374206265206f776e6564206279207468652042414259544f4b6064820152701153881d1bdad95b8818dbdb9d1c9858dd607a1b608482015260a401610af0565b60405163031e79db60e41b81526001600160a01b03821660048201819052906331e79db090602401600060405180830381600087803b15801561161457600080fd5b505af1158015611628573d6000803e3d6000fd5b505060405163031e79db60e41b81523060048201526001600160a01b03841692506331e79db09150602401600060405180830381600087803b15801561166d57600080fd5b505af1158015611681573d6000803e3d6000fd5b50505050806001600160a01b03166331e79db06116a66005546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401600060405180830381600087803b1580156116e757600080fd5b505af11580156116fb573d6000803e3d6000fd5b505060065460405163031e79db60e41b81526001600160a01b03918216600482015290841692506331e79db09150602401600060405180830381600087803b15801561174657600080fd5b505af115801561175a573d6000803e3d6000fd5b50506008546040516001600160a01b03918216935090851691507f90c7d74461c613da5efa97d90740869367d74ab3aa5837aa4ae9a975f954b7a890600090a3600880546001600160a01b0319166001600160a01b039290921691909117905550565b606060048054610a2b906134b1565b6005546001600160a01b031633146117f65760405162461bcd60e51b8152600401610af090613359565b6007546001600160a01b03838116911614156118935760405162461bcd60e51b815260206004820152605060248201527f42414259544f4b454e3a205468652050616e63616b655377617020706169722060448201527f63616e6e6f742062652072656d6f7665642066726f6d206175746f6d6174656460648201526f4d61726b65744d616b6572506169727360801b608482015260a401610af0565b61189d828261259f565b5050565b60085460408051631bc9e27b60e21b815290516000926001600160a01b031691636f2789ec916004808301926020929190829003018186803b158015610bc457600080fd5b600033816118f48286611d82565b9050838110156119545760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610af0565b610b748286868403611f52565b6008546040516302a2e74960e61b81526001600160a01b038381166004830152600092169063a8b9d24090602401611144565b600033610abc8185856120f0565b60085460405163fbcbc0f160e01b81526001600160a01b038381166004830152600092839283928392839283928392839291169063fbcbc0f1906024015b6101006040518083038186803b1580156119f957600080fd5b505afa158015611a0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a3191906130dc565b97509750975097509750975097509750919395975091939597565b6005546001600160a01b03163314611a765760405162461bcd60e51b8152600401610af090613359565b600c819055600d54600b54610d519190610d4b9084611f27565b6005546001600160a01b03163314611aba5760405162461bcd60e51b8152600401610af090613359565b600a55565b60085460408051632f842d8560e21b815290516000926001600160a01b03169163be10b614916004808301926020929190829003018186803b158015610bc457600080fd5b6005546001600160a01b03163314611b2e5760405162461bcd60e51b8152600401610af090613359565b6001600160a01b03821660009081526011602052604090205460ff1615158115151415611bbb5760405162461bcd60e51b815260206004820152603560248201527f42414259544f4b454e3a204163636f756e7420697320616c7265616479207468604482015274652076616c7565206f6620276578636c756465642760581b6064820152608401610af0565b6001600160a01b038216600081815260116020908152604091829020805460ff191685151590811790915591519182527f9d8f7706ea1113d1a167b526eca956215946dd36cc7df39eb16180222d8b5df7910160405180910390a25050565b6005546001600160a01b03163314611c445760405162461bcd60e51b8152600401610af090613359565b60005b82811015611cc3578160116000868685818110611c7457634e487b7160e01b600052603260045260246000fd5b9050602002016020810190611c899190612fff565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580611cbb816134ec565b915050611c47565b507f7fdaf542373fa84f4ee8d662c642f44e4c2276a217d7d29e548b6eb29a233b35838383604051611cf79392919061326a565b60405180910390a1505050565b60085460405163c705c56960e01b81526001600160a01b038381166004830152600092169063c705c5699060240160206040518083038186803b158015611d4a57600080fd5b505afa158015611d5e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119491906131f1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6008546040805163039e107b60e61b815290516000926001600160a01b03169163e7841ec0916004808301926020929190829003018186803b158015610bc457600080fd5b6005546001600160a01b03163314611e1c5760405162461bcd60e51b8152600401610af090613359565b60085460405163e98030c760e01b8152600481018390526001600160a01b039091169063e98030c790602401610b26565b600854604051635183d6fd60e01b81526004810183905260009182918291829182918291829182916001600160a01b0390911690635183d6fd906024016119e0565b6005546001600160a01b03163314611eb95760405162461bcd60e51b8152600401610af090613359565b6001600160a01b038116611f1e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610af0565b610d038161254d565b6000611f338284613443565b9392505050565b6000611f33828461347b565b6000611f33828461345b565b6001600160a01b038316611fb45760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610af0565b6001600160a01b0382166120155760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610af0565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006120828484611d82565b905060001981146120ea57818110156120dd5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610af0565b6120ea8484848403611f52565b50505050565b6001600160a01b0383166121165760405162461bcd60e51b8152600401610af09061338e565b6001600160a01b03821661213c5760405162461bcd60e51b8152600401610af090613316565b806121525761214d83836000612709565b505050565b30600090815260208190526040902054600a54811080159081906121805750600754600160a01b900460ff16155b80156121a557506001600160a01b03851660009081526012602052604090205460ff16155b80156121bf57506005546001600160a01b03868116911614155b80156121d957506005546001600160a01b03858116911614155b1561226c576007805460ff60a01b1916600160a01b179055600e54600d5460009161220f91612209908690611f3a565b90611f46565b905061221a8161285d565b6000612237600e54612209600c5487611f3a90919063ffffffff16565b9050612242816129f6565b3060009081526020819052604090205461225b81612a7d565b50506007805460ff60a01b19169055505b6007546001600160a01b03861660009081526011602052604090205460ff600160a01b9092048216159116806122ba57506001600160a01b03851660009081526011602052604090205460ff165b156122c3575060005b801561233f5760006122e56064612209600e5488611f3a90919063ffffffff16565b6001600160a01b03871660009081526012602052604090205490915060ff1615612326576123196064612209876001611f3a565b6123239082613443565b90505b6123308582612c2d565b945061233d873083612709565b505b61234a868686612709565b6008546001600160a01b031663e30443bc8761237b816001600160a01b031660009081526020819052604090205490565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156123c157600080fd5b505af19250505080156123d2575060015b506008546001600160a01b031663e30443bc86612404816001600160a01b031660009081526020819052604090205490565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561244a57600080fd5b505af192505050801561245b575060015b50600754600160a01b900460ff16612545576010546008546040516001624d3b8760e01b03198152600481018390526001600160a01b039091169063ffb2c47990602401606060405180830381600087803b1580156124b957600080fd5b505af19250505080156124e9575060408051601f3d908101601f191682019092526124e69181019061323d565b60015b6124f257612543565b60408051848152602081018490529081018290526060810185905232906001907fc864333d6121033635ab41b29ae52f10a22cf4438c3e4f1c4c68518feb2f8a989060800160405180910390a35050505b505b505050505050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b03821660009081526012602052604090205460ff16151581151514156126405760405162461bcd60e51b815260206004820152604360248201527f42414259544f4b454e3a204175746f6d61746564206d61726b6574206d616b6560448201527f72207061697220697320616c72656164792073657420746f20746861742076616064820152626c756560e81b608482015260a401610af0565b6001600160a01b0382166000908152601260205260409020805460ff191682158015919091179091556126cd5760085460405163031e79db60e41b81526001600160a01b038481166004830152909116906331e79db090602401600060405180830381600087803b1580156126b457600080fd5b505af11580156126c8573d6000803e3d6000fd5b505050505b604051811515906001600160a01b038416907fffa9187bf1f18bf477bd0ea1bcbb64e93b6a98132473929edfce215cd9b16fab90600090a35050565b6001600160a01b03831661272f5760405162461bcd60e51b8152600401610af09061338e565b6001600160a01b0382166127555760405162461bcd60e51b8152600401610af090613316565b6001600160a01b038316600090815260208190526040902054818110156127cd5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610af0565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290612804908490613443565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161285091815260200190565b60405180910390a36120ea565b6009546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156128a157600080fd5b505afa1580156128b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128d99190613225565b90506128e482612c39565b6009546040516370a0823160e01b815230600482015260009161296c9184916001600160a01b0316906370a082319060240160206040518083038186803b15801561292e57600080fd5b505afa158015612942573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129669190613225565b90612c2d565b600954600f5460405163a9059cbb60e01b81526001600160a01b03918216600482015260248101849052929350169063a9059cbb90604401602060405180830381600087803b1580156129be57600080fd5b505af11580156129d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120ea91906131f1565b6000612a03826002611f46565b90506000612a118383612c2d565b905047612a1d83612df7565b6000612a294783612c2d565b9050612a358382612f46565b60408051858152602081018390529081018490527f17bbfb9a6069321b6ded73bd96327c9e6b7212a5cd51ff219cd61370acafb5619060600160405180910390a15050505050565b612a8681612c39565b6009546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015612aca57600080fd5b505afa158015612ade573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b029190613225565b60095460085460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810184905292935060009291169063a9059cbb90604401602060405180830381600087803b158015612b5857600080fd5b505af1158015612b6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b9091906131f1565b9050801561214d5760085460405163ba72a95560e01b8152600481018490526001600160a01b039091169063ba72a95590602401600060405180830381600087803b158015612bde57600080fd5b505af1158015612bf2573d6000803e3d6000fd5b505060408051868152602081018690527f80195cc573b02cc48460cbca6e6e4cc85ddb91959d946e1c3025ea3d87942dc39350019050611cf7565b6000611f33828461349a565b60408051600380825260808201909252600091602082016060803683370190505090503081600081518110612c7e57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152600654604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b158015612cd257600080fd5b505afa158015612ce6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d0a919061301b565b81600181518110612d2b57634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600954825191169082906002908110612d6a57634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600654612d909130911684611f52565b600654604051635c11d79560e01b81526001600160a01b0390911690635c11d79590612dc99085906000908690309042906004016133d3565b600060405180830381600087803b158015612de357600080fd5b505af1158015612545573d6000803e3d6000fd5b6040805160028082526060820183526000926020830190803683370190505090503081600081518110612e3a57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152600654604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b158015612e8e57600080fd5b505afa158015612ea2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ec6919061301b565b81600181518110612ee757634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600654612f0d9130911684611f52565b60065460405163791ac94760e01b81526001600160a01b039091169063791ac94790612dc99085906000908690309042906004016133d3565b600654612f5e9030906001600160a01b031684611f52565b60065460405163f305d71960e01b8152306004820152602481018490526000604482018190526064820181905260848201524260a48201526001600160a01b039091169063f305d71990839060c4016060604051808303818588803b158015612fc657600080fd5b505af1158015612fda573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b54919061323d565b600060208284031215613010578081fd5b8135611f338161351d565b60006020828403121561302c578081fd5b8151611f338161351d565b60008060408385031215613049578081fd5b82356130548161351d565b915060208301356130648161351d565b809150509250929050565b600080600060608486031215613083578081fd5b833561308e8161351d565b9250602084013561309e8161351d565b929592945050506040919091013590565b600080604083850312156130c1578182fd5b82356130cc8161351d565b9150602083013561306481613532565b600080600080600080600080610100898b0312156130f8578384fd5b88516131038161351d565b809850506020890151965060408901519550606089015194506080890151935060a0890151925060c0890151915060e089015190509295985092959890939650565b60008060408385031215613157578182fd5b82356131628161351d565b946020939093013593505050565b600080600060408486031215613184578283fd5b833567ffffffffffffffff8082111561319b578485fd5b818601915086601f8301126131ae578485fd5b8135818111156131bc578586fd5b8760208260051b85010111156131d0578586fd5b602092830195509350508401356131e681613532565b809150509250925092565b600060208284031215613202578081fd5b8151611f3381613532565b60006020828403121561321e578081fd5b5035919050565b600060208284031215613236578081fd5b5051919050565b600080600060608486031215613251578283fd5b8351925060208401519150604084015190509250925092565b6040808252810183905260008460608301825b868110156132ad5782356132908161351d565b6001600160a01b031682526020928301929091019060010161327d565b5080925050508215156020830152949350505050565b6000602080835283518082850152825b818110156132ef578581018301518582016040015282016132d3565b818111156133005783604083870101525b50601f01601f1916929092016040019392505050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b818110156134225784516001600160a01b0316835293830193918301916001016133fd565b50506001600160a01b03969096166060850152505050608001529392505050565b6000821982111561345657613456613507565b500190565b60008261347657634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561349557613495613507565b500290565b6000828210156134ac576134ac613507565b500390565b600181811c908216806134c557607f821691505b602082108114156134e657634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561350057613500613507565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114610d0357600080fd5b8015158114610d0357600080fdfea26469706673582212204375139c033246d2c696b674d3fd8651d973f67a370316e99530c8c0d2f4743c64736f6c63430008040033
External libraries
IterableMapping : 0xcFF15055c04Cd00744Da56690f55C27237862771