Overview
S Balance
S Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Name:
Router
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "./TweetToken.sol"; import "./TweetPool.sol"; import "./RewardManager.sol"; import "./MigratorManager.sol"; import "./FeeManager.sol"; import "./ConfigManager.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract Router is Ownable { using SafeERC20 for IERC20; // State Variables ConfigManager public configManager; FeeManager public feeManager; RewardManager public rewardManager; IERC20 public susdToken; uint256 public poolId; // Events event TweetPoolCreated(uint256 poolId); event TweetPoolBought(uint256 indexed poolId, address buyer, uint256 tokenAmount); event TweetPoolSold(uint256 indexed poolId, address seller, uint256 dollarAmount); event TweetPoolGraduated(uint256 indexed poolId); // Mappings mapping(uint256 => address) public poolIdToTweetPool; mapping(string => mapping(string => uint256)) public tweetPoolId; mapping(string => mapping(string => bool)) public tweetPoolExists; constructor(address _configManager) Ownable(msg.sender) { poolId = 0; configManager = ConfigManager(_configManager); } // View functions function viewBuyOrder(uint256 _poolId, uint256 _dollarIn) public view returns(uint256 fee_, uint256 tokenOut_, uint256 newDollarReserve_, uint256 newTokenReserve_) { require(_dollarIn >= configManager.minPurchaseAmount(), "Router: Amount too small"); TweetPool tweetPool = TweetPool(poolIdToTweetPool[_poolId]); (uint256 feeRate,,, ) = feeManager.getFeeInfo(tweetPool.virtualDollarReserve()); // Calculate fee and net input uint256 totalFee = (_dollarIn * feeRate) / 10000; uint256 netDollarIn = _dollarIn - totalFee; // Calculate AMM swap uint256 k = tweetPool.virtualDollarReserve() * tweetPool.tweetTokenReserve(); uint256 newDollarReserve = tweetPool.virtualDollarReserve() + netDollarIn; uint256 newTokenReserve = k / newDollarReserve; uint256 tokenOut = tweetPool.tweetTokenReserve() - newTokenReserve; return (totalFee, tokenOut, newDollarReserve, newTokenReserve); } function viewSellOrder(uint256 _poolId, uint256 _tokenIn) public view returns(uint256 fee_, uint256 dollarOut_, uint256 newDollarReserve_, uint256 newTokenReserve_) { TweetPool tweetPool = TweetPool(poolIdToTweetPool[_poolId]); (uint256 feeRate,,, ) = feeManager.getFeeInfo(tweetPool.virtualDollarReserve()); // Calculate AMM swap uint256 k = tweetPool.virtualDollarReserve() * tweetPool.tweetTokenReserve(); uint256 newTokenReserve = tweetPool.tweetTokenReserve() + _tokenIn; uint256 newDollarReserve = k / newTokenReserve; uint256 grossDollarOut = tweetPool.virtualDollarReserve() - newDollarReserve; // Calculate fee and net output uint256 fee = (grossDollarOut * feeRate) / 10000; uint256 netDollarOut = grossDollarOut - fee; return (fee, netDollarOut, newDollarReserve, newTokenReserve); } // State-changing functions function createTweetToken( string calldata tweetId, string calldata tweetUserId) external returns(uint256) { require(!tweetPoolExists[tweetId][tweetUserId], "Router: TweetToken already exists"); // Check allowance and transfer 0.001 SUSD to platform require(IERC20(configManager.susdToken()).allowance(msg.sender, address(this)) >= configManager.creationFee(), "Router: insufficient allowance for platform fee"); require(IERC20(configManager.susdToken()).transferFrom(msg.sender, configManager.platformWallet(), configManager.creationFee()), "Router: platform fee transfer failed"); // Deploy TweetToken TweetToken tweetToken = new TweetToken(tweetId, tweetUserId); // Deploy TweetPool TweetPool tweetPool = new TweetPool( tweetId, address(tweetToken), address(this), tweetUserId, msg.sender, configManager.inactivePoolThreshold(), address(configManager) ); poolId++; poolIdToTweetPool[poolId] = address(tweetPool); tweetPoolId[tweetId][tweetUserId] = poolId; tweetPoolExists[tweetId][tweetUserId] = true; emit TweetPoolCreated(poolId); return poolId; } function buyTweetToken( uint256 _poolId, uint256 _dollarIn ) external { require(_dollarIn >= configManager.minPurchaseAmount(), "Router: Amount too small"); require(IERC20(configManager.susdToken()).transferFrom(msg.sender, address(this), _dollarIn), "Router: SUSD transfer failed"); require(0 < _poolId && _poolId <= poolId, "Router: Pool does not exist"); TweetPool tweetPool = TweetPool(poolIdToTweetPool[_poolId]); require(tweetPool.isGraduated() == false, "Router: Pool is not graduated yet"); // Calculate fees and rewards _handleBuyFees(tweetPool, _dollarIn); // Calculate token amount out using AMM strategy and update balances (uint256 tokenAmountOut, uint256 newDollarReserve) = _handleBuyAMM(tweetPool, _poolId, _dollarIn); // Transfer tokens to buyer require(TweetToken(tweetPool.tweetToken()).transfer(msg.sender, tokenAmountOut), "Router: token transfer failed"); // Update timestamp and emit event tweetPool.updateLastBuyTimestamp(); emit TweetPoolBought(_poolId, msg.sender, tokenAmountOut); // Check for graduation if (newDollarReserve >= configManager.GRADUATE_THRESHOLD()) { _handleGraduation(tweetPool, newDollarReserve); } } function _handleBuyFees(TweetPool tweetPool, uint256 dollarAmount) private { (uint256 tradeFee, uint256 creatorShare, uint256 deployerShare, uint256 platformShare) = feeManager.getFeeInfo(tweetPool.virtualDollarReserve()); uint256 fees = dollarAmount * tradeFee / 10_000; uint256 platformFeeAmount = fees * platformShare / 10_000; uint256 creatorFeeAmount = fees * creatorShare / 10_000; uint256 deployerFeeAmount = fees * deployerShare / 10_000; uint256 rewardFeeAmount = creatorFeeAmount + deployerFeeAmount; IERC20(configManager.susdToken()).transfer(configManager.platformWallet(), platformFeeAmount); IERC20(configManager.susdToken()).transfer(address(rewardManager), rewardFeeAmount); rewardManager.depositRewards( tweetPool.tweetUserId(), creatorFeeAmount, tweetPool.deployerAddress(), deployerFeeAmount ); } function _handleBuyAMM(TweetPool tweetPool, uint256 _poolId, uint256 dollarAmount) private returns (uint256 tokenAmountOut, uint256 newVirtualDollarReserve) { (uint256 fees, uint256 _tokenAmountOut, uint256 _newVirtualDollarReserve, uint256 newTweetTokenReserve) = viewBuyOrder(_poolId, dollarAmount); tweetPool.updateBalances(_newVirtualDollarReserve, newTweetTokenReserve); return (_tokenAmountOut, _newVirtualDollarReserve); } function _handleGraduation(TweetPool tweetPool, uint256 newVirtualDollarReserve) private { tweetPool.setGraduated(); uint256 graduatePoolDollar = newVirtualDollarReserve - 10_000 * 1e6; uint256 graduatePoolToken = tweetPool.tweetTokenReserve(); MigratorManager migratorManager = MigratorManager(configManager.migratorManager()); IERC20(tweetPool.tweetToken()).transfer(address(migratorManager), graduatePoolToken); IERC20(configManager.susdToken()).transfer(address(migratorManager), graduatePoolDollar); emit TweetPoolGraduated(poolId); } function sellTweetToken( uint256 _poolId, uint256 _amountIn ) external { address tweetPoolAddress = poolIdToTweetPool[_poolId]; TweetPool tweetPool = TweetPool(tweetPoolAddress); TweetToken tweetToken = TweetToken(tweetPool.tweetToken()); require(tweetToken.balanceOf(msg.sender) >= _amountIn, "Router: insufficient tweet token balance"); require(tweetToken.allowance(msg.sender, address(this)) >= _amountIn, "Router: insufficient allowance"); require(tweetPool.isGraduated() == false, "Router: Pool is not graduated yet"); // Handle fees and AMM calculations (uint256 dollarAmountOut, uint256 newVirtualDollarReserve) = _handleSellAMM(tweetPool, _poolId, _amountIn); require(dollarAmountOut >= configManager.minPurchaseAmount(), "Router: Insufficient output amount"); // Transfer tokens from seller require(tweetToken.transferFrom(msg.sender, address(this), _amountIn), "Router: tweet token transfer failed"); // Handle fees and rewards _handleSellFees(tweetPool, dollarAmountOut); // Transfer SUSD to seller require(susdToken.transfer(msg.sender, dollarAmountOut), "Router: SUSD transfer failed"); // Update timestamp and emit event tweetPool.updateLastSellTimestamp(); emit TweetPoolSold(_poolId, msg.sender, dollarAmountOut); } function _handleSellFees(TweetPool tweetPool, uint256 dollarAmount) private { (uint256 tradeFee, uint256 creatorShare, uint256 deployerShare, uint256 platformShare) = feeManager.getFeeInfo(tweetPool.virtualDollarReserve()); uint256 fees = dollarAmount * tradeFee / 10_000; uint256 platformFeeAmount = fees * platformShare / 10_000; uint256 creatorFeeAmount = fees * creatorShare / 10_000; uint256 deployerFeeAmount = fees * deployerShare / 10_000; uint256 rewardFeeAmount = creatorFeeAmount + deployerFeeAmount; IERC20(configManager.susdToken()).transfer(configManager.platformWallet(), platformFeeAmount); IERC20(configManager.susdToken()).transfer(address(rewardManager), rewardFeeAmount); rewardManager.depositRewards( tweetPool.tweetUserId(), creatorFeeAmount, tweetPool.deployerAddress(), deployerFeeAmount ); } function _handleSellAMM(TweetPool tweetPool, uint256 _poolId, uint256 tokenAmount) private returns (uint256 dollarAmountOut, uint256 newVirtualDollarReserve) { (uint256 fees, uint256 _dollarAmountOut, uint256 _newVirtualDollarReserve, uint256 newTweetTokenReserve) = viewSellOrder(_poolId, tokenAmount); tweetPool.updateBalances(_newVirtualDollarReserve, newTweetTokenReserve); return (_dollarAmountOut, _newVirtualDollarReserve); } // Admin functions function setConfigAddress(address _configAddress) external onlyOwner { configManager = ConfigManager(_configAddress); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol) pragma solidity ^0.8.20; import {IERC20} from "./IERC20.sol"; import {IERC165} from "./IERC165.sol"; /** * @title IERC1363 * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363]. * * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction. */ interface IERC1363 is IERC20, IERC165 { /* * Note: the ERC-165 identifier for this interface is 0xb0202a11. * 0xb0202a11 === * bytes4(keccak256('transferAndCall(address,uint256)')) ^ * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^ * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^ * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^ * bytes4(keccak256('approveAndCall(address,uint256)')) ^ * bytes4(keccak256('approveAndCall(address,uint256,bytes)')) */ /** * @dev Moves a `value` amount of tokens from the caller's account to `to` * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferAndCall(address to, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from the caller's account to `to` * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @param data Additional data with no specified format, sent in call to `to`. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param from The address which you want to send tokens from. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferFromAndCall(address from, address to, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param from The address which you want to send tokens from. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @param data Additional data with no specified format, sent in call to `to`. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`. * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function approveAndCall(address spender, uint256 value) external returns (bool); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`. * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. * @param data Additional data with no specified format, sent in call to `spender`. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "../utils/introspection/IERC165.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../token/ERC20/IERC20.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.2.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "./IERC20.sol"; import {IERC20Metadata} from "./extensions/IERC20Metadata.sol"; import {Context} from "../../utils/Context.sol"; import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * * TIP: For a detailed writeup see our guide * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * The default value of {decimals} is 18. To change this, you should override * this function so it returns a different value. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of 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 { 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); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Burnable.sol) pragma solidity ^0.8.20; import {ERC20} from "../ERC20.sol"; import {Context} from "../../../utils/Context.sol"; /** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */ abstract contract ERC20Burnable is Context, ERC20 { /** * @dev Destroys a `value` amount of tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 value) public virtual { _burn(_msgSender(), value); } /** * @dev Destroys a `value` amount of tokens from `account`, deducting from * the caller's allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `value`. */ function burnFrom(address account, uint256 value) public virtual { _spendAllowance(account, _msgSender(), value); _burn(account, value); } }
// 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); }
// 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.2.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; import {IERC1363} from "../../../interfaces/IERC1363.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC-20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { /** * @dev An operation with an ERC-20 token failed. */ error SafeERC20FailedOperation(address token); /** * @dev Indicates a failed `decreaseAllowance` request. */ error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease); /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value))); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value))); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. * * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client" * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); forceApprove(token, spender, oldAllowance + value); } /** * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no * value, non-reverting calls are assumed to be successful. * * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client" * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal { unchecked { uint256 currentAllowance = token.allowance(address(this), spender); if (currentAllowance < requestedDecrease) { revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease); } forceApprove(token, spender, currentAllowance - requestedDecrease); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. * * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function * only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being * set here. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value)); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0))); _callOptionalReturn(token, approvalCall); } } /** * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when * targeting contracts. * * Reverts if the returned value is other than `true`. */ function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal { if (to.code.length == 0) { safeTransfer(token, to, value); } else if (!token.transferAndCall(to, value, data)) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when * targeting contracts. * * Reverts if the returned value is other than `true`. */ function transferFromAndCallRelaxed( IERC1363 token, address from, address to, uint256 value, bytes memory data ) internal { if (to.code.length == 0) { safeTransferFrom(token, from, to, value); } else if (!token.transferFromAndCall(from, to, value, data)) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when * targeting contracts. * * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}. * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall} * once without retrying, and relies on the returned value to be true. * * Reverts if the returned value is other than `true`. */ function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal { if (to.code.length == 0) { forceApprove(token, to, value); } else if (!token.approveAndCall(to, value, data)) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements. */ function _callOptionalReturn(IERC20 token, bytes memory data) private { uint256 returnSize; uint256 returnValue; assembly ("memory-safe") { let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20) // bubble errors if iszero(success) { let ptr := mload(0x40) returndatacopy(ptr, 0, returndatasize()) revert(ptr, returndatasize()) } returnSize := returndatasize() returnValue := mload(0) } if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { bool success; uint256 returnSize; uint256 returnValue; assembly ("memory-safe") { success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20) returnSize := returndatasize() returnValue := mload(0) } return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.20; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS } /** * @dev The signature derives the `address(0)`. */ error ECDSAInvalidSignature(); /** * @dev The signature has an invalid length. */ error ECDSAInvalidSignatureLength(uint256 length); /** * @dev The signature has an S value that is in the upper half order. */ error ECDSAInvalidSignatureS(bytes32 s); /** * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not * return address(0) without also returning an error description. Errors are documented using an enum (error type) * and a bytes32 providing additional information about the error. * * If no error is returned, then the address can be used for verification purposes. * * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] */ function tryRecover( bytes32 hash, bytes memory signature ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly ("memory-safe") { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length)); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature); _throwError(error, errorArg); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[ERC-2098 short signatures] */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) { unchecked { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); // We do not check for an overflow here since the shift operation results in 0 or 1. uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. */ function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs); _throwError(error, errorArg); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS, s); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature, bytes32(0)); } return (signer, RecoverError.NoError, bytes32(0)); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s); _throwError(error, errorArg); return recovered; } /** * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided. */ function _throwError(RecoverError error, bytes32 errorArg) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert ECDSAInvalidSignature(); } else if (error == RecoverError.InvalidSignatureLength) { revert ECDSAInvalidSignatureLength(uint256(errorArg)); } else if (error == RecoverError.InvalidSignatureS) { revert ECDSAInvalidSignatureS(errorArg); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[ERC]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "@openzeppelin/contracts/access/Ownable.sol"; contract ConfigManager is Ownable { address public platformWallet; address public susdToken; address public boomToken; address public feeManager; address public migratorManager; address public rewardManager; address public graduateFactory; address public graduateRouter; address public router; uint256 public minPurchaseAmount; uint256 public inactivePoolThreshold; uint256 public creationFee; // Constants for virtual dollar thresholds uint256 public constant START_THRESHOLD = 10_000 * 1e6; // 10,000 virtual dollars uint256 public constant FAMOUS_THRESHOLD = 20_000 * 1e6; // 20,000 virtual dollars uint256 public constant VIRAL_THRESHOLD = 40_000 * 1e6; // 40,000 virtual dollars uint256 public constant GRADUATE_THRESHOLD = 80_000 * 1e6; // 80,000 virtual dollars constructor() Ownable(msg.sender) { inactivePoolThreshold = 24 hours; minPurchaseAmount = 1 * 1e6; // 1 SUSD (1,000,000 base units) creationFee = 1_000; // 0.001 SUSD in base units } function setAddresses( address _platformWallet, address _susdToken, address _boomToken, address _feeManager, address _migratorManager, address _rewardManager, address _router ) public onlyOwner { platformWallet = _platformWallet; susdToken = _susdToken; boomToken = _boomToken; feeManager = _feeManager; migratorManager = _migratorManager; rewardManager = _rewardManager; router = _router; } function setParameters( uint256 _minPurchaseAmount, uint256 _inactivePoolThreshold, uint256 _creationFee ) public onlyOwner { minPurchaseAmount = _minPurchaseAmount; inactivePoolThreshold = _inactivePoolThreshold; creationFee = _creationFee; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./RewardManager.sol"; import "./Router.sol"; import "./ConfigManager.sol"; contract FeeManager is Ownable { ConfigManager public configManager; // Fee rates for each tier (in basis points, 1% = 100) uint256 public constant START_FEE_RATE = 2000; // 20% uint256 public constant FAMOUS_FEE_RATE = 1500; // 15% uint256 public constant VIRAL_FEE_RATE = 1000; // 10% // Platform shares for each tier (in basis points) uint256 public constant START_PLATFORM_SHARE = 8000; // 80% uint256 public constant FAMOUS_PLATFORM_SHARE = 8000; // 80% uint256 public constant VIRAL_PLATFORM_SHARE = 9200; // 92% // Creator shares for each tier (in basis points) uint256 public constant START_CREATOR_SHARE = 1200; // 12% uint256 public constant FAMOUS_CREATOR_SHARE = 1200; // 12% uint256 public constant VIRAL_CREATOR_SHARE = 800; // 8% // Deployer shares for each tier (in basis points) uint256 public constant START_DEPLOYER_SHARE = 800; // 8% uint256 public constant FAMOUS_DEPLOYER_SHARE = 800; // 8% uint256 public constant VIRAL_DEPLOYER_SHARE = 0; // 0% // Graduate DEX distribution (in basis points) uint256 public constant GRADUATE_PLATFORM_SHARE = 9000; // 90% uint256 public constant GRADUATE_CREATOR_SHARE = 750; // 7.5% uint256 public constant GRADUATE_DEPLOYER_SHARE = 250; // 2.5% // Graduate DEX configuration uint256 public constant GRADUATE_SUSD_AMOUNT = 35_000 * 1e6; // 35,000 SUSD uint256 public constant GRADUATE_TOKEN_AMOUNT = 10_000 * 1e18; // 10,000 tokens struct FeeInfo { uint256 feeRate; uint256 creatorShare; uint256 deployerShare; uint256 platformShare; } constructor(address _configManager) Ownable(msg.sender) { configManager = ConfigManager(_configManager); } function getFeeInfo(uint256 virtualDollarAmount) public view returns (uint256, uint256, uint256, uint256) { if (virtualDollarAmount >= configManager.GRADUATE_THRESHOLD()) { return (0, GRADUATE_CREATOR_SHARE, GRADUATE_DEPLOYER_SHARE, GRADUATE_PLATFORM_SHARE); } else if (virtualDollarAmount >= configManager.VIRAL_THRESHOLD()) { return ( VIRAL_FEE_RATE, VIRAL_CREATOR_SHARE, VIRAL_DEPLOYER_SHARE, VIRAL_PLATFORM_SHARE ); } else if (virtualDollarAmount >= configManager.FAMOUS_THRESHOLD()) { return ( FAMOUS_FEE_RATE, FAMOUS_CREATOR_SHARE, FAMOUS_DEPLOYER_SHARE, FAMOUS_PLATFORM_SHARE ); } else if (virtualDollarAmount >= configManager.START_THRESHOLD()) { return ( START_FEE_RATE, START_CREATOR_SHARE, START_DEPLOYER_SHARE, START_PLATFORM_SHARE ); } return (0, 0, 0, 0); // Below start threshold } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./TweetToken.sol"; import "./TweetPool.sol"; import "./RewardManager.sol"; import "./MigratorManager.sol"; import "./FeeManager.sol"; import "./ConfigManager.sol"; interface IUniswapV2Factory { function getPair(address tokenA, address tokenB) external view returns (address pair); } interface IUniswapV2Router02 { function addLiquidity( address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns (uint256 amountA, uint256 amountB, uint256 liquidity); } contract MigratorManager is Ownable { // State Variables RewardManager public rewardManager; FeeManager public feeManager; ConfigManager public configManager; address public routingContract; // Events event MigratedToShadowChain(address indexed virtualPool, address indexed tweetToken); constructor( address _rewardManager, address _feeManager, address _configManager, address _routingContract ) Ownable(msg.sender) { rewardManager = RewardManager(_rewardManager); feeManager = FeeManager(_feeManager); configManager = ConfigManager(_configManager); routingContract = _routingContract; } // Modifiers modifier onlyRoutingContract() { require(msg.sender == routingContract, "Reward: caller is not the routing contract"); _; } function checkAndHandleGraduation( address _virtualPoolAddress ) external onlyRoutingContract { TweetPool virtualPool = TweetPool(_virtualPoolAddress); TweetToken tweetToken = TweetToken(virtualPool.tweetToken()); // Check if pool should graduate if (virtualPool.virtualDollarReserve() >= virtualPool.GRADUATE_THRESHOLD() && !virtualPool.isGraduated()) { _migrateToShadowChain(virtualPool, tweetToken); } } function _migrateToShadowChain( TweetPool tweetPool, TweetToken tweetToken ) internal { require(configManager.graduateFactory() != address(0), "Migrator: Graduate factory not set"); require(configManager.graduateRouter() != address(0), "Migrator: Graduate router not set"); // Get current reserves uint256 virtualDollarReserve = tweetPool.virtualDollarReserve(); (uint256 graduatePoolDollar, uint256 creatorShare, uint256 deployerShare, uint256 platformShare) = feeManager.getFeeInfo(virtualDollarReserve); // Calculate amounts for profit, creator, and deployer uint256 totalRewardAmount = virtualDollarReserve - graduatePoolDollar - (10_000 * 10**6); // All virtual dollars become fees uint256 creatorAmount = totalRewardAmount * creatorShare / 10_000; uint256 deployerAmount = totalRewardAmount * deployerShare / 10_000; uint256 platformAmount = totalRewardAmount * platformShare / 10_000; IERC20(configManager.susdToken()).transfer(configManager.platformWallet(), platformAmount); rewardManager.depositRewards(tweetToken.tweetUserId(), creatorAmount, tweetPool.deployerAddress(), deployerAmount); // Create pair on Shadow chain DEX bytes memory createPairData = abi.encodeWithSignature( "createPair(address,address)", address(tweetToken), configManager.susdToken() ); (bool success1,) = configManager.graduateFactory().call(createPairData); require(success1, "Migrator: Failed to create pair on Shadow chain"); // Burn remaining Tweet Tokens tweetToken.burn(tweetToken.balanceOf(address(this))); // Add liquidity to the pair bytes memory addLiquidityData = abi.encodeWithSignature( "addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)", address(tweetToken), configManager.susdToken(), tweetToken.balanceOf(address(this)), graduatePoolDollar, 0, 0, address(this), block.timestamp + 1800 ); (bool success2,) = configManager.graduateRouter().call(addLiquidityData); require(success2, "Migrator: Failed to add liquidity on Shadow chain"); emit MigratedToShadowChain(address(tweetPool), address(tweetToken)); } // Admin functions function setConfigManager(address _configManager) external onlyOwner { require(_configManager != address(0), "Migrator: invalid config manager"); configManager = ConfigManager(_configManager); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./ConfigManager.sol"; contract RewardManager is Ownable { using ECDSA for bytes32; // State variables IERC20 public susdToken; address public signerAddress; mapping(string => uint256) public creatorRewards; mapping(address => uint256) public deployerRewards; address public routingContract; ConfigManager public configManager; // Events event CreatorRewardClaimed(string indexed tweetUserId, address indexed recipient, uint256 amount); event DeployerRewardClaimed(address indexed deployerAddress, address indexed recipient, uint256 amount); // Modifiers modifier onlyRoutingContract() { require(msg.sender == routingContract, "Reward: caller is not the routing contract"); _; } constructor(address _routingContract, address _configManager, address _signerAddress, address _susdToken) Ownable(msg.sender) { routingContract = _routingContract; require(_signerAddress != address(0), "Reward: invalid signer address"); require(_susdToken != address(0), "Reward: invalid SUSD token"); signerAddress = _signerAddress; susdToken = IERC20(_susdToken); configManager = ConfigManager(_configManager); } function depositRewards(string calldata tweetUserId, uint256 amount, address deployerAddress, uint256 deployerAmount) external onlyRoutingContract { creatorRewards[tweetUserId] += amount; deployerRewards[deployerAddress] += deployerAmount; } function claimCreatorReward(string calldata tweetUserId, address payable to, bytes calldata signature) external { uint256 amount = creatorRewards[tweetUserId]; require(amount > 0, "Reward: no reward available"); // Verify signature bytes32 messageHash = keccak256( abi.encodePacked( "\x19Ethereum Signed Message:\n32", keccak256( abi.encode( address(this), // Contract address for replay protection tweetUserId, // Tweet user ID to, // Recipient address amount // Amount being claimed ) ) ) ); address recoveredSigner = ECDSA.recover(messageHash, signature); require(recoveredSigner == signerAddress, "RewardManager: invalid signature"); creatorRewards[tweetUserId] = 0; require(susdToken.transfer(to, amount), "Reward: transfer failed"); emit CreatorRewardClaimed(tweetUserId, to, amount); } function claimDeployerReward(address payable to) external { uint256 amount = deployerRewards[msg.sender]; require(amount > 0, "Reward: no reward available"); deployerRewards[msg.sender] = 0; require(susdToken.transfer(to, amount), "Reward: transfer failed"); emit DeployerRewardClaimed(msg.sender, to, amount); } function setRoutingContract(address _routingContract) external onlyOwner { require(_routingContract != address(0), "Reward: invalid routing contract"); routingContract = _routingContract; } function setSignerAddress(address newSigner) external onlyOwner { require(newSigner != address(0), "Reward: invalid signer address"); signerAddress = newSigner; } function setConfigManager(address _configManager) external onlyOwner { require(_configManager != address(0), "Reward: invalid config manager"); configManager = ConfigManager(_configManager); } function getCreatorReward(string calldata tweetUserId) external view returns (uint256) { return creatorRewards[tweetUserId]; } function getDeployerReward(address deployerAddress) external view returns (uint256) { return deployerRewards[deployerAddress]; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "@openzeppelin/contracts/access/Ownable.sol"; import "./ConfigManager.sol"; contract TweetPool is Ownable { // State variables uint256 public virtualDollarReserve; uint256 public tweetTokenReserve; uint256 public createdTimestamp; uint256 public lastBuyTimestamp; uint256 public lastSellTimestamp; bool public isGraduated; string public tweetId; string public tweetUserId; address public tweetToken; address public routingContract; address public deployerAddress; uint256 public inactivityThreshold; ConfigManager public configManager; uint256 public constant START_THRESHOLD = 10_000 * 1e6; // 10,000 SUSD uint256 public constant FAMOUS_THRESHOLD = 20_000 * 1e6; // 20,000 SUSD uint256 public constant VIRAL_THRESHOLD = 40_000 * 1e6; // 40,000 SUSD uint256 public constant GRADUATE_THRESHOLD = 80_000 * 1e6; // 80,000 SUSD uint256 public constant K = (10_0000 * 1e6) * (1_000_000 * 1e18); // Events event BalancesUpdated(uint256 virtualDollarReserve, uint256 tweetTokenReserve); event InactivityThresholdUpdated(uint256 inactivityThreshold); event GraduationStatusUpdated(bool isGraduated); // Modifiers modifier onlyRoutingContract() { require(msg.sender == routingContract, "VirtualPool: caller is not the routing contract"); _; } constructor( string memory _tweetId, address _tweetToken, address _routingContract, string memory _tweetUserId, address _deployerAddress, uint256 _inactivityThreshold, address _configAddress ) Ownable(msg.sender) { tweetId = _tweetId; tweetToken = _tweetToken; routingContract = _routingContract; tweetUserId = _tweetUserId; deployerAddress = _deployerAddress; configManager = ConfigManager(_configAddress); inactivityThreshold = _inactivityThreshold * 1 hours; lastBuyTimestamp = 0; lastSellTimestamp = 0; createdTimestamp = block.timestamp; isGraduated = false; } function updateBalances(uint256 _newSUSD, uint256 _newTweetToken) external onlyRoutingContract { virtualDollarReserve = _newSUSD; tweetTokenReserve = _newTweetToken; emit BalancesUpdated(virtualDollarReserve, tweetTokenReserve); } function getBalances() external view returns (uint256, uint256) { return (virtualDollarReserve, tweetTokenReserve); } function getTier() external view returns (uint256) { if (tweetTokenReserve >= GRADUATE_THRESHOLD) return 3; // Graduate if (tweetTokenReserve >= VIRAL_THRESHOLD) return 2; // Viral if (tweetTokenReserve >= FAMOUS_THRESHOLD) return 1; // Famous return 0; // Start } function updateLastBuyTimestamp() external onlyRoutingContract { lastBuyTimestamp = block.timestamp; } function updateLastSellTimestamp() external onlyRoutingContract { lastSellTimestamp = block.timestamp; } function isJackpotEligible() external view returns (bool) { // Pool is eligible if it's inactive (no buys for inactivityThreshold) // or if it's in the Start tier return (block.timestamp - lastBuyTimestamp >= inactivityThreshold) || (tweetTokenReserve < START_THRESHOLD); } function setGraduated() external onlyRoutingContract { isGraduated = true; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; contract TweetToken is ERC20, ERC20Burnable { // State variables string public tweetId; string public tweetUserId; constructor(string memory _tweetId, string memory _tweetUserId) ERC20(string.concat("Tweet Token -", _tweetId), string.concat("TT-", _tweetId)) { tweetId = _tweetId; tweetUserId = _tweetUserId; _mint(msg.sender, 1_000_000 * 10**18); // Initial supply of 1M tokens } }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_configManager","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"poolId","type":"uint256"},{"indexed":false,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"TweetPoolBought","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"poolId","type":"uint256"}],"name":"TweetPoolCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"poolId","type":"uint256"}],"name":"TweetPoolGraduated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"poolId","type":"uint256"},{"indexed":false,"internalType":"address","name":"seller","type":"address"},{"indexed":false,"internalType":"uint256","name":"dollarAmount","type":"uint256"}],"name":"TweetPoolSold","type":"event"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"},{"internalType":"uint256","name":"_dollarIn","type":"uint256"}],"name":"buyTweetToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"configManager","outputs":[{"internalType":"contract ConfigManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"tweetId","type":"string"},{"internalType":"string","name":"tweetUserId","type":"string"}],"name":"createTweetToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeManager","outputs":[{"internalType":"contract FeeManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolIdToTweetPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardManager","outputs":[{"internalType":"contract RewardManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"},{"internalType":"uint256","name":"_amountIn","type":"uint256"}],"name":"sellTweetToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_configAddress","type":"address"}],"name":"setConfigAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"susdToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"string","name":"","type":"string"}],"name":"tweetPoolExists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"string","name":"","type":"string"}],"name":"tweetPoolId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"},{"internalType":"uint256","name":"_dollarIn","type":"uint256"}],"name":"viewBuyOrder","outputs":[{"internalType":"uint256","name":"fee_","type":"uint256"},{"internalType":"uint256","name":"tokenOut_","type":"uint256"},{"internalType":"uint256","name":"newDollarReserve_","type":"uint256"},{"internalType":"uint256","name":"newTokenReserve_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"},{"internalType":"uint256","name":"_tokenIn","type":"uint256"}],"name":"viewSellOrder","outputs":[{"internalType":"uint256","name":"fee_","type":"uint256"},{"internalType":"uint256","name":"dollarOut_","type":"uint256"},{"internalType":"uint256","name":"newDollarReserve_","type":"uint256"},{"internalType":"uint256","name":"newTokenReserve_","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604051620048ac380380620048ac8339810160408190526200003491620000e2565b33806200005b57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b620000668162000092565b506000600555600180546001600160a01b0319166001600160a01b039290921691909117905562000114565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215620000f557600080fd5b81516001600160a01b03811681146200010d57600080fd5b9392505050565b61478880620001246000396000f3fe60806040523480156200001157600080fd5b5060043610620001215760003560e01c806383a12de911620000af578063d0fb0203116200007a578063d0fb020314620002c1578063f2fde38b14620002d5578063f39690e414620002ec578063fc3209201462000300578063ff2dd803146200034b57600080fd5b806383a12de914620002255780638da5cb5b146200023c578063b36fe567146200024e578063ca0ab07514620002ad57600080fd5b80633e0dc34e11620000f05780633e0dc34e14620001bf57806358785d5e14620001d8578063715018a614620002045780637fd82f6d146200020e57600080fd5b806301d8619914620001265780630f4ef8a6146200016257806315242d3f146200018f5780633042937414620001a8575b600080fd5b6200013d62000137366004620026ec565b62000362565b6040805194855260208501939093529183015260608201526080015b60405180910390f35b60035462000176906001600160a01b031681565b6040516001600160a01b03909116815260200162000159565b620001a6620001a0366004620026ec565b62000675565b005b620001a6620001b9366004620026ec565b62000c3d565b620001c960055481565b60405190815260200162000159565b62000176620001e93660046200270f565b6006602052600090815260409020546001600160a01b031681565b620001a6620011b0565b6200013d6200021f366004620026ec565b620011c8565b620001a6620002363660046200273f565b620015a1565b6000546001600160a01b031662000176565b6200029c6200025f36600462002837565b8151602081840181018051600882529282019482019490942091909352815180830184018051928152908401929093019190912091525460ff1681565b604051901515815260200162000159565b60015462000176906001600160a01b031681565b60025462000176906001600160a01b031681565b620001a6620002e63660046200273f565b620015cd565b60045462000176906001600160a01b031681565b620001c96200031136600462002837565b8151602081840181018051600782529282019482019490942091909352815180830184018051928152908401929093019190912091525481565b620001c96200035c366004620028ee565b62001611565b600082815260066020908152604080832054600254825163a1c3daad60e01b815292518594859485946001600160a01b0390811694869491169263d45c267a92869263a1c3daad926004808401939192918290030181865afa158015620003cd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003f3919062002961565b6040518263ffffffff1660e01b81526004016200041291815260200190565b608060405180830381865afa15801562000430573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200045691906200297b565b50505090506000826001600160a01b0316634e875bc06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200049c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004c2919062002961565b836001600160a01b031663a1c3daad6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000501573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000527919062002961565b620005339190620029c8565b9050600088846001600160a01b0316634e875bc06040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000577573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200059d919062002961565b620005a99190620029e8565b90506000620005b98284620029fe565b9050600081866001600160a01b031663a1c3daad6040518163ffffffff1660e01b8152600401602060405180830381865afa158015620005fd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000623919062002961565b6200062f919062002a21565b90506000612710620006428784620029c8565b6200064e9190620029fe565b905060006200065e828462002a21565b919e919d50929b5092995091975050505050505050565b6000828152600660209081526040808320548151633aef4c1760e11b815291516001600160a01b03909116938493909284926375de982e926004808401939192918290030181865afa158015620006d0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620006f6919062002a37565b6040516370a0823160e01b815233600482015290915084906001600160a01b038316906370a0823190602401602060405180830381865afa15801562000740573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000766919062002961565b1015620007cb5760405162461bcd60e51b815260206004820152602860248201527f526f757465723a20696e73756666696369656e7420747765657420746f6b656e6044820152672062616c616e636560c01b60648201526084015b60405180910390fd5b604051636eb1769f60e11b815233600482015230602482015284906001600160a01b0383169063dd62ed3e90604401602060405180830381865afa15801562000818573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200083e919062002961565b10156200088e5760405162461bcd60e51b815260206004820152601e60248201527f526f757465723a20696e73756666696369656e7420616c6c6f77616e636500006044820152606401620007c2565b816001600160a01b0316639e5f26026040518163ffffffff1660e01b8152600401602060405180830381865afa158015620008cd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620008f3919062002a57565b15620009135760405162461bcd60e51b8152600401620007c29062002a7b565b6000806200092384888862001d0b565b91509150600160009054906101000a90046001600160a01b03166001600160a01b031663b47dbf226040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200097b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620009a1919062002961565b821015620009fd5760405162461bcd60e51b815260206004820152602260248201527f526f757465723a20496e73756666696369656e74206f757470757420616d6f756044820152611b9d60f21b6064820152608401620007c2565b6040516323b872dd60e01b8152336004820152306024820152604481018790526001600160a01b038416906323b872dd906064016020604051808303816000875af115801562000a51573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000a77919062002a57565b62000ad15760405162461bcd60e51b815260206004820152602360248201527f526f757465723a20747765657420746f6b656e207472616e73666572206661696044820152621b195960ea1b6064820152608401620007c2565b62000add848362001d9c565b6004805460405163a9059cbb60e01b81523392810192909252602482018490526001600160a01b03169063a9059cbb906044016020604051808303816000875af115801562000b30573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000b56919062002a57565b62000ba45760405162461bcd60e51b815260206004820152601c60248201527f526f757465723a2053555344207472616e73666572206661696c6564000000006044820152606401620007c2565b836001600160a01b031663a5d5a5286040518163ffffffff1660e01b8152600401600060405180830381600087803b15801562000be057600080fd5b505af115801562000bf5573d6000803e3d6000fd5b505060408051338152602081018690528a93507f80c4c36d3e2abc3204ae723307c3f8daa2dbab02d3b7368a2c26f5e79b4581e092500160405180910390a250505050505050565b600160009054906101000a90046001600160a01b03166001600160a01b031663b47dbf226040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000c91573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000cb7919062002961565b81101562000d035760405162461bcd60e51b8152602060048201526018602482015277149bdd5d195c8e88105b5bdd5b9d081d1bdbc81cdb585b1b60421b6044820152606401620007c2565b600160009054906101000a90046001600160a01b03166001600160a01b031663f39690e46040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000d57573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000d7d919062002a37565b6040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b0391909116906323b872dd906064016020604051808303816000875af115801562000dd3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000df9919062002a57565b62000e475760405162461bcd60e51b815260206004820152601c60248201527f526f757465723a2053555344207472616e73666572206661696c6564000000006044820152606401620007c2565b81600010801562000e5a57506005548211155b62000ea85760405162461bcd60e51b815260206004820152601b60248201527f526f757465723a20506f6f6c20646f6573206e6f7420657869737400000000006044820152606401620007c2565b600082815260066020908152604091829020548251634f2f930160e11b815292516001600160a01b03909116928392639e5f2602926004808401938290030181865afa15801562000efd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000f23919062002a57565b1562000f435760405162461bcd60e51b8152600401620007c29062002a7b565b62000f4f818362001d9c565b60008062000f5f838686620022e5565b91509150826001600160a01b03166375de982e6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000fa2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000fc8919062002a37565b60405163a9059cbb60e01b8152336004820152602481018490526001600160a01b03919091169063a9059cbb906044016020604051808303816000875af115801562001018573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200103e919062002a57565b6200108c5760405162461bcd60e51b815260206004820152601d60248201527f526f757465723a20746f6b656e207472616e73666572206661696c65640000006044820152606401620007c2565b826001600160a01b03166383dc045c6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015620010c857600080fd5b505af1158015620010dd573d6000803e3d6000fd5b505060408051338152602081018690528893507f496505f90a72505af86ccfabf2742968b5ee54a2370c20c869d6f236262ed39b92500160405180910390a2600160009054906101000a90046001600160a01b03166001600160a01b0316636f91ff2d6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562001170573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001196919062002961565b8110620011a957620011a98382620022fa565b5050505050565b620011ba62002651565b620011c6600062002680565b565b600080600080600160009054906101000a90046001600160a01b03166001600160a01b031663b47dbf226040518163ffffffff1660e01b8152600401602060405180830381865afa15801562001222573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001248919062002961565b851015620012945760405162461bcd60e51b8152602060048201526018602482015277149bdd5d195c8e88105b5bdd5b9d081d1bdbc81cdb585b1b60421b6044820152606401620007c2565b600086815260066020908152604080832054600254825163a1c3daad60e01b815292516001600160a01b039283169594919092169263d45c267a92869263a1c3daad92600480820193918290030181865afa158015620012f8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200131e919062002961565b6040518263ffffffff1660e01b81526004016200133d91815260200190565b608060405180830381865afa1580156200135b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200138191906200297b565b505050905060006127108289620013999190620029c8565b620013a59190620029fe565b90506000620013b5828a62002a21565b90506000846001600160a01b0316634e875bc06040518163ffffffff1660e01b8152600401602060405180830381865afa158015620013f8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200141e919062002961565b856001600160a01b031663a1c3daad6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200145d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001483919062002961565b6200148f9190620029c8565b9050600082866001600160a01b031663a1c3daad6040518163ffffffff1660e01b8152600401602060405180830381865afa158015620014d3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620014f9919062002961565b620015059190620029e8565b90506000620015158284620029fe565b9050600081886001600160a01b0316634e875bc06040518163ffffffff1660e01b8152600401602060405180830381865afa15801562001559573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200157f919062002961565b6200158b919062002a21565b959e959d50919b50995092975050505050505050565b620015ab62002651565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b620015d762002651565b6001600160a01b0381166200160357604051631e4fbdf760e01b815260006004820152602401620007c2565b6200160e8162002680565b50565b6000600885856040516200162792919062002abc565b908152602001604051809103902083836040516200164792919062002abc565b9081526040519081900360200190205460ff1615620016b35760405162461bcd60e51b815260206004820152602160248201527f526f757465723a205477656574546f6b656e20616c72656164792065786973746044820152607360f81b6064820152608401620007c2565b600160009054906101000a90046001600160a01b03166001600160a01b031663dce0b4e46040518163ffffffff1660e01b8152600401602060405180830381865afa15801562001707573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200172d919062002961565b600160009054906101000a90046001600160a01b03166001600160a01b031663f39690e46040518163ffffffff1660e01b8152600401602060405180830381865afa15801562001781573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620017a7919062002a37565b604051636eb1769f60e11b81523360048201523060248201526001600160a01b03919091169063dd62ed3e90604401602060405180830381865afa158015620017f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200181a919062002961565b1015620018825760405162461bcd60e51b815260206004820152602f60248201527f526f757465723a20696e73756666696369656e7420616c6c6f77616e6365206660448201526e6f7220706c6174666f726d2066656560881b6064820152608401620007c2565b600160009054906101000a90046001600160a01b03166001600160a01b031663f39690e46040518163ffffffff1660e01b8152600401602060405180830381865afa158015620018d6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620018fc919062002a37565b6001600160a01b03166323b872dd33600160009054906101000a90046001600160a01b03166001600160a01b031663fa2af9da6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200195f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001985919062002a37565b600160009054906101000a90046001600160a01b03166001600160a01b031663dce0b4e46040518163ffffffff1660e01b8152600401602060405180830381865afa158015620019d9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620019ff919062002961565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af115801562001a54573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001a7a919062002a57565b62001ad45760405162461bcd60e51b8152602060048201526024808201527f526f757465723a20706c6174666f726d20666565207472616e736665722066616044820152631a5b195960e21b6064820152608401620007c2565b60008585858560405162001ae890620026d0565b62001af7949392919062002af5565b604051809103906000f08015801562001b14573d6000803e3d6000fd5b509050600086868330888833600160009054906101000a90046001600160a01b03166001600160a01b031663864604746040518163ffffffff1660e01b8152600401602060405180830381865afa15801562001b74573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001b9a919062002961565b6001546040516001600160a01b039091169062001bb790620026de565b62001bcb9998979695949392919062002b2b565b604051809103906000f08015801562001be8573d6000803e3d6000fd5b5060058054919250600062001bfd8362002b92565b9091555050600580546000908152600660205260409081902080546001600160a01b0319166001600160a01b0385161790559054905160079062001c45908a908a9062002abc565b9081526020016040518091039020868660405162001c6592919062002abc565b90815260200160405180910390208190555060016008888860405162001c8d92919062002abc565b9081526020016040518091039020868660405162001cad92919062002abc565b90815260405160209181900382018120805460ff19169315159390931790925560055482527f8e509aa843aafad4d0e3026f4c757646a241f64b77c50e3fb6b6a08624033563910160405180910390a1505060055495945050505050565b60008060008060008062001d20888862000362565b60405163780106db60e11b81526004810183905260248101829052939750919550935091506001600160a01b038a169063f0020db690604401600060405180830381600087803b15801562001d7457600080fd5b505af115801562001d89573d6000803e3d6000fd5b50949b939a509298505050505050505050565b600080600080600260009054906101000a90046001600160a01b03166001600160a01b031663d45c267a876001600160a01b031663a1c3daad6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562001e05573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001e2b919062002961565b6040518263ffffffff1660e01b815260040162001e4a91815260200190565b608060405180830381865afa15801562001e68573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001e8e91906200297b565b93509350935093506000612710858762001ea99190620029c8565b62001eb59190620029fe565b9050600061271062001ec88484620029c8565b62001ed49190620029fe565b9050600061271062001ee78785620029c8565b62001ef39190620029fe565b9050600061271062001f068786620029c8565b62001f129190620029fe565b9050600062001f228284620029e8565b9050600160009054906101000a90046001600160a01b03166001600160a01b031663f39690e46040518163ffffffff1660e01b8152600401602060405180830381865afa15801562001f78573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001f9e919062002a37565b6001600160a01b031663a9059cbb600160009054906101000a90046001600160a01b03166001600160a01b031663fa2af9da6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562002000573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002026919062002a37565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018790526044016020604051808303816000875af115801562002074573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200209a919062002a57565b50600160009054906101000a90046001600160a01b03166001600160a01b031663f39690e46040518163ffffffff1660e01b8152600401602060405180830381865afa158015620020ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002115919062002a37565b60035460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810184905291169063a9059cbb906044016020604051808303816000875af115801562002168573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200218e919062002a57565b50600360009054906101000a90046001600160a01b03166001600160a01b0316635f0e148b8c6001600160a01b031663933165d86040518163ffffffff1660e01b8152600401600060405180830381865afa158015620021f2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526200221c919081019062002bd4565b858e6001600160a01b031663efdee94f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200225c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002282919062002a37565b866040518563ffffffff1660e01b8152600401620022a4949392919062002c54565b600060405180830381600087803b158015620022bf57600080fd5b505af1158015620022d4573d6000803e3d6000fd5b505050505050505050505050505050565b60008060008060008062001d208888620011c8565b816001600160a01b0316632ac1a8da6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200233657600080fd5b505af11580156200234b573d6000803e3d6000fd5b5050505060006402540be4008262002364919062002a21565b90506000836001600160a01b0316634e875bc06040518163ffffffff1660e01b8152600401602060405180830381865afa158015620023a7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620023cd919062002961565b90506000600160009054906101000a90046001600160a01b03166001600160a01b031663ba0232256040518163ffffffff1660e01b8152600401602060405180830381865afa15801562002425573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200244b919062002a37565b9050846001600160a01b03166375de982e6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200248c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620024b2919062002a37565b60405163a9059cbb60e01b81526001600160a01b03838116600483015260248201859052919091169063a9059cbb906044016020604051808303816000875af115801562002504573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200252a919062002a57565b50600160009054906101000a90046001600160a01b03166001600160a01b031663f39690e46040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200257f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620025a5919062002a37565b60405163a9059cbb60e01b81526001600160a01b03838116600483015260248201869052919091169063a9059cbb906044016020604051808303816000875af1158015620025f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200261d919062002a57565b506005546040517fcc74390c0c8d920eb25f6ee2c48413396809b2e4bfc5743327d901ef3e15ce5990600090a25050505050565b6000546001600160a01b03163314620011c65760405163118cdaa760e01b8152336004820152602401620007c2565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610e1f8062002ca783390190565b610c8d8062003ac683390190565b600080604083850312156200270057600080fd5b50508035926020909101359150565b6000602082840312156200272257600080fd5b5035919050565b6001600160a01b03811681146200160e57600080fd5b6000602082840312156200275257600080fd5b81356200275f8162002729565b9392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715620027a857620027a862002766565b604052919050565b600067ffffffffffffffff821115620027cd57620027cd62002766565b50601f01601f191660200190565b600082601f830112620027ed57600080fd5b813562002804620027fe82620027b0565b6200277c565b8181528460208386010111156200281a57600080fd5b816020850160208301376000918101602001919091529392505050565b600080604083850312156200284b57600080fd5b823567ffffffffffffffff808211156200286457600080fd5b6200287286838701620027db565b935060208501359150808211156200288957600080fd5b506200289885828601620027db565b9150509250929050565b60008083601f840112620028b557600080fd5b50813567ffffffffffffffff811115620028ce57600080fd5b602083019150836020828501011115620028e757600080fd5b9250929050565b600080600080604085870312156200290557600080fd5b843567ffffffffffffffff808211156200291e57600080fd5b6200292c88838901620028a2565b909650945060208701359150808211156200294657600080fd5b506200295587828801620028a2565b95989497509550505050565b6000602082840312156200297457600080fd5b5051919050565b600080600080608085870312156200299257600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417620029e257620029e2620029b2565b92915050565b80820180821115620029e257620029e2620029b2565b60008262002a1c57634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115620029e257620029e2620029b2565b60006020828403121562002a4a57600080fd5b81516200275f8162002729565b60006020828403121562002a6a57600080fd5b815180151581146200275f57600080fd5b60208082526021908201527f526f757465723a20506f6f6c206973206e6f74206772616475617465642079656040820152601d60fa1b606082015260800190565b8183823760009101908152919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60408152600062002b0b60408301868862002acc565b828103602084015262002b2081858762002acc565b979650505050505050565b60e08152600062002b4160e083018b8d62002acc565b6001600160a01b038a811660208501528981166040850152838203606085015262002b6e82898b62002acc565b968116608085015260a08401959095525050911660c0909101529695505050505050565b60006001820162002ba75762002ba7620029b2565b5060010190565b60005b8381101562002bcb57818101518382015260200162002bb1565b50506000910152565b60006020828403121562002be757600080fd5b815167ffffffffffffffff81111562002bff57600080fd5b8201601f8101841362002c1157600080fd5b805162002c22620027fe82620027b0565b81815285602083850101111562002c3857600080fd5b62002c4b82602083016020860162002bae565b95945050505050565b608081526000855180608084015262002c758160a0850160208a0162002bae565b6020830195909552506001600160a01b03929092166040830152606082015260a0601f909201601f1916010191905056fe60806040523480156200001157600080fd5b5060405162000e1f38038062000e1f833981016040819052620000349162000319565b8160405160200162000047919062000383565b60405160208183030381529060405282604051602001620000699190620003ba565b60408051601f19818403018152919052600362000087838262000476565b50600462000096828262000476565b5060059150620000a99050838262000476565b506006620000b8828262000476565b50620000cf3369d3c21bcecceda1000000620000d7565b50506200056a565b6001600160a01b038216620001075760405163ec442f0560e01b8152600060048201526024015b60405180910390fd5b620001156000838362000119565b5050565b6001600160a01b038316620001485780600260008282546200013c919062000542565b90915550620001bc9050565b6001600160a01b038316600090815260208190526040902054818110156200019d5760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401620000fe565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b038216620001da57600280548290039055620001f9565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516200023f91815260200190565b60405180910390a3505050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200027f57818101518382015260200162000265565b50506000910152565b600082601f8301126200029a57600080fd5b81516001600160401b0380821115620002b757620002b76200024c565b604051601f8301601f19908116603f01168101908282118183101715620002e257620002e26200024c565b81604052838152866020858801011115620002fc57600080fd5b6200030f84602083016020890162000262565b9695505050505050565b600080604083850312156200032d57600080fd5b82516001600160401b03808211156200034557600080fd5b620003538683870162000288565b935060208501519150808211156200036a57600080fd5b50620003798582860162000288565b9150509250929050565b6c547765657420546f6b656e202d60981b815260008251620003ad81600d85016020870162000262565b91909101600d0192915050565b6254542d60e81b815260008251620003da81600385016020870162000262565b9190910160030192915050565b600181811c90821680620003fc57607f821691505b6020821081036200041d57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200047157600081815260208120601f850160051c810160208610156200044c5750805b601f850160051c820191505b818110156200046d5782815560010162000458565b5050505b505050565b81516001600160401b038111156200049257620004926200024c565b620004aa81620004a38454620003e7565b8462000423565b602080601f831160018114620004e25760008415620004c95750858301515b600019600386901b1c1916600185901b1785556200046d565b600085815260208120601f198616915b828110156200051357888601518255948401946001909101908401620004f2565b5085821015620005325787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b808201808211156200056457634e487b7160e01b600052601160045260246000fd5b92915050565b6108a5806200057a6000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c806370a082311161008c578063933165d811610066578063933165d8146101a257806395d89b41146101aa578063a9059cbb146101b2578063dd62ed3e146101c557600080fd5b806370a082311461015e57806379cc6790146101875780637ff5eed11461019a57600080fd5b806306fdde03146100d4578063095ea7b3146100f257806318160ddd1461011557806323b872dd14610127578063313ce5671461013a57806342966c6814610149575b600080fd5b6100dc6101fe565b6040516100e991906106d6565b60405180910390f35b610105610100366004610740565b610290565b60405190151581526020016100e9565b6002545b6040519081526020016100e9565b61010561013536600461076a565b6102aa565b604051601281526020016100e9565b61015c6101573660046107a6565b6102ce565b005b61011961016c3660046107bf565b6001600160a01b031660009081526020819052604090205490565b61015c610195366004610740565b6102db565b6100dc6102f4565b6100dc610382565b6100dc61038f565b6101056101c0366004610740565b61039e565b6101196101d33660046107e1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60606003805461020d90610814565b80601f016020809104026020016040519081016040528092919081815260200182805461023990610814565b80156102865780601f1061025b57610100808354040283529160200191610286565b820191906000526020600020905b81548152906001019060200180831161026957829003601f168201915b5050505050905090565b60003361029e8185856103ac565b60019150505b92915050565b6000336102b88582856103be565b6102c3858585610442565b506001949350505050565b6102d833826104a1565b50565b6102e68233836103be565b6102f082826104a1565b5050565b6005805461030190610814565b80601f016020809104026020016040519081016040528092919081815260200182805461032d90610814565b801561037a5780601f1061034f5761010080835404028352916020019161037a565b820191906000526020600020905b81548152906001019060200180831161035d57829003601f168201915b505050505081565b6006805461030190610814565b60606004805461020d90610814565b60003361029e818585610442565b6103b983838360016104d7565b505050565b6001600160a01b0383811660009081526001602090815260408083209386168352929052205460001981101561043c578181101561042d57604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064015b60405180910390fd5b61043c848484840360006104d7565b50505050565b6001600160a01b03831661046c57604051634b637e8f60e11b815260006004820152602401610424565b6001600160a01b0382166104965760405163ec442f0560e01b815260006004820152602401610424565b6103b98383836105ac565b6001600160a01b0382166104cb57604051634b637e8f60e11b815260006004820152602401610424565b6102f0826000836105ac565b6001600160a01b0384166105015760405163e602df0560e01b815260006004820152602401610424565b6001600160a01b03831661052b57604051634a1406b160e11b815260006004820152602401610424565b6001600160a01b038085166000908152600160209081526040808320938716835292905220829055801561043c57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161059e91815260200190565b60405180910390a350505050565b6001600160a01b0383166105d75780600260008282546105cc919061084e565b909155506106499050565b6001600160a01b0383166000908152602081905260409020548181101561062a5760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610424565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b03821661066557600280548290039055610684565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516106c991815260200190565b60405180910390a3505050565b600060208083528351808285015260005b81811015610703578581018301518582016040015282016106e7565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461073b57600080fd5b919050565b6000806040838503121561075357600080fd5b61075c83610724565b946020939093013593505050565b60008060006060848603121561077f57600080fd5b61078884610724565b925061079660208501610724565b9150604084013590509250925092565b6000602082840312156107b857600080fd5b5035919050565b6000602082840312156107d157600080fd5b6107da82610724565b9392505050565b600080604083850312156107f457600080fd5b6107fd83610724565b915061080b60208401610724565b90509250929050565b600181811c9082168061082857607f821691505b60208210810361084857634e487b7160e01b600052602260045260246000fd5b50919050565b808201808211156102a457634e487b7160e01b600052601160045260246000fdfea2646970667358221220f89ddd28ce36d1cf9e53ad073af457c1ac62a47de5e69bc7110fa2ab53ce6e5764736f6c6343000814003360806040523480156200001157600080fd5b5060405162000c8d38038062000c8d83398101604081905262000034916200024d565b33806200005b57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b62000066816200011b565b5060076200007588826200039a565b50600980546001600160a01b038089166001600160a01b031992831617909255600a8054928816929091169190911790556008620000b485826200039a565b50600b80546001600160a01b038086166001600160a01b031992831617909255600d805492841692909116919091179055620000f382610e1062000466565b600c5550506000600481905560055550504260035550506006805460ff191690555062000492565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200019357600080fd5b81516001600160401b0380821115620001b057620001b06200016b565b604051601f8301601f19908116603f01168101908282118183101715620001db57620001db6200016b565b81604052838152602092508683858801011115620001f857600080fd5b600091505b838210156200021c5785820183015181830184015290820190620001fd565b600093810190920192909252949350505050565b80516001600160a01b03811681146200024857600080fd5b919050565b600080600080600080600060e0888a0312156200026957600080fd5b87516001600160401b03808211156200028157600080fd5b6200028f8b838c0162000181565b98506200029f60208b0162000230565b9750620002af60408b0162000230565b965060608a0151915080821115620002c657600080fd5b50620002d58a828b0162000181565b945050620002e66080890162000230565b925060a08801519150620002fd60c0890162000230565b905092959891949750929550565b600181811c908216806200032057607f821691505b6020821081036200034157634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200039557600081815260208120601f850160051c81016020861015620003705750805b601f850160051c820191505b8181101562000391578281556001016200037c565b5050505b505050565b81516001600160401b03811115620003b657620003b66200016b565b620003ce81620003c784546200030b565b8462000347565b602080601f831160018114620004065760008415620003ed5750858301515b600019600386901b1c1916600185901b17855562000391565b600085815260208120601f198616915b82811015620004375788860151825594840194600190910190840162000416565b5085821015620004565787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b80820281158282048414176200048c57634e487b7160e01b600052601160045260246000fd5b92915050565b6107eb80620004a26000396000f3fe608060405234801561001057600080fd5b50600436106101c35760003560e01c80638da5cb5b116100f9578063a932492f11610097578063efdee94f11610071578063efdee94f14610337578063f0020db61461034a578063f2fde38b1461035d578063f92052c11461037057600080fd5b8063a932492f14610302578063b3ae5d5b14610318578063ca0ab0751461032457600080fd5b80639e5f2602116100d35780639e5f2602146102db5780639ec86276146102e8578063a1c3daad146102f1578063a5d5a528146102fa57600080fd5b80638da5cb5b146102aa578063933165d8146102bb5780639886e12d146102c357600080fd5b80635ad701c21161016657806375de982e1161014057806375de982e1461026e5780637ff5eed11461028157806383dc045c14610296578063842e30041461029e57600080fd5b80635ad701c2146102525780636f91ff2d1461025a578063715018a61461026657600080fd5b80632ac1a8da116101a25780632ac1a8da1461022a578063497818e2146102345780634985746f146102405780634e875bc01461024957600080fd5b8062113e08146101c8578063012e83b4146101e85780631030978114610213575b600080fd5b600154600254604080519283526020830191909152015b60405180910390f35b600a546101fb906001600160a01b031681565b6040516001600160a01b0390911681526020016101df565b61021c60035481565b6040519081526020016101df565b610232610379565b005b61021c6404a817c80081565b61021c60045481565b61021c60025481565b61021c6103bb565b61021c6412a05f200081565b6102326103ff565b6009546101fb906001600160a01b031681565b610289610413565b6040516101df9190610665565b6102326104a1565b61021c6409502f900081565b6000546001600160a01b03166101fb565b6102896104d1565b6102cb6104de565b60405190151581526020016101df565b6006546102cb9060ff1681565b61021c600c5481565b61021c60015481565b610232610509565b61021c6e13426172c74d822b878fe80000000081565b61021c6402540be40081565b600d546101fb906001600160a01b031681565b600b546101fb906001600160a01b031681565b6102326103583660046106b3565b610539565b61023261036b3660046106d5565b6105aa565b61021c60055481565b600a546001600160a01b031633146103ac5760405162461bcd60e51b81526004016103a390610705565b60405180910390fd5b6006805460ff19166001179055565b60006412a05f2000600254106103d15750600390565b6409502f9000600254106103e55750600290565b6404a817c800600254106103f95750600190565b50600090565b6104076105e8565b6104116000610615565b565b6007805461042090610754565b80601f016020809104026020016040519081016040528092919081815260200182805461044c90610754565b80156104995780601f1061046e57610100808354040283529160200191610499565b820191906000526020600020905b81548152906001019060200180831161047c57829003601f168201915b505050505081565b600a546001600160a01b031633146104cb5760405162461bcd60e51b81526004016103a390610705565b42600455565b6008805461042090610754565b6000600c54600454426104f1919061078e565b10158061050457506402540be400600254105b905090565b600a546001600160a01b031633146105335760405162461bcd60e51b81526004016103a390610705565b42600555565b600a546001600160a01b031633146105635760405162461bcd60e51b81526004016103a390610705565b6001829055600281905560408051838152602081018390527fcb711e662039bf9a0bdf74bc04b9d7034424098680c51877b784dc7715934bbd910160405180910390a15050565b6105b26105e8565b6001600160a01b0381166105dc57604051631e4fbdf760e01b8152600060048201526024016103a3565b6105e581610615565b50565b6000546001600160a01b031633146104115760405163118cdaa760e01b81523360048201526024016103a3565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208083528351808285015260005b8181101561069257858101830151858201604001528201610676565b506000604082860101526040601f19601f8301168501019250505092915050565b600080604083850312156106c657600080fd5b50508035926020909101359150565b6000602082840312156106e757600080fd5b81356001600160a01b03811681146106fe57600080fd5b9392505050565b6020808252602f908201527f5669727475616c506f6f6c3a2063616c6c6572206973206e6f7420746865207260408201526e1bdd5d1a5b99c818dbdb9d1c9858dd608a1b606082015260800190565b600181811c9082168061076857607f821691505b60208210810361078857634e487b7160e01b600052602260045260246000fd5b50919050565b818103818111156107af57634e487b7160e01b600052601160045260246000fd5b9291505056fea264697066735822122044f4135f1b19eff38d23aae5765993e4417892df318a7582c4aa544edf9709b564736f6c63430008140033a26469706673582212200a7416ee6866f6cd4841346105b661e0e37d304b2091b45ebbcea4abf69885d064736f6c634300081400330000000000000000000000003daabf4a08e8b8c1e52d86fd8ea7184736ac1931
Deployed Bytecode
0x60806040523480156200001157600080fd5b5060043610620001215760003560e01c806383a12de911620000af578063d0fb0203116200007a578063d0fb020314620002c1578063f2fde38b14620002d5578063f39690e414620002ec578063fc3209201462000300578063ff2dd803146200034b57600080fd5b806383a12de914620002255780638da5cb5b146200023c578063b36fe567146200024e578063ca0ab07514620002ad57600080fd5b80633e0dc34e11620000f05780633e0dc34e14620001bf57806358785d5e14620001d8578063715018a614620002045780637fd82f6d146200020e57600080fd5b806301d8619914620001265780630f4ef8a6146200016257806315242d3f146200018f5780633042937414620001a8575b600080fd5b6200013d62000137366004620026ec565b62000362565b6040805194855260208501939093529183015260608201526080015b60405180910390f35b60035462000176906001600160a01b031681565b6040516001600160a01b03909116815260200162000159565b620001a6620001a0366004620026ec565b62000675565b005b620001a6620001b9366004620026ec565b62000c3d565b620001c960055481565b60405190815260200162000159565b62000176620001e93660046200270f565b6006602052600090815260409020546001600160a01b031681565b620001a6620011b0565b6200013d6200021f366004620026ec565b620011c8565b620001a6620002363660046200273f565b620015a1565b6000546001600160a01b031662000176565b6200029c6200025f36600462002837565b8151602081840181018051600882529282019482019490942091909352815180830184018051928152908401929093019190912091525460ff1681565b604051901515815260200162000159565b60015462000176906001600160a01b031681565b60025462000176906001600160a01b031681565b620001a6620002e63660046200273f565b620015cd565b60045462000176906001600160a01b031681565b620001c96200031136600462002837565b8151602081840181018051600782529282019482019490942091909352815180830184018051928152908401929093019190912091525481565b620001c96200035c366004620028ee565b62001611565b600082815260066020908152604080832054600254825163a1c3daad60e01b815292518594859485946001600160a01b0390811694869491169263d45c267a92869263a1c3daad926004808401939192918290030181865afa158015620003cd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003f3919062002961565b6040518263ffffffff1660e01b81526004016200041291815260200190565b608060405180830381865afa15801562000430573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200045691906200297b565b50505090506000826001600160a01b0316634e875bc06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200049c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004c2919062002961565b836001600160a01b031663a1c3daad6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000501573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000527919062002961565b620005339190620029c8565b9050600088846001600160a01b0316634e875bc06040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000577573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200059d919062002961565b620005a99190620029e8565b90506000620005b98284620029fe565b9050600081866001600160a01b031663a1c3daad6040518163ffffffff1660e01b8152600401602060405180830381865afa158015620005fd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000623919062002961565b6200062f919062002a21565b90506000612710620006428784620029c8565b6200064e9190620029fe565b905060006200065e828462002a21565b919e919d50929b5092995091975050505050505050565b6000828152600660209081526040808320548151633aef4c1760e11b815291516001600160a01b03909116938493909284926375de982e926004808401939192918290030181865afa158015620006d0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620006f6919062002a37565b6040516370a0823160e01b815233600482015290915084906001600160a01b038316906370a0823190602401602060405180830381865afa15801562000740573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000766919062002961565b1015620007cb5760405162461bcd60e51b815260206004820152602860248201527f526f757465723a20696e73756666696369656e7420747765657420746f6b656e6044820152672062616c616e636560c01b60648201526084015b60405180910390fd5b604051636eb1769f60e11b815233600482015230602482015284906001600160a01b0383169063dd62ed3e90604401602060405180830381865afa15801562000818573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200083e919062002961565b10156200088e5760405162461bcd60e51b815260206004820152601e60248201527f526f757465723a20696e73756666696369656e7420616c6c6f77616e636500006044820152606401620007c2565b816001600160a01b0316639e5f26026040518163ffffffff1660e01b8152600401602060405180830381865afa158015620008cd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620008f3919062002a57565b15620009135760405162461bcd60e51b8152600401620007c29062002a7b565b6000806200092384888862001d0b565b91509150600160009054906101000a90046001600160a01b03166001600160a01b031663b47dbf226040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200097b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620009a1919062002961565b821015620009fd5760405162461bcd60e51b815260206004820152602260248201527f526f757465723a20496e73756666696369656e74206f757470757420616d6f756044820152611b9d60f21b6064820152608401620007c2565b6040516323b872dd60e01b8152336004820152306024820152604481018790526001600160a01b038416906323b872dd906064016020604051808303816000875af115801562000a51573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000a77919062002a57565b62000ad15760405162461bcd60e51b815260206004820152602360248201527f526f757465723a20747765657420746f6b656e207472616e73666572206661696044820152621b195960ea1b6064820152608401620007c2565b62000add848362001d9c565b6004805460405163a9059cbb60e01b81523392810192909252602482018490526001600160a01b03169063a9059cbb906044016020604051808303816000875af115801562000b30573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000b56919062002a57565b62000ba45760405162461bcd60e51b815260206004820152601c60248201527f526f757465723a2053555344207472616e73666572206661696c6564000000006044820152606401620007c2565b836001600160a01b031663a5d5a5286040518163ffffffff1660e01b8152600401600060405180830381600087803b15801562000be057600080fd5b505af115801562000bf5573d6000803e3d6000fd5b505060408051338152602081018690528a93507f80c4c36d3e2abc3204ae723307c3f8daa2dbab02d3b7368a2c26f5e79b4581e092500160405180910390a250505050505050565b600160009054906101000a90046001600160a01b03166001600160a01b031663b47dbf226040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000c91573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000cb7919062002961565b81101562000d035760405162461bcd60e51b8152602060048201526018602482015277149bdd5d195c8e88105b5bdd5b9d081d1bdbc81cdb585b1b60421b6044820152606401620007c2565b600160009054906101000a90046001600160a01b03166001600160a01b031663f39690e46040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000d57573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000d7d919062002a37565b6040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b0391909116906323b872dd906064016020604051808303816000875af115801562000dd3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000df9919062002a57565b62000e475760405162461bcd60e51b815260206004820152601c60248201527f526f757465723a2053555344207472616e73666572206661696c6564000000006044820152606401620007c2565b81600010801562000e5a57506005548211155b62000ea85760405162461bcd60e51b815260206004820152601b60248201527f526f757465723a20506f6f6c20646f6573206e6f7420657869737400000000006044820152606401620007c2565b600082815260066020908152604091829020548251634f2f930160e11b815292516001600160a01b03909116928392639e5f2602926004808401938290030181865afa15801562000efd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000f23919062002a57565b1562000f435760405162461bcd60e51b8152600401620007c29062002a7b565b62000f4f818362001d9c565b60008062000f5f838686620022e5565b91509150826001600160a01b03166375de982e6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000fa2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000fc8919062002a37565b60405163a9059cbb60e01b8152336004820152602481018490526001600160a01b03919091169063a9059cbb906044016020604051808303816000875af115801562001018573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200103e919062002a57565b6200108c5760405162461bcd60e51b815260206004820152601d60248201527f526f757465723a20746f6b656e207472616e73666572206661696c65640000006044820152606401620007c2565b826001600160a01b03166383dc045c6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015620010c857600080fd5b505af1158015620010dd573d6000803e3d6000fd5b505060408051338152602081018690528893507f496505f90a72505af86ccfabf2742968b5ee54a2370c20c869d6f236262ed39b92500160405180910390a2600160009054906101000a90046001600160a01b03166001600160a01b0316636f91ff2d6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562001170573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001196919062002961565b8110620011a957620011a98382620022fa565b5050505050565b620011ba62002651565b620011c6600062002680565b565b600080600080600160009054906101000a90046001600160a01b03166001600160a01b031663b47dbf226040518163ffffffff1660e01b8152600401602060405180830381865afa15801562001222573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001248919062002961565b851015620012945760405162461bcd60e51b8152602060048201526018602482015277149bdd5d195c8e88105b5bdd5b9d081d1bdbc81cdb585b1b60421b6044820152606401620007c2565b600086815260066020908152604080832054600254825163a1c3daad60e01b815292516001600160a01b039283169594919092169263d45c267a92869263a1c3daad92600480820193918290030181865afa158015620012f8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200131e919062002961565b6040518263ffffffff1660e01b81526004016200133d91815260200190565b608060405180830381865afa1580156200135b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200138191906200297b565b505050905060006127108289620013999190620029c8565b620013a59190620029fe565b90506000620013b5828a62002a21565b90506000846001600160a01b0316634e875bc06040518163ffffffff1660e01b8152600401602060405180830381865afa158015620013f8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200141e919062002961565b856001600160a01b031663a1c3daad6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200145d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001483919062002961565b6200148f9190620029c8565b9050600082866001600160a01b031663a1c3daad6040518163ffffffff1660e01b8152600401602060405180830381865afa158015620014d3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620014f9919062002961565b620015059190620029e8565b90506000620015158284620029fe565b9050600081886001600160a01b0316634e875bc06040518163ffffffff1660e01b8152600401602060405180830381865afa15801562001559573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200157f919062002961565b6200158b919062002a21565b959e959d50919b50995092975050505050505050565b620015ab62002651565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b620015d762002651565b6001600160a01b0381166200160357604051631e4fbdf760e01b815260006004820152602401620007c2565b6200160e8162002680565b50565b6000600885856040516200162792919062002abc565b908152602001604051809103902083836040516200164792919062002abc565b9081526040519081900360200190205460ff1615620016b35760405162461bcd60e51b815260206004820152602160248201527f526f757465723a205477656574546f6b656e20616c72656164792065786973746044820152607360f81b6064820152608401620007c2565b600160009054906101000a90046001600160a01b03166001600160a01b031663dce0b4e46040518163ffffffff1660e01b8152600401602060405180830381865afa15801562001707573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200172d919062002961565b600160009054906101000a90046001600160a01b03166001600160a01b031663f39690e46040518163ffffffff1660e01b8152600401602060405180830381865afa15801562001781573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620017a7919062002a37565b604051636eb1769f60e11b81523360048201523060248201526001600160a01b03919091169063dd62ed3e90604401602060405180830381865afa158015620017f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200181a919062002961565b1015620018825760405162461bcd60e51b815260206004820152602f60248201527f526f757465723a20696e73756666696369656e7420616c6c6f77616e6365206660448201526e6f7220706c6174666f726d2066656560881b6064820152608401620007c2565b600160009054906101000a90046001600160a01b03166001600160a01b031663f39690e46040518163ffffffff1660e01b8152600401602060405180830381865afa158015620018d6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620018fc919062002a37565b6001600160a01b03166323b872dd33600160009054906101000a90046001600160a01b03166001600160a01b031663fa2af9da6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200195f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001985919062002a37565b600160009054906101000a90046001600160a01b03166001600160a01b031663dce0b4e46040518163ffffffff1660e01b8152600401602060405180830381865afa158015620019d9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620019ff919062002961565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af115801562001a54573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001a7a919062002a57565b62001ad45760405162461bcd60e51b8152602060048201526024808201527f526f757465723a20706c6174666f726d20666565207472616e736665722066616044820152631a5b195960e21b6064820152608401620007c2565b60008585858560405162001ae890620026d0565b62001af7949392919062002af5565b604051809103906000f08015801562001b14573d6000803e3d6000fd5b509050600086868330888833600160009054906101000a90046001600160a01b03166001600160a01b031663864604746040518163ffffffff1660e01b8152600401602060405180830381865afa15801562001b74573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001b9a919062002961565b6001546040516001600160a01b039091169062001bb790620026de565b62001bcb9998979695949392919062002b2b565b604051809103906000f08015801562001be8573d6000803e3d6000fd5b5060058054919250600062001bfd8362002b92565b9091555050600580546000908152600660205260409081902080546001600160a01b0319166001600160a01b0385161790559054905160079062001c45908a908a9062002abc565b9081526020016040518091039020868660405162001c6592919062002abc565b90815260200160405180910390208190555060016008888860405162001c8d92919062002abc565b9081526020016040518091039020868660405162001cad92919062002abc565b90815260405160209181900382018120805460ff19169315159390931790925560055482527f8e509aa843aafad4d0e3026f4c757646a241f64b77c50e3fb6b6a08624033563910160405180910390a1505060055495945050505050565b60008060008060008062001d20888862000362565b60405163780106db60e11b81526004810183905260248101829052939750919550935091506001600160a01b038a169063f0020db690604401600060405180830381600087803b15801562001d7457600080fd5b505af115801562001d89573d6000803e3d6000fd5b50949b939a509298505050505050505050565b600080600080600260009054906101000a90046001600160a01b03166001600160a01b031663d45c267a876001600160a01b031663a1c3daad6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562001e05573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001e2b919062002961565b6040518263ffffffff1660e01b815260040162001e4a91815260200190565b608060405180830381865afa15801562001e68573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001e8e91906200297b565b93509350935093506000612710858762001ea99190620029c8565b62001eb59190620029fe565b9050600061271062001ec88484620029c8565b62001ed49190620029fe565b9050600061271062001ee78785620029c8565b62001ef39190620029fe565b9050600061271062001f068786620029c8565b62001f129190620029fe565b9050600062001f228284620029e8565b9050600160009054906101000a90046001600160a01b03166001600160a01b031663f39690e46040518163ffffffff1660e01b8152600401602060405180830381865afa15801562001f78573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001f9e919062002a37565b6001600160a01b031663a9059cbb600160009054906101000a90046001600160a01b03166001600160a01b031663fa2af9da6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562002000573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002026919062002a37565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018790526044016020604051808303816000875af115801562002074573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200209a919062002a57565b50600160009054906101000a90046001600160a01b03166001600160a01b031663f39690e46040518163ffffffff1660e01b8152600401602060405180830381865afa158015620020ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002115919062002a37565b60035460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810184905291169063a9059cbb906044016020604051808303816000875af115801562002168573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200218e919062002a57565b50600360009054906101000a90046001600160a01b03166001600160a01b0316635f0e148b8c6001600160a01b031663933165d86040518163ffffffff1660e01b8152600401600060405180830381865afa158015620021f2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526200221c919081019062002bd4565b858e6001600160a01b031663efdee94f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200225c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002282919062002a37565b866040518563ffffffff1660e01b8152600401620022a4949392919062002c54565b600060405180830381600087803b158015620022bf57600080fd5b505af1158015620022d4573d6000803e3d6000fd5b505050505050505050505050505050565b60008060008060008062001d208888620011c8565b816001600160a01b0316632ac1a8da6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200233657600080fd5b505af11580156200234b573d6000803e3d6000fd5b5050505060006402540be4008262002364919062002a21565b90506000836001600160a01b0316634e875bc06040518163ffffffff1660e01b8152600401602060405180830381865afa158015620023a7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620023cd919062002961565b90506000600160009054906101000a90046001600160a01b03166001600160a01b031663ba0232256040518163ffffffff1660e01b8152600401602060405180830381865afa15801562002425573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200244b919062002a37565b9050846001600160a01b03166375de982e6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200248c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620024b2919062002a37565b60405163a9059cbb60e01b81526001600160a01b03838116600483015260248201859052919091169063a9059cbb906044016020604051808303816000875af115801562002504573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200252a919062002a57565b50600160009054906101000a90046001600160a01b03166001600160a01b031663f39690e46040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200257f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620025a5919062002a37565b60405163a9059cbb60e01b81526001600160a01b03838116600483015260248201869052919091169063a9059cbb906044016020604051808303816000875af1158015620025f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200261d919062002a57565b506005546040517fcc74390c0c8d920eb25f6ee2c48413396809b2e4bfc5743327d901ef3e15ce5990600090a25050505050565b6000546001600160a01b03163314620011c65760405163118cdaa760e01b8152336004820152602401620007c2565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610e1f8062002ca783390190565b610c8d8062003ac683390190565b600080604083850312156200270057600080fd5b50508035926020909101359150565b6000602082840312156200272257600080fd5b5035919050565b6001600160a01b03811681146200160e57600080fd5b6000602082840312156200275257600080fd5b81356200275f8162002729565b9392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715620027a857620027a862002766565b604052919050565b600067ffffffffffffffff821115620027cd57620027cd62002766565b50601f01601f191660200190565b600082601f830112620027ed57600080fd5b813562002804620027fe82620027b0565b6200277c565b8181528460208386010111156200281a57600080fd5b816020850160208301376000918101602001919091529392505050565b600080604083850312156200284b57600080fd5b823567ffffffffffffffff808211156200286457600080fd5b6200287286838701620027db565b935060208501359150808211156200288957600080fd5b506200289885828601620027db565b9150509250929050565b60008083601f840112620028b557600080fd5b50813567ffffffffffffffff811115620028ce57600080fd5b602083019150836020828501011115620028e757600080fd5b9250929050565b600080600080604085870312156200290557600080fd5b843567ffffffffffffffff808211156200291e57600080fd5b6200292c88838901620028a2565b909650945060208701359150808211156200294657600080fd5b506200295587828801620028a2565b95989497509550505050565b6000602082840312156200297457600080fd5b5051919050565b600080600080608085870312156200299257600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417620029e257620029e2620029b2565b92915050565b80820180821115620029e257620029e2620029b2565b60008262002a1c57634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115620029e257620029e2620029b2565b60006020828403121562002a4a57600080fd5b81516200275f8162002729565b60006020828403121562002a6a57600080fd5b815180151581146200275f57600080fd5b60208082526021908201527f526f757465723a20506f6f6c206973206e6f74206772616475617465642079656040820152601d60fa1b606082015260800190565b8183823760009101908152919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60408152600062002b0b60408301868862002acc565b828103602084015262002b2081858762002acc565b979650505050505050565b60e08152600062002b4160e083018b8d62002acc565b6001600160a01b038a811660208501528981166040850152838203606085015262002b6e82898b62002acc565b968116608085015260a08401959095525050911660c0909101529695505050505050565b60006001820162002ba75762002ba7620029b2565b5060010190565b60005b8381101562002bcb57818101518382015260200162002bb1565b50506000910152565b60006020828403121562002be757600080fd5b815167ffffffffffffffff81111562002bff57600080fd5b8201601f8101841362002c1157600080fd5b805162002c22620027fe82620027b0565b81815285602083850101111562002c3857600080fd5b62002c4b82602083016020860162002bae565b95945050505050565b608081526000855180608084015262002c758160a0850160208a0162002bae565b6020830195909552506001600160a01b03929092166040830152606082015260a0601f909201601f1916010191905056fe60806040523480156200001157600080fd5b5060405162000e1f38038062000e1f833981016040819052620000349162000319565b8160405160200162000047919062000383565b60405160208183030381529060405282604051602001620000699190620003ba565b60408051601f19818403018152919052600362000087838262000476565b50600462000096828262000476565b5060059150620000a99050838262000476565b506006620000b8828262000476565b50620000cf3369d3c21bcecceda1000000620000d7565b50506200056a565b6001600160a01b038216620001075760405163ec442f0560e01b8152600060048201526024015b60405180910390fd5b620001156000838362000119565b5050565b6001600160a01b038316620001485780600260008282546200013c919062000542565b90915550620001bc9050565b6001600160a01b038316600090815260208190526040902054818110156200019d5760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401620000fe565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b038216620001da57600280548290039055620001f9565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516200023f91815260200190565b60405180910390a3505050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200027f57818101518382015260200162000265565b50506000910152565b600082601f8301126200029a57600080fd5b81516001600160401b0380821115620002b757620002b76200024c565b604051601f8301601f19908116603f01168101908282118183101715620002e257620002e26200024c565b81604052838152866020858801011115620002fc57600080fd5b6200030f84602083016020890162000262565b9695505050505050565b600080604083850312156200032d57600080fd5b82516001600160401b03808211156200034557600080fd5b620003538683870162000288565b935060208501519150808211156200036a57600080fd5b50620003798582860162000288565b9150509250929050565b6c547765657420546f6b656e202d60981b815260008251620003ad81600d85016020870162000262565b91909101600d0192915050565b6254542d60e81b815260008251620003da81600385016020870162000262565b9190910160030192915050565b600181811c90821680620003fc57607f821691505b6020821081036200041d57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200047157600081815260208120601f850160051c810160208610156200044c5750805b601f850160051c820191505b818110156200046d5782815560010162000458565b5050505b505050565b81516001600160401b038111156200049257620004926200024c565b620004aa81620004a38454620003e7565b8462000423565b602080601f831160018114620004e25760008415620004c95750858301515b600019600386901b1c1916600185901b1785556200046d565b600085815260208120601f198616915b828110156200051357888601518255948401946001909101908401620004f2565b5085821015620005325787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b808201808211156200056457634e487b7160e01b600052601160045260246000fd5b92915050565b6108a5806200057a6000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c806370a082311161008c578063933165d811610066578063933165d8146101a257806395d89b41146101aa578063a9059cbb146101b2578063dd62ed3e146101c557600080fd5b806370a082311461015e57806379cc6790146101875780637ff5eed11461019a57600080fd5b806306fdde03146100d4578063095ea7b3146100f257806318160ddd1461011557806323b872dd14610127578063313ce5671461013a57806342966c6814610149575b600080fd5b6100dc6101fe565b6040516100e991906106d6565b60405180910390f35b610105610100366004610740565b610290565b60405190151581526020016100e9565b6002545b6040519081526020016100e9565b61010561013536600461076a565b6102aa565b604051601281526020016100e9565b61015c6101573660046107a6565b6102ce565b005b61011961016c3660046107bf565b6001600160a01b031660009081526020819052604090205490565b61015c610195366004610740565b6102db565b6100dc6102f4565b6100dc610382565b6100dc61038f565b6101056101c0366004610740565b61039e565b6101196101d33660046107e1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60606003805461020d90610814565b80601f016020809104026020016040519081016040528092919081815260200182805461023990610814565b80156102865780601f1061025b57610100808354040283529160200191610286565b820191906000526020600020905b81548152906001019060200180831161026957829003601f168201915b5050505050905090565b60003361029e8185856103ac565b60019150505b92915050565b6000336102b88582856103be565b6102c3858585610442565b506001949350505050565b6102d833826104a1565b50565b6102e68233836103be565b6102f082826104a1565b5050565b6005805461030190610814565b80601f016020809104026020016040519081016040528092919081815260200182805461032d90610814565b801561037a5780601f1061034f5761010080835404028352916020019161037a565b820191906000526020600020905b81548152906001019060200180831161035d57829003601f168201915b505050505081565b6006805461030190610814565b60606004805461020d90610814565b60003361029e818585610442565b6103b983838360016104d7565b505050565b6001600160a01b0383811660009081526001602090815260408083209386168352929052205460001981101561043c578181101561042d57604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064015b60405180910390fd5b61043c848484840360006104d7565b50505050565b6001600160a01b03831661046c57604051634b637e8f60e11b815260006004820152602401610424565b6001600160a01b0382166104965760405163ec442f0560e01b815260006004820152602401610424565b6103b98383836105ac565b6001600160a01b0382166104cb57604051634b637e8f60e11b815260006004820152602401610424565b6102f0826000836105ac565b6001600160a01b0384166105015760405163e602df0560e01b815260006004820152602401610424565b6001600160a01b03831661052b57604051634a1406b160e11b815260006004820152602401610424565b6001600160a01b038085166000908152600160209081526040808320938716835292905220829055801561043c57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161059e91815260200190565b60405180910390a350505050565b6001600160a01b0383166105d75780600260008282546105cc919061084e565b909155506106499050565b6001600160a01b0383166000908152602081905260409020548181101561062a5760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610424565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b03821661066557600280548290039055610684565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516106c991815260200190565b60405180910390a3505050565b600060208083528351808285015260005b81811015610703578581018301518582016040015282016106e7565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461073b57600080fd5b919050565b6000806040838503121561075357600080fd5b61075c83610724565b946020939093013593505050565b60008060006060848603121561077f57600080fd5b61078884610724565b925061079660208501610724565b9150604084013590509250925092565b6000602082840312156107b857600080fd5b5035919050565b6000602082840312156107d157600080fd5b6107da82610724565b9392505050565b600080604083850312156107f457600080fd5b6107fd83610724565b915061080b60208401610724565b90509250929050565b600181811c9082168061082857607f821691505b60208210810361084857634e487b7160e01b600052602260045260246000fd5b50919050565b808201808211156102a457634e487b7160e01b600052601160045260246000fdfea2646970667358221220f89ddd28ce36d1cf9e53ad073af457c1ac62a47de5e69bc7110fa2ab53ce6e5764736f6c6343000814003360806040523480156200001157600080fd5b5060405162000c8d38038062000c8d83398101604081905262000034916200024d565b33806200005b57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b62000066816200011b565b5060076200007588826200039a565b50600980546001600160a01b038089166001600160a01b031992831617909255600a8054928816929091169190911790556008620000b485826200039a565b50600b80546001600160a01b038086166001600160a01b031992831617909255600d805492841692909116919091179055620000f382610e1062000466565b600c5550506000600481905560055550504260035550506006805460ff191690555062000492565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200019357600080fd5b81516001600160401b0380821115620001b057620001b06200016b565b604051601f8301601f19908116603f01168101908282118183101715620001db57620001db6200016b565b81604052838152602092508683858801011115620001f857600080fd5b600091505b838210156200021c5785820183015181830184015290820190620001fd565b600093810190920192909252949350505050565b80516001600160a01b03811681146200024857600080fd5b919050565b600080600080600080600060e0888a0312156200026957600080fd5b87516001600160401b03808211156200028157600080fd5b6200028f8b838c0162000181565b98506200029f60208b0162000230565b9750620002af60408b0162000230565b965060608a0151915080821115620002c657600080fd5b50620002d58a828b0162000181565b945050620002e66080890162000230565b925060a08801519150620002fd60c0890162000230565b905092959891949750929550565b600181811c908216806200032057607f821691505b6020821081036200034157634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200039557600081815260208120601f850160051c81016020861015620003705750805b601f850160051c820191505b8181101562000391578281556001016200037c565b5050505b505050565b81516001600160401b03811115620003b657620003b66200016b565b620003ce81620003c784546200030b565b8462000347565b602080601f831160018114620004065760008415620003ed5750858301515b600019600386901b1c1916600185901b17855562000391565b600085815260208120601f198616915b82811015620004375788860151825594840194600190910190840162000416565b5085821015620004565787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b80820281158282048414176200048c57634e487b7160e01b600052601160045260246000fd5b92915050565b6107eb80620004a26000396000f3fe608060405234801561001057600080fd5b50600436106101c35760003560e01c80638da5cb5b116100f9578063a932492f11610097578063efdee94f11610071578063efdee94f14610337578063f0020db61461034a578063f2fde38b1461035d578063f92052c11461037057600080fd5b8063a932492f14610302578063b3ae5d5b14610318578063ca0ab0751461032457600080fd5b80639e5f2602116100d35780639e5f2602146102db5780639ec86276146102e8578063a1c3daad146102f1578063a5d5a528146102fa57600080fd5b80638da5cb5b146102aa578063933165d8146102bb5780639886e12d146102c357600080fd5b80635ad701c21161016657806375de982e1161014057806375de982e1461026e5780637ff5eed11461028157806383dc045c14610296578063842e30041461029e57600080fd5b80635ad701c2146102525780636f91ff2d1461025a578063715018a61461026657600080fd5b80632ac1a8da116101a25780632ac1a8da1461022a578063497818e2146102345780634985746f146102405780634e875bc01461024957600080fd5b8062113e08146101c8578063012e83b4146101e85780631030978114610213575b600080fd5b600154600254604080519283526020830191909152015b60405180910390f35b600a546101fb906001600160a01b031681565b6040516001600160a01b0390911681526020016101df565b61021c60035481565b6040519081526020016101df565b610232610379565b005b61021c6404a817c80081565b61021c60045481565b61021c60025481565b61021c6103bb565b61021c6412a05f200081565b6102326103ff565b6009546101fb906001600160a01b031681565b610289610413565b6040516101df9190610665565b6102326104a1565b61021c6409502f900081565b6000546001600160a01b03166101fb565b6102896104d1565b6102cb6104de565b60405190151581526020016101df565b6006546102cb9060ff1681565b61021c600c5481565b61021c60015481565b610232610509565b61021c6e13426172c74d822b878fe80000000081565b61021c6402540be40081565b600d546101fb906001600160a01b031681565b600b546101fb906001600160a01b031681565b6102326103583660046106b3565b610539565b61023261036b3660046106d5565b6105aa565b61021c60055481565b600a546001600160a01b031633146103ac5760405162461bcd60e51b81526004016103a390610705565b60405180910390fd5b6006805460ff19166001179055565b60006412a05f2000600254106103d15750600390565b6409502f9000600254106103e55750600290565b6404a817c800600254106103f95750600190565b50600090565b6104076105e8565b6104116000610615565b565b6007805461042090610754565b80601f016020809104026020016040519081016040528092919081815260200182805461044c90610754565b80156104995780601f1061046e57610100808354040283529160200191610499565b820191906000526020600020905b81548152906001019060200180831161047c57829003601f168201915b505050505081565b600a546001600160a01b031633146104cb5760405162461bcd60e51b81526004016103a390610705565b42600455565b6008805461042090610754565b6000600c54600454426104f1919061078e565b10158061050457506402540be400600254105b905090565b600a546001600160a01b031633146105335760405162461bcd60e51b81526004016103a390610705565b42600555565b600a546001600160a01b031633146105635760405162461bcd60e51b81526004016103a390610705565b6001829055600281905560408051838152602081018390527fcb711e662039bf9a0bdf74bc04b9d7034424098680c51877b784dc7715934bbd910160405180910390a15050565b6105b26105e8565b6001600160a01b0381166105dc57604051631e4fbdf760e01b8152600060048201526024016103a3565b6105e581610615565b50565b6000546001600160a01b031633146104115760405163118cdaa760e01b81523360048201526024016103a3565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208083528351808285015260005b8181101561069257858101830151858201604001528201610676565b506000604082860101526040601f19601f8301168501019250505092915050565b600080604083850312156106c657600080fd5b50508035926020909101359150565b6000602082840312156106e757600080fd5b81356001600160a01b03811681146106fe57600080fd5b9392505050565b6020808252602f908201527f5669727475616c506f6f6c3a2063616c6c6572206973206e6f7420746865207260408201526e1bdd5d1a5b99c818dbdb9d1c9858dd608a1b606082015260800190565b600181811c9082168061076857607f821691505b60208210810361078857634e487b7160e01b600052602260045260246000fd5b50919050565b818103818111156107af57634e487b7160e01b600052601160045260246000fd5b9291505056fea264697066735822122044f4135f1b19eff38d23aae5765993e4417892df318a7582c4aa544edf9709b564736f6c63430008140033a26469706673582212200a7416ee6866f6cd4841346105b661e0e37d304b2091b45ebbcea4abf69885d064736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000003daabf4a08e8b8c1e52d86fd8ea7184736ac1931
-----Decoded View---------------
Arg [0] : _configManager (address): 0x3dAaBF4a08e8B8C1E52d86FD8EA7184736ac1931
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000003daabf4a08e8b8c1e52d86fd8ea7184736ac1931
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.