Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 365 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Buy Options With... | 13814460 | 1105 days ago | IN | 0 ETH | 0.01776036 | ||||
Buy Exact Option... | 13812988 | 1105 days ago | IN | 0 ETH | 0.02625954 | ||||
Mint And Add Liq... | 13809856 | 1106 days ago | IN | 0 ETH | 0.02989576 | ||||
Mint And Sell Op... | 13808370 | 1106 days ago | IN | 0 ETH | 0.02828141 | ||||
Mint And Sell Op... | 13808349 | 1106 days ago | IN | 0 ETH | 0.02421509 | ||||
Mint And Add Liq... | 13806677 | 1106 days ago | IN | 0 ETH | 0.06625868 | ||||
Sell Exact Optio... | 13806669 | 1106 days ago | IN | 0 ETH | 0.0429597 | ||||
Buy Exact Option... | 13806641 | 1106 days ago | IN | 0 ETH | 0.04461987 | ||||
Buy Exact Option... | 13796581 | 1108 days ago | IN | 0 ETH | 0.01206066 | ||||
Mint And Add Liq... | 13790342 | 1109 days ago | IN | 0 ETH | 0.02077155 | ||||
Mint And Sell Op... | 13745637 | 1116 days ago | IN | 0 ETH | 0.02955782 | ||||
Mint And Sell Op... | 13715456 | 1121 days ago | IN | 0 ETH | 0.05154721 | ||||
Mint And Add Liq... | 13708361 | 1122 days ago | IN | 0 ETH | 0.05222839 | ||||
Mint And Add Liq... | 13699232 | 1123 days ago | IN | 0 ETH | 0.08196324 | ||||
Mint And Add Liq... | 13695803 | 1124 days ago | IN | 0 ETH | 0.04128549 | ||||
Mint And Sell Op... | 13674082 | 1127 days ago | IN | 0 ETH | 0.03575584 | ||||
Buy Exact Option... | 13653329 | 1131 days ago | IN | 0 ETH | 0.05539816 | ||||
Mint And Add Liq... | 13652524 | 1131 days ago | IN | 0 ETH | 0.05495277 | ||||
Buy Exact Option... | 13651069 | 1131 days ago | IN | 0 ETH | 0.03333839 | ||||
Mint And Add Liq... | 13648796 | 1131 days ago | IN | 0 ETH | 0.06206943 | ||||
Buy Exact Option... | 13638188 | 1133 days ago | IN | 0 ETH | 0.04575152 | ||||
Mint And Add Liq... | 13626564 | 1135 days ago | IN | 0 ETH | 0.04810147 | ||||
Buy Exact Option... | 13617252 | 1136 days ago | IN | 0 ETH | 0.04868279 | ||||
Mint And Add Liq... | 13612581 | 1137 days ago | IN | 0 ETH | 0.05265743 | ||||
Mint And Add Liq... | 13600792 | 1139 days ago | IN | 0 ETH | 0.07381546 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
OptionHelper
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: agpl-3.0 pragma solidity 0.6.12; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import "../interfaces/IConfigurationManager.sol"; import "../interfaces/IPodOption.sol"; import "../interfaces/IOptionAMMPool.sol"; import "../interfaces/IOptionPoolRegistry.sol"; /** * @title PodOption * @author Pods Finance * @notice Represents a Proxy that can perform a set of operations on the behalf of an user */ contract OptionHelper is ReentrancyGuard { using SafeERC20 for IERC20; using SafeMath for uint256; /** * @dev store globally accessed configurations */ IConfigurationManager public immutable configurationManager; event OptionsBought( address indexed buyer, address indexed optionAddress, uint256 optionsBought, address inputToken, uint256 inputSold ); event OptionsSold( address indexed seller, address indexed optionAddress, uint256 optionsSold, address outputToken, uint256 outputReceived ); event OptionsMintedAndSold( address indexed seller, address indexed optionAddress, uint256 optionsMintedAndSold, address outputToken, uint256 outputBought ); event LiquidityAdded( address indexed staker, address indexed optionAddress, uint256 amountOptions, address token, uint256 tokenAmount ); constructor(IConfigurationManager _configurationManager) public { require( Address.isContract(address(_configurationManager)), "OptionHelper: Configuration Manager is not a contract" ); configurationManager = _configurationManager; } modifier withinDeadline(uint256 deadline) { require(deadline > block.timestamp, "OptionHelper: deadline expired"); _; } /** * @notice Mint options * @dev Mints an amount of options and return to caller * * @param option The option contract to mint * @param optionAmount Amount of options to mint */ function mint(IPodOption option, uint256 optionAmount) external { _mint(option, optionAmount); // Transfers back the minted options IERC20(address(option)).safeTransfer(msg.sender, optionAmount); } /** * @notice Mint and sell options * @dev Mints an amount of options and sell it in pool * * @param option The option contract to mint * @param optionAmount Amount of options to mint * @param minTokenAmount Minimum amount of output tokens accepted * @param deadline The deadline in unix-timestamp that limits the transaction from happening * @param initialIVGuess The initial implied volatility guess */ function mintAndSellOptions( IPodOption option, uint256 optionAmount, uint256 minTokenAmount, uint256 deadline, uint256 initialIVGuess ) external nonReentrant withinDeadline(deadline) { IOptionAMMPool pool = _getPool(option); _mint(option, optionAmount); // Approve pool transfer IERC20(address(option)).safeApprove(address(pool), optionAmount); // Sells options to pool uint256 tokensBought = pool.tradeExactAInput(optionAmount, minTokenAmount, msg.sender, initialIVGuess); emit OptionsMintedAndSold(msg.sender, address(option), optionAmount, pool.tokenB(), tokensBought); } /** * @notice Mint and add liquidity * @dev Mint options and provide them as liquidity to the pool * * @param option The option contract to mint * @param optionAmount Amount of options to mint * @param tokenAmount Amount of tokens to provide as liquidity */ function mintAndAddLiquidity( IPodOption option, uint256 optionAmount, uint256 tokenAmount ) external nonReentrant { IOptionAMMPool pool = _getPool(option); IERC20 tokenB = IERC20(pool.tokenB()); _mint(option, optionAmount); if (tokenAmount > 0) { // Take stable token from caller tokenB.safeTransferFrom(msg.sender, address(this), tokenAmount); } // Approve pool transfer IERC20(address(option)).safeApprove(address(pool), optionAmount); tokenB.safeApprove(address(pool), tokenAmount); // Adds options and tokens to pool as liquidity pool.addLiquidity(optionAmount, tokenAmount, msg.sender); emit LiquidityAdded(msg.sender, address(option), optionAmount, pool.tokenB(), tokenAmount); } /** * @notice Mint and add liquidity using only collateralAmount as input * @dev Mint options and provide them as liquidity to the pool * * @param option The option contract to mint * @param collateralAmount Amount of collateral tokens to be used to both mint and mint into the stable side */ function mintAndAddLiquidityWithCollateral(IPodOption option, uint256 collateralAmount) external nonReentrant { require(option.optionType() == IPodOption.OptionType.PUT, "OptionHelper: Invalid option type"); IOptionAMMPool pool = _getPool(option); IERC20 tokenB = IERC20(pool.tokenB()); (uint256 optionAmount, uint256 tokenBToAdd) = _calculateEvenAmounts(option, collateralAmount); _mint(option, optionAmount); tokenB.safeTransferFrom(msg.sender, address(this), tokenBToAdd); // Approve pool transfer IERC20(address(option)).safeApprove(address(pool), optionAmount); tokenB.safeApprove(address(pool), tokenBToAdd); // Adds options and tokens to pool as liquidity pool.addLiquidity(optionAmount, tokenBToAdd, msg.sender); emit LiquidityAdded(msg.sender, address(option), optionAmount, pool.tokenB(), tokenBToAdd); } /** * @notice Add liquidity * @dev Provide options as liquidity to the pool * * @param option The option contract to mint * @param optionAmount Amount of options to provide * @param tokenAmount Amount of tokens to provide as liquidity */ function addLiquidity( IPodOption option, uint256 optionAmount, uint256 tokenAmount ) external nonReentrant { IOptionAMMPool pool = _getPool(option); IERC20 tokenB = IERC20(pool.tokenB()); if (optionAmount > 0) { // Take options from caller IERC20(address(option)).safeTransferFrom(msg.sender, address(this), optionAmount); } if (tokenAmount > 0) { // Take stable token from caller tokenB.safeTransferFrom(msg.sender, address(this), tokenAmount); } // Approve pool transfer IERC20(address(option)).safeApprove(address(pool), optionAmount); tokenB.safeApprove(address(pool), tokenAmount); // Adds options and tokens to pool as liquidity pool.addLiquidity(optionAmount, tokenAmount, msg.sender); emit LiquidityAdded(msg.sender, address(option), optionAmount, pool.tokenB(), tokenAmount); } /** * @notice Sell exact amount of options * @dev Sell an amount of options from pool * * @param option The option contract to sell * @param optionAmount Amount of options to sell * @param minTokenReceived Min amount of input tokens to receive * @param deadline The deadline in unix-timestamp that limits the transaction from happening * @param initialIVGuess The initial implied volatility guess */ function sellExactOptions( IPodOption option, uint256 optionAmount, uint256 minTokenReceived, uint256 deadline, uint256 initialIVGuess ) external withinDeadline(deadline) nonReentrant { IOptionAMMPool pool = _getPool(option); IERC20 tokenA = IERC20(pool.tokenA()); // Take input amount from caller tokenA.safeTransferFrom(msg.sender, address(this), optionAmount); // Approve pool transfer tokenA.safeApprove(address(pool), optionAmount); // Buys options from pool uint256 tokenAmountReceived = pool.tradeExactAInput(optionAmount, minTokenReceived, msg.sender, initialIVGuess); emit OptionsSold(msg.sender, address(option), optionAmount, pool.tokenB(), tokenAmountReceived); } /** * @notice Sell estimated amount of options * @dev Sell an estimated amount of options to the pool * * @param option The option contract to sell * @param maxOptionAmount max Amount of options to sell * @param exactTokenReceived exact amount of input tokens to receive * @param deadline The deadline in unix-timestamp that limits the transaction from happening * @param initialIVGuess The initial implied volatility guess */ function sellOptionsAndReceiveExactTokens( IPodOption option, uint256 maxOptionAmount, uint256 exactTokenReceived, uint256 deadline, uint256 initialIVGuess ) external withinDeadline(deadline) nonReentrant { IOptionAMMPool pool = _getPool(option); IERC20 tokenA = IERC20(pool.tokenA()); // Take input amount from caller tokenA.safeTransferFrom(msg.sender, address(this), maxOptionAmount); // Approve pool transfer tokenA.safeApprove(address(pool), maxOptionAmount); // Buys options from pool uint256 optionsSold = pool.tradeExactBOutput(exactTokenReceived, maxOptionAmount, msg.sender, initialIVGuess); uint256 unusedFunds = maxOptionAmount.sub(optionsSold); // Reset allowance tokenA.safeApprove(address(pool), 0); // Transfer back unused funds if (unusedFunds > 0) { tokenA.safeTransfer(msg.sender, unusedFunds); } emit OptionsSold(msg.sender, address(option), optionsSold, pool.tokenB(), exactTokenReceived); } /** * @notice Buy exact amount of options * @dev Buys an amount of options from pool * * @param option The option contract to buy * @param optionAmount Amount of options to buy * @param maxTokenAmount Max amount of input tokens sold * @param deadline The deadline in unix-timestamp that limits the transaction from happening * @param initialIVGuess The initial implied volatility guess */ function buyExactOptions( IPodOption option, uint256 optionAmount, uint256 maxTokenAmount, uint256 deadline, uint256 initialIVGuess ) external withinDeadline(deadline) nonReentrant { IOptionAMMPool pool = _getPool(option); IERC20 tokenB = IERC20(pool.tokenB()); // Take input amount from caller tokenB.safeTransferFrom(msg.sender, address(this), maxTokenAmount); // Approve pool transfer tokenB.safeApprove(address(pool), maxTokenAmount); // Buys options from pool uint256 tokensSold = pool.tradeExactAOutput(optionAmount, maxTokenAmount, msg.sender, initialIVGuess); uint256 unusedFunds = maxTokenAmount.sub(tokensSold); // Reset allowance tokenB.safeApprove(address(pool), 0); // Transfer back unused funds if (unusedFunds > 0) { tokenB.safeTransfer(msg.sender, unusedFunds); } emit OptionsBought(msg.sender, address(option), optionAmount, pool.tokenB(), tokensSold); } /** * @notice Buy estimated amount of options * @dev Buys an estimated amount of options from pool * * @param option The option contract to buy * @param minOptionAmount Min amount of options bought * @param tokenAmount The exact amount of input tokens sold * @param deadline The deadline in unix-timestamp that limits the transaction from happening * @param initialIVGuess The initial implied volatility guess */ function buyOptionsWithExactTokens( IPodOption option, uint256 minOptionAmount, uint256 tokenAmount, uint256 deadline, uint256 initialIVGuess ) external withinDeadline(deadline) nonReentrant { IOptionAMMPool pool = _getPool(option); IERC20 tokenB = IERC20(pool.tokenB()); // Take input amount from caller tokenB.safeTransferFrom(msg.sender, address(this), tokenAmount); // Approve pool transfer tokenB.safeApprove(address(pool), tokenAmount); // Buys options from pool uint256 optionsBought = pool.tradeExactBInput(tokenAmount, minOptionAmount, msg.sender, initialIVGuess); emit OptionsBought(msg.sender, address(option), optionsBought, pool.tokenB(), tokenAmount); } /** * @dev Mints an amount of tokens collecting the strike tokens from the caller * * @param option The option contract to mint * @param amount The amount of options to mint */ function _mint(IPodOption option, uint256 amount) internal { require(Address.isContract(address(option)), "OptionHelper: Option is not a contract"); if (option.optionType() == IPodOption.OptionType.PUT) { IERC20 strikeAsset = IERC20(option.strikeAsset()); uint256 strikeToTransfer = option.strikeToTransfer(amount); // Take strike asset from caller strikeAsset.safeTransferFrom(msg.sender, address(this), strikeToTransfer); // Approving strike asset transfer to Option strikeAsset.safeApprove(address(option), strikeToTransfer); option.mint(amount, msg.sender); } else if (option.optionType() == IPodOption.OptionType.CALL) { IERC20 underlyingAsset = IERC20(option.underlyingAsset()); // Take underlying asset from caller underlyingAsset.safeTransferFrom(msg.sender, address(this), amount); // Approving underlying asset to Option underlyingAsset.safeApprove(address(option), amount); option.mint(amount, msg.sender); } } /** * @dev Returns the AMM Pool associated with the option * * @param option The option to search for * @return IOptionAMMPool */ function _getPool(IPodOption option) internal view returns (IOptionAMMPool) { IOptionPoolRegistry registry = IOptionPoolRegistry(configurationManager.getOptionPoolRegistry()); address exchangeOptionAddress = registry.getPool(address(option)); require(exchangeOptionAddress != address(0), "OptionHelper: pool not found"); return IOptionAMMPool(exchangeOptionAddress); } /** * @dev Returns the AMM Pool associated with the option * * @param option The option to search for * @param collateralAmount Total collateral amount that will be used to mint and add liquidity * @return amountOfOptions amount of options to mint * @return amountOfTokenB amount of stable to add liquidity */ function _calculateEvenAmounts(IPodOption option, uint256 collateralAmount) internal view returns (uint256 amountOfOptions, uint256 amountOfTokenB) { // 1) Get BS Unit Price IOptionAMMPool pool = _getPool(option); uint256 ABPrice = pool.getABPrice(); uint256 strikePrice = option.strikePrice(); uint256 optionDecimals = option.underlyingAssetDecimals(); amountOfOptions = collateralAmount.mul(10**optionDecimals).div(strikePrice.add(ABPrice)); amountOfTokenB = amountOfOptions.mul(ABPrice).div(10**optionDecimals); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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 `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool); /** * @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); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./IERC20.sol"; import "../../math/SafeMath.sol"; import "../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor () internal { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: agpl-3.0 pragma solidity >=0.6.12; interface IConfigurationManager { function setParameter(bytes32 name, uint256 value) external; function setEmergencyStop(address emergencyStop) external; function setPricingMethod(address pricingMethod) external; function setIVGuesser(address ivGuesser) external; function setIVProvider(address ivProvider) external; function setPriceProvider(address priceProvider) external; function setCapProvider(address capProvider) external; function setAMMFactory(address ammFactory) external; function setOptionFactory(address optionFactory) external; function setOptionHelper(address optionHelper) external; function setOptionPoolRegistry(address optionPoolRegistry) external; function getParameter(bytes32 name) external view returns (uint256); function owner() external view returns (address); function getEmergencyStop() external view returns (address); function getPricingMethod() external view returns (address); function getIVGuesser() external view returns (address); function getIVProvider() external view returns (address); function getPriceProvider() external view returns (address); function getCapProvider() external view returns (address); function getAMMFactory() external view returns (address); function getOptionFactory() external view returns (address); function getOptionHelper() external view returns (address); function getOptionPoolRegistry() external view returns (address); }
// SPDX-License-Identifier: agpl-3.0 pragma solidity 0.6.12; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IPodOption is IERC20 { /** Enums */ // @dev 0 for Put, 1 for Call enum OptionType { PUT, CALL } // @dev 0 for European, 1 for American enum ExerciseType { EUROPEAN, AMERICAN } /** Events */ event Mint(address indexed minter, uint256 amount); event Unmint(address indexed minter, uint256 optionAmount, uint256 strikeAmount, uint256 underlyingAmount); event Exercise(address indexed exerciser, uint256 amount); event Withdraw(address indexed minter, uint256 strikeAmount, uint256 underlyingAmount); /** Functions */ /** * @notice Locks collateral and write option tokens. * * @dev The issued amount ratio is 1:1, i.e., 1 option token for 1 underlying token. * * The collateral could be the strike or the underlying asset depending on the option type: Put or Call, * respectively * * It presumes the caller has already called IERC20.approve() on the * strike/underlying token contract to move caller funds. * * Options can only be minted while the series is NOT expired. * * It is also important to notice that options will be sent back * to `msg.sender` and not the `owner`. This behavior is designed to allow * proxy contracts to mint on others behalf. The `owner` will be able to remove * the deposited collateral after series expiration or by calling unmint(), even * if a third-party minted options on its behalf. * * @param amountOfOptions The amount option tokens to be issued * @param owner Which address will be the owner of the options */ function mint(uint256 amountOfOptions, address owner) external; /** * @notice Allow option token holders to use them to exercise the amount of units * of the locked tokens for the equivalent amount of the exercisable assets. * * @dev It presumes the caller has already called IERC20.approve() exercisable asset * to move caller funds. * * On American options, this function can only called anytime before expiration. * For European options, this function can only be called during the exerciseWindow. * Meaning, after expiration and before the end of exercise window. * * @param amountOfOptions The amount option tokens to be exercised */ function exercise(uint256 amountOfOptions) external; /** * @notice After series expiration in case of American or after exercise window for European, * allow minters who have locked their collateral to withdraw them proportionally * to their minted options. * * @dev If assets had been exercised during the option series the minter may withdraw * the exercised assets or a combination of exercised and collateral. */ function withdraw() external; /** * @notice Unlocks collateral by burning option tokens. * * Options can only be burned while the series is NOT expired. * * @param amountOfOptions The amount option tokens to be burned */ function unmint(uint256 amountOfOptions) external; function optionType() external view returns (OptionType); function exerciseType() external view returns (ExerciseType); function underlyingAsset() external view returns (address); function underlyingAssetDecimals() external view returns (uint8); function strikeAsset() external view returns (address); function strikeAssetDecimals() external view returns (uint8); function strikePrice() external view returns (uint256); function strikePriceDecimals() external view returns (uint8); function expiration() external view returns (uint256); function startOfExerciseWindow() external view returns (uint256); function hasExpired() external view returns (bool); function isTradeWindow() external view returns (bool); function isExerciseWindow() external view returns (bool); function isWithdrawWindow() external view returns (bool); function strikeToTransfer(uint256 amountOfOptions) external view returns (uint256); function getSellerWithdrawAmounts(address owner) external view returns (uint256 strikeAmount, uint256 underlyingAmount); function underlyingReserves() external view returns (uint256); function strikeReserves() external view returns (uint256); }
// SPDX-License-Identifier: agpl-3.0 pragma solidity 0.6.12; import "./IAMM.sol"; interface IOptionAMMPool is IAMM { // @dev 0 for when tokenA enter the pool and B leaving (A -> B) // and 1 for the opposite direction enum TradeDirection { AB, BA } function tradeExactAInput( uint256 exactAmountAIn, uint256 minAmountBOut, address owner, uint256 sigmaInitialGuess ) external returns (uint256); function tradeExactAOutput( uint256 exactAmountAOut, uint256 maxAmountBIn, address owner, uint256 sigmaInitialGuess ) external returns (uint256); function tradeExactBInput( uint256 exactAmountBIn, uint256 minAmountAOut, address owner, uint256 sigmaInitialGuess ) external returns (uint256); function tradeExactBOutput( uint256 exactAmountBOut, uint256 maxAmountAIn, address owner, uint256 sigmaInitialGuess ) external returns (uint256); function getOptionTradeDetailsExactAInput(uint256 exactAmountAIn) external view returns ( uint256 amountBOutput, uint256 newSigma, uint256 feesTokenA, uint256 feesTokenB ); function getOptionTradeDetailsExactAOutput(uint256 exactAmountAOut) external view returns ( uint256 amountBInput, uint256 newSigma, uint256 feesTokenA, uint256 feesTokenB ); function getOptionTradeDetailsExactBInput(uint256 exactAmountBIn) external view returns ( uint256 amountAOutput, uint256 newSigma, uint256 feesTokenA, uint256 feesTokenB ); function getOptionTradeDetailsExactBOutput(uint256 exactAmountBOut) external view returns ( uint256 amountAInput, uint256 newSigma, uint256 feesTokenA, uint256 feesTokenB ); function getRemoveLiquidityAmounts( uint256 percentA, uint256 percentB, address user ) external view returns (uint256 withdrawAmountA, uint256 withdrawAmountB); function getABPrice() external view returns (uint256); function getAdjustedIV() external view returns (uint256); function withdrawRewards() external; }
pragma solidity >=0.6.12; interface IOptionPoolRegistry { event PoolSet(address indexed factory, address indexed option, address pool); function getPool(address option) external view returns (address); function setPool(address option, address pool) external; }
// SPDX-License-Identifier: agpl-3.0 pragma solidity 0.6.12; interface IAMM { function addLiquidity( uint256 amountOfA, uint256 amountOfB, address owner ) external; function removeLiquidity(uint256 amountOfA, uint256 amountOfB) external; function tokenA() external view returns (address); function tokenB() external view returns (address); function tokenADecimals() external view returns (uint8); function tokenBDecimals() external view returns (uint8); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IConfigurationManager","name":"_configurationManager","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"staker","type":"address"},{"indexed":true,"internalType":"address","name":"optionAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountOptions","type":"uint256"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"LiquidityAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":true,"internalType":"address","name":"optionAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"optionsBought","type":"uint256"},{"indexed":false,"internalType":"address","name":"inputToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"inputSold","type":"uint256"}],"name":"OptionsBought","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"seller","type":"address"},{"indexed":true,"internalType":"address","name":"optionAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"optionsMintedAndSold","type":"uint256"},{"indexed":false,"internalType":"address","name":"outputToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"outputBought","type":"uint256"}],"name":"OptionsMintedAndSold","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"seller","type":"address"},{"indexed":true,"internalType":"address","name":"optionAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"optionsSold","type":"uint256"},{"indexed":false,"internalType":"address","name":"outputToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"outputReceived","type":"uint256"}],"name":"OptionsSold","type":"event"},{"inputs":[{"internalType":"contract IPodOption","name":"option","type":"address"},{"internalType":"uint256","name":"optionAmount","type":"uint256"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"addLiquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IPodOption","name":"option","type":"address"},{"internalType":"uint256","name":"optionAmount","type":"uint256"},{"internalType":"uint256","name":"maxTokenAmount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"initialIVGuess","type":"uint256"}],"name":"buyExactOptions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IPodOption","name":"option","type":"address"},{"internalType":"uint256","name":"minOptionAmount","type":"uint256"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"initialIVGuess","type":"uint256"}],"name":"buyOptionsWithExactTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"configurationManager","outputs":[{"internalType":"contract IConfigurationManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IPodOption","name":"option","type":"address"},{"internalType":"uint256","name":"optionAmount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IPodOption","name":"option","type":"address"},{"internalType":"uint256","name":"optionAmount","type":"uint256"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"mintAndAddLiquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IPodOption","name":"option","type":"address"},{"internalType":"uint256","name":"collateralAmount","type":"uint256"}],"name":"mintAndAddLiquidityWithCollateral","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IPodOption","name":"option","type":"address"},{"internalType":"uint256","name":"optionAmount","type":"uint256"},{"internalType":"uint256","name":"minTokenAmount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"initialIVGuess","type":"uint256"}],"name":"mintAndSellOptions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IPodOption","name":"option","type":"address"},{"internalType":"uint256","name":"optionAmount","type":"uint256"},{"internalType":"uint256","name":"minTokenReceived","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"initialIVGuess","type":"uint256"}],"name":"sellExactOptions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IPodOption","name":"option","type":"address"},{"internalType":"uint256","name":"maxOptionAmount","type":"uint256"},{"internalType":"uint256","name":"exactTokenReceived","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"initialIVGuess","type":"uint256"}],"name":"sellOptionsAndReceiveExactTokens","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a06040523480156200001157600080fd5b506040516200246838038062002468833981016040819052620000349162000096565b600160008190555062000052816200009060201b620012b21760201c565b6200007a5760405162461bcd60e51b81526004016200007190620000c6565b60405180910390fd5b60601b6001600160601b03191660805262000123565b3b151590565b600060208284031215620000a8578081fd5b81516001600160a01b0381168114620000bf578182fd5b9392505050565b60208082526035908201527f4f7074696f6e48656c7065723a20436f6e66696775726174696f6e204d616e6160408201527f676572206973206e6f74206120636f6e74726163740000000000000000000000606082015260800190565b60805160601c612322620001466000398061102052806112bd52506123226000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c806383d69bc01161006657806383d69bc014610104578063a38c2d5d14610117578063c1d2741c1461012a578063c9c667e31461013d578063e76238fb1461015b5761009e565b806313575d96146100a357806340c10f19146100b85780635378f693146100cb57806355776b77146100de5780637eb27955146100f1575b600080fd5b6100b66100b1366004611da2565b61016e565b005b6100b66100c6366004611d43565b610341565b6100b66100d9366004611da2565b610363565b6100b66100ec366004611d6e565b6105ae565b6100b66100ff366004611d6e565b6107e3565b6100b6610112366004611da2565b610897565b6100b6610125366004611d43565b610b20565b6100b6610138366004611da2565b610deb565b61014561101e565b6040516101529190611e59565b60405180910390f35b6100b6610169366004611da2565b611042565b6002600054141561019a5760405162461bcd60e51b815260040161019190612162565b60405180910390fd5b6002600055814281116101bf5760405162461bcd60e51b8152600401610191906121ef565b60006101ca876112b8565b90506101d687876113fb565b6101ea6001600160a01b03881682886117b0565b60405163d166c2a760e01b81526000906001600160a01b0383169063d166c2a79061021f908a908a9033908a90600401612284565b602060405180830381600087803b15801561023957600080fd5b505af115801561024d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102719190611e04565b9050876001600160a01b0316336001600160a01b03167f57da4e7a13d300f827a47931b449428e82818d869f4c204fc66008ab6e5b34aa89856001600160a01b0316635f64b55b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102e257600080fd5b505afa1580156102f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031a9190611d07565b8560405161032a93929190612246565b60405180910390a350506001600055505050505050565b61034b82826113fb565b61035f6001600160a01b03831633836118af565b5050565b814281116103835760405162461bcd60e51b8152600401610191906121ef565b600260005414156103a65760405162461bcd60e51b815260040161019190612162565b600260009081556103b6876112b8565b90506000816001600160a01b0316635f64b55b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156103f357600080fd5b505afa158015610407573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061042b9190611d07565b90506104426001600160a01b0382163330896118ce565b6104566001600160a01b03821683886117b0565b60405163c5abeb8560e01b81526000906001600160a01b0384169063c5abeb859061048b908a908c9033908b90600401612284565b602060405180830381600087803b1580156104a557600080fd5b505af11580156104b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104dd9190611e04565b9050886001600160a01b0316336001600160a01b03167f0b7a6e3aff849aa259e4f4811bddc851b36794c7cf72667957c9d368a806a42d83866001600160a01b0316635f64b55b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561054e57600080fd5b505afa158015610562573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105869190611d07565b8b60405161059693929190612246565b60405180910390a35050600160005550505050505050565b600260005414156105d15760405162461bcd60e51b815260040161019190612162565b600260009081556105e1846112b8565b90506000816001600160a01b0316635f64b55b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561061e57600080fd5b505afa158015610632573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106569190611d07565b90508315610673576106736001600160a01b0386163330876118ce565b821561068e5761068e6001600160a01b0382163330866118ce565b6106a26001600160a01b03861683866117b0565b6106b66001600160a01b03821683856117b0565b6040516321ec87bf60e21b81526001600160a01b038316906387b21efc906106e690879087903390600401612265565b600060405180830381600087803b15801561070057600080fd5b505af1158015610714573d6000803e3d6000fd5b50505050846001600160a01b0316336001600160a01b03167ff345dae2dc3e319049a895af0e701ae85ef124b6be99bb9d430c8b3d7f8bc49386856001600160a01b0316635f64b55b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561078757600080fd5b505afa15801561079b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107bf9190611d07565b876040516107cf93929190612246565b60405180910390a350506001600055505050565b600260005414156108065760405162461bcd60e51b815260040161019190612162565b60026000908155610816846112b8565b90506000816001600160a01b0316635f64b55b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561085357600080fd5b505afa158015610867573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088b9190611d07565b905061067385856113fb565b814281116108b75760405162461bcd60e51b8152600401610191906121ef565b600260005414156108da5760405162461bcd60e51b815260040161019190612162565b600260009081556108ea876112b8565b90506000816001600160a01b0316635f64b55b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561092757600080fd5b505afa15801561093b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095f9190611d07565b90506109766001600160a01b0382163330896118ce565b61098a6001600160a01b03821683886117b0565b6040516340d2867d60e01b81526000906001600160a01b038416906340d2867d906109bf908b908b9033908b90600401612284565b602060405180830381600087803b1580156109d957600080fd5b505af11580156109ed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a119190611e04565b90506000610a1f88836118f5565b9050610a366001600160a01b0384168560006117b0565b8015610a5057610a506001600160a01b03841633836118af565b896001600160a01b0316336001600160a01b03167f0b7a6e3aff849aa259e4f4811bddc851b36794c7cf72667957c9d368a806a42d8b876001600160a01b0316635f64b55b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610abf57600080fd5b505afa158015610ad3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af79190611d07565b86604051610b0793929190612246565b60405180910390a3505060016000555050505050505050565b60026000541415610b435760405162461bcd60e51b815260040161019190612162565b60026000908155826001600160a01b031663ffd9eedb6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b8357600080fd5b505afa158015610b97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bbb9190611de5565b6001811115610bc657fe5b14610be35760405162461bcd60e51b8152600401610191906120a0565b6000610bee836112b8565b90506000816001600160a01b0316635f64b55b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c2b57600080fd5b505afa158015610c3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c639190611d07565b9050600080610c728686611922565b91509150610c8086836113fb565b610c956001600160a01b0384163330846118ce565b610ca96001600160a01b03871685846117b0565b610cbd6001600160a01b03841685836117b0565b6040516321ec87bf60e21b81526001600160a01b038516906387b21efc90610ced90859085903390600401612265565b600060405180830381600087803b158015610d0757600080fd5b505af1158015610d1b573d6000803e3d6000fd5b50505050856001600160a01b0316336001600160a01b03167ff345dae2dc3e319049a895af0e701ae85ef124b6be99bb9d430c8b3d7f8bc49384876001600160a01b0316635f64b55b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d8e57600080fd5b505afa158015610da2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dc69190611d07565b85604051610dd693929190612246565b60405180910390a35050600160005550505050565b81428111610e0b5760405162461bcd60e51b8152600401610191906121ef565b60026000541415610e2e5760405162461bcd60e51b815260040161019190612162565b60026000908155610e3e876112b8565b90506000816001600160a01b0316630fc63d106040518163ffffffff1660e01b815260040160206040518083038186803b158015610e7b57600080fd5b505afa158015610e8f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb39190611d07565b9050610eca6001600160a01b03821633308a6118ce565b610ede6001600160a01b03821683896117b0565b60405163d166c2a760e01b81526000906001600160a01b0384169063d166c2a790610f13908b908b9033908b90600401612284565b602060405180830381600087803b158015610f2d57600080fd5b505af1158015610f41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f659190611e04565b9050886001600160a01b0316336001600160a01b03167fc810e5759d5fbe9cdc105662306dea31837313ca6395cf48cdc9ef22763ba0f58a866001600160a01b0316635f64b55b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610fd657600080fd5b505afa158015610fea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061100e9190611d07565b8560405161059693929190612246565b7f000000000000000000000000000000000000000000000000000000000000000081565b814281116110625760405162461bcd60e51b8152600401610191906121ef565b600260005414156110855760405162461bcd60e51b815260040161019190612162565b60026000908155611095876112b8565b90506000816001600160a01b0316630fc63d106040518163ffffffff1660e01b815260040160206040518083038186803b1580156110d257600080fd5b505afa1580156110e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061110a9190611d07565b90506111216001600160a01b03821633308a6118ce565b6111356001600160a01b03821683896117b0565b604051631d3f79b160e01b81526000906001600160a01b03841690631d3f79b19061116a908a908c9033908b90600401612284565b602060405180830381600087803b15801561118457600080fd5b505af1158015611198573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111bc9190611e04565b905060006111ca89836118f5565b90506111e16001600160a01b0384168560006117b0565b80156111fb576111fb6001600160a01b03841633836118af565b896001600160a01b0316336001600160a01b03167fc810e5759d5fbe9cdc105662306dea31837313ca6395cf48cdc9ef22763ba0f584876001600160a01b0316635f64b55b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561126a57600080fd5b505afa15801561127e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112a29190611d07565b8c604051610b0793929190612246565b3b151590565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fbbeab4d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561131457600080fd5b505afa158015611328573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134c9190611d07565b90506000816001600160a01b031663bbe4f6db856040518263ffffffff1660e01b815260040161137c9190611e59565b60206040518083038186803b15801561139457600080fd5b505afa1580156113a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113cc9190611d07565b90506001600160a01b0381166113f45760405162461bcd60e51b815260040161019190611fab565b9392505050565b611404826112b2565b6114205760405162461bcd60e51b815260040161019190611f2e565b6000826001600160a01b031663ffd9eedb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561145b57600080fd5b505afa15801561146f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114939190611de5565b600181111561149e57fe5b1415611629576000826001600160a01b03166317d69bc86040518163ffffffff1660e01b815260040160206040518083038186803b1580156114df57600080fd5b505afa1580156114f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115179190611d07565b90506000836001600160a01b031663a09263c2846040518263ffffffff1660e01b81526004016115479190612226565b60206040518083038186803b15801561155f57600080fd5b505afa158015611573573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115979190611e04565b90506115ae6001600160a01b0383163330846118ce565b6115c26001600160a01b03831685836117b0565b6040516394bf804d60e01b81526001600160a01b038516906394bf804d906115f0908690339060040161222f565b600060405180830381600087803b15801561160a57600080fd5b505af115801561161e573d6000803e3d6000fd5b50505050505061035f565b6001826001600160a01b031663ffd9eedb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561166457600080fd5b505afa158015611678573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061169c9190611de5565b60018111156116a757fe5b141561035f576000826001600160a01b0316637158da7c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156116e857600080fd5b505afa1580156116fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117209190611d07565b90506117376001600160a01b0382163330856118ce565b61174b6001600160a01b03821684846117b0565b6040516394bf804d60e01b81526001600160a01b038416906394bf804d90611779908590339060040161222f565b600060405180830381600087803b15801561179357600080fd5b505af11580156117a7573d6000803e3d6000fd5b50505050505050565b8015806118385750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e906117e69030908690600401611e6d565b60206040518083038186803b1580156117fe57600080fd5b505afa158015611812573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118369190611e04565b155b6118545760405162461bcd60e51b815260040161019190612199565b6118aa8363095ea7b360e01b8484604051602401611873929190611eab565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611ad6565b505050565b6118aa8363a9059cbb60e01b8484604051602401611873929190611eab565b6118ef846323b872dd60e01b85858560405160240161187393929190611e87565b50505050565b6000828211156119175760405162461bcd60e51b815260040161019190611f74565b508082035b92915050565b6000806000611930856112b8565b90506000816001600160a01b031663d5b1b1526040518163ffffffff1660e01b815260040160206040518083038186803b15801561196d57600080fd5b505afa158015611981573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119a59190611e04565b90506000866001600160a01b031663c52987cf6040518163ffffffff1660e01b815260040160206040518083038186803b1580156119e257600080fd5b505afa1580156119f6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a1a9190611e04565b90506000876001600160a01b0316639a32c2076040518163ffffffff1660e01b815260040160206040518083038186803b158015611a5757600080fd5b505afa158015611a6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a8f9190611e1c565b60ff169050611ab5611aa18385611b65565b611aaf89600a85900a611b8a565b90611bc4565b9550611ac9600a82900a611aaf8886611b8a565b9450505050509250929050565b6060611b2b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611bf69092919063ffffffff16565b8051909150156118aa5780806020019051810190611b499190611d23565b6118aa5760405162461bcd60e51b815260040161019190612118565b6000828201838110156113f45760405162461bcd60e51b815260040161019190611ef7565b600082611b995750600061191c565b82820282848281611ba657fe5b04146113f45760405162461bcd60e51b81526004016101919061205f565b6000808211611be55760405162461bcd60e51b815260040161019190612028565b818381611bee57fe5b049392505050565b6060611c058484600085611c0d565b949350505050565b606082471015611c2f5760405162461bcd60e51b815260040161019190611fe2565b611c38856112b2565b611c545760405162461bcd60e51b8152600401610191906120e1565b60006060866001600160a01b03168587604051611c719190611e3d565b60006040518083038185875af1925050503d8060008114611cae576040519150601f19603f3d011682016040523d82523d6000602084013e611cb3565b606091505b5091509150611cc3828286611cce565b979650505050505050565b60608315611cdd5750816113f4565b825115611ced5782518084602001fd5b8160405162461bcd60e51b81526004016101919190611ec4565b600060208284031215611d18578081fd5b81516113f4816122d4565b600060208284031215611d34578081fd5b815180151581146113f4578182fd5b60008060408385031215611d55578081fd5b8235611d60816122d4565b946020939093013593505050565b600080600060608486031215611d82578081fd5b8335611d8d816122d4565b95602085013595506040909401359392505050565b600080600080600060a08688031215611db9578081fd5b8535611dc4816122d4565b97602087013597506040870135966060810135965060800135945092505050565b600060208284031215611df6578081fd5b8151600281106113f4578182fd5b600060208284031215611e15578081fd5b5051919050565b600060208284031215611e2d578081fd5b815160ff811681146113f4578182fd5b60008251611e4f8184602087016122a8565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b6000602082528251806020840152611ee38160408501602087016122a8565b601f01601f19169190910160400192915050565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526026908201527f4f7074696f6e48656c7065723a204f7074696f6e206973206e6f74206120636f6040820152651b9d1c9858dd60d21b606082015260800190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252601c908201527f4f7074696f6e48656c7065723a20706f6f6c206e6f7420666f756e6400000000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b60208082526021908201527f4f7074696f6e48656c7065723a20496e76616c6964206f7074696f6e207479706040820152606560f81b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606082015260800190565b6020808252601e908201527f4f7074696f6e48656c7065723a20646561646c696e6520657870697265640000604082015260600190565b90815260200190565b9182526001600160a01b0316602082015260400190565b9283526001600160a01b03919091166020830152604082015260600190565b92835260208301919091526001600160a01b0316604082015260600190565b93845260208401929092526001600160a01b03166040830152606082015260800190565b60005b838110156122c35781810151838201526020016122ab565b838111156118ef5750506000910152565b6001600160a01b03811681146122e957600080fd5b5056fea264697066735822122072e090f874c97baae12d141112494f014ff4bd259bfe07cfcd0878db99cc04e064736f6c634300060c0033000000000000000000000000e4da64757b2b29db43429a52caf7ad884c76f8b0
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061009e5760003560e01c806383d69bc01161006657806383d69bc014610104578063a38c2d5d14610117578063c1d2741c1461012a578063c9c667e31461013d578063e76238fb1461015b5761009e565b806313575d96146100a357806340c10f19146100b85780635378f693146100cb57806355776b77146100de5780637eb27955146100f1575b600080fd5b6100b66100b1366004611da2565b61016e565b005b6100b66100c6366004611d43565b610341565b6100b66100d9366004611da2565b610363565b6100b66100ec366004611d6e565b6105ae565b6100b66100ff366004611d6e565b6107e3565b6100b6610112366004611da2565b610897565b6100b6610125366004611d43565b610b20565b6100b6610138366004611da2565b610deb565b61014561101e565b6040516101529190611e59565b60405180910390f35b6100b6610169366004611da2565b611042565b6002600054141561019a5760405162461bcd60e51b815260040161019190612162565b60405180910390fd5b6002600055814281116101bf5760405162461bcd60e51b8152600401610191906121ef565b60006101ca876112b8565b90506101d687876113fb565b6101ea6001600160a01b03881682886117b0565b60405163d166c2a760e01b81526000906001600160a01b0383169063d166c2a79061021f908a908a9033908a90600401612284565b602060405180830381600087803b15801561023957600080fd5b505af115801561024d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102719190611e04565b9050876001600160a01b0316336001600160a01b03167f57da4e7a13d300f827a47931b449428e82818d869f4c204fc66008ab6e5b34aa89856001600160a01b0316635f64b55b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102e257600080fd5b505afa1580156102f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031a9190611d07565b8560405161032a93929190612246565b60405180910390a350506001600055505050505050565b61034b82826113fb565b61035f6001600160a01b03831633836118af565b5050565b814281116103835760405162461bcd60e51b8152600401610191906121ef565b600260005414156103a65760405162461bcd60e51b815260040161019190612162565b600260009081556103b6876112b8565b90506000816001600160a01b0316635f64b55b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156103f357600080fd5b505afa158015610407573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061042b9190611d07565b90506104426001600160a01b0382163330896118ce565b6104566001600160a01b03821683886117b0565b60405163c5abeb8560e01b81526000906001600160a01b0384169063c5abeb859061048b908a908c9033908b90600401612284565b602060405180830381600087803b1580156104a557600080fd5b505af11580156104b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104dd9190611e04565b9050886001600160a01b0316336001600160a01b03167f0b7a6e3aff849aa259e4f4811bddc851b36794c7cf72667957c9d368a806a42d83866001600160a01b0316635f64b55b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561054e57600080fd5b505afa158015610562573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105869190611d07565b8b60405161059693929190612246565b60405180910390a35050600160005550505050505050565b600260005414156105d15760405162461bcd60e51b815260040161019190612162565b600260009081556105e1846112b8565b90506000816001600160a01b0316635f64b55b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561061e57600080fd5b505afa158015610632573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106569190611d07565b90508315610673576106736001600160a01b0386163330876118ce565b821561068e5761068e6001600160a01b0382163330866118ce565b6106a26001600160a01b03861683866117b0565b6106b66001600160a01b03821683856117b0565b6040516321ec87bf60e21b81526001600160a01b038316906387b21efc906106e690879087903390600401612265565b600060405180830381600087803b15801561070057600080fd5b505af1158015610714573d6000803e3d6000fd5b50505050846001600160a01b0316336001600160a01b03167ff345dae2dc3e319049a895af0e701ae85ef124b6be99bb9d430c8b3d7f8bc49386856001600160a01b0316635f64b55b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561078757600080fd5b505afa15801561079b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107bf9190611d07565b876040516107cf93929190612246565b60405180910390a350506001600055505050565b600260005414156108065760405162461bcd60e51b815260040161019190612162565b60026000908155610816846112b8565b90506000816001600160a01b0316635f64b55b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561085357600080fd5b505afa158015610867573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088b9190611d07565b905061067385856113fb565b814281116108b75760405162461bcd60e51b8152600401610191906121ef565b600260005414156108da5760405162461bcd60e51b815260040161019190612162565b600260009081556108ea876112b8565b90506000816001600160a01b0316635f64b55b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561092757600080fd5b505afa15801561093b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095f9190611d07565b90506109766001600160a01b0382163330896118ce565b61098a6001600160a01b03821683886117b0565b6040516340d2867d60e01b81526000906001600160a01b038416906340d2867d906109bf908b908b9033908b90600401612284565b602060405180830381600087803b1580156109d957600080fd5b505af11580156109ed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a119190611e04565b90506000610a1f88836118f5565b9050610a366001600160a01b0384168560006117b0565b8015610a5057610a506001600160a01b03841633836118af565b896001600160a01b0316336001600160a01b03167f0b7a6e3aff849aa259e4f4811bddc851b36794c7cf72667957c9d368a806a42d8b876001600160a01b0316635f64b55b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610abf57600080fd5b505afa158015610ad3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af79190611d07565b86604051610b0793929190612246565b60405180910390a3505060016000555050505050505050565b60026000541415610b435760405162461bcd60e51b815260040161019190612162565b60026000908155826001600160a01b031663ffd9eedb6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b8357600080fd5b505afa158015610b97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bbb9190611de5565b6001811115610bc657fe5b14610be35760405162461bcd60e51b8152600401610191906120a0565b6000610bee836112b8565b90506000816001600160a01b0316635f64b55b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c2b57600080fd5b505afa158015610c3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c639190611d07565b9050600080610c728686611922565b91509150610c8086836113fb565b610c956001600160a01b0384163330846118ce565b610ca96001600160a01b03871685846117b0565b610cbd6001600160a01b03841685836117b0565b6040516321ec87bf60e21b81526001600160a01b038516906387b21efc90610ced90859085903390600401612265565b600060405180830381600087803b158015610d0757600080fd5b505af1158015610d1b573d6000803e3d6000fd5b50505050856001600160a01b0316336001600160a01b03167ff345dae2dc3e319049a895af0e701ae85ef124b6be99bb9d430c8b3d7f8bc49384876001600160a01b0316635f64b55b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d8e57600080fd5b505afa158015610da2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dc69190611d07565b85604051610dd693929190612246565b60405180910390a35050600160005550505050565b81428111610e0b5760405162461bcd60e51b8152600401610191906121ef565b60026000541415610e2e5760405162461bcd60e51b815260040161019190612162565b60026000908155610e3e876112b8565b90506000816001600160a01b0316630fc63d106040518163ffffffff1660e01b815260040160206040518083038186803b158015610e7b57600080fd5b505afa158015610e8f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb39190611d07565b9050610eca6001600160a01b03821633308a6118ce565b610ede6001600160a01b03821683896117b0565b60405163d166c2a760e01b81526000906001600160a01b0384169063d166c2a790610f13908b908b9033908b90600401612284565b602060405180830381600087803b158015610f2d57600080fd5b505af1158015610f41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f659190611e04565b9050886001600160a01b0316336001600160a01b03167fc810e5759d5fbe9cdc105662306dea31837313ca6395cf48cdc9ef22763ba0f58a866001600160a01b0316635f64b55b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610fd657600080fd5b505afa158015610fea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061100e9190611d07565b8560405161059693929190612246565b7f000000000000000000000000e4da64757b2b29db43429a52caf7ad884c76f8b081565b814281116110625760405162461bcd60e51b8152600401610191906121ef565b600260005414156110855760405162461bcd60e51b815260040161019190612162565b60026000908155611095876112b8565b90506000816001600160a01b0316630fc63d106040518163ffffffff1660e01b815260040160206040518083038186803b1580156110d257600080fd5b505afa1580156110e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061110a9190611d07565b90506111216001600160a01b03821633308a6118ce565b6111356001600160a01b03821683896117b0565b604051631d3f79b160e01b81526000906001600160a01b03841690631d3f79b19061116a908a908c9033908b90600401612284565b602060405180830381600087803b15801561118457600080fd5b505af1158015611198573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111bc9190611e04565b905060006111ca89836118f5565b90506111e16001600160a01b0384168560006117b0565b80156111fb576111fb6001600160a01b03841633836118af565b896001600160a01b0316336001600160a01b03167fc810e5759d5fbe9cdc105662306dea31837313ca6395cf48cdc9ef22763ba0f584876001600160a01b0316635f64b55b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561126a57600080fd5b505afa15801561127e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112a29190611d07565b8c604051610b0793929190612246565b3b151590565b6000807f000000000000000000000000e4da64757b2b29db43429a52caf7ad884c76f8b06001600160a01b031663fbbeab4d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561131457600080fd5b505afa158015611328573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134c9190611d07565b90506000816001600160a01b031663bbe4f6db856040518263ffffffff1660e01b815260040161137c9190611e59565b60206040518083038186803b15801561139457600080fd5b505afa1580156113a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113cc9190611d07565b90506001600160a01b0381166113f45760405162461bcd60e51b815260040161019190611fab565b9392505050565b611404826112b2565b6114205760405162461bcd60e51b815260040161019190611f2e565b6000826001600160a01b031663ffd9eedb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561145b57600080fd5b505afa15801561146f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114939190611de5565b600181111561149e57fe5b1415611629576000826001600160a01b03166317d69bc86040518163ffffffff1660e01b815260040160206040518083038186803b1580156114df57600080fd5b505afa1580156114f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115179190611d07565b90506000836001600160a01b031663a09263c2846040518263ffffffff1660e01b81526004016115479190612226565b60206040518083038186803b15801561155f57600080fd5b505afa158015611573573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115979190611e04565b90506115ae6001600160a01b0383163330846118ce565b6115c26001600160a01b03831685836117b0565b6040516394bf804d60e01b81526001600160a01b038516906394bf804d906115f0908690339060040161222f565b600060405180830381600087803b15801561160a57600080fd5b505af115801561161e573d6000803e3d6000fd5b50505050505061035f565b6001826001600160a01b031663ffd9eedb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561166457600080fd5b505afa158015611678573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061169c9190611de5565b60018111156116a757fe5b141561035f576000826001600160a01b0316637158da7c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156116e857600080fd5b505afa1580156116fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117209190611d07565b90506117376001600160a01b0382163330856118ce565b61174b6001600160a01b03821684846117b0565b6040516394bf804d60e01b81526001600160a01b038416906394bf804d90611779908590339060040161222f565b600060405180830381600087803b15801561179357600080fd5b505af11580156117a7573d6000803e3d6000fd5b50505050505050565b8015806118385750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e906117e69030908690600401611e6d565b60206040518083038186803b1580156117fe57600080fd5b505afa158015611812573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118369190611e04565b155b6118545760405162461bcd60e51b815260040161019190612199565b6118aa8363095ea7b360e01b8484604051602401611873929190611eab565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611ad6565b505050565b6118aa8363a9059cbb60e01b8484604051602401611873929190611eab565b6118ef846323b872dd60e01b85858560405160240161187393929190611e87565b50505050565b6000828211156119175760405162461bcd60e51b815260040161019190611f74565b508082035b92915050565b6000806000611930856112b8565b90506000816001600160a01b031663d5b1b1526040518163ffffffff1660e01b815260040160206040518083038186803b15801561196d57600080fd5b505afa158015611981573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119a59190611e04565b90506000866001600160a01b031663c52987cf6040518163ffffffff1660e01b815260040160206040518083038186803b1580156119e257600080fd5b505afa1580156119f6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a1a9190611e04565b90506000876001600160a01b0316639a32c2076040518163ffffffff1660e01b815260040160206040518083038186803b158015611a5757600080fd5b505afa158015611a6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a8f9190611e1c565b60ff169050611ab5611aa18385611b65565b611aaf89600a85900a611b8a565b90611bc4565b9550611ac9600a82900a611aaf8886611b8a565b9450505050509250929050565b6060611b2b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611bf69092919063ffffffff16565b8051909150156118aa5780806020019051810190611b499190611d23565b6118aa5760405162461bcd60e51b815260040161019190612118565b6000828201838110156113f45760405162461bcd60e51b815260040161019190611ef7565b600082611b995750600061191c565b82820282848281611ba657fe5b04146113f45760405162461bcd60e51b81526004016101919061205f565b6000808211611be55760405162461bcd60e51b815260040161019190612028565b818381611bee57fe5b049392505050565b6060611c058484600085611c0d565b949350505050565b606082471015611c2f5760405162461bcd60e51b815260040161019190611fe2565b611c38856112b2565b611c545760405162461bcd60e51b8152600401610191906120e1565b60006060866001600160a01b03168587604051611c719190611e3d565b60006040518083038185875af1925050503d8060008114611cae576040519150601f19603f3d011682016040523d82523d6000602084013e611cb3565b606091505b5091509150611cc3828286611cce565b979650505050505050565b60608315611cdd5750816113f4565b825115611ced5782518084602001fd5b8160405162461bcd60e51b81526004016101919190611ec4565b600060208284031215611d18578081fd5b81516113f4816122d4565b600060208284031215611d34578081fd5b815180151581146113f4578182fd5b60008060408385031215611d55578081fd5b8235611d60816122d4565b946020939093013593505050565b600080600060608486031215611d82578081fd5b8335611d8d816122d4565b95602085013595506040909401359392505050565b600080600080600060a08688031215611db9578081fd5b8535611dc4816122d4565b97602087013597506040870135966060810135965060800135945092505050565b600060208284031215611df6578081fd5b8151600281106113f4578182fd5b600060208284031215611e15578081fd5b5051919050565b600060208284031215611e2d578081fd5b815160ff811681146113f4578182fd5b60008251611e4f8184602087016122a8565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b6000602082528251806020840152611ee38160408501602087016122a8565b601f01601f19169190910160400192915050565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526026908201527f4f7074696f6e48656c7065723a204f7074696f6e206973206e6f74206120636f6040820152651b9d1c9858dd60d21b606082015260800190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252601c908201527f4f7074696f6e48656c7065723a20706f6f6c206e6f7420666f756e6400000000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b60208082526021908201527f4f7074696f6e48656c7065723a20496e76616c6964206f7074696f6e207479706040820152606560f81b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606082015260800190565b6020808252601e908201527f4f7074696f6e48656c7065723a20646561646c696e6520657870697265640000604082015260600190565b90815260200190565b9182526001600160a01b0316602082015260400190565b9283526001600160a01b03919091166020830152604082015260600190565b92835260208301919091526001600160a01b0316604082015260600190565b93845260208401929092526001600160a01b03166040830152606082015260800190565b60005b838110156122c35781810151838201526020016122ab565b838111156118ef5750506000910152565b6001600160a01b03811681146122e957600080fd5b5056fea264697066735822122072e090f874c97baae12d141112494f014ff4bd259bfe07cfcd0878db99cc04e064736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000e4da64757b2b29db43429a52caf7ad884c76f8b0
-----Decoded View---------------
Arg [0] : _configurationManager (address): 0xE4Da64757b2B29dB43429A52CaF7aD884c76f8b0
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000e4da64757b2b29db43429a52caf7ad884c76f8b0
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.