Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- IcariaSmartTokenFactory
- Optimization enabled
- true
- Compiler version
- v0.8.28+commit.7893614a
- Optimization runs
- 200
- EVM Version
- paris
- Verified at
- 2025-03-22T15:38:02.108680Z
Constructor Arguments
0x00000000000000000000000000000000000000000000003635c9adc5dea00000000000000000000000000000b47eecbb81a9af59da0ff9409c0f9af082d9420d00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000003000000000000000000000000958c664f1dab9357e9a1e913c740decad1d7a3fe00000000000000000000000022b7faca9f94ed2645364abee11f117b56b6469a000000000000000000000000568c45580bdef25f71984d088c36661f12eb5349
contracts/IcariaSmartTokenFactory.sol
//
//
//
// ██╗ ██████╗ █████╗ ██████╗ ██╗ █████╗ ███████╗ ██████╗ ██████╗ ██████╗ ███████╗
// ██║██╔════╝██╔══██╗██╔══██╗██║██╔══██╗ ██╔════╝██╔═══██╗██╔══██╗██╔════╝ ██╔════╝
// ██║██║ ███████║██████╔╝██║███████║ █████╗ ██║ ██║██████╔╝██║ ███╗█████╗
// ██║██║ ██╔══██║██╔══██╗██║██╔══██║ ██╔══╝ ██║ ██║██╔══██╗██║ ██║██╔══╝
// ██║╚██████╗██║ ██║██║ ██║██║██║ ██║ ██║ ╚██████╔╝██║ ██║╚██████╔╝███████╗
// ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝
//
//
//
// Forge
// Web: https://forge.icaria.pro
// Tg: https://t.me/icariaforge
//
// Icaria
// Web: https://icaria.pro
// Tg: https://t.me/icarusprc20
// X: https://x.com/IcarusPRC20
//
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import { IcariaSmartToken } from "./IcariaSmartToken.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IIcariaHelpers } from "./interfaces/IIcariaHelpers.sol";
contract IcariaSmartTokenFactory is Ownable, ReentrancyGuard {
uint256 public constant GLOBAL_DIVIDER = 10000;
uint256 public ICARIA_FEE = 750; // 7.5% from total taxes (like if total taxes are 1% then ICARIA_FEE = 0.075%)
address public ICARIA_WALLET;
address public manager;
uint256 public tokenCreationPrice;
address public immutable helpersAddress;
mapping(address => bool) public isFactoryToken;
// Array of wallets for distribution
address processorWallet;
address[] public distributionWallets;
event TokenCreated(address indexed tokenAddress, string name, string symbol, address indexed owner);
modifier onlyManager() {
require(owner() == _msgSender() || manager == _msgSender() || processorWallet == _msgSender(), "Denied");
_;
}
constructor(uint256 _tokenCreationPrice, address _helpersAddress, address[] memory _distributionWallets) Ownable(msg.sender) {
tokenCreationPrice = _tokenCreationPrice;
ICARIA_WALLET = address(this);
helpersAddress = _helpersAddress;
processorWallet = msg.sender;
distributionWallets = _distributionWallets;
}
function createToken(
string memory name_,
string memory symbol_,
uint256 _initialSupply,
IIcariaHelpers.Tax[] memory _taxes,
bool ownershipRenounced,
address _icariaSmartTrader
) external payable nonReentrant returns (address) {
if (_taxes.length > 0) {
require(msg.value >= tokenCreationPrice, "Insufficient payment");
}
IcariaSmartToken newToken = new IcariaSmartToken(
name_,
symbol_,
address(this), // owner of the token is the caller
msg.sender,
_initialSupply,
_taxes,
_icariaSmartTrader,
address(this), // Pass factory address
helpersAddress // Use the stored helpers address
);
isFactoryToken[address(newToken)] = true;
ownershipRenounced ? newToken.renounceOwnership() : newToken.transferOwnership(msg.sender);
if (_taxes.length > 0 && tokenCreationPrice > 0) {
_withdrawPLS(tokenCreationPrice);
}
emit TokenCreated(address(newToken), name_, symbol_, msg.sender);
return address(newToken);
}
function getTokenTaxData(address tokenAddress) external view returns (IIcariaHelpers.Tax[] memory) {
require(isFactoryToken[tokenAddress], "Not a factory token");
return IcariaSmartToken(payable(tokenAddress)).getTaxes();
}
function getTokenData(address tokenAddress) external view returns (
string memory name,
string memory symbol,
uint256 initialSupply,
uint256 currentSupply,
bool ownershipRenounced,
IIcariaHelpers.Tax[] memory taxes
) {
require(isFactoryToken[tokenAddress], "Not a factory token");
IcariaSmartToken token = IcariaSmartToken(payable(tokenAddress));
name = token.name();
symbol = token.symbol();
initialSupply = token.initialSupply();
currentSupply = token.totalSupply();
ownershipRenounced = token.owner() == address(0);
taxes = token.getTaxes();
return (name, symbol, initialSupply, currentSupply, ownershipRenounced, taxes);
}
function setTokenCreationPrice(uint256 newPrice) external onlyOwner {
tokenCreationPrice = newPrice;
}
function setIcariaFee(uint256 newFee) external onlyOwner {
require(newFee <= GLOBAL_DIVIDER, "Fee > 100%");
ICARIA_FEE = newFee;
}
function setIcariaWallet(address newWallet) external onlyOwner {
require(newWallet != address(0), "Invalid address");
ICARIA_WALLET = newWallet;
}
function setProcessorWallet(address wallet) external onlyOwner {
require(wallet != address(0), "Invalid address");
processorWallet = wallet;
}
function addDistributionWallet(address wallet) external onlyOwner {
require(wallet != address(0), "Invalid address");
// Check if wallet already exists
for(uint256 i = 0; i < distributionWallets.length; i++) {
if(distributionWallets[i] == wallet) {
revert("Exists");
}
}
distributionWallets.push(wallet);
}
function removeDistributionWallet(address walletToRemove) external onlyOwner {
require(distributionWallets.length > 0);
for(uint256 i = 0; i < distributionWallets.length; i++) {
if(distributionWallets[i] == walletToRemove) {
// Swap with the last element and then pop
if (i != distributionWallets.length - 1) {
distributionWallets[i] = distributionWallets[distributionWallets.length - 1];
}
distributionWallets.pop();
return;
}
}
revert();
}
function getDistributionWallets() external view returns (address[] memory) {
return distributionWallets;
}
function processPLS(uint256 amount) external onlyManager {
require(amount > 0 && amount <= address(this).balance, "Invalid amount");
(bool success, ) = processorWallet.call{value: amount}("");
}
function processERC20s(address[] memory tokenAddresses, uint256[] memory amounts) external onlyManager {
require(tokenAddresses.length == amounts.length, "Invalid input");
for(uint256 i = 0; i < tokenAddresses.length; i++) {
IERC20 token = IERC20(tokenAddresses[i]);
uint256 balance = token.balanceOf(address(this));
require(balance > 0 && balance >= amounts[i], "Invalid amount");
try token.transfer(processorWallet, amounts[i]) {} catch {}
}
}
function _withdrawPLS(uint256 amount) internal{
uint256 walletsCount = distributionWallets.length;
require(walletsCount > 0, "No wallets");
uint256 amountPerWallet = amount / walletsCount;
require(amount > 0 && amountPerWallet > 0 && amount <= address(this).balance, "No PLS");
for(uint256 i = 0; i < walletsCount; i++) {
(bool success, ) = distributionWallets[i].call{value: amountPerWallet}("");
}
}
function withdrawPLS(uint256 amount) external onlyManager nonReentrant {
_withdrawPLS(amount);
}
// function withdrawERC20(address tokenAddress) external onlyManager nonReentrant {
// require(tokenAddress != address(0), "Invalid address");
// uint256 walletsCount = distributionWallets.length;
// IERC20 token = IERC20(tokenAddress);
// uint256 balance = token.balanceOf(address(this));
// uint256 amountPerWallet = balance / walletsCount;
// require(balance > 0 && amountPerWallet > 0, "No tokens");
// for(uint256 i = 0; i < walletsCount; i++) {
// require(token.transfer(distributionWallets[i], amountPerWallet), "Failed");
// }
// }
// function approveERC20(address spender, address tokenAddress, uint256 amount) external onlyManager nonReentrant {
// require(tokenAddress != address(0), "Invalid address");
// IERC20(tokenAddress).approve(spender, amount);
// }
// function approveERC20s(address spender, address[] memory tokenAddresses, uint256[] calldata amounts) external onlyManager nonReentrant {
// require(tokenAddresses.length == amounts.length, "Invalid input");
// for(uint256 i = 0; i < tokenAddresses.length; i++) {
// IERC20(tokenAddresses[i]).approve(spender, amounts[i]);
// }
// }
receive() external payable {}
}
@openzeppelin/contracts/access/Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* The initial owner is set to the address provided by the deployer. This can
* later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
@openzeppelin/contracts/interfaces/draft-IERC6093.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;
/**
* @dev Standard ERC-20 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.
*/
interface IERC20Errors {
/**
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param balance Current balance for the interacting account.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC20InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC20InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
* @param spender Address that may be allowed to operate on tokens without being their owner.
* @param allowance Amount of tokens a `spender` is allowed to operate with.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC20InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `spender` to be approved. Used in approvals.
* @param spender Address that may be allowed to operate on tokens without being their owner.
*/
error ERC20InvalidSpender(address spender);
}
/**
* @dev Standard ERC-721 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.
*/
interface IERC721Errors {
/**
* @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20.
* Used in balance queries.
* @param owner Address of the current owner of a token.
*/
error ERC721InvalidOwner(address owner);
/**
* @dev Indicates a `tokenId` whose `owner` is the zero address.
* @param tokenId Identifier number of a token.
*/
error ERC721NonexistentToken(uint256 tokenId);
/**
* @dev Indicates an error related to the ownership over a particular token. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param tokenId Identifier number of a token.
* @param owner Address of the current owner of a token.
*/
error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC721InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC721InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `operator`’s approval. Used in transfers.
* @param operator Address that may be allowed to operate on tokens without being their owner.
* @param tokenId Identifier number of a token.
*/
error ERC721InsufficientApproval(address operator, uint256 tokenId);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC721InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `operator` to be approved. Used in approvals.
* @param operator Address that may be allowed to operate on tokens without being their owner.
*/
error ERC721InvalidOperator(address operator);
}
/**
* @dev Standard ERC-1155 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens.
*/
interface IERC1155Errors {
/**
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param balance Current balance for the interacting account.
* @param needed Minimum amount required to perform a transfer.
* @param tokenId Identifier number of a token.
*/
error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC1155InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC1155InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `operator`’s approval. Used in transfers.
* @param operator Address that may be allowed to operate on tokens without being their owner.
* @param owner Address of the current owner of a token.
*/
error ERC1155MissingApprovalForAll(address operator, address owner);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC1155InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `operator` to be approved. Used in approvals.
* @param operator Address that may be allowed to operate on tokens without being their owner.
*/
error ERC1155InvalidOperator(address operator);
/**
* @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
* Used in batch transfers.
* @param idsLength Length of the array of token identifiers
* @param valuesLength Length of the array of token amounts
*/
error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}
@openzeppelin/contracts/token/ERC20/IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC-20 standard as defined in the ERC.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 value) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 value) external returns (bool);
}
@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC-20 standard.
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
@openzeppelin/contracts/utils/Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}
@openzeppelin/contracts/utils/ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)
pragma solidity ^0.8.20;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at,
* consider using {ReentrancyGuardTransient} instead.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant NOT_ENTERED = 1;
uint256 private constant ENTERED = 2;
uint256 private _status;
/**
* @dev Unauthorized reentrant call.
*/
error ReentrancyGuardReentrantCall();
constructor() {
_status = NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be NOT_ENTERED
if (_status == ENTERED) {
revert ReentrancyGuardReentrantCall();
}
// Any calls to nonReentrant after this point will fail
_status = ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == ENTERED;
}
}
@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol
pragma solidity >=0.5.0;
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB) external view returns (address pair);
function allPairs(uint) external view returns (address pair);
function allPairsLength() external view returns (uint);
function createPair(address tokenA, address tokenB) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol
pragma solidity >=0.5.0;
interface IUniswapV2Pair {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint 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 (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint 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 (uint);
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
event Mint(address indexed sender, uint amount0, uint amount1);
event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint);
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 (uint);
function price1CumulativeLast() external view returns (uint);
function kLast() external view returns (uint);
function mint(address to) external returns (uint liquidity);
function burn(address to) external returns (uint amount0, uint amount1);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.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,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB);
function removeLiquidityETH(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountToken, uint amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountA, uint amountB);
function removeLiquidityETHWithPermit(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountToken, uint amountETH);
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapTokensForExactTokens(
uint amountOut,
uint amountInMax,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol
pragma solidity >=0.6.2;
import './IUniswapV2Router01.sol';
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
contracts/ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.2.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import {Context} from "@openzeppelin/contracts/utils/Context.sol";
import {IERC20Errors} from "@openzeppelin/contracts/interfaces/draft-IERC6093.sol";
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
*
* TIP: For a detailed writeup see our guide
* https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* The default value of {decimals} is 18. To change this, you should override
* this function so it returns a different value.
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC-20
* applications.
*/
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
mapping(address account => uint256) private _balances;
mapping(address account => mapping(address spender => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the default value returned by this function, unless
* it's overridden.
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `value`.
*/
function transfer(address to, uint256 value) public virtual returns (bool) {
address owner = _msgSender();
_transfer(owner, to, value);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `value` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 value) public virtual returns (bool) {
address owner = _msgSender();
_approve(owner, spender, value);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Skips emitting an {Approval} event indicating an allowance update. This is not
* required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `value`.
* - the caller must have allowance for ``from``'s tokens of at least
* `value`.
*/
function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, value);
_transfer(from, to, value);
return true;
}
/**
* @dev Moves a `value` amount of tokens from `from` to `to`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* NOTE: This function is not virtual, {_update} should be overridden instead.
*/
function _transfer(address from, address to, uint256 value) internal virtual {
if (from == address(0)) {
revert ERC20InvalidSender(address(0));
}
if (to == address(0)) {
revert ERC20InvalidReceiver(address(0));
}
_update(from, to, value);
}
/**
* @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`
* (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding
* this function.
*
* Emits a {Transfer} event.
*/
function _update(address from, address to, uint256 value) internal virtual {
if (from == address(0)) {
// Overflow check required: The rest of the code assumes that totalSupply never overflows
_totalSupply += value;
} else {
uint256 fromBalance = _balances[from];
if (fromBalance < value) {
revert ERC20InsufficientBalance(from, fromBalance, value);
}
unchecked {
// Overflow not possible: value <= fromBalance <= totalSupply.
_balances[from] = fromBalance - value;
}
}
if (to == address(0)) {
unchecked {
// Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.
_totalSupply -= value;
}
} else {
unchecked {
// Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.
_balances[to] += value;
}
}
emit Transfer(from, to, value);
}
/**
* @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).
* Relies on the `_update` mechanism
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* NOTE: This function is not virtual, {_update} should be overridden instead.
*/
function _mint(address account, uint256 value) internal {
if (account == address(0)) {
revert ERC20InvalidReceiver(address(0));
}
_update(address(0), account, value);
}
/**
* @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.
* Relies on the `_update` mechanism.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* NOTE: This function is not virtual, {_update} should be overridden instead
*/
function _burn(address account, uint256 value) internal {
if (account == address(0)) {
revert ERC20InvalidSender(address(0));
}
_update(account, address(0), value);
}
/**
* @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*
* Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
*/
function _approve(address owner, address spender, uint256 value) internal {
_approve(owner, spender, value, true);
}
/**
* @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.
*
* By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by
* `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any
* `Approval` event during `transferFrom` operations.
*
* Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to
* true using the following override:
*
* ```solidity
* function _approve(address owner, address spender, uint256 value, bool) internal virtual override {
* super._approve(owner, spender, value, true);
* }
* ```
*
* Requirements are the same as {_approve}.
*/
function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
if (owner == address(0)) {
revert ERC20InvalidApprover(address(0));
}
if (spender == address(0)) {
revert ERC20InvalidSpender(address(0));
}
_allowances[owner][spender] = value;
if (emitEvent) {
emit Approval(owner, spender, value);
}
}
/**
* @dev Updates `owner` s allowance for `spender` based on spent `value`.
*
* Does not update the allowance value in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Does not emit an {Approval} event.
*/
function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance < type(uint256).max) {
if (currentAllowance < value) {
revert ERC20InsufficientAllowance(spender, currentAllowance, value);
}
unchecked {
_approve(owner, spender, currentAllowance - value, false);
}
}
}
}
contracts/IcariaRYManager.sol
//
//
//
// ██╗ ██████╗ █████╗ ██████╗ ██╗ █████╗ ███████╗ ██████╗ ██████╗ ██████╗ ███████╗
// ██║██╔════╝██╔══██╗██╔══██╗██║██╔══██╗ ██╔════╝██╔═══██╗██╔══██╗██╔════╝ ██╔════╝
// ██║██║ ███████║██████╔╝██║███████║ █████╗ ██║ ██║██████╔╝██║ ███╗█████╗
// ██║██║ ██╔══██║██╔══██╗██║██╔══██║ ██╔══╝ ██║ ██║██╔══██╗██║ ██║██╔══╝
// ██║╚██████╗██║ ██║██║ ██║██║██║ ██║ ██║ ╚██████╔╝██║ ██║╚██████╔╝███████╗
// ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝
//
//
//
// Forge
// Web: https://forge.icaria.pro
// Tg: https://t.me/icariaforge
//
// Icaria
// Web: https://icaria.pro
// Tg: https://t.me/icarusprc20
// X: https://x.com/IcarusPRC20
//
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import { IERC20 }from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IIcariaHelpers } from "./interfaces/IIcariaHelpers.sol";
contract IcariaRYManager {
// For yield tax tokens
struct YieldToken {
address tokenAddress;
uint256 reflectionsPerShareAmount;
}
YieldToken[] internal yieldTokens;
mapping(address => uint256[]) internal yieldTokenReflectionDebts;
uint256 internal reflectionsPerShareAmount;
mapping(address => uint256) internal reflectionDebt;
mapping(address => bool) public isReflectionExcluded;
uint256 internal immutable PRECISION;
address internal immutable helpers;
mapping(address => mapping(address => UserYield)) internal userYields;
struct UserYield {
uint256 reflectionDebt;
}
constructor(address _helpers) {
PRECISION = 10**22;
helpers = _helpers;
}
bool internal inSwap;
modifier lockSwap() {
inSwap = true;
_;
inSwap = false;
}
// ------------------------------------------ REFLECTIONS -------------------------------------------------//
function getCurrentReflectionsPerShareAmount() external view returns (uint256) {
return reflectionsPerShareAmount;
}
function isExcludedFromReflections(address account) public view returns (bool) {
return isReflectionExcluded[account];
}
function pendingReflections(address account) public view returns (uint256) {
if (isExcludedFromReflections(account)) {
return 0;
}
return cleanPendingReflections(account);
}
function cleanPendingReflections(address account) internal view returns (uint256) {
return IIcariaHelpers(helpers).cleanPendingReflections(
account,
address(this),
reflectionsPerShareAmount,
reflectionDebt[account],
PRECISION
);
}
function updateAndClaimReflections(address from, address to, address deployer) internal returns (uint256 fromAmount, uint256 toAmount, uint256 deployerAmount) {
if (from == to) {
fromAmount = isExcludedFromReflections(from) ? 0 : pendingReflections(from);
toAmount = 0; // Set to zero to avoid double claiming
} else {
fromAmount = isExcludedFromReflections(from) ? 0 : pendingReflections(from);
toAmount = isExcludedFromReflections(to) ? 0 : pendingReflections(to);
}
deployerAmount = cleanPendingReflections(deployer);
reflectionDebt[deployer] = reflectionsPerShareAmount;
reflectionDebt[from] = reflectionsPerShareAmount;
reflectionDebt[to] = reflectionsPerShareAmount;
}
// function tokenPendingReflections() public view returns (uint256) {
// uint256 currentBalance = IERC20(address(this)).balanceOf(address(this));
// uint256 newReflectionDebt = reflectionsPerShareAmount;
// if (newReflectionDebt <= reflectionDebt[address(this)]) {
// return 0;
// }
// return (newReflectionDebt - reflectionDebt[address(this)]) * currentBalance / PRECISION;
// }
// ------------------------------------------ YIELD TOKENS REFLECTIONS -------------------------------------------------//
function addYieldToken(address tokenAddress) internal returns (uint256 tokenIndex) {
for (uint256 i = 0; i < yieldTokens.length; i++) {
if (yieldTokens[i].tokenAddress == tokenAddress) {
return i;
}
}
yieldTokens.push(YieldToken({
tokenAddress: tokenAddress,
reflectionsPerShareAmount: 0
}));
return yieldTokens.length - 1;
}
function pendingYields(address account, address token, uint256 tokenIndex) public view returns (uint256) {
return IIcariaHelpers(helpers).pendingYields(
account,
token,
address(this),
yieldTokens[tokenIndex].reflectionsPerShareAmount,
userYields[account][token].reflectionDebt,
PRECISION
);
}
function updateAndClaimYield(address from, address to, address deployer) internal {
for (uint256 i = 0; i < yieldTokens.length; i++) {
while (yieldTokenReflectionDebts[from].length <= i) {
yieldTokenReflectionDebts[from].push(yieldTokens[i].reflectionsPerShareAmount);
}
while (yieldTokenReflectionDebts[to].length <= i) {
yieldTokenReflectionDebts[to].push(yieldTokens[i].reflectionsPerShareAmount);
}
while (yieldTokenReflectionDebts[deployer].length <= i) {
yieldTokenReflectionDebts[deployer].push(yieldTokens[i].reflectionsPerShareAmount);
}
uint256 fromAmount = isExcludedFromReflections(from) ? 0 : pendingYields(from, yieldTokens[i].tokenAddress, i);
uint256 toAmount = 0; // Initialize to 0
uint256 deployerAmount = 0; // Initialize to 0
if (from != to) {
toAmount = isExcludedFromReflections(to) ? 0 : pendingYields(to, yieldTokens[i].tokenAddress, i);
}
if (from != deployer && to != deployer) {
deployerAmount = isExcludedFromReflections(deployer) ? 0 : pendingYields(deployer, yieldTokens[i].tokenAddress, i);
}
uint256[] memory transferAmounts = new uint256[](3);
address[] memory recipients = new address[](3);
uint256 recipientCount = 0;
if (fromAmount > 0) {
transferAmounts[recipientCount] = fromAmount;
recipients[recipientCount] = from;
recipientCount++;
yieldTokenReflectionDebts[from][i] = yieldTokens[i].reflectionsPerShareAmount;
}
if (toAmount > 0) {
transferAmounts[recipientCount] = toAmount;
recipients[recipientCount] = to;
recipientCount++;
yieldTokenReflectionDebts[to][i] = yieldTokens[i].reflectionsPerShareAmount;
}
if (deployerAmount > 0) {
transferAmounts[recipientCount] = deployerAmount;
recipients[recipientCount] = deployer;
recipientCount++;
yieldTokenReflectionDebts[deployer][i] = yieldTokens[i].reflectionsPerShareAmount;
}
for (uint256 j = 0; j < recipientCount; j++) {
try IERC20(yieldTokens[i].tokenAddress).transfer(recipients[j], transferAmounts[j]) {
// Transfer succeeded
} catch {
}
}
}
}
//------------------------------- OLD ONE
// uint256 oldFromDebt = yieldTokenReflectionDebts[from][i];
// uint256 oldToDebt = yieldTokenReflectionDebts[to][i];
// uint256 oldDeployerDebt = yieldTokenReflectionDebts[deployer][i];
// yieldTokenReflectionDebts[deployer][i] = yieldTokens[i].reflectionsPerShareAmount;
// yieldTokenReflectionDebts[from][i] = yieldTokens[i].reflectionsPerShareAmount;
// yieldTokenReflectionDebts[to][i] = yieldTokens[i].reflectionsPerShareAmount;
// //yieldTokenReflectionPaid[from][i] += fromAmount;
// //yieldTokenReflectionPaid[to][i] += toAmount;
// //yieldTokenReflectionPaid[deployer][i] += deployerAmount;
// uint256 currentBalance = IERC20(yieldTokens[i].tokenAddress).balanceOf(address(this));
// if (fromAmount > 0 ) {//&& currentBalance >= fromAmount
// currentBalance -= fromAmount;
// try IERC20(yieldTokens[i].tokenAddress).transfer(from, fromAmount) {
// } catch { yieldTokenReflectionDebts[from][i] = oldFromDebt; }
// }
// if (toAmount > 0) {// && currentBalance >= toAmount
// currentBalance -= toAmount;
// try IERC20(yieldTokens[i].tokenAddress).transfer(to, toAmount) {
// } catch { yieldTokenReflectionDebts[to][i] = oldToDebt; }
// }
// if (deployerAmount > 0 ) {//&& currentBalance >= deployerAmount
// try IERC20(yieldTokens[i].tokenAddress).transfer(deployer, deployerAmount) {
// } catch {
// yieldTokenReflectionDebts[deployer][i] = oldDeployerDebt;
// }
// }
// --------------------------------NEW ONE
// uint256[] memory transferAmounts = new uint256[](3);
// address[] memory recipients = new address[](3);
// uint256 recipientCount = 0;
// if (fromAmount > 0) {
// transferAmounts[recipientCount] = fromAmount;
// recipients[recipientCount] = from;
// recipientCount++;
// }
// if (toAmount > 0) {
// transferAmounts[recipientCount] = toAmount;
// recipients[recipientCount] = to;
// recipientCount++;
// }
// if (deployerAmount > 0) {
// transferAmounts[recipientCount] = deployerAmount;
// recipients[recipientCount] = deployer;
// recipientCount++;
// }
// // Update all state FIRST
// yieldTokenReflectionDebts[from][i] = yieldTokens[i].reflectionsPerShareAmount;
// yieldTokenReflectionDebts[to][i] = yieldTokens[i].reflectionsPerShareAmount;
// yieldTokenReflectionDebts[deployer][i] = yieldTokens[i].reflectionsPerShareAmount;
// // Then attempt transfers separately without state updates
// for (uint256 j = 0; j < recipientCount; j++) {
// try IERC20(yieldTokens[i].tokenAddress).transfer(recipients[j], transferAmounts[j]) {
// // Transfer succeeded
// } catch {
// // Transfer failed - could log this if needed
// }
// }
function getYieldTokens() public view returns (YieldToken[] memory) {
return yieldTokens;
}
// function getYieldTokenReflectionDebts(address account) public view returns (uint256[] memory) {
// return yieldTokenReflectionDebts[account];
// }
// function getYieldsPerShare(uint256 index) public view returns (uint256) {
// return yieldTokens[index].reflectionsPerShareAmount;
// }
// ------------------------------------------ END REFLECTIONS -----------------------------------------------//
//-------------------------------------------- HELPERS FUNCTIONS -------------------------------------------------//
// function excludeFromReflections(address account) external onlyOwner {
// require(!isExcludedFromReflections(account), "Account already excluded");
// isReflectionExcluded[account] = true;
// updateAndClaimReflections(account);
// }
// function includeInReflections(address account) external onlyOwner {
// require(isReflectionExcluded[account], "Not excluded");
// isReflectionExcluded[account] = false;
// reflectionDebt[account] = (balanceOf(account) * reflectionsPerShareAmount) / PRECISION;
// }
}
contracts/IcariaSmartToken.sol
//
//
//
// ██╗ ██████╗ █████╗ ██████╗ ██╗ █████╗ ███████╗ ██████╗ ██████╗ ██████╗ ███████╗
// ██║██╔════╝██╔══██╗██╔══██╗██║██╔══██╗ ██╔════╝██╔═══██╗██╔══██╗██╔════╝ ██╔════╝
// ██║██║ ███████║██████╔╝██║███████║ █████╗ ██║ ██║██████╔╝██║ ███╗█████╗
// ██║██║ ██╔══██║██╔══██╗██║██╔══██║ ██╔══╝ ██║ ██║██╔══██╗██║ ██║██╔══╝
// ██║╚██████╗██║ ██║██║ ██║██║██║ ██║ ██║ ╚██████╔╝██║ ██║╚██████╔╝███████╗
// ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝
//
//
//
// Forge
// Web: https://forge.icaria.pro
// Tg: https://t.me/icariaforge
//
// Icaria
// Web: https://icaria.pro
// Tg: https://t.me/icarusprc20
// X: https://x.com/IcarusPRC20
//
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import { ERC20 } from "./ERC20.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IcariaRYManager } from "./IcariaRYManager.sol";
import { Ownable }from "@openzeppelin/contracts/access/Ownable.sol";
import { IUniswapV2Factory } from "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import { IUniswapV2Router02 } from "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import { IUniswapV2Pair } from "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol";
import { IIcariaHelpers } from "./interfaces/IIcariaHelpers.sol";
interface IIcariaSmartTokenFactory {
function ICARIA_FEE() external view returns (uint256);
function ICARIA_WALLET() external view returns (address);
}
interface IIcariaSmartTrader {
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
address _router,
address _receiver,
uint256 amountIn,
address[] memory path
) external;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
address _router,
address _receiver,
uint256 amountIn,
address[] calldata path
) external;
}
interface IWETH {
function withdraw(uint256 wad) external;
}
contract IcariaSmartToken is ERC20, Ownable, IcariaRYManager {
uint256 public constant tokenVersion = 1;
uint256 public immutable initialSupply;
uint256 private constant GLOBAL_DIVIDER = 10000;
address private immutable icariaSmartTrader;
address private immutable deployer;
address private immutable factory;
address private constant wethAddress = 0xA1077a294dDE1B09bB078844df40758a5D0f9a27; // WPLS on PulseChain
address[] private routers = [0x98bf93ebf5c380C0e6Ae8e192A7e2AE08edAcc02, 0x165C3410fC91EF562C50559f7d2289fEbed552d9, 0xcC73b59F8D7b7c532703bDfea2808a28a488cF47, 0xeB45a3c4aedd0F47F345fB4c8A1802BB5740d725];
uint256 private currentSwapAmount;
uint256 private accumulatedIcariaFee;
bool private immutable icariaFeeEnabled;
bool private immutable shouldAccumulateIcariaFee;
bool private immutable reflectionsEnabled;
bool private immutable yieldEnabled;
bool private firstPairInteractionHappened = false;
bool private processedTaxesInTx;
IIcariaHelpers.Tax[] public taxes;
constructor(
string memory name_,
string memory symbol_,
address _owner,
address _mintTo,
uint256 _initialSupply,
IIcariaHelpers.Tax[] memory _taxes,
address _icariaSmartTrader,
address _factory,
address _helpers
) ERC20(name_, symbol_) Ownable(_owner) IcariaRYManager(_helpers) {
_mint(_mintTo, _initialSupply);
deployer = _mintTo;
initialSupply = _initialSupply;
icariaSmartTrader = _icariaSmartTrader;
factory = _factory;
helpers = _helpers;
if(_taxes.length > 0) {
icariaFeeEnabled = true;
(shouldAccumulateIcariaFee, reflectionsEnabled, yieldEnabled) = taxesInitialize(_taxes);
}
}
function taxesInitialize(IIcariaHelpers.Tax[] memory _taxes) private returns (bool, bool, bool) {
bool hasBuyReflectionTax = false;
bool hasSellReflectionTax = false;
bool hasBothReflectionTax = false;
bool shouldAccumulateIcariaFeeLocal = false;
bool reflectionsEnabledLocal = false;
bool yieldEnabledLocal = false;
uint256 totalTaxSize;
for (uint256 i = 0; i < _taxes.length; i++) {
require(_taxes[i].percentage <= 5000, "Tax > 50%");
if (_taxes[i].taxType == IIcariaHelpers.TaxType.Reflection) {
reflectionsEnabledLocal = true;
if ((_taxes[i].taxMoment == IIcariaHelpers.TaxMoment.Buy || _taxes[i].taxMoment == IIcariaHelpers.TaxMoment.Both) &&
(hasBuyReflectionTax || hasBothReflectionTax)) {
revert("Conflicting reflections");
}
if ((_taxes[i].taxMoment == IIcariaHelpers.TaxMoment.Sell || _taxes[i].taxMoment == IIcariaHelpers.TaxMoment.Both) &&
(hasSellReflectionTax || hasBothReflectionTax)) {
revert("Conflicting reflections");
}
if (_taxes[i].taxMoment == IIcariaHelpers.TaxMoment.Buy) {
hasBuyReflectionTax = true;
} else if (_taxes[i].taxMoment == IIcariaHelpers.TaxMoment.Sell) {
hasSellReflectionTax = true;
} else {
hasBothReflectionTax = true;
}
}
if(_taxes[i].taxType == IIcariaHelpers.TaxType.Yield) {
yieldEnabledLocal = true;
addYieldToken(_taxes[i].tokenAddress);
}
if ((_taxes[i].taxType == IIcariaHelpers.TaxType.Dev && _taxes[i].rewardInPls) ||
_taxes[i].taxType == IIcariaHelpers.TaxType.Yield ||
_taxes[i].taxType == IIcariaHelpers.TaxType.ExternalBurn) {
shouldAccumulateIcariaFeeLocal = true;
}
totalTaxSize += _taxes[i].percentage;
_taxes[i].id = i;
_taxes[i].amountAccumulated = 0;
}
require(totalTaxSize <= 8000, "Total taxes > 80%");
taxes = _taxes;
if (reflectionsEnabledLocal) initializeReflectionExclusions();
return (shouldAccumulateIcariaFeeLocal, reflectionsEnabledLocal, yieldEnabledLocal);
}
function _transfer(address from, address to, uint256 value) internal override {
processedTaxesInTx = false;
if (taxes.length == 0 || isExcludedFromTax(from, to) || !firstPairInteractionHappened || inSwap) {
super._transfer(from, to, value);
if(!firstPairInteractionHappened && isPair(to)){
firstPairInteractionHappened = true;
}
return;
}
if(isPair(to) && !isReflectionExcluded[to]) {
isReflectionExcluded[to] = true;
}
currentSwapAmount = value;
uint256 amountAfterTaxs = processTaxes(from, to, value);
if (hasAccumulatedTaxes() && firstPairInteractionHappened && !inSwap && !processedTaxesInTx) {
processAccumulatedTaxes();
processedTaxesInTx = true;
}
if (yieldEnabled) {
updateAndClaimYield(from, to, deployer);
}
if (reflectionsEnabled) {
claimReflections(from, to);
}
if (shouldAccumulateIcariaFee && isSell(from, to)) {
processIcariaFeeAccumulated();
}
super._transfer(from, to, amountAfterTaxs);
}
function processTaxes(address from, address to, uint256 amount) internal returns (uint256) {
uint256 totalTaxAmount = 0;
uint256 totalIcariaFee = 0;
for (uint256 i = 0; i < taxes.length; i++) {
IIcariaHelpers.Tax memory tax = taxes[i];
(uint256 taxAmount, uint256 icariaFee) = calculateTaxAmount(amount, tax);
totalTaxAmount += taxAmount;
totalIcariaFee += icariaFee;
if (tax.taxMoment == IIcariaHelpers.TaxMoment.Both) {
processTaxType(from, taxAmount, tax);
} else if (tax.taxMoment == IIcariaHelpers.TaxMoment.Buy && isBuy(from, to)) {
processTaxType(from, taxAmount, tax);
} else if (tax.taxMoment == IIcariaHelpers.TaxMoment.Sell && isSell(from, to)) {
processTaxType(from, taxAmount, tax);
}
}
if (totalIcariaFee > 0) {
if (shouldAccumulateIcariaFee) {
super._transfer(from, address(this), totalIcariaFee);
accumulatedIcariaFee += totalIcariaFee;
} else {
super._transfer(from, getIcariaWallet(), totalIcariaFee);
}
}
return amount - totalTaxAmount - totalIcariaFee;
}
function calculateTaxAmount(uint256 originalAmount, IIcariaHelpers.Tax memory tax) internal view returns (uint256 taxAmount, uint256 icariaFee) {
return IIcariaHelpers(helpers).calculateTaxAmount(
originalAmount,
tax.percentage,
IIcariaSmartTokenFactory(factory).ICARIA_FEE(),
icariaFeeEnabled,
GLOBAL_DIVIDER
);
}
function processTaxType(address from, uint256 taxAmount, IIcariaHelpers.Tax memory tax) internal {
if (tax.taxType == IIcariaHelpers.TaxType.Burn) {
processBurnTax(from, taxAmount);
} else if (tax.taxType == IIcariaHelpers.TaxType.Reflection) {
processReflectionTax(from, taxAmount);
} else if (tax.taxType == IIcariaHelpers.TaxType.Dev) {
processDevTax(from, taxAmount, tax);
} else if (tax.taxType == IIcariaHelpers.TaxType.ExternalBurn) {
processExternalBurnTax(from, taxAmount, tax);
} else if (tax.taxType == IIcariaHelpers.TaxType.Yield) {
processYieldTax(from, taxAmount, tax);
}
}
function processBurnTax(address from, uint256 taxAmount) internal {
super._burn(from, taxAmount);
}
function processDevTax(address from, uint256 taxAmount, IIcariaHelpers.Tax memory tax) internal {
if (tax.rewardInPls) {
super._transfer(from, address(this), taxAmount);
taxes[tax.id].amountAccumulated += taxAmount;
} else {
super._transfer(from, tax.receiver, taxAmount);
}
}
function processReflectionTax(address from, uint256 taxAmount) internal {
super._transfer(from, address(this), taxAmount);
uint256 supply = totalSupply() - balanceOf(address(this));
if (supply > 0) {
reflectionsPerShareAmount += (taxAmount * PRECISION) / supply;
}
}
function processExternalBurnTax(address from, uint256 taxAmount, IIcariaHelpers.Tax memory tax) internal lockSwap {
super._transfer(from, address(this), taxAmount);
taxes[tax.id].amountAccumulated += taxAmount;
}
function processYieldTax(address from, uint256 taxAmount, IIcariaHelpers.Tax memory tax) internal lockSwap {
super._transfer(from, address(this), taxAmount);
taxes[tax.id].amountAccumulated += taxAmount;
}
function processAccumulatedTaxes() internal {
if (inSwap) return;
processAccumulatedTaxesBatch();
}
function processAccumulatedTaxesBatch() internal lockSwap {
uint256 totalToSwap = 0;
uint256 totalTokenTypes = 0;
bool[] memory taxesToProcess = new bool[](taxes.length);
uint256[] memory taxAmounts = new uint256[](taxes.length);
for (uint256 i = 0; i < taxes.length; i++) {
IIcariaHelpers.Tax storage tax = taxes[i];
if (tax.amountAccumulated == 0) continue;
if (tax.taxType == IIcariaHelpers.TaxType.ExternalBurn ||
(tax.taxType == IIcariaHelpers.TaxType.Dev && tax.rewardInPls) ||
tax.taxType == IIcariaHelpers.TaxType.Yield) {
(uint256 swapAmount, uint256 newAccumulatedAmount) = IIcariaHelpers(helpers).getProcessingAmount(tax.amountAccumulated, currentSwapAmount);
if (swapAmount > 0) {
taxesToProcess[i] = true;
taxAmounts[i] = swapAmount;
totalToSwap += swapAmount;
totalTokenTypes++;
}
taxes[i].amountAccumulated = newAccumulatedAmount;
}
}
if (totalToSwap == 0 || totalTokenTypes == 0) return;
(/*address bestPair*/, address bestRouter) = IIcariaHelpers(helpers).getBestPair(address(this), wethAddress, routers);
if (bestRouter == address(0)) return;
bool swapSuccess = _executeTokenSwap(
bestRouter,
address(this),
totalToSwap,
getTokenWPLSPath(address(this)),
false
);
if (!swapSuccess) {
for (uint256 i = 0; i < taxes.length; i++) {
if (taxesToProcess[i]) {
taxes[i].amountAccumulated += taxAmounts[i];
}
}
return;
}
uint256 totalWethReceived = IERC20(wethAddress).balanceOf(address(this));
if (totalWethReceived == 0) return;
for (uint256 i = 0; i < taxes.length; i++) {
if (!taxesToProcess[i] || taxAmounts[i] == 0) continue;
uint256 wethPortion = (taxAmounts[i] * totalWethReceived) / totalToSwap;
IIcariaHelpers.Tax storage tax = taxes[i];
if (tax.taxType == IIcariaHelpers.TaxType.ExternalBurn) {
processExternalBurnWeth(wethPortion, tax);
} else if (tax.taxType == IIcariaHelpers.TaxType.Dev && tax.rewardInPls) {
processDevWeth(wethPortion, tax);
} else if (tax.taxType == IIcariaHelpers.TaxType.Yield) {
processYieldWeth(wethPortion, tax);
}
}
}
function processExternalBurnWeth(uint256 wethAmount, IIcariaHelpers.Tax memory tax) internal {
if (wethAmount == 0) return;
if (tax.tokenAddress == wethAddress) {
IERC20(wethAddress).transfer(tax.receiver, wethAmount);
return;
}
(/*address bestTargetPair*/, address bestTargetRouter) = IIcariaHelpers(helpers).getBestPair(wethAddress, tax.tokenAddress, routers);
IERC20(wethAddress).approve(icariaSmartTrader, wethAmount);
try IIcariaSmartTrader(icariaSmartTrader).swapExactTokensForTokensSupportingFeeOnTransferTokens(
bestTargetRouter,
tax.receiver,
wethAmount,
getWPLSBuyBurnPath(tax.tokenAddress)
) {
} catch {
IERC20(wethAddress).transfer(tax.receiver, wethAmount);
}
}
function processDevWeth(uint256 wethAmount, IIcariaHelpers.Tax memory tax) internal {
if (wethAmount == 0) return;
try IWETH(wethAddress).withdraw(wethAmount){
(bool success,) = tax.receiver.call{value: wethAmount}("");
if (!success) {
IERC20(wethAddress).transfer(tax.receiver, wethAmount);
}
} catch {
IERC20(wethAddress).transfer(tax.receiver, wethAmount);
}
}
function processYieldWeth(uint256 wethAmount, IIcariaHelpers.Tax memory tax) internal {
if (wethAmount == 0) return;
if (tax.tokenAddress == wethAddress) {
uint256 tokenIndex = addYieldToken(tax.tokenAddress);
uint256 supply = totalSupply() - balanceOf(address(this));
if (supply > 0) {
yieldTokens[tokenIndex].reflectionsPerShareAmount += (wethAmount * PRECISION) / supply;
}
return;
}
(/*address bestTargetPair*/, address bestTargetRouter) = IIcariaHelpers(helpers).getBestPair(wethAddress, tax.tokenAddress, routers);
IERC20(wethAddress).approve(icariaSmartTrader, wethAmount);
uint256 initialTokenBalance = IERC20(tax.tokenAddress).balanceOf(address(this));
try IIcariaSmartTrader(icariaSmartTrader).swapExactTokensForTokensSupportingFeeOnTransferTokens(
bestTargetRouter,
address(this),
wethAmount,
getWPLSBuyBurnPath(tax.tokenAddress)
) {
uint256 finalTokenBalance = IERC20(tax.tokenAddress).balanceOf(address(this));
uint256 boughtAmount = finalTokenBalance - initialTokenBalance;
if (boughtAmount > 0) {
uint256 tokenIndex = addYieldToken(tax.tokenAddress);
uint256 supply = totalSupply() - balanceOf(address(this));
if (supply > 0) {
yieldTokens[tokenIndex].reflectionsPerShareAmount += (boughtAmount * PRECISION) / supply;
}
}
} catch {
// uint256 tokenIndex = addYieldToken(wethAddress);
// uint256 supply = totalSupply() - balanceOf(address(this));
// if (supply > 0) {
// yieldTokens[tokenIndex].reflectionsPerShareAmount += (wethAmount * PRECISION) / supply;
// }
}
}
function processIcariaFeeAccumulated() internal {
if (accumulatedIcariaFee == 0) return;
(/*address bestPair*/, address router) = IIcariaHelpers(helpers).getBestPair(address(this), wethAddress, routers);
if (router == address(0)) return;
(uint256 amountToProcess, uint256 newAccumulatedAmount) = IIcariaHelpers(helpers).getProcessingAmount(accumulatedIcariaFee, currentSwapAmount);
accumulatedIcariaFee = newAccumulatedAmount;
bool success = _executeTokenSwap(
router,
getIcariaWallet(),
amountToProcess,
getTokenWPLSPath(address(this)),
true
);
if (!success) {
accumulatedIcariaFee += amountToProcess;
}
}
function _executeTokenSwap(
address _router,
address _recipient,
uint256 _amount,
address[] memory _path,
bool _swapForETH
) internal returns (bool success) {
if (_amount == 0 || _router == address(0)) return false;
_approve(address(this), icariaSmartTrader, _amount);
if (_swapForETH) {
try IIcariaSmartTrader(icariaSmartTrader).swapExactTokensForETHSupportingFeeOnTransferTokens(
_router,
_recipient,
_amount,
_path
) {
return true;
} catch {
return false;
}
} else {
try IIcariaSmartTrader(icariaSmartTrader).swapExactTokensForTokensSupportingFeeOnTransferTokens(
_router,
_recipient,
_amount,
_path
) {
return true;
} catch {
return false;
}
}
}
function claimReflections(address from, address to) internal {
(uint256 fromAmount, uint256 toAmount, uint256 deployerAmount) = updateAndClaimReflections(from, to, deployer);
if(fromAmount != 0){
if(!isPair(from)){
super._transfer(address(this), from, fromAmount);
}
}
if(toAmount != 0){
if(!isPair(to)){
super._transfer(address(this), to, toAmount);
}
}
if(deployerAmount != 0){
super._transfer(address(this), deployer, deployerAmount);
}
}
function initializeReflectionExclusions() internal {
isReflectionExcluded[address(0)] = true;
isReflectionExcluded[address(this)] = true;
for (uint256 i = 0; i < routers.length; ) {
isReflectionExcluded[routers[i]] = true;
unchecked { i++; }
}
}
function isPair(address _address) internal view returns (bool) {
return IIcariaHelpers(helpers).isPair(_address, address(this));
}
function isBuy(address from, address to) internal view returns (bool) {
return IIcariaHelpers(helpers).isBuy(from, to, address(this));
}
function isSell(address from, address to) internal view returns (bool) {
return IIcariaHelpers(helpers).isSell(from, to, address(this));
}
function getProcessingAmount(uint256 accumulatedAmount) internal view returns (uint256 processAmount, uint256 newAccumulatedAmount) {
return IIcariaHelpers(helpers).getProcessingAmount(accumulatedAmount, currentSwapAmount);
}
function getTokenWPLSPath(address tokenAddress) internal view returns (address[] memory) {
return IIcariaHelpers(helpers).getTokenWPLSPath(tokenAddress);
}
function getWPLSBuyBurnPath(address tokenAddress) internal view returns (address[] memory) {
return IIcariaHelpers(helpers).getWPLSBuyBurnPath(tokenAddress);
}
function getTaxes() public view returns (IIcariaHelpers.Tax[] memory) {
return taxes;
}
function isExcludedFromTax(address from, address to) internal view returns (bool) {
return IIcariaHelpers(helpers).isExcludedFromTax(
from,
to,
icariaSmartTrader,
deployer,
address(this)
);
}
function getIcariaFee() public view returns (uint256) {
return IIcariaSmartTokenFactory(factory).ICARIA_FEE();
}
function getIcariaWallet() public view returns (address) {
return IIcariaSmartTokenFactory(factory).ICARIA_WALLET();
}
function getAccumulatedIcariaFee() external view returns (uint256) {
return accumulatedIcariaFee;
}
function getTotalTaxs() public view returns (uint256) {
return IIcariaHelpers(helpers).getTotalTaxs(taxes);
}
function forceProcessAccumulatedTaxes() external onlyOwner {
processAccumulatedTaxes();
}
function claimYield() external returns (bool) {
updateAndClaimYield(msg.sender, msg.sender, deployer);
return true;
}
function hasAccumulatedTaxes() internal view returns (bool) {
return IIcariaHelpers(helpers).hasAccumulatedTaxes(taxes);
}
receive() external payable {}
}
contracts/interfaces/IIcariaHelpers.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
interface IIcariaHelpers {
enum TaxType { Burn, ExternalBurn, Dev, Reflection, Yield }
enum TaxMoment { Both, Buy, Sell }
struct Tax {
uint256 id;
TaxType taxType;
TaxMoment taxMoment;
uint256 percentage;
address receiver;
address tokenAddress;
address burnAddress;
bool rewardInPls;
uint256 amountAccumulated;
}
function getBestPair(
address tokenA,
address tokenB,
address[] memory routers
) external view returns (address bestPair, address bestRouter);
function isPair(address _address, address _tokenAddress) external view returns (bool);
function isBuy(address _from, address _to, address _tokenAddress) external view returns (bool);
function isSell(address _from, address _to, address _tokenAddress) external view returns (bool);
function getTokenWPLSPath(address tokenAddress) external pure returns (address[] memory path);
function getWPLSBuyBurnPath(address tokenAddress) external pure returns (address[] memory path);
function getProcessingAmount(
uint256 accumulatedAmount,
uint256 currentSwapAmount
) external pure returns (uint256 processAmount, uint256 newAccumulatedAmount);
function calculateTaxAmount(
uint256 originalAmount,
uint256 taxPercentage,
uint256 icariaFee,
bool icariaFeeEnabled,
uint256 globalDivider
) external pure returns (uint256 taxAmount, uint256 icariaFeeAmount);
function hasAccumulatedTaxes(Tax[] memory taxes) external pure returns (bool);
function getTotalTaxs(Tax[] memory taxes) external pure returns (uint256);
function cleanPendingReflections(
address account,
address tokenAddress,
uint256 reflectionsPerShareAmount,
uint256 reflectionDebt,
uint256 precision
) external view returns (uint256);
function pendingYields(
address account,
address /* token */, // Commented out to acknowledge unused parameter
address tokenAddress,
uint256 reflectionsPerShareAmount,
uint256 reflectionDebt,
uint256 precision
) external view returns (uint256);
function isExcludedFromTax(
address from,
address to,
address icariaSmartTrader,
address deployer,
address thisContract
) external pure returns (bool);
}
Compiler Settings
{"viaIR":true,"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"],"":["ast"]}},"optimizer":{"runs":200,"enabled":true},"libraries":{},"evmVersion":"paris"}
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"uint256","name":"_tokenCreationPrice","internalType":"uint256"},{"type":"address","name":"_helpersAddress","internalType":"address"},{"type":"address[]","name":"_distributionWallets","internalType":"address[]"}]},{"type":"error","name":"OwnableInvalidOwner","inputs":[{"type":"address","name":"owner","internalType":"address"}]},{"type":"error","name":"OwnableUnauthorizedAccount","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"error","name":"ReentrancyGuardReentrantCall","inputs":[]},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"TokenCreated","inputs":[{"type":"address","name":"tokenAddress","internalType":"address","indexed":true},{"type":"string","name":"name","internalType":"string","indexed":false},{"type":"string","name":"symbol","internalType":"string","indexed":false},{"type":"address","name":"owner","internalType":"address","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"GLOBAL_DIVIDER","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"ICARIA_FEE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"ICARIA_WALLET","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addDistributionWallet","inputs":[{"type":"address","name":"wallet","internalType":"address"}]},{"type":"function","stateMutability":"payable","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"createToken","inputs":[{"type":"string","name":"name_","internalType":"string"},{"type":"string","name":"symbol_","internalType":"string"},{"type":"uint256","name":"_initialSupply","internalType":"uint256"},{"type":"tuple[]","name":"_taxes","internalType":"struct IIcariaHelpers.Tax[]","components":[{"type":"uint256","name":"id","internalType":"uint256"},{"type":"uint8","name":"taxType","internalType":"enum IIcariaHelpers.TaxType"},{"type":"uint8","name":"taxMoment","internalType":"enum IIcariaHelpers.TaxMoment"},{"type":"uint256","name":"percentage","internalType":"uint256"},{"type":"address","name":"receiver","internalType":"address"},{"type":"address","name":"tokenAddress","internalType":"address"},{"type":"address","name":"burnAddress","internalType":"address"},{"type":"bool","name":"rewardInPls","internalType":"bool"},{"type":"uint256","name":"amountAccumulated","internalType":"uint256"}]},{"type":"bool","name":"ownershipRenounced","internalType":"bool"},{"type":"address","name":"_icariaSmartTrader","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"distributionWallets","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address[]","name":"","internalType":"address[]"}],"name":"getDistributionWallets","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"name","internalType":"string"},{"type":"string","name":"symbol","internalType":"string"},{"type":"uint256","name":"initialSupply","internalType":"uint256"},{"type":"uint256","name":"currentSupply","internalType":"uint256"},{"type":"bool","name":"ownershipRenounced","internalType":"bool"},{"type":"tuple[]","name":"taxes","internalType":"struct IIcariaHelpers.Tax[]","components":[{"type":"uint256","name":"id","internalType":"uint256"},{"type":"uint8","name":"taxType","internalType":"enum IIcariaHelpers.TaxType"},{"type":"uint8","name":"taxMoment","internalType":"enum IIcariaHelpers.TaxMoment"},{"type":"uint256","name":"percentage","internalType":"uint256"},{"type":"address","name":"receiver","internalType":"address"},{"type":"address","name":"tokenAddress","internalType":"address"},{"type":"address","name":"burnAddress","internalType":"address"},{"type":"bool","name":"rewardInPls","internalType":"bool"},{"type":"uint256","name":"amountAccumulated","internalType":"uint256"}]}],"name":"getTokenData","inputs":[{"type":"address","name":"tokenAddress","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple[]","name":"","internalType":"struct IIcariaHelpers.Tax[]","components":[{"type":"uint256","name":"id","internalType":"uint256"},{"type":"uint8","name":"taxType","internalType":"enum IIcariaHelpers.TaxType"},{"type":"uint8","name":"taxMoment","internalType":"enum IIcariaHelpers.TaxMoment"},{"type":"uint256","name":"percentage","internalType":"uint256"},{"type":"address","name":"receiver","internalType":"address"},{"type":"address","name":"tokenAddress","internalType":"address"},{"type":"address","name":"burnAddress","internalType":"address"},{"type":"bool","name":"rewardInPls","internalType":"bool"},{"type":"uint256","name":"amountAccumulated","internalType":"uint256"}]}],"name":"getTokenTaxData","inputs":[{"type":"address","name":"tokenAddress","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"helpersAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isFactoryToken","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"manager","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"processERC20s","inputs":[{"type":"address[]","name":"tokenAddresses","internalType":"address[]"},{"type":"uint256[]","name":"amounts","internalType":"uint256[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"processPLS","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"removeDistributionWallet","inputs":[{"type":"address","name":"walletToRemove","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setIcariaFee","inputs":[{"type":"uint256","name":"newFee","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setIcariaWallet","inputs":[{"type":"address","name":"newWallet","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setProcessorWallet","inputs":[{"type":"address","name":"wallet","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setTokenCreationPrice","inputs":[{"type":"uint256","name":"newPrice","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"tokenCreationPrice","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawPLS","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"receive","stateMutability":"payable"}]
Contract Creation Code
0x60a06040523461022957616174803803806100198161022e565b9283398101906060818303126102295780519161003860208301610253565b604083015190926001600160401b03821161022957019181601f84011215610229578251916001600160401b0383116101e5578260051b93602061007d81870161022e565b8095815201906020829682010192831161022957602001905b8282106102115750505033156101fb5760008054336001600160a01b0319821681178355604051969290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3600180556102ee600255600555600380546001600160a01b03199081163017909155608091909152600780549091163317905551906001600160401b0382116101e5576801000000000000000082116101e5576008548260085580831061019f575b506008600052602060002060005b83811061018257615f0c858161026882396080518181816103c6015261098f0152f35b82516001600160a01b03168183015560209092019160010161015f565b60086000527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee39081019083015b8181106101d95750610151565b600081556001016101cc565b634e487b7160e01b600052604160045260246000fd5b631e4fbdf760e01b600052600060045260246000fd5b6020809161021e84610253565b815201910190610096565b600080fd5b6040519190601f01601f191682016001600160401b038111838210176101e557604052565b51906001600160a01b03821682036102295756fe6080604052600436101561001b575b361561001957600080fd5b005b6000803560e01c806313ff7e9f14610f6957806321b1c1e814610f4b578063279c4ebf14610ed357806327ab5d0f14610eaa578063441062ed14610e8c578063481c6a7514610e6357806348d09f3e14610ba45780636231dd4b14610b035780636277d57314610ae057806365b3f9b014610a18578063715018a6146109be578063799361a314610979578063870a26e91461094f57806388b55661146108525780638da5cb5b1461082b578063a4733533146107e7578063a4b7914e146107a8578063ae1329521461078b578063aedc90ee146106f0578063ce53acc51461069f578063f21c45c914610266578063f2fde38b146101e0578063fa72dda21461018f5763fda86ddc1461012f575061000e565b3461018c57602036600319011261018c5760043561014b6118fe565b612710811161015a5760025580f35b60405162461bcd60e51b815260206004820152600a602482015269466565203e203130302560b01b6044820152606490fd5b80fd5b503461018c57602036600319011261018c576101a9611205565b6101b16118fe565b6001600160a01b03166101c5811515611792565b6bffffffffffffffffffffffff60a01b600354161760035580f35b503461018c57602036600319011261018c576101fa611205565b6102026118fe565b6001600160a01b031680156102525781546001600160a01b03198116821783556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b631e4fbdf760e01b82526004829052602482fd5b5060c036600319011261018c5760043567ffffffffffffffff81116105df57610293903690600401611401565b9060243567ffffffffffffffff81116105df576102b4903690600401611401565b60643567ffffffffffffffff811161069b573660238201121561069b5780600401356102df8161139c565b916102ed604051938461137a565b81835260246101206020850193028201019036821161069757602401915b8183106105e35750505060843592831515840361018c5760a4356001600160a01b038116908190036105df5761033f611800565b8251610599575b604051906145af8083019083821067ffffffffffffffff8311176105855790839291611928843961012081526103b661039461038661012084018c611257565b838103602085015289611257565b306040840152336060840152604435608084015282810360a08401528761127c565b60c08201929092523060e08201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661010090910152039082f08015610578576001600160a01b0316808252600660205260408220805460ff1916600117905593156104f657833b1561018c576040516338a80c5360e11b8152818160048183895af180156104eb576104d6575b50507f6596c1670eb3390048d23721809c3da5d3f531375ac0e2cab0f77a808ed6433161049e60209585935b511515806104cb575b6104bb575b6104ac604051928392604084526040840190611257565b828103898401523396611257565b0390a360018055604051908152f35b6104c6600554611822565b610487565b506005541515610482565b6104e182809261137a565b61018c578061044d565b6040513d84823e3d90fd5b9390833b156105745760405163f2fde38b60e01b8152336004820152858160248183895af1801561056957927f6596c1670eb3390048d23721809c3da5d3f531375ac0e2cab0f77a808ed643319260209761049e938896610559575b5050610479565b816105639161137a565b38610552565b6040513d88823e3d90fd5b8480fd5b50604051903d90823e3d90fd5b634e487b7160e01b85526041600452602485fd5b6005543410156103465760405162461bcd60e51b8152602060048201526014602482015273125b9cdd59999a58da595b9d081c185e5b595b9d60621b6044820152606490fd5b5080fd5b61012083360312610697576040516105fa81611347565b8335815260208401356005811015610693576020820152604084013560038110156106935760408201526060840135606082015261063a60808501611220565b608082015261064b60a08501611220565b60a082015261065c60c08501611220565b60c082015260e084013580151581036106935791816101209360e0602094015261010086013561010082015281520192019161030b565b8780fd5b8580fd5b8280fd5b503461018c57602036600319011261018c576106b9611205565b6106c16118fe565b6001600160a01b03166106d5811515611792565b6bffffffffffffffffffffffff60a01b600754161760075580f35b503461018c57602036600319011261018c578080808060043560018060a01b0382541633148015610777575b8015610763575b61072c90611629565b80151580610759575b61073e90611672565b6007546001600160a01b03165af1506107556117d0565b5080f35b5047811115610735565b506007546001600160a01b03163314610723565b506004546001600160a01b0316331461071c565b503461018c578060031936011261018c5760206040516127108152f35b503461018c57602036600319011261018c5760209060ff906040906001600160a01b036107d3611205565b168152600684522054166040519015158152f35b503461018c57602036600319011261018c576004359060085482101561018c576020610812836113b4565b905460405160039290921b1c6001600160a01b03168152f35b503461018c578060031936011261018c57546040516001600160a01b039091168152602090f35b503461018c57602036600319011261018c5761086c611205565b6108746118fe565b6001600160a01b038116610889811515611792565b60085490835b8281106108f8575050680100000000000000008110156108e457906108bd8260016108e194016008556113b4565b81546001600160a01b0393841660039290921b91821b9390911b1916919091179055565b80f35b634e487b7160e01b83526041600452602483fd5b81610902826113b4565b905460039190911b1c6001600160a01b0316146109215760010161088f565b60405162461bcd60e51b815260206004820152600660248201526545786973747360d01b6044820152606490fd5b503461018c57602036600319011261018c576108e161096c611205565b6109746118fe565b6116af565b503461018c578060031936011261018c576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b503461018c578060031936011261018c576109d76118fe565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461018c578060031936011261018c5760405180602060085491828152018091600885527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee390855b818110610ac15750505082610a7791038361137a565b604051928392602084019060208552518091526040840192915b818110610a9f575050500390f35b82516001600160a01b0316845285945060209384019390920191600101610a91565b82546001600160a01b0316845260209093019260019283019201610a61565b503461018c57602036600319011261018c57610afa6118fe565b60043560055580f35b503461018c57602036600319011261018c576004816001600160a01b03610b28611205565b168082526006602052610b4160ff604084205416611448565b604051632973ef2d60e01b815292839182905afa9081156104eb5782610b7d9392610b81575b505060405191829160208352602083019061127c565b0390f35b610b9d92503d8091833e610b95818361137a565b81019061150d565b3880610b67565b503461018c57604036600319011261018c5760043567ffffffffffffffff81116105df57366023820112156105df57806004013590610be28261139c565b91610bf0604051938461137a565b8083526024602084019160051b8301019136831161057457602401905b828210610e4b575050506024359167ffffffffffffffff831161018c573660238401121561018c57826004013592610c448461139c565b93610c52604051958661137a565b8085526024602086019160051b83010191368311610dc757602401905b828210610e3b5750505060018060a01b0381541633148015610e27575b8015610e13575b610c9c90611629565b8151835103610dde57805b8251811015610755576001600160a01b03610cc2828561165e565b51166040516370a0823160e01b8152306004820152602081602481855afa8015610dd3578490610d9c575b610d0291508015159081610d87575b50611672565b6007546020906001600160a01b03166044610d1d858961165e565b519186604051958694859363a9059cbb60e01b8552600485015260248401525af1610d4c575b50600101610ca7565b6020813d8211610d7f575b81610d646020938361137a565b8101031261069b5790610d78600192611500565b5090610d43565b3d9150610d57565b9050610d93848861165e565b51111538610cfc565b506020813d8211610dcb575b81610db56020938361137a565b81010312610dc757610d029051610ced565b8380fd5b3d9150610da8565b6040513d86823e3d90fd5b60405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b6044820152606490fd5b506007546001600160a01b03163314610c93565b506004546001600160a01b03163314610c8c565b8135815260209182019101610c6f565b60208091610e5884611220565b815201910190610c0d565b503461018c578060031936011261018c576004546040516001600160a01b039091168152602090f35b503461018c578060031936011261018c576020600254604051908152f35b503461018c578060031936011261018c576003546040516001600160a01b039091168152602090f35b503461018c57602036600319011261018c5780546001600160a01b031633148015610f37575b8015610f23575b610f0990611629565b610f11611800565b610f1c600435611822565b6001805580f35b506007546001600160a01b03163314610f00565b506004546001600160a01b03163314610ef9565b503461018c578060031936011261018c576020600554604051908152f35b503461018c57602036600319011261018c576001600160a01b03610f8b611205565b168082526006602052610fa460ff604084205416611448565b6040516306fdde0360e01b8152908282600481845afa9182156111fa5783926111de575b506040516395d89b4160e01b81528381600481855afa908115610dd35784916111bc575b50604051630de370f760e21b815291602083600481845afa9283156111b157859361117d575b506040516318160ddd60e01b8152602081600481855afa90811561056957869161114b575b50604051638da5cb5b60e01b81529286602085600481875afa93841561057857819461110f575b604051632973ef2d60e01b81529550859060049082905afa9384156111045790610b7d9594939291886110ab99956110e2575b50506110b99060405198899860c08a5260c08a0190611257565b9088820360208a0152611257565b604087019490945260608601526001600160a01b031615608085015283820360a085015261127c565b6110b9929550906110fc913d8091833e610b95818361137a565b939038611091565b6040513d89823e3d90fd5b93506020853d602011611143575b8161112a6020938361137a565b8101031261018c5761113d6004956114ec565b9361105e565b3d915061111d565b90506020813d602011611175575b816111666020938361137a565b81010312610697575138611037565b3d9150611159565b9092506020813d6020116111a9575b816111996020938361137a565b8101031261057457519138611012565b3d915061118c565b6040513d87823e3d90fd5b6111d891503d8086833e6111d0818361137a565b81019061148a565b38610fec565b6111f39192503d8085833e6111d0818361137a565b9038610fc8565b6040513d85823e3d90fd5b600435906001600160a01b038216820361121b57565b600080fd5b35906001600160a01b038216820361121b57565b60005b8381106112475750506000910152565b8181015183820152602001611237565b9060209161127081518092818552858086019101611234565b601f01601f1916010190565b906020808351928381520192019060005b81811061129a5750505090565b909192835180518252602081015160058110156113315760208301526040810151906003821015611331576040830191909152606080820151908301526080808201516001600160a01b039081169184019190915260a08083015182169084015260c0808301519091169083015260e08082015115159083015261010090810151908201526101200192602001919060010161128d565b634e487b7160e01b600052602160045260246000fd5b610120810190811067ffffffffffffffff82111761136457604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761136457604052565b67ffffffffffffffff81116113645760051b60200190565b6008548110156113cf57600860005260206000200190600090565b634e487b7160e01b600052603260045260246000fd5b67ffffffffffffffff811161136457601f01601f191660200190565b81601f8201121561121b57803590611418826113e5565b92611426604051948561137a565b8284526020838301011161121b57816000926020809301838601378301015290565b1561144f57565b60405162461bcd60e51b81526020600482015260136024820152722737ba1030903330b1ba37b93c903a37b5b2b760691b6044820152606490fd5b60208183031261121b5780519067ffffffffffffffff821161121b570181601f8201121561121b5780516114bd816113e5565b926114cb604051948561137a565b8184526020828401011161121b576114e99160208085019101611234565b90565b51906001600160a01b038216820361121b57565b5190811515820361121b57565b60208183031261121b5780519067ffffffffffffffff821161121b570181601f8201121561121b578051906115418261139c565b9261154f604051948561137a565b828452602061012081860194028301019181831161121b57602001925b82841061157a575050505090565b6101208483031261121b576040519061159282611347565b845182526020850151600581101561121b576020830152604085015190600382101561121b57826020926040610120950152606087015160608201526115da608088016114ec565b60808201526115eb60a088016114ec565b60a08201526115fc60c088016114ec565b60c082015261160d60e08801611500565b60e082015261010087015161010082015281520193019261156c565b1561163057565b60405162461bcd60e51b815260206004820152600660248201526511195b9a595960d21b6044820152606490fd5b80518210156113cf5760209160051b010190565b1561167957565b60405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b6044820152606490fd5b6008541561121b5760005b6008548082101561121b576116ce826113b4565b905460039190911b1c6001600160a01b03908116908416146116f357506001016116ba565b60001981019250821161177c5781810361174e575b505060085480156117385760001901611720816113b4565b81549060018060a01b039060031b1b19169055600855565b634e487b7160e01b600052603160045260246000fd5b6108bd61175d611775936113b4565b905460039190911b1c6001600160a01b0316916113b4565b3880611708565b634e487b7160e01b600052601160045260246000fd5b1561179957565b60405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b6044820152606490fd5b3d156117fb573d906117e1826113e5565b916117ef604051938461137a565b82523d6000602084013e565b606090565b600260015414611811576002600155565b633ee5aeb560e01b60005260046000fd5b6008549081156118cc576000908281049080151590816118c2575b816118b7575b501561188957815b8381106118585750505050565b8083808080866118696001976113b4565b888060a01b0391549060031b1c165af1506118826117d0565b500161184b565b60405162461bcd60e51b81526020600482015260066024820152654e6f20504c5360d01b6044820152606490fd5b905047101538611843565b821515915061183d565b60405162461bcd60e51b815260206004820152600a6024820152694e6f2077616c6c65747360b01b6044820152606490fd5b6000546001600160a01b0316330361191257565b63118cdaa760e01b6000523360045260246000fdfe6101c060405234610dc3576145af8038038061001a81610dc8565b928339810161012082820312610dc35781516001600160401b038111610dc35781610046918401610ded565b60208301519092906001600160401b038111610dc35782610068918301610ded565b9261007560408301610e58565b9161008260608201610e58565b608082015160a08301519196916001600160401b038111610dc35783019486601f87011215610dc3578551966001600160401b038811610b1c576100cb60208960051b01610dc8565b966020888a815201916020610120849b0283010191818311610dc357602001925b828410610d01575050505061010360c08501610e58565b9261011d61010061011660e08801610e58565b9601610e58565b865190966001600160401b038211610b1c5760035490600182811c92168015610cf7575b6020831014610c155781601f849311610ca8575b50602090601f8311600114610c4057600092610c35575b50508160011b916000199060031b1c1916176003555b8051906001600160401b038211610b1c5760045490600182811c92168015610c2b575b6020831014610c155781601f849311610bbb575b50602090601f8311600114610b5357600092610b48575b50508160011b916000199060031b1c1916176004555b6001600160a01b03168015610b3257600580546001600160a01b0319811683179091556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a369021e19e0c9bab2400000608090815260a08590526040519081016001600160401b03811182821017610b1c576040527398bf93ebf5c380c0e6ae8e192a7e2ae08edacc02815273165c3410fc91ef562c50559f7d2289febed552d9602082015273cc73b59f8d7b7c532703bdfea2808a28a488cf47604082015273eb45a3c4aedd0f47f345fb4c8a1802bb5740d7256060820152600d546004600d5580600410610ad7575b50600d60005260206000209060005b60048110610aba5750506010805460ff19169055506001600160a01b038716968715610aa45761031e82600254610edd565b6002556000978089528860205260408920838154019055887fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020604051868152a36101005260c05260e0526101205260a05280516104a4575b60405161356e90816110018239608051818181610eb901528181611d7f0152818161289101528181612e6f0152612fac015260a05181818161030701528181610ee7015281816111160152818161184401528181611db201528181611f9701528181612034015281816121aa015281816123ed0152818161251e01528181612a1e01528181612c92015281816131f20152613504015260c0518161088d015260e0518181816117de01528181612ae801528181612ba101528181612cda015261323a01526101005181818161084f015281816114cd0152818161163001526118060152610120518181816107bb0152818161102f01526110f10152610140518161113e01526101605181818161147e01526116c10152610180518161145801526101a051816114320152f35b60016101405282808080808080805b88518810156107bb5761138860606104cb8a8c610e83565b5101511161078a576104e960206104e28a8c610e83565b5101610ead565b60058110156105b95760031461062f575b61050960206104e28a8c610e83565b60058110156105b957600414610605575b61052960206104e28a8c610e83565b60058110156105b957600214806105ee575b80156105cd575b8015610598575b61058f575b61056960019160606105608b8d610e83565b51015190610edd565b9780610575818c610e83565b51528b610100610585838d610e83565b51015201966104b3565b6001935061054e565b506105a860206104e28a8c610e83565b60058110156105b957600114610549565b634e487b7160e01b8c52602160045260248cfd5b506105dd60206104e28a8c610e83565b60058110156105b957600414610542565b5060e06105fb898b610e83565b510151151561053b565b600191506106296001600160a01b0360a06106208b8d610e83565b51015116610f1f565b5061051a565b95600192506040610640898b610e83565b51015160038110156105b9578314801561076b575b8061075d575b6106eb57610675604061066e8a8c610e83565b5101610ed0565b60038110156105b957600214801561073e575b80610730575b6106eb576106a1604061066e8a8c610e83565b60038110156105b95783036106b8575081956104fa565b95936106c9604061066e8a8c610e83565b60038110156105b9576002036106e1575081936104fa565b93945081946104fa565b60405162461bcd60e51b815260206004820152601760248201527f436f6e666c696374696e67207265666c656374696f6e730000000000000000006044820152606490fd5b50848561068e57508561068e565b5061074e604061066e8a8c610e83565b60038110156105b95715610688565b50808161065b57508561065b565b5061077b604061066e8a8c610e83565b60038110156105b95715610655565b60405162461bcd60e51b8152602060048201526009602482015268546178203e2035302560b81b6044820152606490fd5b92999650969350969350611f40915011610a6b575190680100000000000000008211610a5757601154826011558083106109bd575b5060118352849190839060008051602061456f833981519152905b8383106108b25750505050610830575b506101a0526101805261016052388080610378565b929091838052600a60205260408420600160ff19825416179055308452600a60205260408420600160ff19825416179055835b600d548110156108a75760008051602061458f8339815191528101546001600160a01b03168552600a60205260408520805460ff1916600190811790915501610863565b50919092503861081b565b809192939450518051835560018301602082015160058110156109a9578154604084015160038110156109955761ffff1990911660ff9092169190911760089190911b61ff00161790556060810151600284015560808101516003840180546001600160a01b03199081166001600160a01b039384161790915560a0808401516004870180549093169084161790915560c083015160058601805460e08601516001600160a81b0319909116929094169190911792151590911b60ff60a01b1691909117905561010001516006830155869392600101916007019060200161080b565b634e487b7160e01b8a52602160045260248afd5b634e487b7160e01b88526021600452602488fd5b80600702906007820403610a435782600702600781048403610a2f576011855260008051602061456f83398151915291820191015b8181106109ff57506107f0565b808560079255856001820155856002820155856003820155856004820155856005820155856006820155016109f2565b634e487b7160e01b85526011600452602485fd5b634e487b7160e01b84526011600452602484fd5b634e487b7160e01b83526041600452602483fd5b60405162461bcd60e51b8152602060048201526011602482015270546f74616c207461786573203e2038302560781b6044820152606490fd5b63ec442f0560e01b600052600060045260246000fd5b81516001600160a01b0316818401556020909101906001016102ec565b600d600052610b169060008051602061458f833981519152017fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb9610e6c565b386102dd565b634e487b7160e01b600052604160045260246000fd5b631e4fbdf760e01b600052600060045260246000fd5b0151905038806101d0565b600460009081528281209350601f198516905b818110610ba35750908460019594939210610b8a575b505050811b016004556101e6565b015160001960f88460031b161c19169055388080610b7c565b92936020600181928786015181550195019301610b66565b6004600052610c05907f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b601f850160051c81019160208610610c0b575b601f0160051c0190610e6c565b386101b9565b9091508190610bf8565b634e487b7160e01b600052602260045260246000fd5b91607f16916101a5565b01519050388061016c565b600360009081528281209350601f198516905b818110610c905750908460019594939210610c77575b505050811b01600355610182565b015160001960f88460031b161c19169055388080610c69565b92936020600181928786015181550195019301610c53565b6003600052610cf1907fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f850160051c81019160208610610c0b57601f0160051c0190610e6c565b38610155565b91607f1691610141565b61012084830312610dc3576040519061012082016001600160401b03811183821017610b1c576040528451825260208501516005811015610dc357602083015260408501516003811015610dc357604083015260608501516060830152610d6a60808601610e58565b6080830152610d7b60a08601610e58565b60a0830152610d8c60c08601610e58565b60c083015260e0850151908115158203610dc3578260209260e06101209501526101008701516101008201528152019301926100ec565b600080fd5b6040519190601f01601f191682016001600160401b03811183821017610b1c57604052565b81601f82011215610dc3578051906001600160401b038211610b1c57610e1c601f8301601f1916602001610dc8565b9282845260208383010111610dc35760005b828110610e4357505060206000918301015290565b80602080928401015182828701015201610e2e565b51906001600160a01b0382168203610dc357565b818110610e77575050565b60008155600101610e6c565b8051821015610e975760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b516005811015610eba5790565b634e487b7160e01b600052602160045260246000fd5b516003811015610eba5790565b91908201809211610eea57565b634e487b7160e01b600052601160045260246000fd5b600654811015610e9757600660005260206000209060011b0190600090565b6006549060005b828110610fd5575060408051919082016001600160401b03811183821017610b1c576040526001600160a01b031681526000602082019081529168010000000000000000811015610b1c57806001610f819201600655610f00565b929092610fbf57905182546001600160a01b0319166001600160a01b039190911617825551600191909101556006546000198101908111610eea5790565b634e487b7160e01b600052600060045260246000fd5b610fde81610f00565b50546001600160a01b03838116911614610ffa57600101610f26565b9150509056fe608080604052600436101561001d575b50361561001b57600080fd5b005b60003560e01c90816306fdde0314610b2e57508063095ea7b314610b0857806318160ddd14610aea57806323b872dd14610a115780632973ef2d146108cc578063313ce567146108b0578063378dc3dc14610875578063406cf229146108395780634f30800d1461081b57806356cdad1d146107fd5780635f75baf614610795578063695d69b314610772578063709df63c1461067f57806370a0823114610645578063715018a6146105e8578063720b6782146105c75780638453ef99146105a65780638da5cb5b1461057d5780639045be581461023657806395d89b4114610475578063a9059cbb14610444578063c5be2bc714610389578063cb78c163146102d6578063dd62ed3e14610275578063e6375d3e14610236578063f2fde38b146101ac578063f56b4d051461017f5763fec4ff171461015e573861000f565b3461017a57600036600319011261017a57602060405160018152f35b600080fd5b3461017a57600036600319011261017a57602061019a61101a565b6040516001600160a01b039091168152f35b3461017a57602036600319011261017a576101c5610c33565b6101cd611de6565b6001600160a01b0316801561022057600580546001600160a01b0319811683179091556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b631e4fbdf760e01b600052600060045260246000fd5b3461017a57602036600319011261017a576001600160a01b03610257610c33565b16600052600a602052602060ff604060002054166040519015158152f35b3461017a57604036600319011261017a5761028e610c33565b602435906001600160a01b038216820361017a5760018060a01b0316600052600160205260406000209060018060a01b03166000526020526020604060002054604051908152f35b3461017a57600036600319011261017a57604051625f8d8f60e81b81526020818061030360048201610f4a565b03817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa801561037d5760009061034a575b602090604051908152f35b506020813d602011610375575b8161036460209383610d1a565b8101031261017a576020905161033f565b3d9150610357565b6040513d6000823e3d90fd5b3461017a57602036600319011261017a5760043560115481101561017a576103b361012091610cb3565b5080549060ff600182015491600281015460018060a01b0360038301541660018060a01b0360048401541691610411600660058601549501549660405198895261040260208a01888316610c83565b8660408a019160081c16610ca6565b6060870152608086015260a0808601919091526001600160a01b03821660c08601521c16151560e0830152610100820152f35b3461017a57604036600319011261017a5761046a610460610c33565b602435903361109f565b602060405160018152f35b3461017a57600036600319011261017a5760405160006004548060011c90600181168015610573575b60208310811461055f5782855290811561053b57506001146104db575b6104d7836104cb81850382610d1a565b60405191829182610bea565b0390f35b91905060046000527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b916000905b808210610521575090915081016020016104cb6104bb565b919260018160209254838588010152019101909291610509565b60ff191660208086019190915291151560051b840190910191506104cb90506104bb565b634e487b7160e01b84526022600452602484fd5b91607f169161049e565b3461017a57600036600319011261017a576005546040516001600160a01b039091168152602090f35b3461017a57600036600319011261017a576105bf611de6565b61001b611e0f565b3461017a5760206105e06105da36610c49565b91610e4c565b604051908152f35b3461017a57600036600319011261017a57610601611de6565b600580546001600160a01b031981169091556000906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461017a57602036600319011261017a576001600160a01b03610666610c33565b1660005260006020526020604060002054604051908152f35b3461017a57600036600319011261017a5760065461069c81610d3c565b906106aa6040519283610d1a565b80825260208201908160066000527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f6000915b83831061073e5784866040519182916020830190602084525180915260408301919060005b818110610710575050500390f35b825180516001600160a01b031685526020908101518186015286955060409094019390920191600101610702565b6002602060019260405161075181610ce8565b848060a01b03865416815284860154838201528152019201920191906106dd565b3461017a57602036600319011261017a5760206105e0610790610c33565b610dfb565b3461017a57600036600319011261017a5760405163441062ed60e01b81526020816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa801561037d5760009061034a57602090604051908152f35b3461017a57600036600319011261017a576020600f54604051908152f35b3461017a57600036600319011261017a576020600854604051908152f35b3461017a57600036600319011261017a5761046a7f0000000000000000000000000000000000000000000000000000000000000000333361194e565b3461017a57600036600319011261017a5760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b3461017a57600036600319011261017a57602060405160128152f35b3461017a57600036600319011261017a576011546108e981610d3c565b906108f76040519283610d1a565b80825260208201908160116000527f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c686000915b8383106109f35784866040519182916020830190602084525180915260408301919060005b81811061095d575050500390f35b9193509160206101206001926101008751805183526109828582015186850190610c83565b61099460408201516040850190610ca6565b60608101516060840152858060a01b036080820151166080840152858060a01b0360a08201511660a0840152858060a01b0360c08201511660c084015260e0810151151560e0840152015161010082015201940191019184939261094f565b60076020600192610a0385610d54565b81520192019201919061092a565b3461017a57610a1f36610c49565b6001600160a01b03831660008181526001602090815260408083203384529091529020549093919291906000198110610a5e575b5061046a935061109f565b838110610acd578415610ab7573315610aa15761046a946000526001602052604060002060018060a01b0333166000526020528360406000209103905584610a53565b634a1406b160e11b600052600060045260246000fd5b63e602df0560e01b600052600060045260246000fd5b8390637dc7a0d960e11b6000523360045260245260445260646000fd5b3461017a57600036600319011261017a576020600254604051908152f35b3461017a57604036600319011261017a5761046a610b24610c33565b6024359033611e3b565b3461017a57600036600319011261017a5760006003548060011c90600181168015610be0575b60208310811461055f5782855290811561053b5750600114610b80576104d7836104cb81850382610d1a565b91905060036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b916000905b808210610bc6575090915081016020016104cb6104bb565b919260018160209254838588010152019101909291610bae565b91607f1691610b54565b91909160208152825180602083015260005b818110610c1d575060409293506000838284010152601f8019910116010190565b8060208092870101516040828601015201610bfc565b600435906001600160a01b038216820361017a57565b606090600319011261017a576004356001600160a01b038116810361017a57906024356001600160a01b038116810361017a579060443590565b906005821015610c905752565b634e487b7160e01b600052602160045260246000fd5b906003821015610c905752565b601154811015610cd25760116000526007602060002091020190600090565b634e487b7160e01b600052603260045260246000fd5b6040810190811067ffffffffffffffff821117610d0457604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff821117610d0457604052565b67ffffffffffffffff8111610d045760051b60200190565b90604051610120810181811067ffffffffffffffff821117610d0457604052809280548252600181015460ff8116906005821015610c905760ff91602085015260081c166003811015610c905760408301526002810154606083015260038101546001600160a01b0390811660808401526004820154811660a080850191909152600583015491821660c08501521c60ff16151560e0830152600601546101009190910152565b6001600160a01b0381166000908152600a602052604090205460ff16610e2757610e2490611d3d565b90565b50600090565b600654811015610cd257600660005260206000209060011b0190600090565b91610e58600191610e2d565b5001546001600160a01b039283166000818152600b6020908152604080832095871680845295825291829020549151632faa847360e01b815260048101939093526024830194909452306044830152606482019290925260848101919091527f000000000000000000000000000000000000000000000000000000000000000060a482015291829060c49082907f0000000000000000000000000000000000000000000000000000000000000000165afa90811561037d57600091610f1b575090565b90506020813d602011610f42575b81610f3660209383610d1a565b8101031261017a575190565b3d9150610f29565b60406020820191602081526011548093520190601160005260206000209060005b818110610f785750505090565b909192600761012060019286548152610fae84880154610f9e6020840160ff8316610c83565b60ff604084019160081c16610ca6565b60028701546060820152600387015460a085811b86900391821660808401526004890154821681840152600589015491821660c08401521c60ff16151560e08201526006870154610100820152019401929101610f6b565b51906001600160a01b038216820361017a57565b6040516327ab5d0f60e01b81526020816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa90811561037d5760009161106b575090565b90506020813d602011611097575b8161108660209383610d1a565b8101031261017a57610e2490611006565b3d9150611079565b9190918260105461ff00198116601055601154159081156117b7575b81156117ab575b50801561179f575b611761576110d790611f67565b8061173e575b611716575b600e8290556001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811694937f0000000000000000000000000000000000000000000000000000000000000000909116906000807f00000000000000000000000000000000000000000000000000000000000000001515815b6011548310156113c65761117d61117784610cb3565b50610d54565b92606084015191600460208d6040519283809263441062ed60e01b82525afa90811561037d57600091611392575b5060405193632b8d28ef60e21b85528b600486015260248501526044840152836064840152612710608484015260408360a4818b5afa90811561037d576000938492611357575b50906112018461120793611fe4565b96611fe4565b93604081018051906003821015610c905760009161123657505061122e906001938a61278d565b019192611161565b8051600381101561134357600114806112c2575b1561126357505061125e906001938a61278d565b61122e565b939293519060038210156112ae57506001939291906002148061129e575b61128d575b505061122e565b611297918a61278d565b3880611286565b506112a9888b611ffe565b611281565b634e487b7160e01b81526021600452602490fd5b50604051636468b51760e01b81526001600160a01b038c811660048301528a1660248201523060448201526020816064818e5afa90811561133857839161130a575b5061124a565b61132b915060203d8111611331575b6113238183610d1a565b810190611936565b38611304565b503d611319565b6040513d85823e3d90fd5b634e487b7160e01b83526021600452602483fd5b611201945061120792506113819060403d811161138b575b6113798183610d1a565b81019061217b565b90949092506111f2565b503d61136f565b906020823d82116113be575b816113ab60209383610d1a565b810103126113bb575051386111ab565b80fd5b3d915061139e565b9150506113e2939697506113dd91929495836116bf575b611ff1565b916020604051809563ca497e2360e01b8252818061140260048201610f4a565b03915afa801561037d576114ac946000916116a0575b5080611694575b80611687575b80611677575b61165b575b7f000000000000000000000000000000000000000000000000000000000000000061162b575b7f00000000000000000000000000000000000000000000000000000000000000006114cb575b7f0000000000000000000000000000000000000000000000000000000000000000806114bb575b6114ae57611ea2565b565b6114b6612191565b611ea2565b506114c68282611ffe565b6114a3565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0382811690841660008282036115d6575081600052600a60205260ff604060002054166000146115c85760005b6000915b61152d85611d3d565b6008546001600160a01b0387166000908152600960205260408082208390559681528681208290559283529490912093909355806115aa575b508061158c575b508061157b575b505061147c565b6115859130611ea2565b3880611574565b61159585611f67565b61156d576115a4908530611ea2565b3861156d565b6115b385611f67565b611566576115c2908530611ea2565b38611566565b6115d184610dfb565b611520565b828152600a602052604081205460ff161561161c575b81600052600a60205260ff6040600020541660001461160e5760005b91611524565b61161786610dfb565b611608565b5061162684610dfb565b6115ec565b6116567f0000000000000000000000000000000000000000000000000000000000000000838361194e565b611456565b611663611e0f565b61010061ff00196010541617601055611430565b5060ff60105460081c161561142b565b5060ff600c541615611425565b5060ff6010541661141f565b6116b9915060203d602011611331576113238183610d1a565b38611418565b7f000000000000000000000000000000000000000000000000000000000000000015611704576116f0843089611ea2565b6116fc84600f54611fe4565b600f55611ff1565b6113dd8461171061101a565b89611ea2565b6001600160a01b0383166000908152600a60205260409020805460ff191660011790556110e2565b506001600160a01b0383166000908152600a602052604090205460ff16156110dd565b61176b9291611ea2565b6010549060ff821615908161178f575b506117835750565b60ff1916600117601055565b6117999150611f67565b3861177b565b5060ff600c54166110ca565b60ff91501615386110c2565b60405163fa88ad5760e01b81526001600160a01b03858116600483015287811660248301527f0000000000000000000000000000000000000000000000000000000000000000811660448301527f000000000000000000000000000000000000000000000000000000000000000081166064830152306084830152909350909150602090839060a49082907f0000000000000000000000000000000000000000000000000000000000000000165afa801561037d57859260009161187d575b50906110bb565b611896915060203d602011611331576113238183610d1a565b38611876565b8054821015610cd25760005260206000200190600090565b90815491600160401b831015610d0457826118d79160016114ac9501815561189c565b90919082549060031b91821b91600019901b1916179055565b805115610cd25760200190565b8051821015610cd25760209160051b010190565b60001981146119205760010190565b634e487b7160e01b600052601160045260246000fd5b9081602091031261017a5751801515810361017a5790565b9260009260809290916060905b600654861015611d34575b6001600160a01b03871660008181526007602052604090205487106119ae5760005260076020526119a9604060002060016119a089610e2d565b500154906118b4565b611966565b5093909192935b6001600160a01b03841660008181526007602052604090205487106119f45760005260076020526119ef604060002060016119a089610e2d565b6119b5565b5093909192935b6001600160a01b0382166000818152600760205260409020548710611a3a576000526007602052611a35604060002060016119a089610e2d565b6119fb565b506001600160a01b0387166000818152600a602052604090205491969395929492939160ff1615611d10576000905b6000906001600160a01b03861682818303611ccd575b6001600160a01b038916918383141580611cc3575b611c7c575b60405194611aa78c87610d1a565b600386528836602088013760405194611ac08d87610d1a565b600386528936602088013760009780611c33575b505080611be7575b505080611b95575b505060005b838110611afd57505050506001019461195b565b600190611b696020611b0e88610e2d565b505460a085901b85900390811690611b2685886118fd565b511690611b3385896118fd565b5160405163a9059cbb60e01b81526001600160a01b03909316600484015260248301529092839190829060009082906044820190565b03925af1611b79575b5001611ae9565b611b909060203d8111611331576113238183610d1a565b611b72565b84611bba91611ba8611be09497876118fd565b5285611bb482866118fd565b52611911565b936001611bc687610e2d565b5001549060005260076020526118d786604060002061189c565b3880611ae4565b86611c0691611bfa611c2c9499896118fd565b5287611bb482886118fd565b956001611c1289610e2d565b5001549060005260076020526118d788604060002061189c565b3880611adc565b909750611c3f876118f0565b5286611c4a866118f0565b52611c7560019788611c5b8b610e2d565b5001549060005260076020526118d78a604060002061189c565b3880611ad4565b905081600052600a60205260ff60406000205416600014611ca05760005b90611a99565b611cbe86611cad81610e2d565b50546001600160a01b03168b610e4c565b611c9a565b5082811415611a94565b92818152600a60205260ff604082205416600014611cec575b92611a7f565b50611d0b85611cfa81610e2d565b50546001600160a01b031689610e4c565b611ce6565b611d2e82611d1d81610e2d565b50546001600160a01b03168a610e4c565b90611a69565b95505050505050565b6008549060018060a01b0316908160005260096020526040600020549060405192631d2fa43b60e11b84526004840152306024840152604483015260648201527f0000000000000000000000000000000000000000000000000000000000000000608482015260208160a48160018060a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa90811561037d57600091610f1b575090565b6005546001600160a01b03163303611dfa57565b63118cdaa760e01b6000523360045260246000fd5b600c5460ff8116611e385760ff1916600117600c55611e2c61230a565b60ff19600c5416600c55565b50565b6001600160a01b0316908115610ab7576001600160a01b0316918215610aa15760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260018252604060002085600052825280604060002055604051908152a3565b6001600160a01b0316908115611f51576001600160a01b0316918215611f3b576000828152806020526040812054828110611f215791604082827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef958760209652828652038282205586815280845220818154019055604051908152a3565b916064928463391434e360e21b8452600452602452604452fd5b63ec442f0560e01b600052600060045260246000fd5b634b637e8f60e11b600052600060045260246000fd5b604051630d5c7b5d60e41b81526001600160a01b03918216600482015230602482015290602090829060449082907f0000000000000000000000000000000000000000000000000000000000000000165afa90811561037d57600091611fcb575090565b610e24915060203d602011611331576113238183610d1a565b9190820180921161192057565b9190820391821161192057565b60405163154b004960e31b81526001600160a01b03918216600482015291166024820152306044820152602081806064810103817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa90811561037d57600091611fcb575090565b919082604091031261017a57610e24602061208a84611006565b9301611006565b608090606081019260018060a01b0316815273a1077a294dde1b09bb078844df40758a5d0f9a27602082015260606040820152600d548093520190600d60005260206000209060005b8181106120e75750505090565b82546001600160a01b03168452602090930192600192830192016120da565b608090606081019273a1077a294dde1b09bb078844df40758a5d0f9a27825260018060a01b0316602082015260606040820152600d548093520190600d60005260206000209060005b81811061215c5750505090565b82546001600160a01b031684526020909301926001928301920161214f565b919082604091031261017a576020825192015190565b600f548015611e385760408051632a8ddb2f60e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031692909182806121e43060048301612091565b0381865afa91821561037d576000926122a4575b506001600160a01b0382161561229f576040906044600e54918351958693849263059b6d4760e21b8452600484015260248301525afa801561037d57600092600091612278575b50600f5561225f908261225061101a565b612259306129f4565b92612ad3565b156122675750565b61227390600f54611fe4565b600f55565b61225f929350612297915060403d60401161138b576113798183610d1a565b90929161223f565b505050565b6122c791925060403d6040116122d0575b6122bf8183610d1a565b810190612070565b905090386121f8565b503d6122b5565b8181029291811591840414171561192057565b81156122f4570490565b634e487b7160e01b600052601260045260246000fd5b600090816011549061231b82610d3c565b906123296040519283610d1a565b828252601f1961233884610d3c565b0136602084013761234883610d3c565b926123566040519485610d1a565b808452612365601f1991610d3c565b01366020850137845b6011548110156124e65761238181610cb3565b5060068101549081156124dc5760ff600182015416600581101580610c9057600182149283156124b2575b5082156124a1575b50506123c6575b506001905b0161236e565b600e546040805163059b6d4760e21b815260048101939093526024830191909152816044817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa90811561037d576000908192612480575b5080612448575b5090600191600661243f83610cb3565b500155906123bb565b6124726124789184939599600161246081978a6118fd565b528161246c868b6118fd565b52611fe4565b97611911565b92909161242f565b905061249a915060403d811161138b576113798183610d1a565b9038612428565b909150610c905760041438806123b4565b60009350600283149150816124ca575b5091386123ac565b60ff91506005015460a01c16386124c2565b50506001906123c0565b509392939190918315908115612784575b5061229f5760408051632a8ddb2f60e01b815290818061251a3060048301612091565b03817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa90811561037d57600091612763575b506001600160a01b038116156126cf5761257d9084612575306129f4565b913090612b8f565b15612709576040516370a0823160e01b81523060048201529160208360248173a1077a294dde1b09bb078844df40758a5d0f9a275afa92831561037d576000936126d5575b5082156126cf5760005b6011548110156126c8576125e081836118fd565b511580156126b6575b6126ae5761260a85612605866125ff85886118fd565b516122d7565b6122ea565b9061261481610cb3565b5060ff600182015416926005841015610c905760019384810361264a575061263e61264492610d54565b9061318c565b016125cc565b6000600282148061269d575b1561267457505061266961266f92610d54565b90612fd1565b612644565b50600414612684575b5050612644565b61269061269692610d54565b90612c2e565b388061267d565b5060ff600585015460a01c16612656565b600190612644565b506126c181846118fd565b51156125e9565b5050505050565b50505050565b90926020823d602011612701575b816126f060209383610d1a565b810103126113bb57505191386125c2565b3d91506126e3565b9092915060005b60115481101561275d5780612727600192866118fd565b51612733575b01612710565b61273d81846118fd565b51612756600661274c84610cb3565b5001918254611fe4565b905561272d565b50509050565b61277c915060403d6040116122d0576122bf8183610d1a565b905038612557565b905015386124f7565b60208301928351936005851015610c905760009461283a5750506001600160a01b03169081156128265781835282602052604083205481811061280d57817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef926020928587528684520360408620558060025403600255604051908152a3565b6064939263391434e360e21b8452600452602452604452fd5b634b637e8f60e11b83526004839052602483fd5b809492939451600581101561295e57859291906003036128c35750506128659061287a933090611ea2565b60406002549130815280602052205490611ff1565b9081612884575050565b6128be916126056128b6927f0000000000000000000000000000000000000000000000000000000000000000906122d7565b600854611fe4565b600855565b8091949392505160058110156113435760020361291d57505060e0820151156129055761274c612901926128fb856006943090611ea2565b51610cb3565b9055565b6114ac9291608060018060a01b039101511690611ea2565b809492945160058110156113435760010361293d5750506114ac926133dd565b519060058210156112ae575060041461295557505050565b6114ac926133dd565b634e487b7160e01b84526021600452602484fd5b60208183031261017a5780519067ffffffffffffffff821161017a57019080601f8301121561017a5781516129a681610d3c565b926129b46040519485610d1a565b81845260208085019260051b82010192831161017a57602001905b8282106129dc5750505090565b602080916129e984611006565b8152019101906129cf565b6040516343d7ef9f60e11b81526001600160a01b03918216600482015290600090829060249082907f0000000000000000000000000000000000000000000000000000000000000000165afa90811561037d57600091612a52575090565b610e2491503d806000833e612a678183610d1a565b810190612972565b60a091936020936080830195600180861b03168352600180851b03168483015260408201526080606082015284518094520192019060005b818110612ab45750505090565b82516001600160a01b0316845260209384019390920191600101612aa7565b93929160009181158015612b7e575b612b76577f0000000000000000000000000000000000000000000000000000000000000000612b12838230611e3b565b6001600160a01b031690813b15612b72578380959697612b4860405198899687958694630309079d60e31b865260048601612a6f565b03925af19182612b62575b5090612b5c5790565b50600190565b81612b6c91610d1a565b38612b53565b8380fd5b509093505050565b506001600160a01b03861615612ae2565b90929180158015612c1d575b612c14577f0000000000000000000000000000000000000000000000000000000000000000612bcb828230611e3b565b6001600160a01b031692833b1561017a57612bf991604051958694637e18437960e01b865260048601612a6f565b03825a9181600080958195f19182612b62575090612b5c5790565b50505050600090565b506001600160a01b03821615612b9b565b9190600090831561275d5760a00180516001600160a01b031673a1077a294dde1b09bb078844df40758a5d0f9a278114612f7d5750805160408051632a8ddb2f60e01b81529182908190612c8e906001600160a01b031660048301612106565b03817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa908115611338578391612f5c575b5060405163095ea7b360e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0381166004830152602482018790529095906020876044818873a1077a294dde1b09bb078844df40758a5d0f9a275af1968715612f51578596976024959650612f34575b5084516040516370a0823160e01b81523060048201529460209186919082906001600160a01b03165afa938415612f29578694612ef1575b5084516001600160a01b039182169291612d9691166134da565b92823b15612eed5791612dc6939187809460405196879586948593637e18437960e01b8552309060048601612a6f565b03925af19081612ed9575b50612ddb57505050565b81516040516370a0823160e01b81523060048201529190602090839060249082906001600160a01b03165afa8015612ece578490612e9a575b612e1e9250611ff1565b9081612e2957505050565b51612e5690612e40906001600160a01b031661340e565b9260406002549130815280602052205490611ff1565b90811561229f5761274c612e94612901936126056001947f0000000000000000000000000000000000000000000000000000000000000000906122d7565b93610e2d565b506020823d602011612ec6575b81612eb460209383610d1a565b8101031261017a57612e1e9151612e14565b3d9150612ea7565b6040513d86823e3d90fd5b84612ee691959295610d1a565b9238612dd1565b8680fd5b9093506020813d602011612f21575b81612f0d60209383610d1a565b81010312612f1d57519238612d7c565b8580fd5b3d9150612f00565b6040513d88823e3d90fd5b612f4c9060203d602011611331576113238183610d1a565b612d44565b6040513d87823e3d90fd5b612f75915060403d6040116122d0576122bf8183610d1a565b905038612cca565b612f8f9150612e40909492939461340e565b9081612f9a57505050565b61274c612e94612901936126056001947f0000000000000000000000000000000000000000000000000000000000000000906122d7565b90600090821561229f5773a1077a294dde1b09bb078844df40758a5d0f9a273b1561318857604051632e1a7d4d60e01b81526004810184905282816024818373a1077a294dde1b09bb078844df40758a5d0f9a275af19081613174575b506130b2576080015160405163a9059cbb60e01b81526001600160a01b039091166004820152602481019290925260208280604481015b03818473a1077a294dde1b09bb078844df40758a5d0f9a275af19081156130a6575061308e5750565b611e389060203d602011611331576113238183610d1a565b604051903d90823e3d90fd5b608001818080808660018060a01b038651165af13d1561316f573d67ffffffffffffffff811161315b57604051906130f4601f8201601f191660200183610d1a565b81528360203d92013e5b1561310857505050565b5160405163a9059cbb60e01b81526001600160a01b03909116600482015260248101929092526020826044818473a1077a294dde1b09bb078844df40758a5d0f9a275af19081156130a6575061308e5750565b634e487b7160e01b84526041600452602484fd5b6130fe565b8361318191949294610d1a565b913861302e565b5080fd5b90600090821561229f5760a0810180519091906001600160a01b031673a1077a294dde1b09bb078844df40758a5d0f9a271461338657815160408051632a8ddb2f60e01b81529291839081906131ee906001600160a01b031660048301612106565b03817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa918215612ece578492613363575b5060405163095ea7b360e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b038116600483015260248201879052906020816044818973a1077a294dde1b09bb078844df40758a5d0f9a275af18015612f29579060809291613346575b5091018051935190936001600160a01b0392831692908116916132c191166134da565b92823b15612f1d579186918680946132ef60405197889687958694637e18437960e01b865260048601612a6f565b03925af19081613332575b5061229f575160405163a9059cbb60e01b81526001600160a01b03909116600482015260248101929092526020828060448101613065565b8361333f91949294610d1a565b91386132fa565b61335e9060203d602011611331576113238183610d1a565b61329e565b61337d91925060403d6040116122d0576122bf8183610d1a565b9050903861322a565b6080015160405163a9059cbb60e01b81526001600160a01b0390911660048201526024810193909352506020826044818473a1077a294dde1b09bb078844df40758a5d0f9a275af19081156130a6575061308e5750565b61274c82936128fb61340094600694600160ff19600c541617600c553090611ea2565b905560ff19600c5416600c55565b6006549060005b8281106134af57506040519061342a82610ce8565b6001600160a01b0316815260006020820190815291600160401b811015610d045780600161345b9201600655610e2d565b92909261349957905182546001600160a01b0319166001600160a01b0391909116178255516001919091015560065460001981019081116119205790565b634e487b7160e01b600052600060045260246000fd5b6134b881610e2d565b50546001600160a01b038381169116146134d457600101613415565b91505090565b6040516377a9efe360e11b81526001600160a01b03918216600482015290600090829060249082907f0000000000000000000000000000000000000000000000000000000000000000165afa90811561037d57600091612a5257509056fea264697066735822122030825c5b589300ce921707b920a77bb82678897bec1e0773e64166e27ac8cbc464736f6c634300081c003331ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c68d7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb5a2646970667358221220a84af224a40d9b7f5a0dd57cf5bc3f5d8807fd559983accdc82c4612f5725f4064736f6c634300081c003300000000000000000000000000000000000000000000003635c9adc5dea00000000000000000000000000000b47eecbb81a9af59da0ff9409c0f9af082d9420d00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000003000000000000000000000000958c664f1dab9357e9a1e913c740decad1d7a3fe00000000000000000000000022b7faca9f94ed2645364abee11f117b56b6469a000000000000000000000000568c45580bdef25f71984d088c36661f12eb5349
Deployed ByteCode
0x6080604052600436101561001b575b361561001957600080fd5b005b6000803560e01c806313ff7e9f14610f6957806321b1c1e814610f4b578063279c4ebf14610ed357806327ab5d0f14610eaa578063441062ed14610e8c578063481c6a7514610e6357806348d09f3e14610ba45780636231dd4b14610b035780636277d57314610ae057806365b3f9b014610a18578063715018a6146109be578063799361a314610979578063870a26e91461094f57806388b55661146108525780638da5cb5b1461082b578063a4733533146107e7578063a4b7914e146107a8578063ae1329521461078b578063aedc90ee146106f0578063ce53acc51461069f578063f21c45c914610266578063f2fde38b146101e0578063fa72dda21461018f5763fda86ddc1461012f575061000e565b3461018c57602036600319011261018c5760043561014b6118fe565b612710811161015a5760025580f35b60405162461bcd60e51b815260206004820152600a602482015269466565203e203130302560b01b6044820152606490fd5b80fd5b503461018c57602036600319011261018c576101a9611205565b6101b16118fe565b6001600160a01b03166101c5811515611792565b6bffffffffffffffffffffffff60a01b600354161760035580f35b503461018c57602036600319011261018c576101fa611205565b6102026118fe565b6001600160a01b031680156102525781546001600160a01b03198116821783556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b631e4fbdf760e01b82526004829052602482fd5b5060c036600319011261018c5760043567ffffffffffffffff81116105df57610293903690600401611401565b9060243567ffffffffffffffff81116105df576102b4903690600401611401565b60643567ffffffffffffffff811161069b573660238201121561069b5780600401356102df8161139c565b916102ed604051938461137a565b81835260246101206020850193028201019036821161069757602401915b8183106105e35750505060843592831515840361018c5760a4356001600160a01b038116908190036105df5761033f611800565b8251610599575b604051906145af8083019083821067ffffffffffffffff8311176105855790839291611928843961012081526103b661039461038661012084018c611257565b838103602085015289611257565b306040840152336060840152604435608084015282810360a08401528761127c565b60c08201929092523060e08201527f000000000000000000000000b47eecbb81a9af59da0ff9409c0f9af082d9420d6001600160a01b031661010090910152039082f08015610578576001600160a01b0316808252600660205260408220805460ff1916600117905593156104f657833b1561018c576040516338a80c5360e11b8152818160048183895af180156104eb576104d6575b50507f6596c1670eb3390048d23721809c3da5d3f531375ac0e2cab0f77a808ed6433161049e60209585935b511515806104cb575b6104bb575b6104ac604051928392604084526040840190611257565b828103898401523396611257565b0390a360018055604051908152f35b6104c6600554611822565b610487565b506005541515610482565b6104e182809261137a565b61018c578061044d565b6040513d84823e3d90fd5b9390833b156105745760405163f2fde38b60e01b8152336004820152858160248183895af1801561056957927f6596c1670eb3390048d23721809c3da5d3f531375ac0e2cab0f77a808ed643319260209761049e938896610559575b5050610479565b816105639161137a565b38610552565b6040513d88823e3d90fd5b8480fd5b50604051903d90823e3d90fd5b634e487b7160e01b85526041600452602485fd5b6005543410156103465760405162461bcd60e51b8152602060048201526014602482015273125b9cdd59999a58da595b9d081c185e5b595b9d60621b6044820152606490fd5b5080fd5b61012083360312610697576040516105fa81611347565b8335815260208401356005811015610693576020820152604084013560038110156106935760408201526060840135606082015261063a60808501611220565b608082015261064b60a08501611220565b60a082015261065c60c08501611220565b60c082015260e084013580151581036106935791816101209360e0602094015261010086013561010082015281520192019161030b565b8780fd5b8580fd5b8280fd5b503461018c57602036600319011261018c576106b9611205565b6106c16118fe565b6001600160a01b03166106d5811515611792565b6bffffffffffffffffffffffff60a01b600754161760075580f35b503461018c57602036600319011261018c578080808060043560018060a01b0382541633148015610777575b8015610763575b61072c90611629565b80151580610759575b61073e90611672565b6007546001600160a01b03165af1506107556117d0565b5080f35b5047811115610735565b506007546001600160a01b03163314610723565b506004546001600160a01b0316331461071c565b503461018c578060031936011261018c5760206040516127108152f35b503461018c57602036600319011261018c5760209060ff906040906001600160a01b036107d3611205565b168152600684522054166040519015158152f35b503461018c57602036600319011261018c576004359060085482101561018c576020610812836113b4565b905460405160039290921b1c6001600160a01b03168152f35b503461018c578060031936011261018c57546040516001600160a01b039091168152602090f35b503461018c57602036600319011261018c5761086c611205565b6108746118fe565b6001600160a01b038116610889811515611792565b60085490835b8281106108f8575050680100000000000000008110156108e457906108bd8260016108e194016008556113b4565b81546001600160a01b0393841660039290921b91821b9390911b1916919091179055565b80f35b634e487b7160e01b83526041600452602483fd5b81610902826113b4565b905460039190911b1c6001600160a01b0316146109215760010161088f565b60405162461bcd60e51b815260206004820152600660248201526545786973747360d01b6044820152606490fd5b503461018c57602036600319011261018c576108e161096c611205565b6109746118fe565b6116af565b503461018c578060031936011261018c576040517f000000000000000000000000b47eecbb81a9af59da0ff9409c0f9af082d9420d6001600160a01b03168152602090f35b503461018c578060031936011261018c576109d76118fe565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461018c578060031936011261018c5760405180602060085491828152018091600885527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee390855b818110610ac15750505082610a7791038361137a565b604051928392602084019060208552518091526040840192915b818110610a9f575050500390f35b82516001600160a01b0316845285945060209384019390920191600101610a91565b82546001600160a01b0316845260209093019260019283019201610a61565b503461018c57602036600319011261018c57610afa6118fe565b60043560055580f35b503461018c57602036600319011261018c576004816001600160a01b03610b28611205565b168082526006602052610b4160ff604084205416611448565b604051632973ef2d60e01b815292839182905afa9081156104eb5782610b7d9392610b81575b505060405191829160208352602083019061127c565b0390f35b610b9d92503d8091833e610b95818361137a565b81019061150d565b3880610b67565b503461018c57604036600319011261018c5760043567ffffffffffffffff81116105df57366023820112156105df57806004013590610be28261139c565b91610bf0604051938461137a565b8083526024602084019160051b8301019136831161057457602401905b828210610e4b575050506024359167ffffffffffffffff831161018c573660238401121561018c57826004013592610c448461139c565b93610c52604051958661137a565b8085526024602086019160051b83010191368311610dc757602401905b828210610e3b5750505060018060a01b0381541633148015610e27575b8015610e13575b610c9c90611629565b8151835103610dde57805b8251811015610755576001600160a01b03610cc2828561165e565b51166040516370a0823160e01b8152306004820152602081602481855afa8015610dd3578490610d9c575b610d0291508015159081610d87575b50611672565b6007546020906001600160a01b03166044610d1d858961165e565b519186604051958694859363a9059cbb60e01b8552600485015260248401525af1610d4c575b50600101610ca7565b6020813d8211610d7f575b81610d646020938361137a565b8101031261069b5790610d78600192611500565b5090610d43565b3d9150610d57565b9050610d93848861165e565b51111538610cfc565b506020813d8211610dcb575b81610db56020938361137a565b81010312610dc757610d029051610ced565b8380fd5b3d9150610da8565b6040513d86823e3d90fd5b60405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b6044820152606490fd5b506007546001600160a01b03163314610c93565b506004546001600160a01b03163314610c8c565b8135815260209182019101610c6f565b60208091610e5884611220565b815201910190610c0d565b503461018c578060031936011261018c576004546040516001600160a01b039091168152602090f35b503461018c578060031936011261018c576020600254604051908152f35b503461018c578060031936011261018c576003546040516001600160a01b039091168152602090f35b503461018c57602036600319011261018c5780546001600160a01b031633148015610f37575b8015610f23575b610f0990611629565b610f11611800565b610f1c600435611822565b6001805580f35b506007546001600160a01b03163314610f00565b506004546001600160a01b03163314610ef9565b503461018c578060031936011261018c576020600554604051908152f35b503461018c57602036600319011261018c576001600160a01b03610f8b611205565b168082526006602052610fa460ff604084205416611448565b6040516306fdde0360e01b8152908282600481845afa9182156111fa5783926111de575b506040516395d89b4160e01b81528381600481855afa908115610dd35784916111bc575b50604051630de370f760e21b815291602083600481845afa9283156111b157859361117d575b506040516318160ddd60e01b8152602081600481855afa90811561056957869161114b575b50604051638da5cb5b60e01b81529286602085600481875afa93841561057857819461110f575b604051632973ef2d60e01b81529550859060049082905afa9384156111045790610b7d9594939291886110ab99956110e2575b50506110b99060405198899860c08a5260c08a0190611257565b9088820360208a0152611257565b604087019490945260608601526001600160a01b031615608085015283820360a085015261127c565b6110b9929550906110fc913d8091833e610b95818361137a565b939038611091565b6040513d89823e3d90fd5b93506020853d602011611143575b8161112a6020938361137a565b8101031261018c5761113d6004956114ec565b9361105e565b3d915061111d565b90506020813d602011611175575b816111666020938361137a565b81010312610697575138611037565b3d9150611159565b9092506020813d6020116111a9575b816111996020938361137a565b8101031261057457519138611012565b3d915061118c565b6040513d87823e3d90fd5b6111d891503d8086833e6111d0818361137a565b81019061148a565b38610fec565b6111f39192503d8085833e6111d0818361137a565b9038610fc8565b6040513d85823e3d90fd5b600435906001600160a01b038216820361121b57565b600080fd5b35906001600160a01b038216820361121b57565b60005b8381106112475750506000910152565b8181015183820152602001611237565b9060209161127081518092818552858086019101611234565b601f01601f1916010190565b906020808351928381520192019060005b81811061129a5750505090565b909192835180518252602081015160058110156113315760208301526040810151906003821015611331576040830191909152606080820151908301526080808201516001600160a01b039081169184019190915260a08083015182169084015260c0808301519091169083015260e08082015115159083015261010090810151908201526101200192602001919060010161128d565b634e487b7160e01b600052602160045260246000fd5b610120810190811067ffffffffffffffff82111761136457604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761136457604052565b67ffffffffffffffff81116113645760051b60200190565b6008548110156113cf57600860005260206000200190600090565b634e487b7160e01b600052603260045260246000fd5b67ffffffffffffffff811161136457601f01601f191660200190565b81601f8201121561121b57803590611418826113e5565b92611426604051948561137a565b8284526020838301011161121b57816000926020809301838601378301015290565b1561144f57565b60405162461bcd60e51b81526020600482015260136024820152722737ba1030903330b1ba37b93c903a37b5b2b760691b6044820152606490fd5b60208183031261121b5780519067ffffffffffffffff821161121b570181601f8201121561121b5780516114bd816113e5565b926114cb604051948561137a565b8184526020828401011161121b576114e99160208085019101611234565b90565b51906001600160a01b038216820361121b57565b5190811515820361121b57565b60208183031261121b5780519067ffffffffffffffff821161121b570181601f8201121561121b578051906115418261139c565b9261154f604051948561137a565b828452602061012081860194028301019181831161121b57602001925b82841061157a575050505090565b6101208483031261121b576040519061159282611347565b845182526020850151600581101561121b576020830152604085015190600382101561121b57826020926040610120950152606087015160608201526115da608088016114ec565b60808201526115eb60a088016114ec565b60a08201526115fc60c088016114ec565b60c082015261160d60e08801611500565b60e082015261010087015161010082015281520193019261156c565b1561163057565b60405162461bcd60e51b815260206004820152600660248201526511195b9a595960d21b6044820152606490fd5b80518210156113cf5760209160051b010190565b1561167957565b60405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b6044820152606490fd5b6008541561121b5760005b6008548082101561121b576116ce826113b4565b905460039190911b1c6001600160a01b03908116908416146116f357506001016116ba565b60001981019250821161177c5781810361174e575b505060085480156117385760001901611720816113b4565b81549060018060a01b039060031b1b19169055600855565b634e487b7160e01b600052603160045260246000fd5b6108bd61175d611775936113b4565b905460039190911b1c6001600160a01b0316916113b4565b3880611708565b634e487b7160e01b600052601160045260246000fd5b1561179957565b60405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b6044820152606490fd5b3d156117fb573d906117e1826113e5565b916117ef604051938461137a565b82523d6000602084013e565b606090565b600260015414611811576002600155565b633ee5aeb560e01b60005260046000fd5b6008549081156118cc576000908281049080151590816118c2575b816118b7575b501561188957815b8381106118585750505050565b8083808080866118696001976113b4565b888060a01b0391549060031b1c165af1506118826117d0565b500161184b565b60405162461bcd60e51b81526020600482015260066024820152654e6f20504c5360d01b6044820152606490fd5b905047101538611843565b821515915061183d565b60405162461bcd60e51b815260206004820152600a6024820152694e6f2077616c6c65747360b01b6044820152606490fd5b6000546001600160a01b0316330361191257565b63118cdaa760e01b6000523360045260246000fdfe6101c060405234610dc3576145af8038038061001a81610dc8565b928339810161012082820312610dc35781516001600160401b038111610dc35781610046918401610ded565b60208301519092906001600160401b038111610dc35782610068918301610ded565b9261007560408301610e58565b9161008260608201610e58565b608082015160a08301519196916001600160401b038111610dc35783019486601f87011215610dc3578551966001600160401b038811610b1c576100cb60208960051b01610dc8565b966020888a815201916020610120849b0283010191818311610dc357602001925b828410610d01575050505061010360c08501610e58565b9261011d61010061011660e08801610e58565b9601610e58565b865190966001600160401b038211610b1c5760035490600182811c92168015610cf7575b6020831014610c155781601f849311610ca8575b50602090601f8311600114610c4057600092610c35575b50508160011b916000199060031b1c1916176003555b8051906001600160401b038211610b1c5760045490600182811c92168015610c2b575b6020831014610c155781601f849311610bbb575b50602090601f8311600114610b5357600092610b48575b50508160011b916000199060031b1c1916176004555b6001600160a01b03168015610b3257600580546001600160a01b0319811683179091556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a369021e19e0c9bab2400000608090815260a08590526040519081016001600160401b03811182821017610b1c576040527398bf93ebf5c380c0e6ae8e192a7e2ae08edacc02815273165c3410fc91ef562c50559f7d2289febed552d9602082015273cc73b59f8d7b7c532703bdfea2808a28a488cf47604082015273eb45a3c4aedd0f47f345fb4c8a1802bb5740d7256060820152600d546004600d5580600410610ad7575b50600d60005260206000209060005b60048110610aba5750506010805460ff19169055506001600160a01b038716968715610aa45761031e82600254610edd565b6002556000978089528860205260408920838154019055887fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020604051868152a36101005260c05260e0526101205260a05280516104a4575b60405161356e90816110018239608051818181610eb901528181611d7f0152818161289101528181612e6f0152612fac015260a05181818161030701528181610ee7015281816111160152818161184401528181611db201528181611f9701528181612034015281816121aa015281816123ed0152818161251e01528181612a1e01528181612c92015281816131f20152613504015260c0518161088d015260e0518181816117de01528181612ae801528181612ba101528181612cda015261323a01526101005181818161084f015281816114cd0152818161163001526118060152610120518181816107bb0152818161102f01526110f10152610140518161113e01526101605181818161147e01526116c10152610180518161145801526101a051816114320152f35b60016101405282808080808080805b88518810156107bb5761138860606104cb8a8c610e83565b5101511161078a576104e960206104e28a8c610e83565b5101610ead565b60058110156105b95760031461062f575b61050960206104e28a8c610e83565b60058110156105b957600414610605575b61052960206104e28a8c610e83565b60058110156105b957600214806105ee575b80156105cd575b8015610598575b61058f575b61056960019160606105608b8d610e83565b51015190610edd565b9780610575818c610e83565b51528b610100610585838d610e83565b51015201966104b3565b6001935061054e565b506105a860206104e28a8c610e83565b60058110156105b957600114610549565b634e487b7160e01b8c52602160045260248cfd5b506105dd60206104e28a8c610e83565b60058110156105b957600414610542565b5060e06105fb898b610e83565b510151151561053b565b600191506106296001600160a01b0360a06106208b8d610e83565b51015116610f1f565b5061051a565b95600192506040610640898b610e83565b51015160038110156105b9578314801561076b575b8061075d575b6106eb57610675604061066e8a8c610e83565b5101610ed0565b60038110156105b957600214801561073e575b80610730575b6106eb576106a1604061066e8a8c610e83565b60038110156105b95783036106b8575081956104fa565b95936106c9604061066e8a8c610e83565b60038110156105b9576002036106e1575081936104fa565b93945081946104fa565b60405162461bcd60e51b815260206004820152601760248201527f436f6e666c696374696e67207265666c656374696f6e730000000000000000006044820152606490fd5b50848561068e57508561068e565b5061074e604061066e8a8c610e83565b60038110156105b95715610688565b50808161065b57508561065b565b5061077b604061066e8a8c610e83565b60038110156105b95715610655565b60405162461bcd60e51b8152602060048201526009602482015268546178203e2035302560b81b6044820152606490fd5b92999650969350969350611f40915011610a6b575190680100000000000000008211610a5757601154826011558083106109bd575b5060118352849190839060008051602061456f833981519152905b8383106108b25750505050610830575b506101a0526101805261016052388080610378565b929091838052600a60205260408420600160ff19825416179055308452600a60205260408420600160ff19825416179055835b600d548110156108a75760008051602061458f8339815191528101546001600160a01b03168552600a60205260408520805460ff1916600190811790915501610863565b50919092503861081b565b809192939450518051835560018301602082015160058110156109a9578154604084015160038110156109955761ffff1990911660ff9092169190911760089190911b61ff00161790556060810151600284015560808101516003840180546001600160a01b03199081166001600160a01b039384161790915560a0808401516004870180549093169084161790915560c083015160058601805460e08601516001600160a81b0319909116929094169190911792151590911b60ff60a01b1691909117905561010001516006830155869392600101916007019060200161080b565b634e487b7160e01b8a52602160045260248afd5b634e487b7160e01b88526021600452602488fd5b80600702906007820403610a435782600702600781048403610a2f576011855260008051602061456f83398151915291820191015b8181106109ff57506107f0565b808560079255856001820155856002820155856003820155856004820155856005820155856006820155016109f2565b634e487b7160e01b85526011600452602485fd5b634e487b7160e01b84526011600452602484fd5b634e487b7160e01b83526041600452602483fd5b60405162461bcd60e51b8152602060048201526011602482015270546f74616c207461786573203e2038302560781b6044820152606490fd5b63ec442f0560e01b600052600060045260246000fd5b81516001600160a01b0316818401556020909101906001016102ec565b600d600052610b169060008051602061458f833981519152017fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb9610e6c565b386102dd565b634e487b7160e01b600052604160045260246000fd5b631e4fbdf760e01b600052600060045260246000fd5b0151905038806101d0565b600460009081528281209350601f198516905b818110610ba35750908460019594939210610b8a575b505050811b016004556101e6565b015160001960f88460031b161c19169055388080610b7c565b92936020600181928786015181550195019301610b66565b6004600052610c05907f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b601f850160051c81019160208610610c0b575b601f0160051c0190610e6c565b386101b9565b9091508190610bf8565b634e487b7160e01b600052602260045260246000fd5b91607f16916101a5565b01519050388061016c565b600360009081528281209350601f198516905b818110610c905750908460019594939210610c77575b505050811b01600355610182565b015160001960f88460031b161c19169055388080610c69565b92936020600181928786015181550195019301610c53565b6003600052610cf1907fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f850160051c81019160208610610c0b57601f0160051c0190610e6c565b38610155565b91607f1691610141565b61012084830312610dc3576040519061012082016001600160401b03811183821017610b1c576040528451825260208501516005811015610dc357602083015260408501516003811015610dc357604083015260608501516060830152610d6a60808601610e58565b6080830152610d7b60a08601610e58565b60a0830152610d8c60c08601610e58565b60c083015260e0850151908115158203610dc3578260209260e06101209501526101008701516101008201528152019301926100ec565b600080fd5b6040519190601f01601f191682016001600160401b03811183821017610b1c57604052565b81601f82011215610dc3578051906001600160401b038211610b1c57610e1c601f8301601f1916602001610dc8565b9282845260208383010111610dc35760005b828110610e4357505060206000918301015290565b80602080928401015182828701015201610e2e565b51906001600160a01b0382168203610dc357565b818110610e77575050565b60008155600101610e6c565b8051821015610e975760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b516005811015610eba5790565b634e487b7160e01b600052602160045260246000fd5b516003811015610eba5790565b91908201809211610eea57565b634e487b7160e01b600052601160045260246000fd5b600654811015610e9757600660005260206000209060011b0190600090565b6006549060005b828110610fd5575060408051919082016001600160401b03811183821017610b1c576040526001600160a01b031681526000602082019081529168010000000000000000811015610b1c57806001610f819201600655610f00565b929092610fbf57905182546001600160a01b0319166001600160a01b039190911617825551600191909101556006546000198101908111610eea5790565b634e487b7160e01b600052600060045260246000fd5b610fde81610f00565b50546001600160a01b03838116911614610ffa57600101610f26565b9150509056fe608080604052600436101561001d575b50361561001b57600080fd5b005b60003560e01c90816306fdde0314610b2e57508063095ea7b314610b0857806318160ddd14610aea57806323b872dd14610a115780632973ef2d146108cc578063313ce567146108b0578063378dc3dc14610875578063406cf229146108395780634f30800d1461081b57806356cdad1d146107fd5780635f75baf614610795578063695d69b314610772578063709df63c1461067f57806370a0823114610645578063715018a6146105e8578063720b6782146105c75780638453ef99146105a65780638da5cb5b1461057d5780639045be581461023657806395d89b4114610475578063a9059cbb14610444578063c5be2bc714610389578063cb78c163146102d6578063dd62ed3e14610275578063e6375d3e14610236578063f2fde38b146101ac578063f56b4d051461017f5763fec4ff171461015e573861000f565b3461017a57600036600319011261017a57602060405160018152f35b600080fd5b3461017a57600036600319011261017a57602061019a61101a565b6040516001600160a01b039091168152f35b3461017a57602036600319011261017a576101c5610c33565b6101cd611de6565b6001600160a01b0316801561022057600580546001600160a01b0319811683179091556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b631e4fbdf760e01b600052600060045260246000fd5b3461017a57602036600319011261017a576001600160a01b03610257610c33565b16600052600a602052602060ff604060002054166040519015158152f35b3461017a57604036600319011261017a5761028e610c33565b602435906001600160a01b038216820361017a5760018060a01b0316600052600160205260406000209060018060a01b03166000526020526020604060002054604051908152f35b3461017a57600036600319011261017a57604051625f8d8f60e81b81526020818061030360048201610f4a565b03817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa801561037d5760009061034a575b602090604051908152f35b506020813d602011610375575b8161036460209383610d1a565b8101031261017a576020905161033f565b3d9150610357565b6040513d6000823e3d90fd5b3461017a57602036600319011261017a5760043560115481101561017a576103b361012091610cb3565b5080549060ff600182015491600281015460018060a01b0360038301541660018060a01b0360048401541691610411600660058601549501549660405198895261040260208a01888316610c83565b8660408a019160081c16610ca6565b6060870152608086015260a0808601919091526001600160a01b03821660c08601521c16151560e0830152610100820152f35b3461017a57604036600319011261017a5761046a610460610c33565b602435903361109f565b602060405160018152f35b3461017a57600036600319011261017a5760405160006004548060011c90600181168015610573575b60208310811461055f5782855290811561053b57506001146104db575b6104d7836104cb81850382610d1a565b60405191829182610bea565b0390f35b91905060046000527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b916000905b808210610521575090915081016020016104cb6104bb565b919260018160209254838588010152019101909291610509565b60ff191660208086019190915291151560051b840190910191506104cb90506104bb565b634e487b7160e01b84526022600452602484fd5b91607f169161049e565b3461017a57600036600319011261017a576005546040516001600160a01b039091168152602090f35b3461017a57600036600319011261017a576105bf611de6565b61001b611e0f565b3461017a5760206105e06105da36610c49565b91610e4c565b604051908152f35b3461017a57600036600319011261017a57610601611de6565b600580546001600160a01b031981169091556000906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461017a57602036600319011261017a576001600160a01b03610666610c33565b1660005260006020526020604060002054604051908152f35b3461017a57600036600319011261017a5760065461069c81610d3c565b906106aa6040519283610d1a565b80825260208201908160066000527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f6000915b83831061073e5784866040519182916020830190602084525180915260408301919060005b818110610710575050500390f35b825180516001600160a01b031685526020908101518186015286955060409094019390920191600101610702565b6002602060019260405161075181610ce8565b848060a01b03865416815284860154838201528152019201920191906106dd565b3461017a57602036600319011261017a5760206105e0610790610c33565b610dfb565b3461017a57600036600319011261017a5760405163441062ed60e01b81526020816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa801561037d5760009061034a57602090604051908152f35b3461017a57600036600319011261017a576020600f54604051908152f35b3461017a57600036600319011261017a576020600854604051908152f35b3461017a57600036600319011261017a5761046a7f0000000000000000000000000000000000000000000000000000000000000000333361194e565b3461017a57600036600319011261017a5760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b3461017a57600036600319011261017a57602060405160128152f35b3461017a57600036600319011261017a576011546108e981610d3c565b906108f76040519283610d1a565b80825260208201908160116000527f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c686000915b8383106109f35784866040519182916020830190602084525180915260408301919060005b81811061095d575050500390f35b9193509160206101206001926101008751805183526109828582015186850190610c83565b61099460408201516040850190610ca6565b60608101516060840152858060a01b036080820151166080840152858060a01b0360a08201511660a0840152858060a01b0360c08201511660c084015260e0810151151560e0840152015161010082015201940191019184939261094f565b60076020600192610a0385610d54565b81520192019201919061092a565b3461017a57610a1f36610c49565b6001600160a01b03831660008181526001602090815260408083203384529091529020549093919291906000198110610a5e575b5061046a935061109f565b838110610acd578415610ab7573315610aa15761046a946000526001602052604060002060018060a01b0333166000526020528360406000209103905584610a53565b634a1406b160e11b600052600060045260246000fd5b63e602df0560e01b600052600060045260246000fd5b8390637dc7a0d960e11b6000523360045260245260445260646000fd5b3461017a57600036600319011261017a576020600254604051908152f35b3461017a57604036600319011261017a5761046a610b24610c33565b6024359033611e3b565b3461017a57600036600319011261017a5760006003548060011c90600181168015610be0575b60208310811461055f5782855290811561053b5750600114610b80576104d7836104cb81850382610d1a565b91905060036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b916000905b808210610bc6575090915081016020016104cb6104bb565b919260018160209254838588010152019101909291610bae565b91607f1691610b54565b91909160208152825180602083015260005b818110610c1d575060409293506000838284010152601f8019910116010190565b8060208092870101516040828601015201610bfc565b600435906001600160a01b038216820361017a57565b606090600319011261017a576004356001600160a01b038116810361017a57906024356001600160a01b038116810361017a579060443590565b906005821015610c905752565b634e487b7160e01b600052602160045260246000fd5b906003821015610c905752565b601154811015610cd25760116000526007602060002091020190600090565b634e487b7160e01b600052603260045260246000fd5b6040810190811067ffffffffffffffff821117610d0457604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff821117610d0457604052565b67ffffffffffffffff8111610d045760051b60200190565b90604051610120810181811067ffffffffffffffff821117610d0457604052809280548252600181015460ff8116906005821015610c905760ff91602085015260081c166003811015610c905760408301526002810154606083015260038101546001600160a01b0390811660808401526004820154811660a080850191909152600583015491821660c08501521c60ff16151560e0830152600601546101009190910152565b6001600160a01b0381166000908152600a602052604090205460ff16610e2757610e2490611d3d565b90565b50600090565b600654811015610cd257600660005260206000209060011b0190600090565b91610e58600191610e2d565b5001546001600160a01b039283166000818152600b6020908152604080832095871680845295825291829020549151632faa847360e01b815260048101939093526024830194909452306044830152606482019290925260848101919091527f000000000000000000000000000000000000000000000000000000000000000060a482015291829060c49082907f0000000000000000000000000000000000000000000000000000000000000000165afa90811561037d57600091610f1b575090565b90506020813d602011610f42575b81610f3660209383610d1a565b8101031261017a575190565b3d9150610f29565b60406020820191602081526011548093520190601160005260206000209060005b818110610f785750505090565b909192600761012060019286548152610fae84880154610f9e6020840160ff8316610c83565b60ff604084019160081c16610ca6565b60028701546060820152600387015460a085811b86900391821660808401526004890154821681840152600589015491821660c08401521c60ff16151560e08201526006870154610100820152019401929101610f6b565b51906001600160a01b038216820361017a57565b6040516327ab5d0f60e01b81526020816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa90811561037d5760009161106b575090565b90506020813d602011611097575b8161108660209383610d1a565b8101031261017a57610e2490611006565b3d9150611079565b9190918260105461ff00198116601055601154159081156117b7575b81156117ab575b50801561179f575b611761576110d790611f67565b8061173e575b611716575b600e8290556001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811694937f0000000000000000000000000000000000000000000000000000000000000000909116906000807f00000000000000000000000000000000000000000000000000000000000000001515815b6011548310156113c65761117d61117784610cb3565b50610d54565b92606084015191600460208d6040519283809263441062ed60e01b82525afa90811561037d57600091611392575b5060405193632b8d28ef60e21b85528b600486015260248501526044840152836064840152612710608484015260408360a4818b5afa90811561037d576000938492611357575b50906112018461120793611fe4565b96611fe4565b93604081018051906003821015610c905760009161123657505061122e906001938a61278d565b019192611161565b8051600381101561134357600114806112c2575b1561126357505061125e906001938a61278d565b61122e565b939293519060038210156112ae57506001939291906002148061129e575b61128d575b505061122e565b611297918a61278d565b3880611286565b506112a9888b611ffe565b611281565b634e487b7160e01b81526021600452602490fd5b50604051636468b51760e01b81526001600160a01b038c811660048301528a1660248201523060448201526020816064818e5afa90811561133857839161130a575b5061124a565b61132b915060203d8111611331575b6113238183610d1a565b810190611936565b38611304565b503d611319565b6040513d85823e3d90fd5b634e487b7160e01b83526021600452602483fd5b611201945061120792506113819060403d811161138b575b6113798183610d1a565b81019061217b565b90949092506111f2565b503d61136f565b906020823d82116113be575b816113ab60209383610d1a565b810103126113bb575051386111ab565b80fd5b3d915061139e565b9150506113e2939697506113dd91929495836116bf575b611ff1565b916020604051809563ca497e2360e01b8252818061140260048201610f4a565b03915afa801561037d576114ac946000916116a0575b5080611694575b80611687575b80611677575b61165b575b7f000000000000000000000000000000000000000000000000000000000000000061162b575b7f00000000000000000000000000000000000000000000000000000000000000006114cb575b7f0000000000000000000000000000000000000000000000000000000000000000806114bb575b6114ae57611ea2565b565b6114b6612191565b611ea2565b506114c68282611ffe565b6114a3565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0382811690841660008282036115d6575081600052600a60205260ff604060002054166000146115c85760005b6000915b61152d85611d3d565b6008546001600160a01b0387166000908152600960205260408082208390559681528681208290559283529490912093909355806115aa575b508061158c575b508061157b575b505061147c565b6115859130611ea2565b3880611574565b61159585611f67565b61156d576115a4908530611ea2565b3861156d565b6115b385611f67565b611566576115c2908530611ea2565b38611566565b6115d184610dfb565b611520565b828152600a602052604081205460ff161561161c575b81600052600a60205260ff6040600020541660001461160e5760005b91611524565b61161786610dfb565b611608565b5061162684610dfb565b6115ec565b6116567f0000000000000000000000000000000000000000000000000000000000000000838361194e565b611456565b611663611e0f565b61010061ff00196010541617601055611430565b5060ff60105460081c161561142b565b5060ff600c541615611425565b5060ff6010541661141f565b6116b9915060203d602011611331576113238183610d1a565b38611418565b7f000000000000000000000000000000000000000000000000000000000000000015611704576116f0843089611ea2565b6116fc84600f54611fe4565b600f55611ff1565b6113dd8461171061101a565b89611ea2565b6001600160a01b0383166000908152600a60205260409020805460ff191660011790556110e2565b506001600160a01b0383166000908152600a602052604090205460ff16156110dd565b61176b9291611ea2565b6010549060ff821615908161178f575b506117835750565b60ff1916600117601055565b6117999150611f67565b3861177b565b5060ff600c54166110ca565b60ff91501615386110c2565b60405163fa88ad5760e01b81526001600160a01b03858116600483015287811660248301527f0000000000000000000000000000000000000000000000000000000000000000811660448301527f000000000000000000000000000000000000000000000000000000000000000081166064830152306084830152909350909150602090839060a49082907f0000000000000000000000000000000000000000000000000000000000000000165afa801561037d57859260009161187d575b50906110bb565b611896915060203d602011611331576113238183610d1a565b38611876565b8054821015610cd25760005260206000200190600090565b90815491600160401b831015610d0457826118d79160016114ac9501815561189c565b90919082549060031b91821b91600019901b1916179055565b805115610cd25760200190565b8051821015610cd25760209160051b010190565b60001981146119205760010190565b634e487b7160e01b600052601160045260246000fd5b9081602091031261017a5751801515810361017a5790565b9260009260809290916060905b600654861015611d34575b6001600160a01b03871660008181526007602052604090205487106119ae5760005260076020526119a9604060002060016119a089610e2d565b500154906118b4565b611966565b5093909192935b6001600160a01b03841660008181526007602052604090205487106119f45760005260076020526119ef604060002060016119a089610e2d565b6119b5565b5093909192935b6001600160a01b0382166000818152600760205260409020548710611a3a576000526007602052611a35604060002060016119a089610e2d565b6119fb565b506001600160a01b0387166000818152600a602052604090205491969395929492939160ff1615611d10576000905b6000906001600160a01b03861682818303611ccd575b6001600160a01b038916918383141580611cc3575b611c7c575b60405194611aa78c87610d1a565b600386528836602088013760405194611ac08d87610d1a565b600386528936602088013760009780611c33575b505080611be7575b505080611b95575b505060005b838110611afd57505050506001019461195b565b600190611b696020611b0e88610e2d565b505460a085901b85900390811690611b2685886118fd565b511690611b3385896118fd565b5160405163a9059cbb60e01b81526001600160a01b03909316600484015260248301529092839190829060009082906044820190565b03925af1611b79575b5001611ae9565b611b909060203d8111611331576113238183610d1a565b611b72565b84611bba91611ba8611be09497876118fd565b5285611bb482866118fd565b52611911565b936001611bc687610e2d565b5001549060005260076020526118d786604060002061189c565b3880611ae4565b86611c0691611bfa611c2c9499896118fd565b5287611bb482886118fd565b956001611c1289610e2d565b5001549060005260076020526118d788604060002061189c565b3880611adc565b909750611c3f876118f0565b5286611c4a866118f0565b52611c7560019788611c5b8b610e2d565b5001549060005260076020526118d78a604060002061189c565b3880611ad4565b905081600052600a60205260ff60406000205416600014611ca05760005b90611a99565b611cbe86611cad81610e2d565b50546001600160a01b03168b610e4c565b611c9a565b5082811415611a94565b92818152600a60205260ff604082205416600014611cec575b92611a7f565b50611d0b85611cfa81610e2d565b50546001600160a01b031689610e4c565b611ce6565b611d2e82611d1d81610e2d565b50546001600160a01b03168a610e4c565b90611a69565b95505050505050565b6008549060018060a01b0316908160005260096020526040600020549060405192631d2fa43b60e11b84526004840152306024840152604483015260648201527f0000000000000000000000000000000000000000000000000000000000000000608482015260208160a48160018060a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa90811561037d57600091610f1b575090565b6005546001600160a01b03163303611dfa57565b63118cdaa760e01b6000523360045260246000fd5b600c5460ff8116611e385760ff1916600117600c55611e2c61230a565b60ff19600c5416600c55565b50565b6001600160a01b0316908115610ab7576001600160a01b0316918215610aa15760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260018252604060002085600052825280604060002055604051908152a3565b6001600160a01b0316908115611f51576001600160a01b0316918215611f3b576000828152806020526040812054828110611f215791604082827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef958760209652828652038282205586815280845220818154019055604051908152a3565b916064928463391434e360e21b8452600452602452604452fd5b63ec442f0560e01b600052600060045260246000fd5b634b637e8f60e11b600052600060045260246000fd5b604051630d5c7b5d60e41b81526001600160a01b03918216600482015230602482015290602090829060449082907f0000000000000000000000000000000000000000000000000000000000000000165afa90811561037d57600091611fcb575090565b610e24915060203d602011611331576113238183610d1a565b9190820180921161192057565b9190820391821161192057565b60405163154b004960e31b81526001600160a01b03918216600482015291166024820152306044820152602081806064810103817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa90811561037d57600091611fcb575090565b919082604091031261017a57610e24602061208a84611006565b9301611006565b608090606081019260018060a01b0316815273a1077a294dde1b09bb078844df40758a5d0f9a27602082015260606040820152600d548093520190600d60005260206000209060005b8181106120e75750505090565b82546001600160a01b03168452602090930192600192830192016120da565b608090606081019273a1077a294dde1b09bb078844df40758a5d0f9a27825260018060a01b0316602082015260606040820152600d548093520190600d60005260206000209060005b81811061215c5750505090565b82546001600160a01b031684526020909301926001928301920161214f565b919082604091031261017a576020825192015190565b600f548015611e385760408051632a8ddb2f60e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031692909182806121e43060048301612091565b0381865afa91821561037d576000926122a4575b506001600160a01b0382161561229f576040906044600e54918351958693849263059b6d4760e21b8452600484015260248301525afa801561037d57600092600091612278575b50600f5561225f908261225061101a565b612259306129f4565b92612ad3565b156122675750565b61227390600f54611fe4565b600f55565b61225f929350612297915060403d60401161138b576113798183610d1a565b90929161223f565b505050565b6122c791925060403d6040116122d0575b6122bf8183610d1a565b810190612070565b905090386121f8565b503d6122b5565b8181029291811591840414171561192057565b81156122f4570490565b634e487b7160e01b600052601260045260246000fd5b600090816011549061231b82610d3c565b906123296040519283610d1a565b828252601f1961233884610d3c565b0136602084013761234883610d3c565b926123566040519485610d1a565b808452612365601f1991610d3c565b01366020850137845b6011548110156124e65761238181610cb3565b5060068101549081156124dc5760ff600182015416600581101580610c9057600182149283156124b2575b5082156124a1575b50506123c6575b506001905b0161236e565b600e546040805163059b6d4760e21b815260048101939093526024830191909152816044817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa90811561037d576000908192612480575b5080612448575b5090600191600661243f83610cb3565b500155906123bb565b6124726124789184939599600161246081978a6118fd565b528161246c868b6118fd565b52611fe4565b97611911565b92909161242f565b905061249a915060403d811161138b576113798183610d1a565b9038612428565b909150610c905760041438806123b4565b60009350600283149150816124ca575b5091386123ac565b60ff91506005015460a01c16386124c2565b50506001906123c0565b509392939190918315908115612784575b5061229f5760408051632a8ddb2f60e01b815290818061251a3060048301612091565b03817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa90811561037d57600091612763575b506001600160a01b038116156126cf5761257d9084612575306129f4565b913090612b8f565b15612709576040516370a0823160e01b81523060048201529160208360248173a1077a294dde1b09bb078844df40758a5d0f9a275afa92831561037d576000936126d5575b5082156126cf5760005b6011548110156126c8576125e081836118fd565b511580156126b6575b6126ae5761260a85612605866125ff85886118fd565b516122d7565b6122ea565b9061261481610cb3565b5060ff600182015416926005841015610c905760019384810361264a575061263e61264492610d54565b9061318c565b016125cc565b6000600282148061269d575b1561267457505061266961266f92610d54565b90612fd1565b612644565b50600414612684575b5050612644565b61269061269692610d54565b90612c2e565b388061267d565b5060ff600585015460a01c16612656565b600190612644565b506126c181846118fd565b51156125e9565b5050505050565b50505050565b90926020823d602011612701575b816126f060209383610d1a565b810103126113bb57505191386125c2565b3d91506126e3565b9092915060005b60115481101561275d5780612727600192866118fd565b51612733575b01612710565b61273d81846118fd565b51612756600661274c84610cb3565b5001918254611fe4565b905561272d565b50509050565b61277c915060403d6040116122d0576122bf8183610d1a565b905038612557565b905015386124f7565b60208301928351936005851015610c905760009461283a5750506001600160a01b03169081156128265781835282602052604083205481811061280d57817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef926020928587528684520360408620558060025403600255604051908152a3565b6064939263391434e360e21b8452600452602452604452fd5b634b637e8f60e11b83526004839052602483fd5b809492939451600581101561295e57859291906003036128c35750506128659061287a933090611ea2565b60406002549130815280602052205490611ff1565b9081612884575050565b6128be916126056128b6927f0000000000000000000000000000000000000000000000000000000000000000906122d7565b600854611fe4565b600855565b8091949392505160058110156113435760020361291d57505060e0820151156129055761274c612901926128fb856006943090611ea2565b51610cb3565b9055565b6114ac9291608060018060a01b039101511690611ea2565b809492945160058110156113435760010361293d5750506114ac926133dd565b519060058210156112ae575060041461295557505050565b6114ac926133dd565b634e487b7160e01b84526021600452602484fd5b60208183031261017a5780519067ffffffffffffffff821161017a57019080601f8301121561017a5781516129a681610d3c565b926129b46040519485610d1a565b81845260208085019260051b82010192831161017a57602001905b8282106129dc5750505090565b602080916129e984611006565b8152019101906129cf565b6040516343d7ef9f60e11b81526001600160a01b03918216600482015290600090829060249082907f0000000000000000000000000000000000000000000000000000000000000000165afa90811561037d57600091612a52575090565b610e2491503d806000833e612a678183610d1a565b810190612972565b60a091936020936080830195600180861b03168352600180851b03168483015260408201526080606082015284518094520192019060005b818110612ab45750505090565b82516001600160a01b0316845260209384019390920191600101612aa7565b93929160009181158015612b7e575b612b76577f0000000000000000000000000000000000000000000000000000000000000000612b12838230611e3b565b6001600160a01b031690813b15612b72578380959697612b4860405198899687958694630309079d60e31b865260048601612a6f565b03925af19182612b62575b5090612b5c5790565b50600190565b81612b6c91610d1a565b38612b53565b8380fd5b509093505050565b506001600160a01b03861615612ae2565b90929180158015612c1d575b612c14577f0000000000000000000000000000000000000000000000000000000000000000612bcb828230611e3b565b6001600160a01b031692833b1561017a57612bf991604051958694637e18437960e01b865260048601612a6f565b03825a9181600080958195f19182612b62575090612b5c5790565b50505050600090565b506001600160a01b03821615612b9b565b9190600090831561275d5760a00180516001600160a01b031673a1077a294dde1b09bb078844df40758a5d0f9a278114612f7d5750805160408051632a8ddb2f60e01b81529182908190612c8e906001600160a01b031660048301612106565b03817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa908115611338578391612f5c575b5060405163095ea7b360e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0381166004830152602482018790529095906020876044818873a1077a294dde1b09bb078844df40758a5d0f9a275af1968715612f51578596976024959650612f34575b5084516040516370a0823160e01b81523060048201529460209186919082906001600160a01b03165afa938415612f29578694612ef1575b5084516001600160a01b039182169291612d9691166134da565b92823b15612eed5791612dc6939187809460405196879586948593637e18437960e01b8552309060048601612a6f565b03925af19081612ed9575b50612ddb57505050565b81516040516370a0823160e01b81523060048201529190602090839060249082906001600160a01b03165afa8015612ece578490612e9a575b612e1e9250611ff1565b9081612e2957505050565b51612e5690612e40906001600160a01b031661340e565b9260406002549130815280602052205490611ff1565b90811561229f5761274c612e94612901936126056001947f0000000000000000000000000000000000000000000000000000000000000000906122d7565b93610e2d565b506020823d602011612ec6575b81612eb460209383610d1a565b8101031261017a57612e1e9151612e14565b3d9150612ea7565b6040513d86823e3d90fd5b84612ee691959295610d1a565b9238612dd1565b8680fd5b9093506020813d602011612f21575b81612f0d60209383610d1a565b81010312612f1d57519238612d7c565b8580fd5b3d9150612f00565b6040513d88823e3d90fd5b612f4c9060203d602011611331576113238183610d1a565b612d44565b6040513d87823e3d90fd5b612f75915060403d6040116122d0576122bf8183610d1a565b905038612cca565b612f8f9150612e40909492939461340e565b9081612f9a57505050565b61274c612e94612901936126056001947f0000000000000000000000000000000000000000000000000000000000000000906122d7565b90600090821561229f5773a1077a294dde1b09bb078844df40758a5d0f9a273b1561318857604051632e1a7d4d60e01b81526004810184905282816024818373a1077a294dde1b09bb078844df40758a5d0f9a275af19081613174575b506130b2576080015160405163a9059cbb60e01b81526001600160a01b039091166004820152602481019290925260208280604481015b03818473a1077a294dde1b09bb078844df40758a5d0f9a275af19081156130a6575061308e5750565b611e389060203d602011611331576113238183610d1a565b604051903d90823e3d90fd5b608001818080808660018060a01b038651165af13d1561316f573d67ffffffffffffffff811161315b57604051906130f4601f8201601f191660200183610d1a565b81528360203d92013e5b1561310857505050565b5160405163a9059cbb60e01b81526001600160a01b03909116600482015260248101929092526020826044818473a1077a294dde1b09bb078844df40758a5d0f9a275af19081156130a6575061308e5750565b634e487b7160e01b84526041600452602484fd5b6130fe565b8361318191949294610d1a565b913861302e565b5080fd5b90600090821561229f5760a0810180519091906001600160a01b031673a1077a294dde1b09bb078844df40758a5d0f9a271461338657815160408051632a8ddb2f60e01b81529291839081906131ee906001600160a01b031660048301612106565b03817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa918215612ece578492613363575b5060405163095ea7b360e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b038116600483015260248201879052906020816044818973a1077a294dde1b09bb078844df40758a5d0f9a275af18015612f29579060809291613346575b5091018051935190936001600160a01b0392831692908116916132c191166134da565b92823b15612f1d579186918680946132ef60405197889687958694637e18437960e01b865260048601612a6f565b03925af19081613332575b5061229f575160405163a9059cbb60e01b81526001600160a01b03909116600482015260248101929092526020828060448101613065565b8361333f91949294610d1a565b91386132fa565b61335e9060203d602011611331576113238183610d1a565b61329e565b61337d91925060403d6040116122d0576122bf8183610d1a565b9050903861322a565b6080015160405163a9059cbb60e01b81526001600160a01b0390911660048201526024810193909352506020826044818473a1077a294dde1b09bb078844df40758a5d0f9a275af19081156130a6575061308e5750565b61274c82936128fb61340094600694600160ff19600c541617600c553090611ea2565b905560ff19600c5416600c55565b6006549060005b8281106134af57506040519061342a82610ce8565b6001600160a01b0316815260006020820190815291600160401b811015610d045780600161345b9201600655610e2d565b92909261349957905182546001600160a01b0319166001600160a01b0391909116178255516001919091015560065460001981019081116119205790565b634e487b7160e01b600052600060045260246000fd5b6134b881610e2d565b50546001600160a01b038381169116146134d457600101613415565b91505090565b6040516377a9efe360e11b81526001600160a01b03918216600482015290600090829060249082907f0000000000000000000000000000000000000000000000000000000000000000165afa90811561037d57600091612a5257509056fea264697066735822122030825c5b589300ce921707b920a77bb82678897bec1e0773e64166e27ac8cbc464736f6c634300081c003331ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c68d7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb5a2646970667358221220a84af224a40d9b7f5a0dd57cf5bc3f5d8807fd559983accdc82c4612f5725f4064736f6c634300081c0033