Feature Tip: Add private address tag to any address under My Name Tag !
ERC-20
Overview
Max Total Supply
194,353.747718 xBASKET
Holders
44
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 6 Decimals)
Balance
42,488.024845 xBASKETValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
xBasket
Compiler Version
v0.8.16+commit.07a7930e
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; import "@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol"; import "@openzeppelin/contracts/interfaces/IERC4626.sol"; import "./interfaces/IKeyProtocolVariables.sol"; import "./interfaces/IxTokenRouter.sol"; import "./interfaces/IOraclePrices.sol"; import "./interfaces/IxToken.sol"; import "./interfaces/ITWAP.sol"; contract xBasket is ERC20, IERC4626, Ownable { IxTokenRouter public xTokenRouter; IOraclePrices public oraclePrices; IKeyProtocolVariables public keyProtocolValues; address public xWheat; address public xSoy; address public xCorn; address public xRice; address public cWheat; address public cSoy; address public cCorn; address public cRice; address public usdc; ISwapRouter public uniswapRouter; ITWAP public twap; event AutoCompounded(uint256 xWheat, uint256 xSoy, uint256 xRice, uint256 xCorn); constructor( address _xTokenRouter, address _oraclePrices, address _keyProtocolValues, address _uniswapRouter, address _twap ) ERC20("xBasket LandX Index Fund", "xBASKET") { require(_xTokenRouter != address(0), "zero address is not allowed"); require(_oraclePrices != address(0), "zero address is not allowed"); require(_keyProtocolValues != address(0), "zero address is not allowed"); require(_uniswapRouter != address(0), "zero address is not allowed"); xTokenRouter = IxTokenRouter(_xTokenRouter); oraclePrices = IOraclePrices(_oraclePrices); keyProtocolValues = IKeyProtocolVariables(_keyProtocolValues); xWheat = xTokenRouter.getXToken("WHEAT"); xSoy = xTokenRouter.getXToken("SOY"); xRice = xTokenRouter.getXToken("RICE"); xCorn = xTokenRouter.getXToken("CORN"); cWheat = xTokenRouter.getCToken("WHEAT"); cSoy = xTokenRouter.getCToken("SOY"); cRice = xTokenRouter.getCToken("RICE"); cCorn = xTokenRouter.getCToken("CORN"); usdc = oraclePrices.usdc(); uniswapRouter = ISwapRouter(_uniswapRouter); twap = ITWAP(_twap); } // We have 4 underlying tokens function asset() public view override returns (address) { return usdc; } // return underlying assets amount in USDC function totalAssets() public view override returns (uint256) { return calculateTVL(); } function convertToShares(uint256 assets) public view override returns (uint256) { return _convertToShares(assets); } function _convertToShares(uint256 assets) internal view returns (uint256 shares) { uint256 usdVaultValuation = calculateTVL(); uint256 circulatingSupply = totalSupply(); if (circulatingSupply == 0) { shares = 4 * assets; // initially 1 xBasket = 0.25 of all 4 xTokens } else { uint256 xWheatPrice = twap.getPrice(xWheat, usdc); uint256 xSoyPrice = twap.getPrice(xSoy, usdc); uint256 xRicePrice = twap.getPrice(xRice, usdc); uint256 xCornPrice = twap.getPrice(xCorn, usdc); shares = (assets * (xWheatPrice + xSoyPrice + xCornPrice + xRicePrice) * circulatingSupply) / usdVaultValuation / 1e6; } return shares; } function convertToAssets(uint256 shares) public view override returns (uint256) { return _convertToAssets(shares); } function _convertToAssets(uint256 shares) internal view returns (uint256) { uint256 usdVaultValuation = calculateTVL(); uint256 circulatingSupply = totalSupply(); if (circulatingSupply == 0) { return shares / 4; } uint256 xWheatPrice = twap.getPrice(xWheat, usdc); uint256 xSoyPrice = twap.getPrice(xSoy, usdc); uint256 xRicePrice = twap.getPrice(xRice, usdc); uint256 xCornPrice = twap.getPrice(xCorn, usdc); uint256 redeemAmount = (1e6 * shares * usdVaultValuation) / circulatingSupply / (xWheatPrice + xSoyPrice + xRicePrice + xCornPrice); return redeemAmount; } function maxDeposit(address receiver) public view virtual override returns (uint256) { return _findMinAssetBalanceValue(receiver); } function maxMint(address receiver) public view virtual override returns (uint256) { return _convertToShares(_findMinAssetBalanceValue(receiver)); } function maxWithdraw(address owner) public view virtual override returns (uint256) { return _convertToAssets(balanceOf(owner)); } function maxRedeem(address owner) public view virtual override returns (uint256) { return balanceOf(owner); } function previewDeposit(uint256 assets) public view virtual override returns (uint256) { return _convertToShares(assets); } function previewMint(uint256 shares) public view virtual override returns (uint256) { return _convertToAssets(shares); } function previewWithdraw(uint256 assets) public view virtual override returns (uint256) { return _convertToShares(assets); } function previewRedeem(uint256 shares) public view virtual override returns (uint256) { return _convertToAssets(shares); } function deposit(uint256 assets, address receiver) public virtual override returns (uint256) { require( assets <= maxDeposit(msg.sender), "ERC4626: deposit more than max" ); uint256 shares = previewDeposit(assets); _deposit(msg.sender, receiver, assets, shares); return shares; } function mint(uint256 shares, address receiver) public virtual override returns (uint256) { require(shares <= maxMint(msg.sender), "ERC4626: mint more than max"); uint256 assets = previewMint(shares); _deposit(msg.sender, receiver, assets, shares); return assets; } function withdraw( uint256 assets, address receiver, address owner ) public virtual override returns (uint256) { require( assets <= maxWithdraw(owner), "ERC4626: withdraw more than max" ); uint256 shares = previewWithdraw(assets); _withdraw(_msgSender(), receiver, owner, assets, shares); return shares; } function redeem( uint256 shares, address receiver, address owner ) public virtual override returns (uint256) { require(shares <= maxRedeem(owner), "ERC4626: redeem more than max"); uint256 assets = previewRedeem(shares); _withdraw(_msgSender(), receiver, owner, assets, shares); return assets; } function _findMinAssetBalanceValue(address owner) internal view returns (uint256) { uint256 xWheatBalance = IxToken(xWheat).balanceOf(owner); uint256 xSoyBalance = IxToken(xSoy).balanceOf(owner); uint256 xRiceBalance = IxToken(xRice).balanceOf(owner); uint256 xCornBalance = IxToken(xCorn).balanceOf(owner); uint256[4] memory balances = [ xWheatBalance, xSoyBalance, xRiceBalance, xCornBalance ]; uint256 smallest = xWheatBalance; uint256 i; for (i = 0; i < balances.length; i++) { if (balances[i] < smallest) { smallest = balances[i]; } } return smallest; } function _deposit( address caller, address receiver, uint256 assets, uint256 shares ) internal { IxToken(xWheat).xBasketTransfer(caller, assets); IxToken(xSoy).xBasketTransfer(caller, assets); IxToken(xRice).xBasketTransfer(caller, assets); IxToken(xCorn).xBasketTransfer(caller, assets); IxToken(xWheat).stake(assets); IxToken(xSoy).stake(assets); IxToken(xRice).stake(assets); IxToken(xCorn).stake(assets); _mint(receiver, shares); emit Deposit(caller, receiver, assets, shares); } function _withdraw( address caller, address receiver, address owner, uint256 assets, uint256 shares ) internal { if (caller != owner) { _spendAllowance(owner, caller, shares); } autoCompoundRewards(); _burn(owner, shares); IxToken(xWheat).unstake(assets); IxToken(xSoy).unstake(assets); IxToken(xRice).unstake(assets); IxToken(xCorn).unstake(assets); IxToken(xWheat).transfer(receiver, assets); IxToken(xSoy).transfer(receiver, assets); IxToken(xRice).transfer(receiver, assets); IxToken(xCorn).transfer(receiver, assets); emit Withdraw(caller, receiver, owner, assets, shares); } // calculate the value of the contracts xToken holdings in USDC function calculateCollateral() public view returns (uint256) { // xTokens Balances uint256 xWheatBalance = IxToken(xWheat).balanceOf(address(this)); uint256 xSoyBalance = IxToken(xSoy).balanceOf(address(this)); uint256 xRiceBalance = IxToken(xRice).balanceOf(address(this)); uint256 xCornBalance = IxToken(xCorn).balanceOf(address(this)); (uint256 xWheatStaked, ) = IxToken(xWheat).Staked(address(this)); (uint256 xSoyStaked, ) = IxToken(xSoy).Staked(address(this)); (uint256 xRiceStaked, ) = IxToken(xRice).Staked(address(this)); (uint256 xCornStaked, ) = IxToken(xCorn).Staked(address(this)); // USDC Prices - Note this assumes prices are stored in USDC with 6 decimals uint256 xWheatPrice = twap.getPrice(xWheat, usdc); uint256 xSoyPrice = twap.getPrice(xSoy, usdc); uint256 xRicePrice = twap.getPrice(xRice, usdc); uint256 xCornPrice = twap.getPrice(xCorn, usdc); // Valutations uint256 collateral; collateral += (xWheatBalance + xWheatStaked) * xWheatPrice; collateral += (xSoyBalance + xSoyStaked) * xSoyPrice; collateral += (xRiceBalance + xRiceStaked) * xRicePrice; collateral += (xCornBalance + xCornStaked) * xCornPrice; collateral = collateral / 1e6; //USDC has 6 decimals return collateral; } // calculate the value of the contracts cToken holdings in USDC function calculateYield() public view returns (uint256) { // Rewards Pending & USDC balance uint256 cWheatPending = IxToken(xWheat).availableToClaim(address(this)); uint256 cSoyPending = IxToken(xSoy).availableToClaim(address(this)); uint256 cRicePending = IxToken(xRice).availableToClaim(address(this)); uint256 cCornPending = IxToken(xCorn).availableToClaim(address(this)); uint256 usdcBalance = IERC20(usdc).balanceOf(address(this)); // USDC Prices - Note this assumes prices are stored in USDC with 6 decimals uint256 cWheatPrice = oraclePrices.prices("WHEAT"); uint256 cSoyPrice = oraclePrices.prices("SOY"); uint256 cRicePrice = oraclePrices.prices("RICE"); uint256 cCornPrice = oraclePrices.prices("CORN"); // Valutations uint256 totalYield = usdcBalance; totalYield += ((IERC20(cWheat).balanceOf(address(this)) + cWheatPending) * cWheatPrice) / 1e9; // cTokenparices are per megatonne, 1 cTokenPrice = 1 price per kg, so we divide by 1e9 totalYield += ((IERC20(cSoy).balanceOf(address(this)) + cSoyPending) * cSoyPrice) / 1e9; totalYield += ((IERC20(cRice).balanceOf(address(this)) + cRicePending) * cRicePrice) / 1e9; totalYield += ((IERC20(cCorn).balanceOf(address(this)) + cCornPending) * cCornPrice) / 1e9; return totalYield; } // calculate the value of the contracts holdings in USDC function calculateTVL() public view returns (uint256) { uint256 totalCollateral = calculateCollateral(); uint256 totalYield = calculateYield(); uint256 tvl = totalCollateral + totalYield; return tvl; } // calculate price per token function pricePerToken() public view returns (uint256) { uint256 tvl = calculateTVL(); uint256 circulatingSupply = totalSupply(); if (circulatingSupply == 0) { return 0; } uint256 xBasketPrice = (tvl * 1e6) / circulatingSupply; // price is usdc (6 decimals) for 1 xBasket return xBasketPrice; } // claim rewards, sell cTokens, buy xTokens, stake new xTokens function autoCompoundRewards() public { IxToken(xWheat).claim(); IxToken(xSoy).claim(); IxToken(xRice).claim(); IxToken(xCorn).claim(); uint256 cWheatBalance = IERC20(cWheat).balanceOf(address(this)); uint256 cSoyBalance = IERC20(cSoy).balanceOf(address(this)); uint256 cRiceBalance = IERC20(cRice).balanceOf(address(this)); uint256 cCornBalance = IERC20(cCorn).balanceOf(address(this)); ERC20Burnable(cWheat).burn(cWheatBalance); //Sell cWheat _convertToXToken(xWheat); //Buy xWheat ERC20Burnable(cSoy).burn(cSoyBalance); //Sell cSoy _convertToXToken(xSoy); //Buy xSoy ERC20Burnable(cRice).burn(cRiceBalance); //Sell cRice _convertToXToken(xRice); //Buy xRice ERC20Burnable(cCorn).burn(cCornBalance); //Sell cCorn _convertToXToken(xCorn); //Buy xCorn uint256 xWheatBalance = IxToken(xWheat).balanceOf(address(this)); uint256 xSoyBalance = IxToken(xSoy).balanceOf(address(this)); uint256 xRiceBalance = IxToken(xRice).balanceOf(address(this)); uint256 xCornBalance = IxToken(xCorn).balanceOf(address(this)); IxToken(xWheat).stake(xWheatBalance); IxToken(xSoy).stake(xSoyBalance); IxToken(xRice).stake(xRiceBalance); IxToken(xCorn).stake(xCornBalance); emit AutoCompounded(xWheatBalance, xSoyBalance, xRiceBalance, xCornBalance); } function quoteAmountOut(uint _amount, address xToken) public view returns (uint) { uint price = twap.getPrice(usdc, xToken); uint256 amountOut = _amount * price / 1e6; //xTokens has 6 decimals return amountOut; } function _convertToXToken(address xToken) internal returns (uint256) { uint256 amountIn = IERC20(usdc).balanceOf(address(this)); uint256 slippage = keyProtocolValues.buyXTokenSlippage(); uint256 predictedAmountOut = quoteAmountOut(amountIn, xToken); uint256 minAmountOut = predictedAmountOut * 10000 / (10000 + slippage); TransferHelper.safeApprove(usdc, address(uniswapRouter), amountIn); ISwapRouter.ExactInputSingleParams memory params = ISwapRouter .ExactInputSingleParams( usdc, xToken, 3000, address(this), block.timestamp + 15, amountIn, minAmountOut, 0 ); return uniswapRouter.exactInputSingle(params); } function renounceOwnership() public view override onlyOwner { revert ("can 't renounceOwnership here"); } function decimals() public view virtual override(ERC20, IERC20Metadata) returns (uint8) { return 6; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC4626.sol) pragma solidity ^0.8.0; import "../token/ERC20/IERC20.sol"; import "../token/ERC20/extensions/IERC20Metadata.sol"; /** * @dev Interface of the ERC4626 "Tokenized Vault Standard", as defined in * https://eips.ethereum.org/EIPS/eip-4626[ERC-4626]. * * _Available since v4.7._ */ interface IERC4626 is IERC20, IERC20Metadata { event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares); event Withdraw( address indexed sender, address indexed receiver, address indexed owner, uint256 assets, uint256 shares ); /** * @dev Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing. * * - MUST be an ERC-20 token contract. * - MUST NOT revert. */ function asset() external view returns (address assetTokenAddress); /** * @dev Returns the total amount of the underlying asset that is “managed” by Vault. * * - SHOULD include any compounding that occurs from yield. * - MUST be inclusive of any fees that are charged against assets in the Vault. * - MUST NOT revert. */ function totalAssets() external view returns (uint256 totalManagedAssets); /** * @dev Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal * scenario where all the conditions are met. * * - MUST NOT be inclusive of any fees that are charged against assets in the Vault. * - MUST NOT show any variations depending on the caller. * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange. * - MUST NOT revert. * * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and * from. */ function convertToShares(uint256 assets) external view returns (uint256 shares); /** * @dev Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal * scenario where all the conditions are met. * * - MUST NOT be inclusive of any fees that are charged against assets in the Vault. * - MUST NOT show any variations depending on the caller. * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange. * - MUST NOT revert. * * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and * from. */ function convertToAssets(uint256 shares) external view returns (uint256 assets); /** * @dev Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver, * through a deposit call. * * - MUST return a limited value if receiver is subject to some deposit limit. * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited. * - MUST NOT revert. */ function maxDeposit(address receiver) external view returns (uint256 maxAssets); /** * @dev Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given * current on-chain conditions. * * - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit * call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called * in the same transaction. * - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the * deposit would be accepted, regardless if the user has enough tokens approved, etc. * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees. * - MUST NOT revert. * * NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in * share price or some other type of condition, meaning the depositor will lose assets by depositing. */ function previewDeposit(uint256 assets) external view returns (uint256 shares); /** * @dev Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens. * * - MUST emit the Deposit event. * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the * deposit execution, and are accounted for during deposit. * - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not * approving enough underlying tokens to the Vault contract, etc). * * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token. */ function deposit(uint256 assets, address receiver) external returns (uint256 shares); /** * @dev Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call. * - MUST return a limited value if receiver is subject to some mint limit. * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted. * - MUST NOT revert. */ function maxMint(address receiver) external view returns (uint256 maxShares); /** * @dev Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given * current on-chain conditions. * * - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call * in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the * same transaction. * - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint * would be accepted, regardless if the user has enough tokens approved, etc. * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees. * - MUST NOT revert. * * NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in * share price or some other type of condition, meaning the depositor will lose assets by minting. */ function previewMint(uint256 shares) external view returns (uint256 assets); /** * @dev Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens. * * - MUST emit the Deposit event. * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint * execution, and are accounted for during mint. * - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not * approving enough underlying tokens to the Vault contract, etc). * * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token. */ function mint(uint256 shares, address receiver) external returns (uint256 assets); /** * @dev Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the * Vault, through a withdraw call. * * - MUST return a limited value if owner is subject to some withdrawal limit or timelock. * - MUST NOT revert. */ function maxWithdraw(address owner) external view returns (uint256 maxAssets); /** * @dev Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block, * given current on-chain conditions. * * - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw * call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if * called * in the same transaction. * - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though * the withdrawal would be accepted, regardless if the user has enough shares, etc. * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees. * - MUST NOT revert. * * NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in * share price or some other type of condition, meaning the depositor will lose assets by depositing. */ function previewWithdraw(uint256 assets) external view returns (uint256 shares); /** * @dev Burns shares from owner and sends exactly assets of underlying tokens to receiver. * * - MUST emit the Withdraw event. * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the * withdraw execution, and are accounted for during withdraw. * - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner * not having enough shares, etc). * * Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed. * Those methods should be performed separately. */ function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares); /** * @dev Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault, * through a redeem call. * * - MUST return a limited value if owner is subject to some withdrawal limit or timelock. * - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock. * - MUST NOT revert. */ function maxRedeem(address owner) external view returns (uint256 maxShares); /** * @dev Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block, * given current on-chain conditions. * * - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call * in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the * same transaction. * - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the * redemption would be accepted, regardless if the user has enough shares, etc. * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees. * - MUST NOT revert. * * NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in * share price or some other type of condition, meaning the depositor will lose assets by redeeming. */ function previewRedeem(uint256 shares) external view returns (uint256 assets); /** * @dev Burns exactly shares from owner and sends assets of underlying tokens to receiver. * * - MUST emit the Withdraw event. * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the * redeem execution, and are accounted for during redeem. * - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner * not having enough shares, etc). * * NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed. * Those methods should be performed separately. */ function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * The default value of {decimals} is 18. To change this, you should override * this function so it returns a different value. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the default value returned by this function, unless * it's overridden. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer(address from, address to, uint256 amount) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by // decrementing then incrementing. _balances[to] += amount; } emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; unchecked { // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above. _balances[account] += amount; } emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; // Overflow not possible: amount <= accountBalance <= totalSupply. _totalSupply -= amount; } emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol) pragma solidity ^0.8.0; import "../ERC20.sol"; import "../../../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 `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public virtual { _burn(_msgSender(), amount); } /** * @dev Destroys `amount` tokens from `account`, deducting from the caller's * allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `amount`. */ function burnFrom(address account, uint256 amount) public virtual { _spendAllowance(account, _msgSender(), amount); _burn(account, amount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Callback for IUniswapV3PoolActions#swap /// @notice Any contract that calls IUniswapV3PoolActions#swap must implement this interface interface IUniswapV3SwapCallback { /// @notice Called to `msg.sender` after executing a swap via IUniswapV3Pool#swap. /// @dev In the implementation you must pay the pool tokens owed for the swap. /// The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory. /// amount0Delta and amount1Delta can both be 0 if no tokens were swapped. /// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by /// the end of the swap. If positive, the callback must send that amount of token0 to the pool. /// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by /// the end of the swap. If positive, the callback must send that amount of token1 to the pool. /// @param data Any data passed through by the caller via the IUniswapV3PoolActions#swap call function uniswapV3SwapCallback( int256 amount0Delta, int256 amount1Delta, bytes calldata data ) external; }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.7.5; pragma abicoder v2; import '@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol'; /// @title Router token swapping functionality /// @notice Functions for swapping tokens via Uniswap V3 interface ISwapRouter is IUniswapV3SwapCallback { struct ExactInputSingleParams { address tokenIn; address tokenOut; uint24 fee; address recipient; uint256 deadline; uint256 amountIn; uint256 amountOutMinimum; uint160 sqrtPriceLimitX96; } /// @notice Swaps `amountIn` of one token for as much as possible of another token /// @param params The parameters necessary for the swap, encoded as `ExactInputSingleParams` in calldata /// @return amountOut The amount of the received token function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut); struct ExactInputParams { bytes path; address recipient; uint256 deadline; uint256 amountIn; uint256 amountOutMinimum; } /// @notice Swaps `amountIn` of one token for as much as possible of another along the specified path /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactInputParams` in calldata /// @return amountOut The amount of the received token function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut); struct ExactOutputSingleParams { address tokenIn; address tokenOut; uint24 fee; address recipient; uint256 deadline; uint256 amountOut; uint256 amountInMaximum; uint160 sqrtPriceLimitX96; } /// @notice Swaps as little as possible of one token for `amountOut` of another token /// @param params The parameters necessary for the swap, encoded as `ExactOutputSingleParams` in calldata /// @return amountIn The amount of the input token function exactOutputSingle(ExactOutputSingleParams calldata params) external payable returns (uint256 amountIn); struct ExactOutputParams { bytes path; address recipient; uint256 deadline; uint256 amountOut; uint256 amountInMaximum; } /// @notice Swaps as little as possible of one token for `amountOut` of another along the specified path (reversed) /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactOutputParams` in calldata /// @return amountIn The amount of the input token function exactOutput(ExactOutputParams calldata params) external payable returns (uint256 amountIn); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.6.0; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; library TransferHelper { /// @notice Transfers tokens from the targeted address to the given destination /// @notice Errors with 'STF' if transfer fails /// @param token The contract address of the token to be transferred /// @param from The originating address from which the tokens will be transferred /// @param to The destination address of the transfer /// @param value The amount to be transferred function safeTransferFrom( address token, address from, address to, uint256 value ) internal { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'STF'); } /// @notice Transfers tokens from msg.sender to a recipient /// @dev Errors with ST if transfer fails /// @param token The contract address of the token which will be transferred /// @param to The recipient of the transfer /// @param value The value of the transfer function safeTransfer( address token, address to, uint256 value ) internal { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'ST'); } /// @notice Approves the stipulated contract to spend the given allowance in the given token /// @dev Errors with 'SA' if transfer fails /// @param token The contract address of the token to be approved /// @param to The target of the approval /// @param value The amount of the given token the target will be allowed to spend function safeApprove( address token, address to, uint256 value ) internal { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.approve.selector, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'SA'); } /// @notice Transfers ETH to the recipient address /// @dev Fails with `STE` /// @param to The destination of the transfer /// @param value The value to be transferred function safeTransferETH(address to, uint256 value) internal { (bool success, ) = to.call{value: value}(new bytes(0)); require(success, 'STE'); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; interface IKeyProtocolVariables { function xTokenMintFee() external view returns (uint256); function securityDepositMonths() external view returns (uint8); function xTokensSecurityWallet() external view returns (address); function landxOperationalWallet() external view returns (address); function landxChoiceWallet() external view returns (address); function landXOperationsPercentage() external view returns (uint256); function landXChoicePercentage() external view returns (uint256); function lndxHoldersPercentage() external view returns (uint256); function hedgeFundAllocation() external view returns (uint256); function hedgeFundWallet() external view returns (address); function preLaunch() external view returns (bool); function sellXTokenSlippage() external view returns (uint256); function buyXTokenSlippage() external view returns (uint256); function cTokenSellFee() external view returns (uint256); function validatorCommission() external view returns (uint256); function validatorCommisionWallet() external view returns (address); function payRentFee() external view returns (uint256); function maxValidatorFee() external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; interface IOraclePrices { function prices(string memory grain) external view returns (uint256); function getXTokenPrice(address xToken) external view returns (uint256); function usdc() external view returns (address); }
// SPDX-License-Identifier: MIT pragma solidity >=0.7.4; interface ITWAP { function getPrice(address tokenIn, address tokenOut) external view returns (uint); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IxToken is IERC20 { function previewNonDistributedYield() external view returns(uint256); function getNonDistributedYield() external returns(uint256); function stake(uint256 amount) external; function unstake(uint256 amount) external; function xBasketTransfer(address _from, uint256 amount) external; function Staked(address) external view returns (uint256 amount, uint256 startTime); // Not function availableToClaim(address account) external view returns (uint256); function claim() external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; interface IxTokenRouter { function getXToken(string memory _name) external view returns (address); function getCToken(string memory _name) external view returns (address); }
{ "evmVersion": "london", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 2000 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_xTokenRouter","type":"address"},{"internalType":"address","name":"_oraclePrices","type":"address"},{"internalType":"address","name":"_keyProtocolValues","type":"address"},{"internalType":"address","name":"_uniswapRouter","type":"address"},{"internalType":"address","name":"_twap","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"xWheat","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"xSoy","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"xRice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"xCorn","type":"uint256"}],"name":"AutoCompounded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"assets","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"assets","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"asset","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"autoCompoundRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cCorn","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cRice","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cSoy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cWheat","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"calculateCollateral","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"calculateTVL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"calculateYield","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"convertToAssets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"}],"name":"convertToShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"keyProtocolValues","outputs":[{"internalType":"contract IKeyProtocolVariables","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"maxDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"maxMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"maxRedeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"maxWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oraclePrices","outputs":[{"internalType":"contract IOraclePrices","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"}],"name":"previewDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"previewMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"previewRedeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"}],"name":"previewWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pricePerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"xToken","type":"address"}],"name":"quoteAmountOut","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"redeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAssets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"twap","outputs":[{"internalType":"contract ITWAP","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswapRouter","outputs":[{"internalType":"contract ISwapRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"usdc","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"xCorn","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"xRice","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"xSoy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"xTokenRouter","outputs":[{"internalType":"contract IxTokenRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"xWheat","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162004a2538038062004a258339810160408190526200003491620007fd565b6040518060400160405280601881526020017f784261736b6574204c616e645820496e6465782046756e640000000000000000815250604051806040016040528060078152602001661e109054d2d15560ca1b81525081600390816200009b919062000912565b506004620000aa828262000912565b505050620000c7620000c16200078a60201b60201c565b6200078e565b6001600160a01b038516620001125760405162461bcd60e51b815260206004820152601b602482015260008051602062004a0583398151915260448201526064015b60405180910390fd5b6001600160a01b038416620001595760405162461bcd60e51b815260206004820152601b602482015260008051602062004a05833981519152604482015260640162000109565b6001600160a01b038316620001a05760405162461bcd60e51b815260206004820152601b602482015260008051602062004a05833981519152604482015260640162000109565b6001600160a01b038216620001e75760405162461bcd60e51b815260206004820152601b602482015260008051602062004a05833981519152604482015260640162000109565b600680546001600160a01b038781166001600160a01b031992831681179093556007805488831690841617905560088054918716919092161790556040516315eb439160e01b815260206004820152600560248201526415d211505560da1b60448201526315eb439190606401602060405180830381865afa15801562000272573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002989190620009de565b600980546001600160a01b0319166001600160a01b039283161790556006546040516315eb439160e01b8152602060048201526003602482015262534f5960e81b60448201529116906315eb439190606401602060405180830381865afa15801562000308573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200032e9190620009de565b600a80546001600160a01b0319166001600160a01b039283161790556006546040516315eb439160e01b815260206004808301919091526024820152635249434560e01b60448201529116906315eb439190606401602060405180830381865afa158015620003a1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003c79190620009de565b600c80546001600160a01b0319166001600160a01b039283161790556006546040516315eb439160e01b8152602060048083019190915260248201526321a7a92760e11b60448201529116906315eb439190606401602060405180830381865afa1580156200043a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004609190620009de565b600b80546001600160a01b0319166001600160a01b0392831617905560065460405163392ac3cd60e01b815260206004820152600560248201526415d211505560da1b604482015291169063392ac3cd90606401602060405180830381865afa158015620004d2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004f89190620009de565b600d80546001600160a01b0319166001600160a01b0392831617905560065460405163392ac3cd60e01b8152602060048201526003602482015262534f5960e81b604482015291169063392ac3cd90606401602060405180830381865afa15801562000568573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200058e9190620009de565b600e80546001600160a01b0319166001600160a01b0392831617905560065460405163392ac3cd60e01b815260206004808301919091526024820152635249434560e01b604482015291169063392ac3cd90606401602060405180830381865afa15801562000601573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620006279190620009de565b601080546001600160a01b0319166001600160a01b0392831617905560065460405163392ac3cd60e01b8152602060048083019190915260248201526321a7a92760e11b604482015291169063392ac3cd90606401602060405180830381865afa1580156200069a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620006c09190620009de565b600f80546001600160a01b0319166001600160a01b0392831617905560075460408051631f209df760e11b815290519190921691633e413bee9160048083019260209291908290030181865afa1580156200071f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620007459190620009de565b601180546001600160a01b03199081166001600160a01b0393841617909155601280548216948316949094179093556013805490931691161790555062000a03915050565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b0381168114620007f857600080fd5b919050565b600080600080600060a086880312156200081657600080fd5b6200082186620007e0565b94506200083160208701620007e0565b93506200084160408701620007e0565b92506200085160608701620007e0565b91506200086160808701620007e0565b90509295509295909350565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200089857607f821691505b602082108103620008b957634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200090d57600081815260208120601f850160051c81016020861015620008e85750805b601f850160051c820191505b818110156200090957828155600101620008f4565b5050505b505050565b81516001600160401b038111156200092e576200092e6200086d565b62000946816200093f845462000883565b84620008bf565b602080601f8311600181146200097e5760008415620009655750858301515b600019600386901b1c1916600185901b17855562000909565b600085815260208120601f198616915b82811015620009af578886015182559484019460019091019084016200098e565b5085821015620009ce5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215620009f157600080fd5b620009fc82620007e0565b9392505050565b613ff28062000a136000396000f3fe608060405234801561001057600080fd5b50600436106103365760003560e01c80637b1b1de6116101b2578063c46b0812116100f9578063dab67f35116100a2578063e808e4961161007c578063e808e4961461067c578063ef8b30f7146103cc578063f2fde38b1461068f578063f7a7d49b146106a257600080fd5b8063dab67f351461061d578063dd62ed3e14610630578063dfcf222c1461066957600080fd5b8063ce96cb77116100d3578063ce96cb77146105ef578063d156458014610602578063d905777e1461060a57600080fd5b8063c46b0812146105d4578063c63d75b6146105dc578063c6e6f592146103cc57600080fd5b8063a457c2d71161015b578063b3d7f6b911610135578063b3d7f6b914610396578063b460af94146105ae578063ba087652146105c157600080fd5b8063a457c2d714610575578063a9059cbb14610588578063b209e9951461059b57600080fd5b806394bf804d1161018c57806394bf804d1461054757806395d89b411461055a57806399af4ba81461056257600080fd5b80637b1b1de61461051b57806380557592146105235780638da5cb5b1461053657600080fd5b8063313ce567116102815780634cdad5061161022a57806370a082311161020457806370a08231146104c2578063715018a6146104eb578063735de9f7146104f557806376b70f5e1461050857600080fd5b80634cdad506146103965780635125105b146104a75780636e553f65146104af57600080fd5b80633e413bee1161025b5780633e413bee14610479578063402d267d1461048c57806342bf19011461049f57600080fd5b8063313ce5671461044657806338d52e0f14610455578063395093511461046657600080fd5b80630b3a6efb116102e35780631a6bed4a116102bd5780631a6bed4a1461040d57806323b872dd146104205780632b282c0c1461043357600080fd5b80630b3a6efb146103df5780631208aa18146103f257806318160ddd1461040557600080fd5b806307a2d13a1161031457806307a2d13a14610396578063095ea7b3146103a95780630a28a477146103cc57600080fd5b806301e17d381461033b57806301e1d1141461036b57806306fdde0314610381575b600080fd5b600e5461034e906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6103736106b5565b604051908152602001610362565b6103896106c4565b6040516103629190613cd4565b6103736103a4366004613d25565b610756565b6103bc6103b7366004613d5a565b610767565b6040519015158152602001610362565b6103736103da366004613d25565b61077f565b60065461034e906001600160a01b031681565b60135461034e906001600160a01b031681565b600254610373565b600c5461034e906001600160a01b031681565b6103bc61042e366004613d84565b61078a565b60105461034e906001600160a01b031681565b60405160068152602001610362565b6011546001600160a01b031661034e565b6103bc610474366004613d5a565b6107ae565b60115461034e906001600160a01b031681565b61037361049a366004613dc0565b6107ed565b6103736107f8565b610373610f52565b6103736104bd366004613ddb565b610f7f565b6103736104d0366004613dc0565b6001600160a01b031660009081526020819052604090205490565b6104f3610ffe565b005b60125461034e906001600160a01b031681565b60075461034e906001600160a01b031681565b61037361104e565b60095461034e906001600160a01b031681565b6005546001600160a01b031661034e565b610373610555366004613ddb565b611093565b610389611106565b60085461034e906001600160a01b031681565b6103bc610583366004613d5a565b611115565b6103bc610596366004613d5a565b6111bf565b600b5461034e906001600160a01b031681565b6103736105bc366004613e07565b6111cd565b6103736105cf366004613e07565b611241565b6104f36112b5565b6103736105ea366004613dc0565b611b7e565b6103736105fd366004613dc0565b611b91565b610373611bb3565b610373610618366004613dc0565b6121ed565b61037361062b366004613ddb565b61220b565b61037361063e366004613e43565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b600f5461034e906001600160a01b031681565b600d5461034e906001600160a01b031681565b6104f361069d366004613dc0565b6122ac565b600a5461034e906001600160a01b031681565b60006106bf610f52565b905090565b6060600380546106d390613e6d565b80601f01602080910402602001604051908101604052809291908181526020018280546106ff90613e6d565b801561074c5780601f106107215761010080835404028352916020019161074c565b820191906000526020600020905b81548152906001019060200180831161072f57829003601f168201915b5050505050905090565b60006107618261233c565b92915050565b6000336107758185856125ca565b5060019392505050565b600061076182612722565b6000336107988582856129b7565b6107a3858585612a49565b506001949350505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061077590829086906107e8908790613ebd565b6125ca565b600061076182612c36565b6009546040516301b48a3160e31b815230600482015260009182916001600160a01b0390911690630da4518890602401602060405180830381865afa158015610845573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108699190613ed0565b600a546040516301b48a3160e31b81523060048201529192506000916001600160a01b0390911690630da4518890602401602060405180830381865afa1580156108b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108db9190613ed0565b600c546040516301b48a3160e31b81523060048201529192506000916001600160a01b0390911690630da4518890602401602060405180830381865afa158015610929573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094d9190613ed0565b600b546040516301b48a3160e31b81523060048201529192506000916001600160a01b0390911690630da4518890602401602060405180830381865afa15801561099b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109bf9190613ed0565b6011546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610a0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a319190613ed0565b60075460405163c3825f4b60e01b815260206004820152600560248201527f574845415400000000000000000000000000000000000000000000000000000060448201529192506000916001600160a01b039091169063c3825f4b90606401602060405180830381865afa158015610aad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad19190613ed0565b60075460405163c3825f4b60e01b815260206004820152600360248201527f534f59000000000000000000000000000000000000000000000000000000000060448201529192506000916001600160a01b039091169063c3825f4b90606401602060405180830381865afa158015610b4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b719190613ed0565b60075460405163c3825f4b60e01b81529192506000916001600160a01b039091169063c3825f4b90610bd79060040160208082526004908201527f5249434500000000000000000000000000000000000000000000000000000000604082015260600190565b602060405180830381865afa158015610bf4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c189190613ed0565b60075460405163c3825f4b60e01b81529192506000916001600160a01b039091169063c3825f4b90610c7e9060040160208082526004908201527f434f524e00000000000000000000000000000000000000000000000000000000604082015260600190565b602060405180830381865afa158015610c9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cbf9190613ed0565b600d546040516370a0823160e01b81523060048201529192508691633b9aca009187918d916001600160a01b0316906370a0823190602401602060405180830381865afa158015610d14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d389190613ed0565b610d429190613ebd565b610d4c9190613ee9565b610d569190613f08565b610d609082613ebd565b600e546040516370a0823160e01b8152306004820152919250633b9aca009186918c916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610db5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dd99190613ed0565b610de39190613ebd565b610ded9190613ee9565b610df79190613f08565b610e019082613ebd565b6010546040516370a0823160e01b8152306004820152919250633b9aca009185918b916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610e56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7a9190613ed0565b610e849190613ebd565b610e8e9190613ee9565b610e989190613f08565b610ea29082613ebd565b600f546040516370a0823160e01b8152306004820152919250633b9aca009184918a916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610ef7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1b9190613ed0565b610f259190613ebd565b610f2f9190613ee9565b610f399190613f08565b610f439082613ebd565b9b9a5050505050505050505050565b600080610f5d611bb3565b90506000610f696107f8565b90506000610f778284613ebd565b949350505050565b6000610f8a336107ed565b831115610fde5760405162461bcd60e51b815260206004820152601e60248201527f455243343632363a206465706f736974206d6f7265207468616e206d6178000060448201526064015b60405180910390fd5b6000610fe98461077f565b9050610ff733848684612e8b565b9392505050565b611006613201565b60405162461bcd60e51b815260206004820152601d60248201527f63616e2027742072656e6f756e63654f776e65727368697020686572650000006044820152606401610fd5565b600080611059610f52565b9050600061106660025490565b9050806000036110795760009250505090565b60008161108984620f4240613ee9565b610f779190613f08565b600061109e33611b7e565b8311156110ed5760405162461bcd60e51b815260206004820152601b60248201527f455243343632363a206d696e74206d6f7265207468616e206d617800000000006044820152606401610fd5565b60006110f884610756565b9050610ff733848387612e8b565b6060600480546106d390613e6d565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156111b25760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610fd5565b6107a382868684036125ca565b600033610775818585612a49565b60006111d882611b91565b8411156112275760405162461bcd60e51b815260206004820152601f60248201527f455243343632363a207769746864726177206d6f7265207468616e206d6178006044820152606401610fd5565b60006112328561077f565b9050610f77338585888561325d565b600061124c826121ed565b84111561129b5760405162461bcd60e51b815260206004820152601d60248201527f455243343632363a2072656465656d206d6f7265207468616e206d61780000006044820152606401610fd5565b60006112a685610756565b9050610f77338585848961325d565b600960009054906101000a90046001600160a01b03166001600160a01b0316634e71d92d6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561130557600080fd5b505af1158015611319573d6000803e3d6000fd5b50505050600a60009054906101000a90046001600160a01b03166001600160a01b0316634e71d92d6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561136d57600080fd5b505af1158015611381573d6000803e3d6000fd5b50505050600c60009054906101000a90046001600160a01b03166001600160a01b0316634e71d92d6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156113d557600080fd5b505af11580156113e9573d6000803e3d6000fd5b50505050600b60009054906101000a90046001600160a01b03166001600160a01b0316634e71d92d6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561143d57600080fd5b505af1158015611451573d6000803e3d6000fd5b5050600d546040516370a0823160e01b8152306004820152600093506001600160a01b0390911691506370a0823190602401602060405180830381865afa1580156114a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c49190613ed0565b600e546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015611512573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115369190613ed0565b6010546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015611584573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a89190613ed0565b600f546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156115f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061161a9190613ed0565b600d54604051630852cd8d60e31b8152600481018790529192506001600160a01b0316906342966c6890602401600060405180830381600087803b15801561166157600080fd5b505af1158015611675573d6000803e3d6000fd5b505060095461168f92506001600160a01b03169050613652565b50600e54604051630852cd8d60e31b8152600481018590526001600160a01b03909116906342966c6890602401600060405180830381600087803b1580156116d657600080fd5b505af11580156116ea573d6000803e3d6000fd5b5050600a5461170492506001600160a01b03169050613652565b50601054604051630852cd8d60e31b8152600481018490526001600160a01b03909116906342966c6890602401600060405180830381600087803b15801561174b57600080fd5b505af115801561175f573d6000803e3d6000fd5b5050600c5461177992506001600160a01b03169050613652565b50600f54604051630852cd8d60e31b8152600481018390526001600160a01b03909116906342966c6890602401600060405180830381600087803b1580156117c057600080fd5b505af11580156117d4573d6000803e3d6000fd5b5050600b546117ee92506001600160a01b03169050613652565b506009546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611838573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061185c9190613ed0565b600a546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156118aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ce9190613ed0565b600c546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa15801561191c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119409190613ed0565b600b546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa15801561198e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119b29190613ed0565b60095460405163534a7e1d60e11b8152600481018790529192506001600160a01b03169063a694fc3a90602401600060405180830381600087803b1580156119f957600080fd5b505af1158015611a0d573d6000803e3d6000fd5b5050600a5460405163534a7e1d60e11b8152600481018790526001600160a01b03909116925063a694fc3a9150602401600060405180830381600087803b158015611a5757600080fd5b505af1158015611a6b573d6000803e3d6000fd5b5050600c5460405163534a7e1d60e11b8152600481018690526001600160a01b03909116925063a694fc3a9150602401600060405180830381600087803b158015611ab557600080fd5b505af1158015611ac9573d6000803e3d6000fd5b5050600b5460405163534a7e1d60e11b8152600481018590526001600160a01b03909116925063a694fc3a9150602401600060405180830381600087803b158015611b1357600080fd5b505af1158015611b27573d6000803e3d6000fd5b50506040805187815260208101879052908101859052606081018490527f27a2bea22a9f7bc8212ff605035cabdc346982d55fd089d677372a16011916479250608001905060405180910390a15050505050505050565b6000610761611b8c83612c36565b612722565b6001600160a01b0381166000908152602081905260408120546107619061233c565b6009546040516370a0823160e01b815230600482015260009182916001600160a01b03909116906370a0823190602401602060405180830381865afa158015611c00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c249190613ed0565b600a546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015611c72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c969190613ed0565b600c546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015611ce4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d089190613ed0565b600b546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015611d56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d7a9190613ed0565b600954604051633b99c32160e11b81523060048201529192506000916001600160a01b03909116906377338642906024016040805180830381865afa158015611dc7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611deb9190613f2a565b50600a54604051633b99c32160e11b81523060048201529192506000916001600160a01b03909116906377338642906024016040805180830381865afa158015611e39573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e5d9190613f2a565b50600c54604051633b99c32160e11b81523060048201529192506000916001600160a01b03909116906377338642906024016040805180830381865afa158015611eab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ecf9190613f2a565b50600b54604051633b99c32160e11b81523060048201529192506000916001600160a01b03909116906377338642906024016040805180830381865afa158015611f1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f419190613f2a565b50601354600954601154604051635620c32d60e11b81526001600160a01b039283166004820152908216602482015292935060009291169063ac41865a90604401602060405180830381865afa158015611f9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fc39190613ed0565b601354600a54601154604051635620c32d60e11b81526001600160a01b039283166004820152908216602482015292935060009291169063ac41865a90604401602060405180830381865afa158015612020573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120449190613ed0565b601354600c54601154604051635620c32d60e11b81526001600160a01b039283166004820152908216602482015292935060009291169063ac41865a90604401602060405180830381865afa1580156120a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120c59190613ed0565b601354600b54601154604051635620c32d60e11b81526001600160a01b039283166004820152908216602482015292935060009291169063ac41865a90604401602060405180830381865afa158015612122573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121469190613ed0565b90506000846121558a8f613ebd565b61215f9190613ee9565b6121699082613ebd565b905083612176898e613ebd565b6121809190613ee9565b61218a9082613ebd565b905082612197888d613ebd565b6121a19190613ee9565b6121ab9082613ebd565b9050816121b8878c613ebd565b6121c29190613ee9565b6121cc9082613ebd565b90506121db620f424082613f08565b9e9d5050505050505050505050505050565b6001600160a01b038116600090815260208190526040812054610761565b601354601154604051635620c32d60e11b81526001600160a01b03918216600482015283821660248201526000928392169063ac41865a90604401602060405180830381865afa158015612263573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122879190613ed0565b90506000620f42406122998387613ee9565b6122a39190613f08565b95945050505050565b6122b4613201565b6001600160a01b0381166123305760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610fd5565b612339816138d5565b50565b600080612347610f52565b9050600061235460025490565b90508060000361236957610f77600485613f08565b601354600954601154604051635620c32d60e11b81526001600160a01b0392831660048201529082166024820152600092919091169063ac41865a90604401602060405180830381865afa1580156123c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123e99190613ed0565b601354600a54601154604051635620c32d60e11b81526001600160a01b039283166004820152908216602482015292935060009291169063ac41865a90604401602060405180830381865afa158015612446573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061246a9190613ed0565b601354600c54601154604051635620c32d60e11b81526001600160a01b039283166004820152908216602482015292935060009291169063ac41865a90604401602060405180830381865afa1580156124c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124eb9190613ed0565b601354600b54601154604051635620c32d60e11b81526001600160a01b039283166004820152908216602482015292935060009291169063ac41865a90604401602060405180830381865afa158015612548573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061256c9190613ed0565b90506000818361257c8688613ebd565b6125869190613ebd565b6125909190613ebd565b868861259f8c620f4240613ee9565b6125a99190613ee9565b6125b39190613f08565b6125bd9190613f08565b9998505050505050505050565b6001600160a01b0383166126455760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610fd5565b6001600160a01b0382166126c15760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610fd5565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60008061272d610f52565b9050600061273a60025490565b9050806000036127565761274f846004613ee9565b92506129b0565b601354600954601154604051635620c32d60e11b81526001600160a01b0392831660048201529082166024820152600092919091169063ac41865a90604401602060405180830381865afa1580156127b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127d69190613ed0565b601354600a54601154604051635620c32d60e11b81526001600160a01b039283166004820152908216602482015292935060009291169063ac41865a90604401602060405180830381865afa158015612833573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128579190613ed0565b601354600c54601154604051635620c32d60e11b81526001600160a01b039283166004820152908216602482015292935060009291169063ac41865a90604401602060405180830381865afa1580156128b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128d89190613ed0565b601354600b54601154604051635620c32d60e11b81526001600160a01b039283166004820152908216602482015292935060009291169063ac41865a90604401602060405180830381865afa158015612935573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129599190613ed0565b9050620f42408686848461296d888a613ebd565b6129779190613ebd565b6129819190613ebd565b61298b908c613ee9565b6129959190613ee9565b61299f9190613f08565b6129a99190613f08565b9650505050505b5050919050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198114612a435781811015612a365760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610fd5565b612a4384848484036125ca565b50505050565b6001600160a01b038316612ac55760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610fd5565b6001600160a01b038216612b415760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610fd5565b6001600160a01b03831660009081526020819052604090205481811015612bd05760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610fd5565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3612a43565b6009546040516370a0823160e01b81526001600160a01b03838116600483015260009283929116906370a0823190602401602060405180830381865afa158015612c84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ca89190613ed0565b600a546040516370a0823160e01b81526001600160a01b038681166004830152929350600092909116906370a0823190602401602060405180830381865afa158015612cf8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d1c9190613ed0565b600c546040516370a0823160e01b81526001600160a01b038781166004830152929350600092909116906370a0823190602401602060405180830381865afa158015612d6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d909190613ed0565b600b546040516370a0823160e01b81526001600160a01b038881166004830152929350600092909116906370a0823190602401602060405180830381865afa158015612de0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e049190613ed0565b6040805160808101825286815260208101869052908101849052606081018290529091508460005b6004811015612e7f5781838260048110612e4857612e48613f4e565b60200201511015612e6d57828160048110612e6557612e65613f4e565b602002015191505b80612e7781613f64565b915050612e2c565b50979650505050505050565b600954604051632964085d60e21b81526001600160a01b038681166004830152602482018590529091169063a590217490604401600060405180830381600087803b158015612ed957600080fd5b505af1158015612eed573d6000803e3d6000fd5b5050600a54604051632964085d60e21b81526001600160a01b03888116600483015260248201879052909116925063a59021749150604401600060405180830381600087803b158015612f3f57600080fd5b505af1158015612f53573d6000803e3d6000fd5b5050600c54604051632964085d60e21b81526001600160a01b03888116600483015260248201879052909116925063a59021749150604401600060405180830381600087803b158015612fa557600080fd5b505af1158015612fb9573d6000803e3d6000fd5b5050600b54604051632964085d60e21b81526001600160a01b03888116600483015260248201879052909116925063a59021749150604401600060405180830381600087803b15801561300b57600080fd5b505af115801561301f573d6000803e3d6000fd5b505060095460405163534a7e1d60e11b8152600481018690526001600160a01b03909116925063a694fc3a9150602401600060405180830381600087803b15801561306957600080fd5b505af115801561307d573d6000803e3d6000fd5b5050600a5460405163534a7e1d60e11b8152600481018690526001600160a01b03909116925063a694fc3a9150602401600060405180830381600087803b1580156130c757600080fd5b505af11580156130db573d6000803e3d6000fd5b5050600c5460405163534a7e1d60e11b8152600481018690526001600160a01b03909116925063a694fc3a9150602401600060405180830381600087803b15801561312557600080fd5b505af1158015613139573d6000803e3d6000fd5b5050600b5460405163534a7e1d60e11b8152600481018690526001600160a01b03909116925063a694fc3a9150602401600060405180830381600087803b15801561318357600080fd5b505af1158015613197573d6000803e3d6000fd5b505050506131a5838261393f565b826001600160a01b0316846001600160a01b03167fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d784846040516131f3929190918252602082015260400190565b60405180910390a350505050565b6005546001600160a01b0316331461325b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610fd5565b565b826001600160a01b0316856001600160a01b031614613281576132818386836129b7565b6132896112b5565b61329383826139fe565b6009546040516305c2fbcf60e31b8152600481018490526001600160a01b0390911690632e17de7890602401600060405180830381600087803b1580156132d957600080fd5b505af11580156132ed573d6000803e3d6000fd5b5050600a546040516305c2fbcf60e31b8152600481018690526001600160a01b039091169250632e17de789150602401600060405180830381600087803b15801561333757600080fd5b505af115801561334b573d6000803e3d6000fd5b5050600c546040516305c2fbcf60e31b8152600481018690526001600160a01b039091169250632e17de789150602401600060405180830381600087803b15801561339557600080fd5b505af11580156133a9573d6000803e3d6000fd5b5050600b546040516305c2fbcf60e31b8152600481018690526001600160a01b039091169250632e17de789150602401600060405180830381600087803b1580156133f357600080fd5b505af1158015613407573d6000803e3d6000fd5b505060095460405163a9059cbb60e01b81526001600160a01b03888116600483015260248201879052909116925063a9059cbb91506044016020604051808303816000875af115801561345e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134829190613f7e565b50600a5460405163a9059cbb60e01b81526001600160a01b038681166004830152602482018590529091169063a9059cbb906044016020604051808303816000875af11580156134d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134fa9190613f7e565b50600c5460405163a9059cbb60e01b81526001600160a01b038681166004830152602482018590529091169063a9059cbb906044016020604051808303816000875af115801561354e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135729190613f7e565b50600b5460405163a9059cbb60e01b81526001600160a01b038681166004830152602482018590529091169063a9059cbb906044016020604051808303816000875af11580156135c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135ea9190613f7e565b50826001600160a01b0316846001600160a01b0316866001600160a01b03167ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db8585604051613643929190918252602082015260400190565b60405180910390a45050505050565b6011546040516370a0823160e01b815230600482015260009182916001600160a01b03909116906370a0823190602401602060405180830381865afa15801561369f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136c39190613ed0565b90506000600860009054906101000a90046001600160a01b03166001600160a01b0316636dba41e46040518163ffffffff1660e01b8152600401602060405180830381865afa15801561371a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061373e9190613ed0565b9050600061374c838661220b565b9050600061375c83612710613ebd565b61376883612710613ee9565b6137729190613f08565b601154601254919250613792916001600160a01b03918216911686613b67565b60408051610100810182526011546001600160a01b03908116825288166020820152610bb891810191909152306060820152600090608081016137d642600f613ebd565b815260208082018890526040808301869052600060609384015260125481517f414bf38900000000000000000000000000000000000000000000000000000000815285516001600160a01b03908116600483015293860151841660248201529185015162ffffff16604483015292840151821660648201526080840151608482015260a084015160a482015260c084015160c482015260e0840151821660e4820152929350169063414bf38990610104016020604051808303816000875af11580156138a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138ca9190613ed0565b979650505050505050565b600580546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0382166139955760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610fd5565b80600260008282546139a79190613ebd565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6001600160a01b038216613a7a5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610fd5565b6001600160a01b03821660009081526020819052604090205481811015613b095760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610fd5565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529151600092839290871691613bf19190613fa0565b6000604051808303816000865af19150503d8060008114613c2e576040519150601f19603f3d011682016040523d82523d6000602084013e613c33565b606091505b5091509150818015613c5d575080511580613c5d575080806020019051810190613c5d9190613f7e565b613ca95760405162461bcd60e51b815260206004820152600260248201527f53410000000000000000000000000000000000000000000000000000000000006044820152606401610fd5565b5050505050565b60005b83811015613ccb578181015183820152602001613cb3565b50506000910152565b6020815260008251806020840152613cf3816040850160208701613cb0565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b600060208284031215613d3757600080fd5b5035919050565b80356001600160a01b0381168114613d5557600080fd5b919050565b60008060408385031215613d6d57600080fd5b613d7683613d3e565b946020939093013593505050565b600080600060608486031215613d9957600080fd5b613da284613d3e565b9250613db060208501613d3e565b9150604084013590509250925092565b600060208284031215613dd257600080fd5b610ff782613d3e565b60008060408385031215613dee57600080fd5b82359150613dfe60208401613d3e565b90509250929050565b600080600060608486031215613e1c57600080fd5b83359250613e2c60208501613d3e565b9150613e3a60408501613d3e565b90509250925092565b60008060408385031215613e5657600080fd5b613e5f83613d3e565b9150613dfe60208401613d3e565b600181811c90821680613e8157607f821691505b602082108103613ea157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561076157610761613ea7565b600060208284031215613ee257600080fd5b5051919050565b6000816000190483118215151615613f0357613f03613ea7565b500290565b600082613f2557634e487b7160e01b600052601260045260246000fd5b500490565b60008060408385031215613f3d57600080fd5b505080516020909101519092909150565b634e487b7160e01b600052603260045260246000fd5b60006000198203613f7757613f77613ea7565b5060010190565b600060208284031215613f9057600080fd5b81518015158114610ff757600080fd5b60008251613fb2818460208701613cb0565b919091019291505056fea2646970667358221220350b0b0bea9a2a1c37e8864dc76c266bbce00af01c97f87c668f29735adc42c164736f6c634300081000337a65726f2061646472657373206973206e6f7420616c6c6f7765640000000000000000000000000000000000189ca29981b6ad3ab01c2959b90eafca637076a8000000000000000000000000f49a0863d532e6036d693fbacfd2417aebda8784000000000000000000000000a6c319a1c3d4ed22d4ee1e6b53d3342cc70a8b53000000000000000000000000e592427a0aece92de3edee1f18e0157c058615640000000000000000000000005eb612f924dad205eab02911b198520effe96e5c
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106103365760003560e01c80637b1b1de6116101b2578063c46b0812116100f9578063dab67f35116100a2578063e808e4961161007c578063e808e4961461067c578063ef8b30f7146103cc578063f2fde38b1461068f578063f7a7d49b146106a257600080fd5b8063dab67f351461061d578063dd62ed3e14610630578063dfcf222c1461066957600080fd5b8063ce96cb77116100d3578063ce96cb77146105ef578063d156458014610602578063d905777e1461060a57600080fd5b8063c46b0812146105d4578063c63d75b6146105dc578063c6e6f592146103cc57600080fd5b8063a457c2d71161015b578063b3d7f6b911610135578063b3d7f6b914610396578063b460af94146105ae578063ba087652146105c157600080fd5b8063a457c2d714610575578063a9059cbb14610588578063b209e9951461059b57600080fd5b806394bf804d1161018c57806394bf804d1461054757806395d89b411461055a57806399af4ba81461056257600080fd5b80637b1b1de61461051b57806380557592146105235780638da5cb5b1461053657600080fd5b8063313ce567116102815780634cdad5061161022a57806370a082311161020457806370a08231146104c2578063715018a6146104eb578063735de9f7146104f557806376b70f5e1461050857600080fd5b80634cdad506146103965780635125105b146104a75780636e553f65146104af57600080fd5b80633e413bee1161025b5780633e413bee14610479578063402d267d1461048c57806342bf19011461049f57600080fd5b8063313ce5671461044657806338d52e0f14610455578063395093511461046657600080fd5b80630b3a6efb116102e35780631a6bed4a116102bd5780631a6bed4a1461040d57806323b872dd146104205780632b282c0c1461043357600080fd5b80630b3a6efb146103df5780631208aa18146103f257806318160ddd1461040557600080fd5b806307a2d13a1161031457806307a2d13a14610396578063095ea7b3146103a95780630a28a477146103cc57600080fd5b806301e17d381461033b57806301e1d1141461036b57806306fdde0314610381575b600080fd5b600e5461034e906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6103736106b5565b604051908152602001610362565b6103896106c4565b6040516103629190613cd4565b6103736103a4366004613d25565b610756565b6103bc6103b7366004613d5a565b610767565b6040519015158152602001610362565b6103736103da366004613d25565b61077f565b60065461034e906001600160a01b031681565b60135461034e906001600160a01b031681565b600254610373565b600c5461034e906001600160a01b031681565b6103bc61042e366004613d84565b61078a565b60105461034e906001600160a01b031681565b60405160068152602001610362565b6011546001600160a01b031661034e565b6103bc610474366004613d5a565b6107ae565b60115461034e906001600160a01b031681565b61037361049a366004613dc0565b6107ed565b6103736107f8565b610373610f52565b6103736104bd366004613ddb565b610f7f565b6103736104d0366004613dc0565b6001600160a01b031660009081526020819052604090205490565b6104f3610ffe565b005b60125461034e906001600160a01b031681565b60075461034e906001600160a01b031681565b61037361104e565b60095461034e906001600160a01b031681565b6005546001600160a01b031661034e565b610373610555366004613ddb565b611093565b610389611106565b60085461034e906001600160a01b031681565b6103bc610583366004613d5a565b611115565b6103bc610596366004613d5a565b6111bf565b600b5461034e906001600160a01b031681565b6103736105bc366004613e07565b6111cd565b6103736105cf366004613e07565b611241565b6104f36112b5565b6103736105ea366004613dc0565b611b7e565b6103736105fd366004613dc0565b611b91565b610373611bb3565b610373610618366004613dc0565b6121ed565b61037361062b366004613ddb565b61220b565b61037361063e366004613e43565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b600f5461034e906001600160a01b031681565b600d5461034e906001600160a01b031681565b6104f361069d366004613dc0565b6122ac565b600a5461034e906001600160a01b031681565b60006106bf610f52565b905090565b6060600380546106d390613e6d565b80601f01602080910402602001604051908101604052809291908181526020018280546106ff90613e6d565b801561074c5780601f106107215761010080835404028352916020019161074c565b820191906000526020600020905b81548152906001019060200180831161072f57829003601f168201915b5050505050905090565b60006107618261233c565b92915050565b6000336107758185856125ca565b5060019392505050565b600061076182612722565b6000336107988582856129b7565b6107a3858585612a49565b506001949350505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061077590829086906107e8908790613ebd565b6125ca565b600061076182612c36565b6009546040516301b48a3160e31b815230600482015260009182916001600160a01b0390911690630da4518890602401602060405180830381865afa158015610845573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108699190613ed0565b600a546040516301b48a3160e31b81523060048201529192506000916001600160a01b0390911690630da4518890602401602060405180830381865afa1580156108b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108db9190613ed0565b600c546040516301b48a3160e31b81523060048201529192506000916001600160a01b0390911690630da4518890602401602060405180830381865afa158015610929573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094d9190613ed0565b600b546040516301b48a3160e31b81523060048201529192506000916001600160a01b0390911690630da4518890602401602060405180830381865afa15801561099b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109bf9190613ed0565b6011546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610a0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a319190613ed0565b60075460405163c3825f4b60e01b815260206004820152600560248201527f574845415400000000000000000000000000000000000000000000000000000060448201529192506000916001600160a01b039091169063c3825f4b90606401602060405180830381865afa158015610aad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad19190613ed0565b60075460405163c3825f4b60e01b815260206004820152600360248201527f534f59000000000000000000000000000000000000000000000000000000000060448201529192506000916001600160a01b039091169063c3825f4b90606401602060405180830381865afa158015610b4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b719190613ed0565b60075460405163c3825f4b60e01b81529192506000916001600160a01b039091169063c3825f4b90610bd79060040160208082526004908201527f5249434500000000000000000000000000000000000000000000000000000000604082015260600190565b602060405180830381865afa158015610bf4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c189190613ed0565b60075460405163c3825f4b60e01b81529192506000916001600160a01b039091169063c3825f4b90610c7e9060040160208082526004908201527f434f524e00000000000000000000000000000000000000000000000000000000604082015260600190565b602060405180830381865afa158015610c9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cbf9190613ed0565b600d546040516370a0823160e01b81523060048201529192508691633b9aca009187918d916001600160a01b0316906370a0823190602401602060405180830381865afa158015610d14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d389190613ed0565b610d429190613ebd565b610d4c9190613ee9565b610d569190613f08565b610d609082613ebd565b600e546040516370a0823160e01b8152306004820152919250633b9aca009186918c916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610db5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dd99190613ed0565b610de39190613ebd565b610ded9190613ee9565b610df79190613f08565b610e019082613ebd565b6010546040516370a0823160e01b8152306004820152919250633b9aca009185918b916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610e56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7a9190613ed0565b610e849190613ebd565b610e8e9190613ee9565b610e989190613f08565b610ea29082613ebd565b600f546040516370a0823160e01b8152306004820152919250633b9aca009184918a916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610ef7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1b9190613ed0565b610f259190613ebd565b610f2f9190613ee9565b610f399190613f08565b610f439082613ebd565b9b9a5050505050505050505050565b600080610f5d611bb3565b90506000610f696107f8565b90506000610f778284613ebd565b949350505050565b6000610f8a336107ed565b831115610fde5760405162461bcd60e51b815260206004820152601e60248201527f455243343632363a206465706f736974206d6f7265207468616e206d6178000060448201526064015b60405180910390fd5b6000610fe98461077f565b9050610ff733848684612e8b565b9392505050565b611006613201565b60405162461bcd60e51b815260206004820152601d60248201527f63616e2027742072656e6f756e63654f776e65727368697020686572650000006044820152606401610fd5565b600080611059610f52565b9050600061106660025490565b9050806000036110795760009250505090565b60008161108984620f4240613ee9565b610f779190613f08565b600061109e33611b7e565b8311156110ed5760405162461bcd60e51b815260206004820152601b60248201527f455243343632363a206d696e74206d6f7265207468616e206d617800000000006044820152606401610fd5565b60006110f884610756565b9050610ff733848387612e8b565b6060600480546106d390613e6d565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156111b25760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610fd5565b6107a382868684036125ca565b600033610775818585612a49565b60006111d882611b91565b8411156112275760405162461bcd60e51b815260206004820152601f60248201527f455243343632363a207769746864726177206d6f7265207468616e206d6178006044820152606401610fd5565b60006112328561077f565b9050610f77338585888561325d565b600061124c826121ed565b84111561129b5760405162461bcd60e51b815260206004820152601d60248201527f455243343632363a2072656465656d206d6f7265207468616e206d61780000006044820152606401610fd5565b60006112a685610756565b9050610f77338585848961325d565b600960009054906101000a90046001600160a01b03166001600160a01b0316634e71d92d6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561130557600080fd5b505af1158015611319573d6000803e3d6000fd5b50505050600a60009054906101000a90046001600160a01b03166001600160a01b0316634e71d92d6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561136d57600080fd5b505af1158015611381573d6000803e3d6000fd5b50505050600c60009054906101000a90046001600160a01b03166001600160a01b0316634e71d92d6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156113d557600080fd5b505af11580156113e9573d6000803e3d6000fd5b50505050600b60009054906101000a90046001600160a01b03166001600160a01b0316634e71d92d6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561143d57600080fd5b505af1158015611451573d6000803e3d6000fd5b5050600d546040516370a0823160e01b8152306004820152600093506001600160a01b0390911691506370a0823190602401602060405180830381865afa1580156114a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c49190613ed0565b600e546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015611512573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115369190613ed0565b6010546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015611584573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a89190613ed0565b600f546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156115f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061161a9190613ed0565b600d54604051630852cd8d60e31b8152600481018790529192506001600160a01b0316906342966c6890602401600060405180830381600087803b15801561166157600080fd5b505af1158015611675573d6000803e3d6000fd5b505060095461168f92506001600160a01b03169050613652565b50600e54604051630852cd8d60e31b8152600481018590526001600160a01b03909116906342966c6890602401600060405180830381600087803b1580156116d657600080fd5b505af11580156116ea573d6000803e3d6000fd5b5050600a5461170492506001600160a01b03169050613652565b50601054604051630852cd8d60e31b8152600481018490526001600160a01b03909116906342966c6890602401600060405180830381600087803b15801561174b57600080fd5b505af115801561175f573d6000803e3d6000fd5b5050600c5461177992506001600160a01b03169050613652565b50600f54604051630852cd8d60e31b8152600481018390526001600160a01b03909116906342966c6890602401600060405180830381600087803b1580156117c057600080fd5b505af11580156117d4573d6000803e3d6000fd5b5050600b546117ee92506001600160a01b03169050613652565b506009546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611838573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061185c9190613ed0565b600a546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156118aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ce9190613ed0565b600c546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa15801561191c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119409190613ed0565b600b546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa15801561198e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119b29190613ed0565b60095460405163534a7e1d60e11b8152600481018790529192506001600160a01b03169063a694fc3a90602401600060405180830381600087803b1580156119f957600080fd5b505af1158015611a0d573d6000803e3d6000fd5b5050600a5460405163534a7e1d60e11b8152600481018790526001600160a01b03909116925063a694fc3a9150602401600060405180830381600087803b158015611a5757600080fd5b505af1158015611a6b573d6000803e3d6000fd5b5050600c5460405163534a7e1d60e11b8152600481018690526001600160a01b03909116925063a694fc3a9150602401600060405180830381600087803b158015611ab557600080fd5b505af1158015611ac9573d6000803e3d6000fd5b5050600b5460405163534a7e1d60e11b8152600481018590526001600160a01b03909116925063a694fc3a9150602401600060405180830381600087803b158015611b1357600080fd5b505af1158015611b27573d6000803e3d6000fd5b50506040805187815260208101879052908101859052606081018490527f27a2bea22a9f7bc8212ff605035cabdc346982d55fd089d677372a16011916479250608001905060405180910390a15050505050505050565b6000610761611b8c83612c36565b612722565b6001600160a01b0381166000908152602081905260408120546107619061233c565b6009546040516370a0823160e01b815230600482015260009182916001600160a01b03909116906370a0823190602401602060405180830381865afa158015611c00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c249190613ed0565b600a546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015611c72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c969190613ed0565b600c546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015611ce4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d089190613ed0565b600b546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015611d56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d7a9190613ed0565b600954604051633b99c32160e11b81523060048201529192506000916001600160a01b03909116906377338642906024016040805180830381865afa158015611dc7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611deb9190613f2a565b50600a54604051633b99c32160e11b81523060048201529192506000916001600160a01b03909116906377338642906024016040805180830381865afa158015611e39573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e5d9190613f2a565b50600c54604051633b99c32160e11b81523060048201529192506000916001600160a01b03909116906377338642906024016040805180830381865afa158015611eab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ecf9190613f2a565b50600b54604051633b99c32160e11b81523060048201529192506000916001600160a01b03909116906377338642906024016040805180830381865afa158015611f1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f419190613f2a565b50601354600954601154604051635620c32d60e11b81526001600160a01b039283166004820152908216602482015292935060009291169063ac41865a90604401602060405180830381865afa158015611f9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fc39190613ed0565b601354600a54601154604051635620c32d60e11b81526001600160a01b039283166004820152908216602482015292935060009291169063ac41865a90604401602060405180830381865afa158015612020573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120449190613ed0565b601354600c54601154604051635620c32d60e11b81526001600160a01b039283166004820152908216602482015292935060009291169063ac41865a90604401602060405180830381865afa1580156120a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120c59190613ed0565b601354600b54601154604051635620c32d60e11b81526001600160a01b039283166004820152908216602482015292935060009291169063ac41865a90604401602060405180830381865afa158015612122573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121469190613ed0565b90506000846121558a8f613ebd565b61215f9190613ee9565b6121699082613ebd565b905083612176898e613ebd565b6121809190613ee9565b61218a9082613ebd565b905082612197888d613ebd565b6121a19190613ee9565b6121ab9082613ebd565b9050816121b8878c613ebd565b6121c29190613ee9565b6121cc9082613ebd565b90506121db620f424082613f08565b9e9d5050505050505050505050505050565b6001600160a01b038116600090815260208190526040812054610761565b601354601154604051635620c32d60e11b81526001600160a01b03918216600482015283821660248201526000928392169063ac41865a90604401602060405180830381865afa158015612263573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122879190613ed0565b90506000620f42406122998387613ee9565b6122a39190613f08565b95945050505050565b6122b4613201565b6001600160a01b0381166123305760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610fd5565b612339816138d5565b50565b600080612347610f52565b9050600061235460025490565b90508060000361236957610f77600485613f08565b601354600954601154604051635620c32d60e11b81526001600160a01b0392831660048201529082166024820152600092919091169063ac41865a90604401602060405180830381865afa1580156123c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123e99190613ed0565b601354600a54601154604051635620c32d60e11b81526001600160a01b039283166004820152908216602482015292935060009291169063ac41865a90604401602060405180830381865afa158015612446573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061246a9190613ed0565b601354600c54601154604051635620c32d60e11b81526001600160a01b039283166004820152908216602482015292935060009291169063ac41865a90604401602060405180830381865afa1580156124c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124eb9190613ed0565b601354600b54601154604051635620c32d60e11b81526001600160a01b039283166004820152908216602482015292935060009291169063ac41865a90604401602060405180830381865afa158015612548573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061256c9190613ed0565b90506000818361257c8688613ebd565b6125869190613ebd565b6125909190613ebd565b868861259f8c620f4240613ee9565b6125a99190613ee9565b6125b39190613f08565b6125bd9190613f08565b9998505050505050505050565b6001600160a01b0383166126455760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610fd5565b6001600160a01b0382166126c15760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610fd5565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60008061272d610f52565b9050600061273a60025490565b9050806000036127565761274f846004613ee9565b92506129b0565b601354600954601154604051635620c32d60e11b81526001600160a01b0392831660048201529082166024820152600092919091169063ac41865a90604401602060405180830381865afa1580156127b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127d69190613ed0565b601354600a54601154604051635620c32d60e11b81526001600160a01b039283166004820152908216602482015292935060009291169063ac41865a90604401602060405180830381865afa158015612833573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128579190613ed0565b601354600c54601154604051635620c32d60e11b81526001600160a01b039283166004820152908216602482015292935060009291169063ac41865a90604401602060405180830381865afa1580156128b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128d89190613ed0565b601354600b54601154604051635620c32d60e11b81526001600160a01b039283166004820152908216602482015292935060009291169063ac41865a90604401602060405180830381865afa158015612935573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129599190613ed0565b9050620f42408686848461296d888a613ebd565b6129779190613ebd565b6129819190613ebd565b61298b908c613ee9565b6129959190613ee9565b61299f9190613f08565b6129a99190613f08565b9650505050505b5050919050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198114612a435781811015612a365760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610fd5565b612a4384848484036125ca565b50505050565b6001600160a01b038316612ac55760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610fd5565b6001600160a01b038216612b415760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610fd5565b6001600160a01b03831660009081526020819052604090205481811015612bd05760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610fd5565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3612a43565b6009546040516370a0823160e01b81526001600160a01b03838116600483015260009283929116906370a0823190602401602060405180830381865afa158015612c84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ca89190613ed0565b600a546040516370a0823160e01b81526001600160a01b038681166004830152929350600092909116906370a0823190602401602060405180830381865afa158015612cf8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d1c9190613ed0565b600c546040516370a0823160e01b81526001600160a01b038781166004830152929350600092909116906370a0823190602401602060405180830381865afa158015612d6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d909190613ed0565b600b546040516370a0823160e01b81526001600160a01b038881166004830152929350600092909116906370a0823190602401602060405180830381865afa158015612de0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e049190613ed0565b6040805160808101825286815260208101869052908101849052606081018290529091508460005b6004811015612e7f5781838260048110612e4857612e48613f4e565b60200201511015612e6d57828160048110612e6557612e65613f4e565b602002015191505b80612e7781613f64565b915050612e2c565b50979650505050505050565b600954604051632964085d60e21b81526001600160a01b038681166004830152602482018590529091169063a590217490604401600060405180830381600087803b158015612ed957600080fd5b505af1158015612eed573d6000803e3d6000fd5b5050600a54604051632964085d60e21b81526001600160a01b03888116600483015260248201879052909116925063a59021749150604401600060405180830381600087803b158015612f3f57600080fd5b505af1158015612f53573d6000803e3d6000fd5b5050600c54604051632964085d60e21b81526001600160a01b03888116600483015260248201879052909116925063a59021749150604401600060405180830381600087803b158015612fa557600080fd5b505af1158015612fb9573d6000803e3d6000fd5b5050600b54604051632964085d60e21b81526001600160a01b03888116600483015260248201879052909116925063a59021749150604401600060405180830381600087803b15801561300b57600080fd5b505af115801561301f573d6000803e3d6000fd5b505060095460405163534a7e1d60e11b8152600481018690526001600160a01b03909116925063a694fc3a9150602401600060405180830381600087803b15801561306957600080fd5b505af115801561307d573d6000803e3d6000fd5b5050600a5460405163534a7e1d60e11b8152600481018690526001600160a01b03909116925063a694fc3a9150602401600060405180830381600087803b1580156130c757600080fd5b505af11580156130db573d6000803e3d6000fd5b5050600c5460405163534a7e1d60e11b8152600481018690526001600160a01b03909116925063a694fc3a9150602401600060405180830381600087803b15801561312557600080fd5b505af1158015613139573d6000803e3d6000fd5b5050600b5460405163534a7e1d60e11b8152600481018690526001600160a01b03909116925063a694fc3a9150602401600060405180830381600087803b15801561318357600080fd5b505af1158015613197573d6000803e3d6000fd5b505050506131a5838261393f565b826001600160a01b0316846001600160a01b03167fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d784846040516131f3929190918252602082015260400190565b60405180910390a350505050565b6005546001600160a01b0316331461325b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610fd5565b565b826001600160a01b0316856001600160a01b031614613281576132818386836129b7565b6132896112b5565b61329383826139fe565b6009546040516305c2fbcf60e31b8152600481018490526001600160a01b0390911690632e17de7890602401600060405180830381600087803b1580156132d957600080fd5b505af11580156132ed573d6000803e3d6000fd5b5050600a546040516305c2fbcf60e31b8152600481018690526001600160a01b039091169250632e17de789150602401600060405180830381600087803b15801561333757600080fd5b505af115801561334b573d6000803e3d6000fd5b5050600c546040516305c2fbcf60e31b8152600481018690526001600160a01b039091169250632e17de789150602401600060405180830381600087803b15801561339557600080fd5b505af11580156133a9573d6000803e3d6000fd5b5050600b546040516305c2fbcf60e31b8152600481018690526001600160a01b039091169250632e17de789150602401600060405180830381600087803b1580156133f357600080fd5b505af1158015613407573d6000803e3d6000fd5b505060095460405163a9059cbb60e01b81526001600160a01b03888116600483015260248201879052909116925063a9059cbb91506044016020604051808303816000875af115801561345e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134829190613f7e565b50600a5460405163a9059cbb60e01b81526001600160a01b038681166004830152602482018590529091169063a9059cbb906044016020604051808303816000875af11580156134d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134fa9190613f7e565b50600c5460405163a9059cbb60e01b81526001600160a01b038681166004830152602482018590529091169063a9059cbb906044016020604051808303816000875af115801561354e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135729190613f7e565b50600b5460405163a9059cbb60e01b81526001600160a01b038681166004830152602482018590529091169063a9059cbb906044016020604051808303816000875af11580156135c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135ea9190613f7e565b50826001600160a01b0316846001600160a01b0316866001600160a01b03167ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db8585604051613643929190918252602082015260400190565b60405180910390a45050505050565b6011546040516370a0823160e01b815230600482015260009182916001600160a01b03909116906370a0823190602401602060405180830381865afa15801561369f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136c39190613ed0565b90506000600860009054906101000a90046001600160a01b03166001600160a01b0316636dba41e46040518163ffffffff1660e01b8152600401602060405180830381865afa15801561371a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061373e9190613ed0565b9050600061374c838661220b565b9050600061375c83612710613ebd565b61376883612710613ee9565b6137729190613f08565b601154601254919250613792916001600160a01b03918216911686613b67565b60408051610100810182526011546001600160a01b03908116825288166020820152610bb891810191909152306060820152600090608081016137d642600f613ebd565b815260208082018890526040808301869052600060609384015260125481517f414bf38900000000000000000000000000000000000000000000000000000000815285516001600160a01b03908116600483015293860151841660248201529185015162ffffff16604483015292840151821660648201526080840151608482015260a084015160a482015260c084015160c482015260e0840151821660e4820152929350169063414bf38990610104016020604051808303816000875af11580156138a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138ca9190613ed0565b979650505050505050565b600580546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0382166139955760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610fd5565b80600260008282546139a79190613ebd565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6001600160a01b038216613a7a5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610fd5565b6001600160a01b03821660009081526020819052604090205481811015613b095760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610fd5565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529151600092839290871691613bf19190613fa0565b6000604051808303816000865af19150503d8060008114613c2e576040519150601f19603f3d011682016040523d82523d6000602084013e613c33565b606091505b5091509150818015613c5d575080511580613c5d575080806020019051810190613c5d9190613f7e565b613ca95760405162461bcd60e51b815260206004820152600260248201527f53410000000000000000000000000000000000000000000000000000000000006044820152606401610fd5565b5050505050565b60005b83811015613ccb578181015183820152602001613cb3565b50506000910152565b6020815260008251806020840152613cf3816040850160208701613cb0565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b600060208284031215613d3757600080fd5b5035919050565b80356001600160a01b0381168114613d5557600080fd5b919050565b60008060408385031215613d6d57600080fd5b613d7683613d3e565b946020939093013593505050565b600080600060608486031215613d9957600080fd5b613da284613d3e565b9250613db060208501613d3e565b9150604084013590509250925092565b600060208284031215613dd257600080fd5b610ff782613d3e565b60008060408385031215613dee57600080fd5b82359150613dfe60208401613d3e565b90509250929050565b600080600060608486031215613e1c57600080fd5b83359250613e2c60208501613d3e565b9150613e3a60408501613d3e565b90509250925092565b60008060408385031215613e5657600080fd5b613e5f83613d3e565b9150613dfe60208401613d3e565b600181811c90821680613e8157607f821691505b602082108103613ea157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561076157610761613ea7565b600060208284031215613ee257600080fd5b5051919050565b6000816000190483118215151615613f0357613f03613ea7565b500290565b600082613f2557634e487b7160e01b600052601260045260246000fd5b500490565b60008060408385031215613f3d57600080fd5b505080516020909101519092909150565b634e487b7160e01b600052603260045260246000fd5b60006000198203613f7757613f77613ea7565b5060010190565b600060208284031215613f9057600080fd5b81518015158114610ff757600080fd5b60008251613fb2818460208701613cb0565b919091019291505056fea2646970667358221220350b0b0bea9a2a1c37e8864dc76c266bbce00af01c97f87c668f29735adc42c164736f6c63430008100033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000189ca29981b6ad3ab01c2959b90eafca637076a8000000000000000000000000f49a0863d532e6036d693fbacfd2417aebda8784000000000000000000000000a6c319a1c3d4ed22d4ee1e6b53d3342cc70a8b53000000000000000000000000e592427a0aece92de3edee1f18e0157c058615640000000000000000000000005eb612f924dad205eab02911b198520effe96e5c
-----Decoded View---------------
Arg [0] : _xTokenRouter (address): 0x189cA29981b6ad3ab01c2959B90eAfcA637076a8
Arg [1] : _oraclePrices (address): 0xF49A0863D532E6036D693FBACfd2417Aebda8784
Arg [2] : _keyProtocolValues (address): 0xA6c319A1c3d4ed22d4EE1e6b53D3342cC70A8b53
Arg [3] : _uniswapRouter (address): 0xE592427A0AEce92De3Edee1F18E0157C05861564
Arg [4] : _twap (address): 0x5eb612F924dAD205eAb02911b198520eFfE96e5C
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000189ca29981b6ad3ab01c2959b90eafca637076a8
Arg [1] : 000000000000000000000000f49a0863d532e6036d693fbacfd2417aebda8784
Arg [2] : 000000000000000000000000a6c319a1c3d4ed22d4ee1e6b53d3342cc70a8b53
Arg [3] : 000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564
Arg [4] : 0000000000000000000000005eb612f924dad205eab02911b198520effe96e5c
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.