More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Admin | 13754384 | 128 days ago | IN | 0 frxETH | 0 |
Loading...
Loading
Contract Name:
Automation
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { IUniswapV3Pool } from "contracts/interfaces/external/uniswap/IUniswapV3Pool.sol"; import { Admin } from "contracts/base/Admin.sol"; import { NonDelegateMulticall } from "contracts/base/NonDelegateMulticall.sol"; import { Sickle } from "contracts/Sickle.sol"; import { SickleRegistry } from "contracts/SickleRegistry.sol"; import { IAutomation } from "contracts/interfaces/IAutomation.sol"; import { INftAutomation } from "contracts/interfaces/INftAutomation.sol"; import { NftRebalance, NftPosition, NftHarvest, NftWithdraw, NftCompound } from "contracts/structs/NftFarmStrategyStructs.sol"; import { Farm, HarvestParams, WithdrawParams, CompoundParams } from "contracts/structs/FarmStrategyStructs.sol"; // @title Automation contract for automating farming strategies // @notice This contract allows users to automate their farming strategies // by enabling auto-compound or auto-harvest for non-NFT positions. // Only one of Auto-Compound or Auto-Harvest can be enabled: // all user positions will be either auto-compounded or auto-harvested. // For NFT positions, all automation settings are handled by NftSettingsRegistry // instead. // The contract also allows an approved automator to compound, harvest, exit or // rebalance farming positions on behalf of users. // @dev This contract is expected to be used by an external automation bot // that will call the compoundFor, harvestFor, and rebalanceFor functions. // The automation bot is expected to be the EOA of the approved automator. // The approved automator is set by the protocol admin. contract Automation is Admin, NonDelegateMulticall { error InvalidInputLength(); error NotApprovedAutomator(); event HarvestedFor( Sickle indexed sickle, address indexed stakingContract, uint256 indexed poolIndex ); event CompoundedFor( Sickle indexed sickle, address indexed claimStakingContract, uint256 claimPoolIndex, address indexed depositStakingContract, uint256 depositPoolIndex ); event ExitedFor( Sickle indexed sickle, address indexed stakingContract, uint256 indexed poolIndex ); event NftHarvestedFor( Sickle indexed sickle, address indexed nftAddress, uint256 indexed tokenId ); event NftCompoundedFor( Sickle indexed sickle, address indexed nftAddress, uint256 indexed tokenId ); event NftExitedFor( Sickle indexed sickle, address indexed nftAddress, uint256 indexed tokenId ); event NftRebalancedFor( Sickle indexed sickle, address indexed nftAddress, uint256 indexed tokenId ); event ApprovedAutomatorSet(address approvedAutomator); address payable public approvedAutomator; constructor( SickleRegistry registry_, address payable approvedAutomator_, address admin_ ) Admin(admin_) NonDelegateMulticall(registry_) { approvedAutomator = approvedAutomator_; } modifier onlyApprovedAutomator() { if (msg.sender != approvedAutomator) revert NotApprovedAutomator(); _; } // Admin functions /// @notice Update approved automator address. /// @dev Controls which external address is allowed to /// compound farming positions for Sickles. This is expected to be the EOA /// of an automation bot. /// @custom:access Restricted to protocol admin. function setApprovedAutomator( address payable approvedAutomator_ ) external onlyAdmin { approvedAutomator = approvedAutomator_; emit ApprovedAutomatorSet(approvedAutomator_); } // Automator functions function compoundFor( IAutomation[] memory strategies, Sickle[] memory sickles, CompoundParams[] memory params, address[][] memory sweepTokens ) external onlyApprovedAutomator { uint256 strategiesLength = strategies.length; if ( strategiesLength != sickles.length || strategiesLength != params.length || strategiesLength != sweepTokens.length ) { revert InvalidInputLength(); } address[] memory targets = new address[](strategiesLength); bytes[] memory data = new bytes[](strategiesLength); for (uint256 i; i < strategiesLength; i++) { Sickle sickle = sickles[i]; CompoundParams memory param = params[i]; targets[i] = address(strategies[i]); data[i] = abi.encodeCall( IAutomation.compoundFor, (sickle, param, sweepTokens[i]) ); emit CompoundedFor( sickle, param.claimFarm.stakingContract, param.claimFarm.poolIndex, param.depositFarm.stakingContract, param.depositFarm.poolIndex ); } this.multicall(targets, data); } function harvestFor( IAutomation[] memory strategies, Sickle[] memory sickles, Farm[] memory farms, HarvestParams[] memory params, address[][] memory sweepTokens ) external onlyApprovedAutomator { uint256 strategiesLength = strategies.length; if ( strategiesLength != sickles.length || strategiesLength != params.length || strategiesLength != sweepTokens.length ) { revert InvalidInputLength(); } address[] memory targets = new address[](strategiesLength); bytes[] memory data = new bytes[](strategiesLength); for (uint256 i; i < strategiesLength; i++) { Sickle sickle = sickles[i]; Farm memory farm = farms[i]; HarvestParams memory param = params[i]; targets[i] = address(strategies[i]); data[i] = abi.encodeCall( IAutomation.harvestFor, (sickle, farm, param, sweepTokens[i]) ); emit HarvestedFor(sickle, farm.stakingContract, farm.poolIndex); } this.multicall(targets, data); } function exitFor( IAutomation[] memory strategies, Sickle[] memory sickles, Farm[] memory farms, HarvestParams[] memory harvestParams, address[][] memory harvestSweepTokens, WithdrawParams[] memory withdrawParams, address[][] memory withdrawSweepTokens ) external onlyApprovedAutomator { uint256 strategiesLength = strategies.length; if ( strategiesLength != sickles.length || strategiesLength != farms.length || strategiesLength != harvestParams.length || strategiesLength != withdrawParams.length || strategiesLength != harvestSweepTokens.length || strategiesLength != withdrawSweepTokens.length ) { revert InvalidInputLength(); } address[] memory targets = new address[](strategiesLength); bytes[] memory data = new bytes[](strategiesLength); for (uint256 i; i < strategiesLength; i++) { targets[i] = address(strategies[i]); data[i] = abi.encodeCall( IAutomation.exitFor, ( sickles[i], farms[i], harvestParams[i], harvestSweepTokens[i], withdrawParams[i], withdrawSweepTokens[i] ) ); emit ExitedFor( sickles[i], farms[i].stakingContract, farms[i].poolIndex ); } this.multicall(targets, data); } // NFT Automator functions // Validation is done in the NftAutomation contract function harvestFor( INftAutomation[] memory strategies, Sickle[] memory sickles, NftPosition[] memory positions, NftHarvest[] memory params ) external onlyApprovedAutomator { uint256 strategiesLength = strategies.length; if ( strategiesLength != sickles.length || strategiesLength != positions.length || strategiesLength != params.length ) { revert InvalidInputLength(); } address[] memory targets = new address[](strategiesLength); bytes[] memory data = new bytes[](strategiesLength); for (uint256 i; i < strategiesLength; i++) { Sickle sickle = sickles[i]; NftPosition memory position = positions[i]; targets[i] = address(strategies[i]); data[i] = abi.encodeCall( INftAutomation.harvestFor, (sickle, position, params[i]) ); emit NftHarvestedFor( sickle, address(position.nft), position.tokenId ); } this.multicall(targets, data); } function compoundFor( INftAutomation[] memory strategies, Sickle[] memory sickles, NftPosition[] memory positions, NftCompound[] memory params, bool[] memory inPlace, address[][] memory sweepTokens ) external onlyApprovedAutomator { uint256 strategiesLength = strategies.length; if ( strategiesLength != sickles.length || strategiesLength != positions.length || strategiesLength != params.length || strategiesLength != sweepTokens.length ) { revert InvalidInputLength(); } address[] memory targets = new address[](strategiesLength); bytes[] memory data = new bytes[](strategiesLength); for (uint256 i; i < strategiesLength; i++) { Sickle sickle = sickles[i]; NftPosition memory position = positions[i]; targets[i] = address(strategies[i]); data[i] = abi.encodeCall( INftAutomation.compoundFor, (sickle, position, params[i], inPlace[i], sweepTokens[i]) ); emit NftCompoundedFor( sickle, address(position.nft), position.tokenId ); } this.multicall(targets, data); } function exitFor( INftAutomation[] memory strategies, Sickle[] memory sickles, NftPosition[] memory positions, NftHarvest[] memory harvestParams, NftWithdraw[] memory withdrawParams, address[][] memory sweepTokens ) external onlyApprovedAutomator { uint256 strategiesLength = strategies.length; if ( strategiesLength != sickles.length || strategiesLength != positions.length || strategiesLength != harvestParams.length || strategiesLength != withdrawParams.length || strategiesLength != sweepTokens.length ) { revert InvalidInputLength(); } address[] memory targets = new address[](strategiesLength); bytes[] memory data = new bytes[](strategiesLength); for (uint256 i; i < strategiesLength; i++) { Sickle sickle = sickles[i]; NftPosition memory position = positions[i]; targets[i] = address(strategies[i]); data[i] = abi.encodeCall( INftAutomation.exitFor, ( sickle, position, harvestParams[i], withdrawParams[i], sweepTokens[i] ) ); emit NftExitedFor(sickle, address(position.nft), position.tokenId); } this.multicall(targets, data); } function rebalanceFor( INftAutomation[] memory strategies, Sickle[] memory sickles, NftRebalance[] memory params, address[][] memory sweepTokens ) external onlyApprovedAutomator { uint256 strategiesLength = strategies.length; if ( strategiesLength != sickles.length || strategiesLength != params.length || strategiesLength != sweepTokens.length ) { revert InvalidInputLength(); } address[] memory targets = new address[](strategiesLength); bytes[] memory data = new bytes[](strategiesLength); for (uint256 i; i < strategiesLength; i++) { NftRebalance memory param = params[i]; Sickle sickle = sickles[i]; targets[i] = address(strategies[i]); data[i] = abi.encodeCall( INftAutomation.rebalanceFor, (sickle, param, sweepTokens[i]) ); emit NftRebalancedFor( sickle, address(param.position.nft), param.position.tokenId ); } this.multicall(targets, data); } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Pool state that never changes /// @notice These parameters are fixed for a pool forever, i.e., the methods /// will always return the same values interface IUniswapV3PoolImmutables { /// @notice The contract that deployed the pool, which must adhere to the /// IUniswapV3Factory interface /// @return The contract address function factory() external view returns (address); /// @notice The first of the two tokens of the pool, sorted by address /// @return The token contract address function token0() external view returns (address); /// @notice The second of the two tokens of the pool, sorted by address /// @return The token contract address function token1() external view returns (address); /// @notice The pool's fee in hundredths of a bip, i.e. 1e-6 /// @return The fee function fee() external view returns (uint24); /// @notice The pool tick spacing /// @dev Ticks can only be used at multiples of this value, minimum of 1 and /// always positive /// e.g.: a tickSpacing of 3 means ticks can be initialized every 3rd tick, /// i.e., ..., -6, -3, 0, 3, 6, ... /// This value is an int24 to avoid casting even though it is always /// positive. /// @return The tick spacing function tickSpacing() external view returns (int24); /// @notice The maximum amount of position liquidity that can use any tick /// in the range /// @dev This parameter is enforced per tick to prevent liquidity from /// overflowing a uint128 at any point, and /// also prevents out-of-range liquidity from being used to prevent adding /// in-range liquidity to a pool /// @return The max amount of liquidity per tick function maxLiquidityPerTick() external view returns (uint128); } /// @title Pool state that can change /// @notice These methods compose the pool's state, and can change with any /// frequency including multiple times /// per transaction interface IUniswapV3PoolState { /// @notice The 0th storage slot in the pool stores many values, and is /// exposed as a single method to save gas /// when accessed externally. /// @return sqrtPriceX96 The current price of the pool as a /// sqrt(token1/token0) Q64.96 value /// @return tick The current tick of the pool, i.e. according to the last /// tick transition that was run. /// This value may not always be equal to /// SqrtTickMath.getTickAtSqrtRatio(sqrtPriceX96) if the price is on a tick /// boundary. /// @return observationIndex The index of the last oracle observation that /// was written, /// @return observationCardinality The current maximum number of /// observations stored in the pool, /// @return observationCardinalityNext The next maximum number of /// observations, to be updated when the observation. /// @return feeProtocol The protocol fee for both tokens of the pool. /// Encoded as two 4 bit values, where the protocol fee of token1 is shifted /// 4 bits and the protocol fee of token0 /// is the lower 4 bits. Used as the denominator of a fraction of the swap /// fee, e.g. 4 means 1/4th of the swap fee. /// unlocked Whether the pool is currently locked to reentrancy function slot0() external view returns ( uint160 sqrtPriceX96, int24 tick, uint16 observationIndex, uint16 observationCardinality, uint16 observationCardinalityNext, uint8 feeProtocol, bool unlocked ); /// @notice The fee growth as a Q128.128 fees of token0 collected per unit /// of liquidity for the entire life of the pool /// @dev This value can overflow the uint256 function feeGrowthGlobal0X128() external view returns (uint256); /// @notice The fee growth as a Q128.128 fees of token1 collected per unit /// of liquidity for the entire life of the pool /// @dev This value can overflow the uint256 function feeGrowthGlobal1X128() external view returns (uint256); /// @notice The amounts of token0 and token1 that are owed to the protocol /// @dev Protocol fees will never exceed uint128 max in either token function protocolFees() external view returns (uint128 token0, uint128 token1); /// @notice The currently in range liquidity available to the pool /// @dev This value has no relationship to the total liquidity across all /// ticks /// @return The liquidity at the current price of the pool function liquidity() external view returns (uint128); /// @notice Look up information about a specific tick in the pool /// @param tick The tick to look up /// @return liquidityGross the total amount of position liquidity that uses /// the pool either as tick lower or /// tick upper /// @return liquidityNet how much liquidity changes when the pool price /// crosses the tick, /// @return feeGrowthOutside0X128 the fee growth on the other side of the /// tick from the current tick in token0, /// @return feeGrowthOutside1X128 the fee growth on the other side of the /// tick from the current tick in token1, /// @return tickCumulativeOutside the cumulative tick value on the other /// side of the tick from the current tick /// @return secondsPerLiquidityOutsideX128 the seconds spent per liquidity /// on the other side of the tick from the current tick, /// @return secondsOutside the seconds spent on the other side of the tick /// from the current tick, /// @return initialized Set to true if the tick is initialized, i.e. /// liquidityGross is greater than 0, otherwise equal to false. /// Outside values can only be used if the tick is initialized, i.e. if /// liquidityGross is greater than 0. /// In addition, these values are only relative and must be used only in /// comparison to previous snapshots for /// a specific position. function ticks(int24 tick) external view returns ( uint128 liquidityGross, int128 liquidityNet, uint256 feeGrowthOutside0X128, uint256 feeGrowthOutside1X128, int56 tickCumulativeOutside, uint160 secondsPerLiquidityOutsideX128, uint32 secondsOutside, bool initialized ); /// @notice Returns 256 packed tick initialized boolean values. See /// TickBitmap for more information function tickBitmap(int16 wordPosition) external view returns (uint256); /// @notice Returns the information about a position by the position's key /// @param key The position's key is a hash of a preimage composed by the /// owner, tickLower and tickUpper /// @return liquidity The amount of liquidity in the position, /// @return feeGrowthInside0LastX128 fee growth of token0 inside the tick /// range as of the last mint/burn/poke, /// @return feeGrowthInside1LastX128 fee growth of token1 inside the tick /// range as of the last mint/burn/poke, /// @return tokensOwed0 the computed amount of token0 owed to the position /// as of the last mint/burn/poke, /// @return tokensOwed1 the computed amount of token1 owed to the position /// as of the last mint/burn/poke function positions(bytes32 key) external view returns ( uint128 liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128, uint128 tokensOwed0, uint128 tokensOwed1 ); /// @notice Returns data about a specific observation index /// @param index The element of the observations array to fetch /// @dev You most likely want to use #observe() instead of this method to /// get an observation as of some amount of time /// ago, rather than at a specific index in the array. /// @return blockTimestamp The timestamp of the observation, /// @return tickCumulative the tick multiplied by seconds elapsed for the /// life of the pool as of the observation timestamp, /// @return secondsPerLiquidityCumulativeX128 the seconds per in range /// liquidity for the life of the pool as of the observation timestamp, /// @return initialized whether the observation has been initialized and the /// values are safe to use function observations(uint256 index) external view returns ( uint32 blockTimestamp, int56 tickCumulative, uint160 secondsPerLiquidityCumulativeX128, bool initialized ); } interface IUniswapV3Pool is IUniswapV3PoolImmutables, IUniswapV3PoolState { function flash( address recipient, uint256 amount0, uint256 amount1, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; /// @title Admin contract /// @author vfat.tools /// @notice Provides an administration mechanism allowing restricted functions abstract contract Admin { /// ERRORS /// /// @notice Thrown when the caller is not the admin error NotAdminError(); //0xb5c42b3b /// EVENTS /// /// @notice Emitted when a new admin is set /// @param oldAdmin Address of the old admin /// @param newAdmin Address of the new admin event AdminSet(address oldAdmin, address newAdmin); /// STORAGE /// /// @notice Address of the current admin address public admin; /// MODIFIERS /// /// @dev Restricts a function to the admin modifier onlyAdmin() { if (msg.sender != admin) revert NotAdminError(); _; } /// WRITE FUNCTIONS /// /// @param admin_ Address of the admin constructor(address admin_) { emit AdminSet(admin, admin_); admin = admin_; } /// @notice Sets a new admin /// @param newAdmin Address of the new admin /// @custom:access Restricted to protocol admin. function setAdmin(address newAdmin) external onlyAdmin { emit AdminSet(admin, newAdmin); admin = newAdmin; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import { SickleStorage } from "contracts/base/SickleStorage.sol"; import { SickleRegistry } from "contracts/SickleRegistry.sol"; /// @title Multicall contract /// @author vfat.tools /// @notice Enables calling multiple methods in a single call to the contract abstract contract NonDelegateMulticall is SickleStorage { /// ERRORS /// error MulticallParamsMismatchError(); // 0xc1e637c9 /// @notice Thrown when the target contract is not whitelisted /// @param target Address of the non-whitelisted target error TargetNotWhitelisted(address target); // 0x47ccabe7 /// @notice Thrown when the caller is not whitelisted /// @param caller Address of the non-whitelisted caller error CallerNotWhitelisted(address caller); // 0x252c8273 /// STORAGE /// /// @notice Address of the SickleRegistry contract /// @dev Needs to be immutable so that it's accessible for Sickle proxies SickleRegistry public immutable registry; /// INITIALIZATION /// /// @param registry_ Address of the SickleRegistry contract constructor(SickleRegistry registry_) initializer { registry = registry_; } /// WRITE FUNCTIONS /// /// @notice Batch multiple calls together (calls or delegatecalls) /// @param targets Array of targets to call /// @param data Array of data to pass with the calls function multicall( address[] calldata targets, bytes[] calldata data ) external payable { if (targets.length != data.length) { revert MulticallParamsMismatchError(); } if (!registry.isWhitelistedCaller(msg.sender)) { revert CallerNotWhitelisted(msg.sender); } for (uint256 i = 0; i != data.length;) { if (targets[i] == address(0)) { unchecked { ++i; } continue; // No-op } if (targets[i] != address(this)) { if (!registry.isWhitelistedTarget(targets[i])) { revert TargetNotWhitelisted(targets[i]); } } (bool success, bytes memory result) = targets[i].call(data[i]); if (!success) { if (result.length == 0) revert(); assembly { revert(add(32, result), mload(result)) } } unchecked { ++i; } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import { SickleStorage } from "contracts/base/SickleStorage.sol"; import { Multicall } from "contracts/base/Multicall.sol"; import { SickleRegistry } from "contracts/SickleRegistry.sol"; /// @title Sickle contract /// @author vfat.tools /// @notice Sickle facilitates farming and interactions with Masterchef /// contracts /// @dev Base contract inheriting from all the other "manager" contracts contract Sickle is SickleStorage, Multicall { /// @notice Function to receive ETH receive() external payable { } /// @param sickleRegistry_ Address of the SickleRegistry contract constructor( SickleRegistry sickleRegistry_ ) initializer Multicall(sickleRegistry_) { _Sickle_initialize(address(0), address(0)); } /// @param sickleOwner_ Address of the Sickle owner function initialize( address sickleOwner_, address approved_ ) external initializer { _Sickle_initialize(sickleOwner_, approved_); } /// INTERNALS /// function _Sickle_initialize( address sickleOwner_, address approved_ ) internal { SickleStorage._SickleStorage_initialize(sickleOwner_, approved_); } function onERC721Received( address, // operator address, // from uint256, // tokenId bytes calldata // data ) external pure returns (bytes4) { return this.onERC721Received.selector; } function onERC1155Received( address, // operator address, // from uint256, // id uint256, // value bytes calldata // data ) external pure returns (bytes4) { return this.onERC1155Received.selector; } function onERC1155BatchReceived( address, // operator address, // from uint256[] calldata, // ids uint256[] calldata, // values bytes calldata // data ) external pure returns (bytes4) { return this.onERC1155BatchReceived.selector; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import { Admin } from "contracts/base/Admin.sol"; library SickleRegistryEvents { event CollectorChanged(address newCollector); event FeesUpdated(bytes32[] feeHashes, uint256[] feesInBP); event ReferralCodeCreated(bytes32 indexed code, address indexed referrer); // Multicall caller and target whitelist status changes event CallerStatusChanged(address caller, bool isWhitelisted); event TargetStatusChanged(address target, bool isWhitelisted); } /// @title SickleRegistry contract /// @author vfat.tools /// @notice Manages the whitelisted contracts and the collector address contract SickleRegistry is Admin { /// ERRORS /// error ArrayLengthMismatch(); // 0xa24a13a6 error FeeAboveMaxLimit(); // 0xd6cf7b5e error InvalidReferralCode(); // 0xe55b4629 /// STORAGE /// /// @notice Address of the fee collector address public collector; /// @notice Tracks the contracts that can be called through Sickle multicall /// @return True if the contract is a whitelisted target mapping(address => bool) public isWhitelistedTarget; /// @notice Tracks the contracts that can call Sickle multicall /// @return True if the contract is a whitelisted caller mapping(address => bool) public isWhitelistedCaller; /// @notice Keeps track of the referrers and their associated code mapping(bytes32 => address) public referralCodes; /// @notice Mapping for fee hashes (hash of the strategy contract addresses /// and the function selectors) and their associated fees /// @return The fee in basis points to apply to the transaction amount mapping(bytes32 => uint256) public feeRegistry; /// WRITE FUNCTIONS /// /// @param admin_ Address of the admin /// @param collector_ Address of the collector constructor(address admin_, address collector_) Admin(admin_) { collector = collector_; } /// @notice Updates the whitelist status for multiple multicall targets /// @param targets Addresses of the contracts to update /// @param isApproved New status for the contracts /// @custom:access Restricted to protocol admin. function setWhitelistedTargets( address[] calldata targets, bool isApproved ) external onlyAdmin { for (uint256 i; i < targets.length;) { isWhitelistedTarget[targets[i]] = isApproved; emit SickleRegistryEvents.TargetStatusChanged( targets[i], isApproved ); unchecked { ++i; } } } /// @notice Updates the fee collector address /// @param newCollector Address of the new fee collector /// @custom:access Restricted to protocol admin. function updateCollector(address newCollector) external onlyAdmin { collector = newCollector; emit SickleRegistryEvents.CollectorChanged(newCollector); } /// @notice Update the whitelist status for multiple multicall callers /// @param callers Addresses of the callers /// @param isApproved New status for the caller /// @custom:access Restricted to protocol admin. function setWhitelistedCallers( address[] calldata callers, bool isApproved ) external onlyAdmin { for (uint256 i; i < callers.length;) { isWhitelistedCaller[callers[i]] = isApproved; emit SickleRegistryEvents.CallerStatusChanged( callers[i], isApproved ); unchecked { ++i; } } } /// @notice Associates a referral code to the address of the caller function setReferralCode(bytes32 referralCode) external { if (referralCodes[referralCode] != address(0)) { revert InvalidReferralCode(); } referralCodes[referralCode] = msg.sender; emit SickleRegistryEvents.ReferralCodeCreated(referralCode, msg.sender); } /// @notice Update the fees for multiple strategy functions /// @param feeHashes Array of fee hashes /// @param feesArray Array of fees to apply (in basis points) /// @custom:access Restricted to protocol admin. function setFees( bytes32[] calldata feeHashes, uint256[] calldata feesArray ) external onlyAdmin { if (feeHashes.length != feesArray.length) { revert ArrayLengthMismatch(); } for (uint256 i = 0; i < feeHashes.length;) { if (feesArray[i] <= 500) { // maximum fee of 5% feeRegistry[feeHashes[i]] = feesArray[i]; } else { revert FeeAboveMaxLimit(); } unchecked { ++i; } } emit SickleRegistryEvents.FeesUpdated(feeHashes, feesArray); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import { Sickle } from "contracts/Sickle.sol"; import { Farm, HarvestParams, CompoundParams, WithdrawParams } from "contracts/structs/FarmStrategyStructs.sol"; interface IAutomation { function harvestFor( Sickle sickle, Farm calldata farm, HarvestParams calldata params, address[] calldata sweepTokens ) external; function compoundFor( Sickle sickle, CompoundParams calldata params, address[] calldata sweepTokens ) external; function exitFor( Sickle sickle, Farm calldata farm, HarvestParams calldata harvestParams, address[] calldata harvestSweepTokens, WithdrawParams calldata withdrawParams, address[] calldata withdrawSweepTokens ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import { IUniswapV3Pool } from "contracts/interfaces/external/uniswap/IUniswapV3Pool.sol"; import { Sickle } from "contracts/Sickle.sol"; import { NftPosition, NftRebalance, NftHarvest, NftWithdraw, NftCompound } from "contracts/structs/NftFarmStrategyStructs.sol"; interface INftAutomation { function rebalanceFor( Sickle sickle, NftRebalance calldata rebalance, address[] calldata sweepTokens ) external; function harvestFor( Sickle sickle, NftPosition calldata position, NftHarvest calldata params ) external; function compoundFor( Sickle sickle, NftPosition calldata position, NftCompound calldata params, bool inPlace, address[] memory sweepTokens ) external; function exitFor( Sickle sickle, NftPosition calldata position, NftHarvest calldata harvestParams, NftWithdraw calldata withdrawParams, address[] memory sweepTokens ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import { IUniswapV3Pool } from "contracts/interfaces/external/uniswap/IUniswapV3Pool.sol"; import { INonfungiblePositionManager } from "contracts/interfaces/external/uniswap/INonfungiblePositionManager.sol"; import { NftZapIn, NftZapOut } from "contracts/structs/NftZapStructs.sol"; import { SwapParams } from "contracts/structs/LiquidityStructs.sol"; import { Farm } from "contracts/structs/FarmStrategyStructs.sol"; struct NftPosition { Farm farm; INonfungiblePositionManager nft; uint256 tokenId; } struct NftIncrease { address[] tokensIn; uint256[] amountsIn; NftZapIn zap; bytes extraData; } struct NftDeposit { Farm farm; INonfungiblePositionManager nft; NftIncrease increase; } struct NftWithdraw { NftZapOut zap; address[] tokensOut; bytes extraData; } struct SimpleNftHarvest { address[] rewardTokens; uint128 amount0Max; uint128 amount1Max; bytes extraData; } struct NftHarvest { SimpleNftHarvest harvest; SwapParams[] swaps; address[] outputTokens; address[] sweepTokens; } struct NftCompound { SimpleNftHarvest harvest; NftZapIn zap; } struct NftRebalance { IUniswapV3Pool pool; NftPosition position; NftHarvest harvest; NftWithdraw withdraw; NftIncrease increase; } struct NftMove { IUniswapV3Pool pool; NftPosition position; NftHarvest harvest; NftWithdraw withdraw; NftDeposit deposit; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import { ZapIn, ZapOut } from "contracts/libraries/ZapLib.sol"; import { SwapParams } from "contracts/structs/LiquidityStructs.sol"; struct Farm { address stakingContract; uint256 poolIndex; } struct DepositParams { Farm farm; address[] tokensIn; uint256[] amountsIn; ZapIn zap; bytes extraData; } struct WithdrawParams { bytes extraData; ZapOut zap; address[] tokensOut; } struct HarvestParams { SwapParams[] swaps; bytes extraData; address[] tokensOut; } struct CompoundParams { Farm claimFarm; bytes claimExtraData; address[] rewardTokens; ZapIn zap; Farm depositFarm; bytes depositExtraData; } struct SimpleDepositParams { Farm farm; address lpToken; uint256 amountIn; bytes extraData; } struct SimpleHarvestParams { address[] rewardTokens; bytes extraData; } struct SimpleWithdrawParams { address lpToken; uint256 amountOut; bytes extraData; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; library SickleStorageEvents { event ApprovedAddressChanged(address newApproved); } /// @title SickleStorage contract /// @author vfat.tools /// @notice Base storage of the Sickle contract /// @dev This contract needs to be inherited by stub contracts meant to be used /// with `delegatecall` abstract contract SickleStorage is Initializable { /// ERRORS /// /// @notice Thrown when the caller is not the owner of the Sickle contract error NotOwnerError(); // 0x74a21527 /// @notice Thrown when the caller is not a strategy contract or the /// Flashloan Stub error NotStrategyError(); // 0x4581ba62 /// STORAGE /// /// @notice Address of the owner address public owner; /// @notice An address that can be set by the owner of the Sickle contract /// in order to trigger specific functions. address public approved; /// MODIFIERS /// /// @dev Restricts a function call to the owner, however if the admin was /// not set yet, /// the modifier will not restrict the call, this allows the SickleFactory /// to perform /// some calls on the user's behalf before passing the admin rights to them modifier onlyOwner() { if (msg.sender != owner) revert NotOwnerError(); _; } /// INITIALIZATION /// /// @param owner_ Address of the owner of this Sickle contract function _SickleStorage_initialize( address owner_, address approved_ ) internal onlyInitializing { owner = owner_; approved = approved_; } /// WRITE FUNCTIONS /// /// @notice Sets the approved address of this Sickle /// @param newApproved Address meant to be approved by the owner function setApproved(address newApproved) external onlyOwner { approved = newApproved; emit SickleStorageEvents.ApprovedAddressChanged(newApproved); } /// @notice Checks if `caller` is either the owner of the Sickle contract /// or was approved by them /// @param caller Address to check /// @return True if `caller` is either the owner of the Sickle contract function isOwnerOrApproved(address caller) public view returns (bool) { return caller == owner || caller == approved; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import { SickleStorage } from "contracts/base/SickleStorage.sol"; import { SickleRegistry } from "contracts/SickleRegistry.sol"; /// @title Multicall contract /// @author vfat.tools /// @notice Enables calling multiple methods in a single call to the contract abstract contract Multicall is SickleStorage { /// ERRORS /// error MulticallParamsMismatchError(); // 0xc1e637c9 /// @notice Thrown when the target contract is not whitelisted /// @param target Address of the non-whitelisted target error TargetNotWhitelisted(address target); // 0x47ccabe7 /// @notice Thrown when the caller is not whitelisted /// @param caller Address of the non-whitelisted caller error CallerNotWhitelisted(address caller); // 0x252c8273 /// STORAGE /// /// @notice Address of the SickleRegistry contract /// @dev Needs to be immutable so that it's accessible for Sickle proxies SickleRegistry public immutable registry; /// INITIALIZATION /// /// @param registry_ Address of the SickleRegistry contract constructor(SickleRegistry registry_) initializer { registry = registry_; } /// WRITE FUNCTIONS /// /// @notice Batch multiple calls together (calls or delegatecalls) /// @param targets Array of targets to call /// @param data Array of data to pass with the calls function multicall( address[] calldata targets, bytes[] calldata data ) external payable { if (targets.length != data.length) { revert MulticallParamsMismatchError(); } if (!registry.isWhitelistedCaller(msg.sender)) { revert CallerNotWhitelisted(msg.sender); } for (uint256 i = 0; i != data.length;) { if (targets[i] == address(0)) { unchecked { ++i; } continue; // No-op } if (targets[i] != address(this)) { if (!registry.isWhitelistedTarget(targets[i])) { revert TargetNotWhitelisted(targets[i]); } } (bool success, bytes memory result) = targets[i].delegatecall(data[i]); if (!success) { if (result.length == 0) revert(); assembly { revert(add(32, result), mload(result)) } } unchecked { ++i; } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { IERC721Enumerable } from "openzeppelin-contracts/contracts/interfaces/IERC721Enumerable.sol"; interface INonfungiblePositionManager is IERC721Enumerable { struct IncreaseLiquidityParams { uint256 tokenId; uint256 amount0Desired; uint256 amount1Desired; uint256 amount0Min; uint256 amount1Min; uint256 deadline; } struct MintParams { address token0; address token1; uint24 fee; int24 tickLower; int24 tickUpper; uint256 amount0Desired; uint256 amount1Desired; uint256 amount0Min; uint256 amount1Min; address recipient; uint256 deadline; } struct DecreaseLiquidityParams { uint256 tokenId; uint128 liquidity; uint256 amount0Min; uint256 amount1Min; uint256 deadline; } struct CollectParams { uint256 tokenId; address recipient; uint128 amount0Max; uint128 amount1Max; } function increaseLiquidity(IncreaseLiquidityParams memory params) external payable returns (uint256 amount0, uint256 amount1, uint256 liquidity); function decreaseLiquidity(DecreaseLiquidityParams calldata params) external payable returns (uint256 amount0, uint256 amount1); function mint(MintParams memory params) external payable returns (uint256 tokenId, uint256 amount0, uint256 amount1); function collect(CollectParams calldata params) external payable returns (uint256 amount0, uint256 amount1); function burn(uint256 tokenId) external payable; function positions(uint256 tokenId) external view returns ( uint96 nonce, address operator, address token0, address token1, uint24 fee, int24 tickLower, int24 tickUpper, uint128 liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128, uint128 tokensOwed0, uint128 tokensOwed1 ); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import { SwapParams } from "contracts/structs/LiquidityStructs.sol"; import { NftAddLiquidity, NftRemoveLiquidity } from "contracts/structs/NftLiquidityStructs.sol"; struct NftZapIn { SwapParams[] swaps; NftAddLiquidity addLiquidityParams; } struct NftZapOut { NftRemoveLiquidity removeLiquidityParams; SwapParams[] swaps; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; struct AddLiquidityParams { address router; address lpToken; address[] tokens; uint256[] desiredAmounts; uint256[] minAmounts; bytes extraData; } struct RemoveLiquidityParams { address router; address lpToken; address[] tokens; uint256 lpAmountIn; uint256[] minAmountsOut; bytes extraData; } struct SwapParams { address router; uint256 amountIn; uint256 minAmountOut; address tokenIn; bytes extraData; } struct GetAmountOutParams { address router; address lpToken; address tokenIn; address tokenOut; uint256 amountIn; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { SafeTransferLib } from "solmate/utils/SafeTransferLib.sol"; import { SwapParams, AddLiquidityParams } from "contracts/structs/LiquidityStructs.sol"; import { ILiquidityConnector } from "contracts/interfaces/ILiquidityConnector.sol"; import { ConnectorRegistry } from "contracts/ConnectorRegistry.sol"; import { DelegateModule } from "contracts/modules/DelegateModule.sol"; import { ZapIn, ZapOut } from "contracts/structs/ZapStructs.sol"; import { IZapLib } from "contracts/interfaces/libraries/IZapLib.sol"; import { ISwapLib } from "contracts/interfaces/libraries/ISwapLib.sol"; contract ZapLib is DelegateModule, IZapLib { error LiquidityAmountError(); // 0x4d0ab6b4 ISwapLib public immutable swapLib; ConnectorRegistry public immutable connectorRegistry; constructor(ConnectorRegistry connectorRegistry_, ISwapLib swapLib_) { connectorRegistry = connectorRegistry_; swapLib = swapLib_; } function zapIn( ZapIn memory zap ) external payable { uint256 swapDataLength = zap.swaps.length; for (uint256 i; i < swapDataLength;) { _delegateTo( address(swapLib), abi.encodeCall(ISwapLib.swap, (zap.swaps[i])) ); unchecked { i++; } } if (zap.addLiquidityParams.lpToken == address(0)) { return; } bool atLeastOneNonZero = false; AddLiquidityParams memory addLiquidityParams = zap.addLiquidityParams; uint256 addLiquidityParamsTokensLength = addLiquidityParams.tokens.length; for (uint256 i; i < addLiquidityParamsTokensLength; i++) { if (addLiquidityParams.tokens[i] == address(0)) { continue; } if (addLiquidityParams.desiredAmounts[i] == 0) { addLiquidityParams.desiredAmounts[i] = IERC20( addLiquidityParams.tokens[i] ).balanceOf(address(this)); } if (addLiquidityParams.desiredAmounts[i] > 0) { atLeastOneNonZero = true; // In case there is USDT or similar dust approval, revoke it SafeTransferLib.safeApprove( addLiquidityParams.tokens[i], addLiquidityParams.router, 0 ); SafeTransferLib.safeApprove( addLiquidityParams.tokens[i], addLiquidityParams.router, addLiquidityParams.desiredAmounts[i] ); } } if (!atLeastOneNonZero) { revert LiquidityAmountError(); } address routerConnector = connectorRegistry.connectorOf(addLiquidityParams.router); _delegateTo( routerConnector, abi.encodeCall( ILiquidityConnector.addLiquidity, (addLiquidityParams) ) ); for (uint256 i; i < addLiquidityParamsTokensLength;) { if (addLiquidityParams.tokens[i] != address(0)) { // Revoke any dust approval in case the amount was estimated SafeTransferLib.safeApprove( addLiquidityParams.tokens[i], addLiquidityParams.router, 0 ); } unchecked { i++; } } } function zapOut( ZapOut memory zap ) external { if (zap.removeLiquidityParams.lpToken != address(0)) { if (zap.removeLiquidityParams.lpAmountIn > 0) { SafeTransferLib.safeApprove( zap.removeLiquidityParams.lpToken, zap.removeLiquidityParams.router, zap.removeLiquidityParams.lpAmountIn ); } address routerConnector = connectorRegistry.connectorOf(zap.removeLiquidityParams.router); _delegateTo( address(routerConnector), abi.encodeCall( ILiquidityConnector.removeLiquidity, zap.removeLiquidityParams ) ); } uint256 swapDataLength = zap.swaps.length; for (uint256 i; i < swapDataLength;) { _delegateTo( address(swapLib), abi.encodeCall(ISwapLib.swap, (zap.swaps[i])) ); unchecked { i++; } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.1) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/Address.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a * constructor. * * Emits an {Initialized} event. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: setting the version to 255 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint8) { return _initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _initializing; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../token/ERC721/extensions/IERC721Enumerable.sol";
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { INonfungiblePositionManager } from "contracts/interfaces/external/uniswap/INonfungiblePositionManager.sol"; struct Pool { address token0; address token1; uint24 fee; } struct NftAddLiquidity { INonfungiblePositionManager nft; uint256 tokenId; Pool pool; int24 tickLower; int24 tickUpper; uint256 amount0Desired; uint256 amount1Desired; uint256 amount0Min; uint256 amount1Min; bytes extraData; } struct NftRemoveLiquidity { INonfungiblePositionManager nft; uint256 tokenId; uint128 liquidity; uint256 amount0Min; // For decreasing uint256 amount1Min; uint128 amount0Max; // For collecting uint128 amount1Max; bytes extraData; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; import {ERC20} from "../tokens/ERC20.sol"; /// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol) /// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer. /// @dev Note that none of the functions in this library check that a token has code at all! That responsibility is delegated to the caller. library SafeTransferLib { /*////////////////////////////////////////////////////////////// ERRORS //////////////////////////////////////////////////////////////*/ error ETHTransferFailed(); error TransferFromFailed(); error TransferFailed(); error ApproveFailed(); /*////////////////////////////////////////////////////////////// ETH OPERATIONS //////////////////////////////////////////////////////////////*/ function safeTransferETH(address to, uint256 amount) internal { bool success; /// @solidity memory-safe-assembly assembly { // Transfer the ETH and store if it succeeded or not. success := call(gas(), to, amount, 0, 0, 0, 0) } if (!success) revert ETHTransferFailed(); } /*////////////////////////////////////////////////////////////// ERC20 OPERATIONS //////////////////////////////////////////////////////////////*/ function safeTransferFrom( address token, address from, address to, uint256 amount ) internal { bool success; /// @solidity memory-safe-assembly assembly { // Get a pointer to some free memory. let freeMemoryPointer := mload(0x40) // Write the abi-encoded calldata into memory, beginning with the function selector. mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000) mstore(add(freeMemoryPointer, 4), from) // Append the "from" argument. mstore(add(freeMemoryPointer, 36), to) // Append the "to" argument. mstore(add(freeMemoryPointer, 68), amount) // Append the "amount" argument. success := and( // Set success to whether the call reverted, if not we check it either // returned exactly 1 (can't just be non-zero data), or had no return data. or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())), // We use 100 because the length of our calldata totals up like so: 4 + 32 * 3. // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. // Counterintuitively, this call must be positioned second to the or() call in the // surrounding and() call or else returndatasize() will be zero during the computation. call(gas(), token, 0, freeMemoryPointer, 100, 0, 32) ) } if (!success) revert TransferFromFailed(); } function safeTransfer( address token, address to, uint256 amount ) internal { bool success; /// @solidity memory-safe-assembly assembly { // Get a pointer to some free memory. let freeMemoryPointer := mload(0x40) // Write the abi-encoded calldata into memory, beginning with the function selector. mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000) mstore(add(freeMemoryPointer, 4), to) // Append the "to" argument. mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. success := and( // Set success to whether the call reverted, if not we check it either // returned exactly 1 (can't just be non-zero data), or had no return data. or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())), // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2. // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. // Counterintuitively, this call must be positioned second to the or() call in the // surrounding and() call or else returndatasize() will be zero during the computation. call(gas(), token, 0, freeMemoryPointer, 68, 0, 32) ) } if (!success) revert TransferFailed(); } function safeApprove( address token, address to, uint256 amount ) internal { bool success; /// @solidity memory-safe-assembly assembly { // Get a pointer to some free memory. let freeMemoryPointer := mload(0x40) // Write the abi-encoded calldata into memory, beginning with the function selector. mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000) mstore(add(freeMemoryPointer, 4), to) // Append the "to" argument. mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. success := and( // Set success to whether the call reverted, if not we check it either // returned exactly 1 (can't just be non-zero data), or had no return data. or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())), // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2. // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. // Counterintuitively, this call must be positioned second to the or() call in the // surrounding and() call or else returndatasize() will be zero during the computation. call(gas(), token, 0, freeMemoryPointer, 68, 0, 32) ) } if (!success) revert ApproveFailed(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { AddLiquidityParams, RemoveLiquidityParams, SwapParams, GetAmountOutParams } from "contracts/structs/LiquidityStructs.sol"; interface ILiquidityConnector { function addLiquidity( AddLiquidityParams memory addLiquidityParams ) external payable; function removeLiquidity( RemoveLiquidityParams memory removeLiquidityParams ) external; function swapExactTokensForTokens( SwapParams memory swap ) external payable; function getAmountOut( GetAmountOutParams memory getAmountOutParams ) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import { Admin } from "contracts/base/Admin.sol"; import { TimelockAdmin } from "contracts/base/TimelockAdmin.sol"; error ConnectorNotRegistered(address target); interface ICustomConnectorRegistry { function connectorOf(address target) external view returns (address); } contract ConnectorRegistry is Admin, TimelockAdmin { event ConnectorChanged(address target, address connector); event CustomRegistryAdded(address registry); event CustomRegistryRemoved(address registry); error ConnectorAlreadySet(address target); error ConnectorNotSet(address target); ICustomConnectorRegistry[] public customRegistries; mapping(ICustomConnectorRegistry => bool) public isCustomRegistry; mapping(address target => address connector) private connectors_; constructor( address admin_, address timelockAdmin_ ) Admin(admin_) TimelockAdmin(timelockAdmin_) { } /// @notice Update connector addresses for a batch of targets. /// @dev Controls which connector contracts are used for the specified /// targets. /// @custom:access Restricted to protocol admin. function setConnectors( address[] calldata targets, address[] calldata connectors ) external onlyAdmin { for (uint256 i; i != targets.length;) { if (connectors_[targets[i]] != address(0)) { revert ConnectorAlreadySet(targets[i]); } connectors_[targets[i]] = connectors[i]; emit ConnectorChanged(targets[i], connectors[i]); unchecked { ++i; } } } function updateConnectors( address[] calldata targets, address[] calldata connectors ) external onlyTimelockAdmin { for (uint256 i; i != targets.length;) { if (connectors_[targets[i]] == address(0)) { revert ConnectorNotSet(targets[i]); } connectors_[targets[i]] = connectors[i]; emit ConnectorChanged(targets[i], connectors[i]); unchecked { ++i; } } } /// @notice Append an address to the custom registries list. /// @custom:access Restricted to protocol admin. function addCustomRegistry(ICustomConnectorRegistry registry) external onlyAdmin { customRegistries.push(registry); isCustomRegistry[registry] = true; emit CustomRegistryAdded(address(registry)); } /// @notice Replace an address in the custom registries list. /// @custom:access Restricted to protocol admin. function updateCustomRegistry( uint256 index, ICustomConnectorRegistry newRegistry ) external onlyTimelockAdmin { address oldRegistry = address(customRegistries[index]); isCustomRegistry[customRegistries[index]] = false; emit CustomRegistryRemoved(oldRegistry); customRegistries[index] = newRegistry; isCustomRegistry[newRegistry] = true; if (address(newRegistry) != address(0)) { emit CustomRegistryAdded(address(newRegistry)); } } function connectorOf(address target) external view returns (address) { address connector = connectors_[target]; if (connector != address(0)) { return connector; } uint256 length = customRegistries.length; for (uint256 i; i != length;) { if (address(customRegistries[i]) != address(0)) { try customRegistries[i].connectorOf(target) returns ( address _connector ) { if (_connector != address(0)) { return _connector; } } catch { // Ignore } } unchecked { ++i; } } revert ConnectorNotRegistered(target); } function hasConnector(address target) external view returns (bool) { if (connectors_[target] != address(0)) { return true; } uint256 length = customRegistries.length; for (uint256 i; i != length;) { if (address(customRegistries[i]) != address(0)) { try customRegistries[i].connectorOf(target) returns ( address _connector ) { if (_connector != address(0)) { return true; } } catch { // Ignore } unchecked { ++i; } } } return false; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; contract DelegateModule { function _delegateTo( address to, bytes memory data ) internal returns (bytes memory) { (bool success, bytes memory result) = to.delegatecall(data); if (!success) { if (result.length == 0) revert(); assembly { revert(add(32, result), mload(result)) } } return result; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { SwapParams, AddLiquidityParams, RemoveLiquidityParams } from "contracts/structs/LiquidityStructs.sol"; struct ZapIn { SwapParams[] swaps; AddLiquidityParams addLiquidityParams; } struct ZapOut { RemoveLiquidityParams removeLiquidityParams; SwapParams[] swaps; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { ZapIn, ZapOut } from "contracts/structs/ZapStructs.sol"; interface IZapLib { function zapIn( ZapIn memory zap ) external payable; function zapOut( ZapOut memory zap ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { SwapParams } from "contracts/structs/LiquidityStructs.sol"; interface ISwapLib { function swap( SwapParams memory swap ) external payable; function swapMultiple( SwapParams[] memory swaps ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @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 * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // 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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Modern and gas efficient ERC20 + EIP-2612 implementation. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol) /// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol) /// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it. abstract contract ERC20 { /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event Transfer(address indexed from, address indexed to, uint256 amount); event Approval(address indexed owner, address indexed spender, uint256 amount); /*////////////////////////////////////////////////////////////// METADATA STORAGE //////////////////////////////////////////////////////////////*/ string public name; string public symbol; uint8 public immutable decimals; /*////////////////////////////////////////////////////////////// ERC20 STORAGE //////////////////////////////////////////////////////////////*/ uint256 public totalSupply; mapping(address => uint256) public balanceOf; mapping(address => mapping(address => uint256)) public allowance; /*////////////////////////////////////////////////////////////// EIP-2612 STORAGE //////////////////////////////////////////////////////////////*/ uint256 internal immutable INITIAL_CHAIN_ID; bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR; mapping(address => uint256) public nonces; /*////////////////////////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////*/ constructor( string memory _name, string memory _symbol, uint8 _decimals ) { name = _name; symbol = _symbol; decimals = _decimals; INITIAL_CHAIN_ID = block.chainid; INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator(); } /*////////////////////////////////////////////////////////////// ERC20 LOGIC //////////////////////////////////////////////////////////////*/ function approve(address spender, uint256 amount) public virtual returns (bool) { allowance[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } function transfer(address to, uint256 amount) public virtual returns (bool) { balanceOf[msg.sender] -= amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(msg.sender, to, amount); return true; } function transferFrom( address from, address to, uint256 amount ) public virtual returns (bool) { uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals. if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount; balanceOf[from] -= amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(from, to, amount); return true; } /*////////////////////////////////////////////////////////////// EIP-2612 LOGIC //////////////////////////////////////////////////////////////*/ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual { require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED"); // Unchecked because the only math done is incrementing // the owner's nonce which cannot realistically overflow. unchecked { address recoveredAddress = ecrecover( keccak256( abi.encodePacked( "\x19\x01", DOMAIN_SEPARATOR(), keccak256( abi.encode( keccak256( "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)" ), owner, spender, value, nonces[owner]++, deadline ) ) ) ), v, r, s ); require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER"); allowance[recoveredAddress][spender] = value; } emit Approval(owner, spender, value); } function DOMAIN_SEPARATOR() public view virtual returns (bytes32) { return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator(); } function computeDomainSeparator() internal view virtual returns (bytes32) { return keccak256( abi.encode( keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), keccak256(bytes(name)), keccak256("1"), block.chainid, address(this) ) ); } /*////////////////////////////////////////////////////////////// INTERNAL MINT/BURN LOGIC //////////////////////////////////////////////////////////////*/ function _mint(address to, uint256 amount) internal virtual { totalSupply += amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(address(0), to, amount); } function _burn(address from, uint256 amount) internal virtual { balanceOf[from] -= amount; // Cannot underflow because a user's balance // will never be larger than the total supply. unchecked { totalSupply -= amount; } emit Transfer(from, address(0), amount); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; /// @title TimelockAdmin contract /// @author vfat.tools /// @notice Provides an timelockAdministration mechanism allowing restricted /// functions abstract contract TimelockAdmin { /// ERRORS /// /// @notice Thrown when the caller is not the timelockAdmin error NotTimelockAdminError(); /// EVENTS /// /// @notice Emitted when a new timelockAdmin is set /// @param oldTimelockAdmin Address of the old timelockAdmin /// @param newTimelockAdmin Address of the new timelockAdmin event TimelockAdminSet(address oldTimelockAdmin, address newTimelockAdmin); /// STORAGE /// /// @notice Address of the current timelockAdmin address public timelockAdmin; /// MODIFIERS /// /// @dev Restricts a function to the timelockAdmin modifier onlyTimelockAdmin() { if (msg.sender != timelockAdmin) revert NotTimelockAdminError(); _; } /// WRITE FUNCTIONS /// /// @param timelockAdmin_ Address of the timelockAdmin constructor(address timelockAdmin_) { emit TimelockAdminSet(timelockAdmin, timelockAdmin_); timelockAdmin = timelockAdmin_; } /// @notice Sets a new timelockAdmin /// @dev Can only be called by the current timelockAdmin /// @param newTimelockAdmin Address of the new timelockAdmin function setTimelockAdmin(address newTimelockAdmin) external onlyTimelockAdmin { emit TimelockAdminSet(timelockAdmin, newTimelockAdmin); timelockAdmin = newTimelockAdmin; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "remappings": [ "solmate/=lib/solmate/src/", "@openzeppelin/=lib/openzeppelin-contracts/", "@uniswap/v3-periphery/=lib/v3-periphery/", "@uniswap/v3-core/=lib/v3-core/", "@morpho-blue/=lib/morpho-blue/src/", "ds-test/=lib/solmate/lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "morpho-blue/=lib/morpho-blue/", "openzeppelin-contracts/=lib/openzeppelin-contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "viaIR": false, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract SickleRegistry","name":"registry_","type":"address"},{"internalType":"address payable","name":"approvedAutomator_","type":"address"},{"internalType":"address","name":"admin_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"CallerNotWhitelisted","type":"error"},{"inputs":[],"name":"InvalidInputLength","type":"error"},{"inputs":[],"name":"MulticallParamsMismatchError","type":"error"},{"inputs":[],"name":"NotAdminError","type":"error"},{"inputs":[],"name":"NotApprovedAutomator","type":"error"},{"inputs":[],"name":"NotOwnerError","type":"error"},{"inputs":[],"name":"NotStrategyError","type":"error"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"TargetNotWhitelisted","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"approvedAutomator","type":"address"}],"name":"ApprovedAutomatorSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Sickle","name":"sickle","type":"address"},{"indexed":true,"internalType":"address","name":"claimStakingContract","type":"address"},{"indexed":false,"internalType":"uint256","name":"claimPoolIndex","type":"uint256"},{"indexed":true,"internalType":"address","name":"depositStakingContract","type":"address"},{"indexed":false,"internalType":"uint256","name":"depositPoolIndex","type":"uint256"}],"name":"CompoundedFor","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Sickle","name":"sickle","type":"address"},{"indexed":true,"internalType":"address","name":"stakingContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"poolIndex","type":"uint256"}],"name":"ExitedFor","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Sickle","name":"sickle","type":"address"},{"indexed":true,"internalType":"address","name":"stakingContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"poolIndex","type":"uint256"}],"name":"HarvestedFor","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Sickle","name":"sickle","type":"address"},{"indexed":true,"internalType":"address","name":"nftAddress","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"NftCompoundedFor","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Sickle","name":"sickle","type":"address"},{"indexed":true,"internalType":"address","name":"nftAddress","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"NftExitedFor","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Sickle","name":"sickle","type":"address"},{"indexed":true,"internalType":"address","name":"nftAddress","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"NftHarvestedFor","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Sickle","name":"sickle","type":"address"},{"indexed":true,"internalType":"address","name":"nftAddress","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"NftRebalancedFor","type":"event"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"approved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"approvedAutomator","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract INftAutomation[]","name":"strategies","type":"address[]"},{"internalType":"contract Sickle[]","name":"sickles","type":"address[]"},{"components":[{"components":[{"internalType":"address","name":"stakingContract","type":"address"},{"internalType":"uint256","name":"poolIndex","type":"uint256"}],"internalType":"struct Farm","name":"farm","type":"tuple"},{"internalType":"contract INonfungiblePositionManager","name":"nft","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"internalType":"struct NftPosition[]","name":"positions","type":"tuple[]"},{"components":[{"components":[{"internalType":"address[]","name":"rewardTokens","type":"address[]"},{"internalType":"uint128","name":"amount0Max","type":"uint128"},{"internalType":"uint128","name":"amount1Max","type":"uint128"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct SimpleNftHarvest","name":"harvest","type":"tuple"},{"components":[{"components":[{"internalType":"address","name":"router","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"minAmountOut","type":"uint256"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct SwapParams[]","name":"swaps","type":"tuple[]"},{"components":[{"internalType":"contract INonfungiblePositionManager","name":"nft","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"address","name":"token0","type":"address"},{"internalType":"address","name":"token1","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"}],"internalType":"struct Pool","name":"pool","type":"tuple"},{"internalType":"int24","name":"tickLower","type":"int24"},{"internalType":"int24","name":"tickUpper","type":"int24"},{"internalType":"uint256","name":"amount0Desired","type":"uint256"},{"internalType":"uint256","name":"amount1Desired","type":"uint256"},{"internalType":"uint256","name":"amount0Min","type":"uint256"},{"internalType":"uint256","name":"amount1Min","type":"uint256"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct NftAddLiquidity","name":"addLiquidityParams","type":"tuple"}],"internalType":"struct NftZapIn","name":"zap","type":"tuple"}],"internalType":"struct NftCompound[]","name":"params","type":"tuple[]"},{"internalType":"bool[]","name":"inPlace","type":"bool[]"},{"internalType":"address[][]","name":"sweepTokens","type":"address[][]"}],"name":"compoundFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IAutomation[]","name":"strategies","type":"address[]"},{"internalType":"contract Sickle[]","name":"sickles","type":"address[]"},{"components":[{"components":[{"internalType":"address","name":"stakingContract","type":"address"},{"internalType":"uint256","name":"poolIndex","type":"uint256"}],"internalType":"struct Farm","name":"claimFarm","type":"tuple"},{"internalType":"bytes","name":"claimExtraData","type":"bytes"},{"internalType":"address[]","name":"rewardTokens","type":"address[]"},{"components":[{"components":[{"internalType":"address","name":"router","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"minAmountOut","type":"uint256"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct SwapParams[]","name":"swaps","type":"tuple[]"},{"components":[{"internalType":"address","name":"router","type":"address"},{"internalType":"address","name":"lpToken","type":"address"},{"internalType":"address[]","name":"tokens","type":"address[]"},{"internalType":"uint256[]","name":"desiredAmounts","type":"uint256[]"},{"internalType":"uint256[]","name":"minAmounts","type":"uint256[]"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct AddLiquidityParams","name":"addLiquidityParams","type":"tuple"}],"internalType":"struct ZapIn","name":"zap","type":"tuple"},{"components":[{"internalType":"address","name":"stakingContract","type":"address"},{"internalType":"uint256","name":"poolIndex","type":"uint256"}],"internalType":"struct Farm","name":"depositFarm","type":"tuple"},{"internalType":"bytes","name":"depositExtraData","type":"bytes"}],"internalType":"struct CompoundParams[]","name":"params","type":"tuple[]"},{"internalType":"address[][]","name":"sweepTokens","type":"address[][]"}],"name":"compoundFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IAutomation[]","name":"strategies","type":"address[]"},{"internalType":"contract Sickle[]","name":"sickles","type":"address[]"},{"components":[{"internalType":"address","name":"stakingContract","type":"address"},{"internalType":"uint256","name":"poolIndex","type":"uint256"}],"internalType":"struct Farm[]","name":"farms","type":"tuple[]"},{"components":[{"components":[{"internalType":"address","name":"router","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"minAmountOut","type":"uint256"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct SwapParams[]","name":"swaps","type":"tuple[]"},{"internalType":"bytes","name":"extraData","type":"bytes"},{"internalType":"address[]","name":"tokensOut","type":"address[]"}],"internalType":"struct HarvestParams[]","name":"harvestParams","type":"tuple[]"},{"internalType":"address[][]","name":"harvestSweepTokens","type":"address[][]"},{"components":[{"internalType":"bytes","name":"extraData","type":"bytes"},{"components":[{"components":[{"internalType":"address","name":"router","type":"address"},{"internalType":"address","name":"lpToken","type":"address"},{"internalType":"address[]","name":"tokens","type":"address[]"},{"internalType":"uint256","name":"lpAmountIn","type":"uint256"},{"internalType":"uint256[]","name":"minAmountsOut","type":"uint256[]"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct RemoveLiquidityParams","name":"removeLiquidityParams","type":"tuple"},{"components":[{"internalType":"address","name":"router","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"minAmountOut","type":"uint256"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct SwapParams[]","name":"swaps","type":"tuple[]"}],"internalType":"struct ZapOut","name":"zap","type":"tuple"},{"internalType":"address[]","name":"tokensOut","type":"address[]"}],"internalType":"struct WithdrawParams[]","name":"withdrawParams","type":"tuple[]"},{"internalType":"address[][]","name":"withdrawSweepTokens","type":"address[][]"}],"name":"exitFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract INftAutomation[]","name":"strategies","type":"address[]"},{"internalType":"contract Sickle[]","name":"sickles","type":"address[]"},{"components":[{"components":[{"internalType":"address","name":"stakingContract","type":"address"},{"internalType":"uint256","name":"poolIndex","type":"uint256"}],"internalType":"struct Farm","name":"farm","type":"tuple"},{"internalType":"contract INonfungiblePositionManager","name":"nft","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"internalType":"struct NftPosition[]","name":"positions","type":"tuple[]"},{"components":[{"components":[{"internalType":"address[]","name":"rewardTokens","type":"address[]"},{"internalType":"uint128","name":"amount0Max","type":"uint128"},{"internalType":"uint128","name":"amount1Max","type":"uint128"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct SimpleNftHarvest","name":"harvest","type":"tuple"},{"components":[{"internalType":"address","name":"router","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"minAmountOut","type":"uint256"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct SwapParams[]","name":"swaps","type":"tuple[]"},{"internalType":"address[]","name":"outputTokens","type":"address[]"},{"internalType":"address[]","name":"sweepTokens","type":"address[]"}],"internalType":"struct NftHarvest[]","name":"harvestParams","type":"tuple[]"},{"components":[{"components":[{"components":[{"internalType":"contract INonfungiblePositionManager","name":"nft","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint128","name":"liquidity","type":"uint128"},{"internalType":"uint256","name":"amount0Min","type":"uint256"},{"internalType":"uint256","name":"amount1Min","type":"uint256"},{"internalType":"uint128","name":"amount0Max","type":"uint128"},{"internalType":"uint128","name":"amount1Max","type":"uint128"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct NftRemoveLiquidity","name":"removeLiquidityParams","type":"tuple"},{"components":[{"internalType":"address","name":"router","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"minAmountOut","type":"uint256"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct SwapParams[]","name":"swaps","type":"tuple[]"}],"internalType":"struct NftZapOut","name":"zap","type":"tuple"},{"internalType":"address[]","name":"tokensOut","type":"address[]"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct NftWithdraw[]","name":"withdrawParams","type":"tuple[]"},{"internalType":"address[][]","name":"sweepTokens","type":"address[][]"}],"name":"exitFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IAutomation[]","name":"strategies","type":"address[]"},{"internalType":"contract Sickle[]","name":"sickles","type":"address[]"},{"components":[{"internalType":"address","name":"stakingContract","type":"address"},{"internalType":"uint256","name":"poolIndex","type":"uint256"}],"internalType":"struct Farm[]","name":"farms","type":"tuple[]"},{"components":[{"components":[{"internalType":"address","name":"router","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"minAmountOut","type":"uint256"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct SwapParams[]","name":"swaps","type":"tuple[]"},{"internalType":"bytes","name":"extraData","type":"bytes"},{"internalType":"address[]","name":"tokensOut","type":"address[]"}],"internalType":"struct HarvestParams[]","name":"params","type":"tuple[]"},{"internalType":"address[][]","name":"sweepTokens","type":"address[][]"}],"name":"harvestFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract INftAutomation[]","name":"strategies","type":"address[]"},{"internalType":"contract Sickle[]","name":"sickles","type":"address[]"},{"components":[{"components":[{"internalType":"address","name":"stakingContract","type":"address"},{"internalType":"uint256","name":"poolIndex","type":"uint256"}],"internalType":"struct Farm","name":"farm","type":"tuple"},{"internalType":"contract INonfungiblePositionManager","name":"nft","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"internalType":"struct NftPosition[]","name":"positions","type":"tuple[]"},{"components":[{"components":[{"internalType":"address[]","name":"rewardTokens","type":"address[]"},{"internalType":"uint128","name":"amount0Max","type":"uint128"},{"internalType":"uint128","name":"amount1Max","type":"uint128"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct SimpleNftHarvest","name":"harvest","type":"tuple"},{"components":[{"internalType":"address","name":"router","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"minAmountOut","type":"uint256"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct SwapParams[]","name":"swaps","type":"tuple[]"},{"internalType":"address[]","name":"outputTokens","type":"address[]"},{"internalType":"address[]","name":"sweepTokens","type":"address[]"}],"internalType":"struct NftHarvest[]","name":"params","type":"tuple[]"}],"name":"harvestFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"isOwnerOrApproved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract INftAutomation[]","name":"strategies","type":"address[]"},{"internalType":"contract Sickle[]","name":"sickles","type":"address[]"},{"components":[{"internalType":"contract IUniswapV3Pool","name":"pool","type":"address"},{"components":[{"components":[{"internalType":"address","name":"stakingContract","type":"address"},{"internalType":"uint256","name":"poolIndex","type":"uint256"}],"internalType":"struct Farm","name":"farm","type":"tuple"},{"internalType":"contract INonfungiblePositionManager","name":"nft","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"internalType":"struct NftPosition","name":"position","type":"tuple"},{"components":[{"components":[{"internalType":"address[]","name":"rewardTokens","type":"address[]"},{"internalType":"uint128","name":"amount0Max","type":"uint128"},{"internalType":"uint128","name":"amount1Max","type":"uint128"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct SimpleNftHarvest","name":"harvest","type":"tuple"},{"components":[{"internalType":"address","name":"router","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"minAmountOut","type":"uint256"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct SwapParams[]","name":"swaps","type":"tuple[]"},{"internalType":"address[]","name":"outputTokens","type":"address[]"},{"internalType":"address[]","name":"sweepTokens","type":"address[]"}],"internalType":"struct NftHarvest","name":"harvest","type":"tuple"},{"components":[{"components":[{"components":[{"internalType":"contract INonfungiblePositionManager","name":"nft","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint128","name":"liquidity","type":"uint128"},{"internalType":"uint256","name":"amount0Min","type":"uint256"},{"internalType":"uint256","name":"amount1Min","type":"uint256"},{"internalType":"uint128","name":"amount0Max","type":"uint128"},{"internalType":"uint128","name":"amount1Max","type":"uint128"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct NftRemoveLiquidity","name":"removeLiquidityParams","type":"tuple"},{"components":[{"internalType":"address","name":"router","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"minAmountOut","type":"uint256"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct SwapParams[]","name":"swaps","type":"tuple[]"}],"internalType":"struct NftZapOut","name":"zap","type":"tuple"},{"internalType":"address[]","name":"tokensOut","type":"address[]"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct NftWithdraw","name":"withdraw","type":"tuple"},{"components":[{"internalType":"address[]","name":"tokensIn","type":"address[]"},{"internalType":"uint256[]","name":"amountsIn","type":"uint256[]"},{"components":[{"components":[{"internalType":"address","name":"router","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"minAmountOut","type":"uint256"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct SwapParams[]","name":"swaps","type":"tuple[]"},{"components":[{"internalType":"contract INonfungiblePositionManager","name":"nft","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"address","name":"token0","type":"address"},{"internalType":"address","name":"token1","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"}],"internalType":"struct Pool","name":"pool","type":"tuple"},{"internalType":"int24","name":"tickLower","type":"int24"},{"internalType":"int24","name":"tickUpper","type":"int24"},{"internalType":"uint256","name":"amount0Desired","type":"uint256"},{"internalType":"uint256","name":"amount1Desired","type":"uint256"},{"internalType":"uint256","name":"amount0Min","type":"uint256"},{"internalType":"uint256","name":"amount1Min","type":"uint256"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct NftAddLiquidity","name":"addLiquidityParams","type":"tuple"}],"internalType":"struct NftZapIn","name":"zap","type":"tuple"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct NftIncrease","name":"increase","type":"tuple"}],"internalType":"struct NftRebalance[]","name":"params","type":"tuple[]"},{"internalType":"address[][]","name":"sweepTokens","type":"address[][]"}],"name":"rebalanceFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"registry","outputs":[{"internalType":"contract SickleRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newApproved","type":"address"}],"name":"setApproved","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"approvedAutomator_","type":"address"}],"name":"setApprovedAutomator","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a06040523480156200001157600080fd5b50604051620043e1380380620043e183398101604081905262000034916200021b565b600054604080516001600160a01b0392831681529183166020830152849183917fbf265e8326285a2747e33e54d5945f7111f2b5edb826eb8c08d4677779b3ff97910160405180910390a1600080546001600160a01b0319166001600160a01b03929092169190911790819055600160a81b900460ff1615808015620000c757506000546001600160a01b90910460ff16105b80620000ea5750303b158015620000ea5750600054600160a01b900460ff166001145b620001525760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b6000805460ff60a01b1916600160a01b179055801562000180576000805460ff60a81b1916600160a81b1790555b6001600160a01b0382166080528015620001d6576000805460ff60a81b19169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050600380546001600160a01b0319166001600160a01b039390931692909217909155506200026f9050565b6001600160a01b03811681146200021857600080fd5b50565b6000806000606084860312156200023157600080fd5b83516200023e8162000202565b6020850151909350620002518162000202565b6040850151909250620002648162000202565b809150509250925092565b608051614148620002996000396000818161020701528181610a160152610b2e01526141486000f3fe6080604052600436106100fe5760003560e01c80638da5cb5b11610095578063e6fb317f11610064578063e6fb317f146102a9578063f25c4fa9146102c9578063f5b3f424146102e9578063f851a44014610319578063fb0289ca1461033957600080fd5b80638da5cb5b146102295780639969e9ee1461024957806399e2a63b14610269578063bd42d8481461028957600080fd5b806363fb0b96116100d157806363fb0b96146101a2578063704b6c02146101b5578063745a7b3b146101d55780637b103999146101f557600080fd5b806319d40b0814610103578063216f5a891461014057806329df02cf146101625780634179eebc14610182575b600080fd5b34801561010f57600080fd5b50600254610123906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561014c57600080fd5b5061016061015b3660046124cf565b610359565b005b34801561016e57600080fd5b5061016061017d3660046129bb565b610664565b34801561018e57600080fd5b50600354610123906001600160a01b031681565b6101606101b0366004612b20565b6109e1565b3480156101c157600080fd5b506101606101d0366004612b8b565b610d12565b3480156101e157600080fd5b506101606101f0366004612b8b565b610da6565b34801561020157600080fd5b506101237f000000000000000000000000000000000000000000000000000000000000000081565b34801561023557600080fd5b50600154610123906001600160a01b031681565b34801561025557600080fd5b50610160610264366004612baf565b610e26565b34801561027557600080fd5b50610160610284366004612dab565b61110f565b34801561029557600080fd5b506101606102a4366004612f82565b6113d6565b3480156102b557600080fd5b506101606102c4366004613363565b611654565b3480156102d557600080fd5b506101606102e436600461356e565b6118c2565b3480156102f557600080fd5b50610309610304366004612b8b565b611b76565b6040519015158152602001610137565b34801561032557600080fd5b50600054610123906001600160a01b031681565b34801561034557600080fd5b50610160610354366004612b8b565b611ba8565b6003546001600160a01b031633146103845760405163198f48cb60e31b815260040160405180910390fd5b8551855181141580610397575084518114155b806103a3575083518114155b806103af575081518114155b156103cd57604051637db491eb60e01b815260040160405180910390fd5b6000816001600160401b038111156103e7576103e7611c21565b604051908082528060200260200182016040528015610410578160200160208202803683370190505b5090506000826001600160401b0381111561042d5761042d611c21565b60405190808252806020026020018201604052801561046057816020015b606081526020019060019003908161044b5790505b50905060005b8381101561060157600089828151811061048257610482613632565b6020026020010151905060008983815181106104a0576104a0613632565b602002602001015190508b83815181106104bc576104bc613632565b60200260200101518584815181106104d6576104d6613632565b60200260200101906001600160a01b031690816001600160a01b03168152505081818a858151811061050a5761050a613632565b60200260200101518a868151811061052457610524613632565b60200260200101518a878151811061053e5761053e613632565b602002602001015160405160240161055a9594939291906138f7565b60408051601f198184030181529190526020810180516001600160e01b031663f0806a7f60e01b179052845185908590811061059857610598613632565b6020026020010181905250806040015181602001516001600160a01b0316836001600160a01b03167f62d08c7b40038caee4cbb8d156cdba7f6c9cc8e53163de4b9c5d986f253fd7d860405160405180910390a4505080806105f990613979565b915050610466565b506040516331fd85cb60e11b815230906363fb0b969061062790859085906004016139a0565b600060405180830381600087803b15801561064157600080fd5b505af1158015610655573d6000803e3d6000fd5b50505050505050505050505050565b6003546001600160a01b0316331461068f5760405163198f48cb60e31b815260040160405180910390fd5b86518651811415806106a2575085518114155b806106ae575084518114155b806106ba575082518114155b806106c6575083518114155b806106d2575081518114155b156106f057604051637db491eb60e01b815260040160405180910390fd5b6000816001600160401b0381111561070a5761070a611c21565b604051908082528060200260200182016040528015610733578160200160208202803683370190505b5090506000826001600160401b0381111561075057610750611c21565b60405190808252806020026020018201604052801561078357816020015b606081526020019060019003908161076e5790505b50905060005b8381101561097d578a81815181106107a3576107a3613632565b60200260200101518382815181106107bd576107bd613632565b60200260200101906001600160a01b031690816001600160a01b0316815250508981815181106107ef576107ef613632565b602002602001015189828151811061080957610809613632565b602002602001015189838151811061082357610823613632565b602002602001015189848151811061083d5761083d613632565b602002602001015189858151811061085757610857613632565b602002602001015189868151811061087157610871613632565b602002602001015160405160240161088e96959493929190613a8a565b60408051601f198184030181529190526020810180516001600160e01b031663f1a9e60360e01b17905282518390839081106108cc576108cc613632565b60200260200101819052508881815181106108e9576108e9613632565b60200260200101516020015189828151811061090757610907613632565b6020026020010151600001516001600160a01b03168b838151811061092e5761092e613632565b60200260200101516001600160a01b03167f60072b5585d4e6f71a97d87f0e001a6482f2cf1d00c33a30437a3b6f6ebd0a8f60405160405180910390a48061097581613979565b915050610789565b506040516331fd85cb60e11b815230906363fb0b96906109a390859085906004016139a0565b600060405180830381600087803b1580156109bd57600080fd5b505af11580156109d1573d6000803e3d6000fd5b5050505050505050505050505050565b828114610a015760405163c1e637c960e01b815260040160405180910390fd5b6040516332afe8a160e21b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063cabfa28490602401602060405180830381865afa158015610a65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a899190613be2565b610aad5760405163252c827360e01b81523360048201526024015b60405180910390fd5b60005b808214610d0b576000858583818110610acb57610acb613632565b9050602002016020810190610ae09190612b8b565b6001600160a01b031603610af657600101610ab0565b30858583818110610b0957610b09613632565b9050602002016020810190610b1e9190612b8b565b6001600160a01b031614610c3a577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663907caa00868684818110610b6d57610b6d613632565b9050602002016020810190610b829190612b8b565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610bc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bea9190613be2565b610c3a57848482818110610c0057610c00613632565b9050602002016020810190610c159190612b8b565b6040516347ccabe760e01b81526001600160a01b039091166004820152602401610aa4565b600080868684818110610c4f57610c4f613632565b9050602002016020810190610c649190612b8b565b6001600160a01b0316858585818110610c7f57610c7f613632565b9050602002810190610c919190613bff565b604051610c9f929190613c45565b6000604051808303816000865af19150503d8060008114610cdc576040519150601f19603f3d011682016040523d82523d6000602084013e610ce1565b606091505b509150915081610d01578051600003610cf957600080fd5b805181602001fd5b5050600101610ab0565b5050505050565b6000546001600160a01b03163314610d3d5760405163b5c42b3b60e01b815260040160405180910390fd5b600054604080516001600160a01b03928316815291831660208301527fbf265e8326285a2747e33e54d5945f7111f2b5edb826eb8c08d4677779b3ff97910160405180910390a1600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610dd15760405163b5c42b3b60e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527f7b24afe53ea3c0eb8558ae101198e86c392b4055609b2be0e0b23b89b2b8f013906020015b60405180910390a150565b6003546001600160a01b03163314610e515760405163198f48cb60e31b815260040160405180910390fd5b8451845181141580610e64575082518114155b80610e70575081518114155b15610e8e57604051637db491eb60e01b815260040160405180910390fd5b6000816001600160401b03811115610ea857610ea8611c21565b604051908082528060200260200182016040528015610ed1578160200160208202803683370190505b5090506000826001600160401b03811115610eee57610eee611c21565b604051908082528060200260200182016040528015610f2157816020015b6060815260200190600190039081610f0c5790505b50905060005b838110156110ad576000888281518110610f4357610f43613632565b602002602001015190506000888381518110610f6157610f61613632565b602002602001015190506000888481518110610f7f57610f7f613632565b602002602001015190508b8481518110610f9b57610f9b613632565b6020026020010151868581518110610fb557610fb5613632565b60200260200101906001600160a01b031690816001600160a01b0316815250508282828a8781518110610fea57610fea613632565b60200260200101516040516024016110059493929190613c55565b60408051601f198184030181529190526020810180516001600160e01b031663aaec71d760e01b179052855186908690811061104357611043613632565b6020026020010181905250816020015182600001516001600160a01b0316846001600160a01b03167fbeb1a0a003f297419afd0c65340a684e8c5e9b576a1a705a4ac19762f8e89c0460405160405180910390a450505080806110a590613979565b915050610f27565b506040516331fd85cb60e11b815230906363fb0b96906110d390859085906004016139a0565b600060405180830381600087803b1580156110ed57600080fd5b505af1158015611101573d6000803e3d6000fd5b505050505050505050505050565b6003546001600160a01b0316331461113a5760405163198f48cb60e31b815260040160405180910390fd5b835183518114158061114d575082518114155b80611159575081518114155b1561117757604051637db491eb60e01b815260040160405180910390fd5b6000816001600160401b0381111561119157611191611c21565b6040519080825280602002602001820160405280156111ba578160200160208202803683370190505b5090506000826001600160401b038111156111d7576111d7611c21565b60405190808252806020026020018201604052801561120a57816020015b60608152602001906001900390816111f55790505b50905060005b8381101561137557600087828151811061122c5761122c613632565b60200260200101519050600087838151811061124a5761124a613632565b6020026020010151905089838151811061126657611266613632565b602002602001015185848151811061128057611280613632565b60200260200101906001600160a01b031690816001600160a01b03168152505081818885815181106112b4576112b4613632565b60200260200101516040516024016112ce93929190613d16565b60408051601f198184030181529190526020810180516001600160e01b0316634a2462b560e11b179052845185908590811061130c5761130c613632565b6020026020010181905250806040015181602001516001600160a01b0316836001600160a01b03167f845400de7ed0a439c0685ef185e4e48ab874482b2bbba826983593c7b9bb114b60405160405180910390a45050808061136d90613979565b915050611210565b506040516331fd85cb60e11b815230906363fb0b969061139b90859085906004016139a0565b600060405180830381600087803b1580156113b557600080fd5b505af11580156113c9573d6000803e3d6000fd5b5050505050505050505050565b6003546001600160a01b031633146114015760405163198f48cb60e31b815260040160405180910390fd5b8351835181141580611414575082518114155b80611420575081518114155b1561143e57604051637db491eb60e01b815260040160405180910390fd5b6000816001600160401b0381111561145857611458611c21565b604051908082528060200260200182016040528015611481578160200160208202803683370190505b5090506000826001600160401b0381111561149e5761149e611c21565b6040519080825280602002602001820160405280156114d157816020015b60608152602001906001900390816114bc5790505b50905060005b838110156113755760008782815181106114f3576114f3613632565b60200260200101519050600087838151811061151157611511613632565b6020026020010151905089838151811061152d5761152d613632565b602002602001015185848151811061154757611547613632565b60200260200101906001600160a01b031690816001600160a01b031681525050818188858151811061157b5761157b613632565b602002602001015160405160240161159593929190613d45565b60408051601f198184030181529190526020810180516001600160e01b031663814a1f1560e01b17905284518590859081106115d3576115d3613632565b6020908102919091018101919091526080820151805183518051908401519284015160408051948552948401526001600160a01b039182169390821692918616917fa7618589b4ad2eca6c42db5d1b67fe22fd78e950354363e80700e97e021614c6910160405180910390a45050808061164c90613979565b9150506114d7565b6003546001600160a01b0316331461167f5760405163198f48cb60e31b815260040160405180910390fd5b8351835181141580611692575082518114155b8061169e575081518114155b156116bc57604051637db491eb60e01b815260040160405180910390fd5b6000816001600160401b038111156116d6576116d6611c21565b6040519080825280602002602001820160405280156116ff578160200160208202803683370190505b5090506000826001600160401b0381111561171c5761171c611c21565b60405190808252806020026020018201604052801561174f57816020015b606081526020019060019003908161173a5790505b50905060005b8381101561137557600086828151811061177157611771613632565b60200260200101519050600088838151811061178f5761178f613632565b602002602001015190508983815181106117ab576117ab613632565b60200260200101518584815181106117c5576117c5613632565b60200260200101906001600160a01b031690816001600160a01b03168152505080828885815181106117f9576117f9613632565b602002602001015160405160240161181393929190613fc0565b60408051601f198184030181529190526020810180516001600160e01b0316631c03256560e31b179052845185908590811061185157611851613632565b60200260200101819052508160200151604001518260200151602001516001600160a01b0316826001600160a01b03167fb26a0db4cf85bbeaf7c8a6dcf47ab1bab082afd520f0120d76781ec53f67df6e60405160405180910390a4505080806118ba90613979565b915050611755565b6003546001600160a01b031633146118ed5760405163198f48cb60e31b815260040160405180910390fd5b8551855181141580611900575084518114155b8061190c575083518114155b80611918575082518114155b80611924575081518114155b1561194257604051637db491eb60e01b815260040160405180910390fd5b6000816001600160401b0381111561195c5761195c611c21565b604051908082528060200260200182016040528015611985578160200160208202803683370190505b5090506000826001600160401b038111156119a2576119a2611c21565b6040519080825280602002602001820160405280156119d557816020015b60608152602001906001900390816119c05790505b50905060005b838110156106015760008982815181106119f7576119f7613632565b602002602001015190506000898381518110611a1557611a15613632565b602002602001015190508b8381518110611a3157611a31613632565b6020026020010151858481518110611a4b57611a4b613632565b60200260200101906001600160a01b031690816001600160a01b03168152505081818a8581518110611a7f57611a7f613632565b60200260200101518a8681518110611a9957611a99613632565b60200260200101518a8781518110611ab357611ab3613632565b6020026020010151604051602401611acf9594939291906140ba565b60408051601f198184030181529190526020810180516001600160e01b03166338f6f92760e01b1790528451859085908110611b0d57611b0d613632565b6020026020010181905250806040015181602001516001600160a01b0316836001600160a01b03167f24a5e161bb55a0a758c5ce5e6621fc0494f946bd2e70162ed7d785c7b914079160405160405180910390a450508080611b6e90613979565b9150506119db565b6001546000906001600160a01b0383811691161480611ba257506002546001600160a01b038381169116145b92915050565b6001546001600160a01b03163314611bd3576040516374a2152760e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527f5e5dee98c8f51165e719725b40ebe485de8ce07b39ad552e40a31d58b5be764690602001610e1b565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715611c5957611c59611c21565b60405290565b604051606081016001600160401b0381118282101715611c5957611c59611c21565b604051608081016001600160401b0381118282101715611c5957611c59611c21565b60405160a081016001600160401b0381118282101715611c5957611c59611c21565b60405161014081016001600160401b0381118282101715611c5957611c59611c21565b60405160c081016001600160401b0381118282101715611c5957611c59611c21565b60405161010081016001600160401b0381118282101715611c5957611c59611c21565b604051601f8201601f191681016001600160401b0381118282101715611d5557611d55611c21565b604052919050565b60006001600160401b03821115611d7657611d76611c21565b5060051b60200190565b6001600160a01b0381168114611d9557600080fd5b50565b600082601f830112611da957600080fd5b81356020611dbe611db983611d5d565b611d2d565b82815260059290921b84018101918181019086841115611ddd57600080fd5b8286015b84811015611e01578035611df481611d80565b8352918301918301611de1565b509695505050505050565b600082601f830112611e1d57600080fd5b81356020611e2d611db983611d5d565b82815260059290921b84018101918181019086841115611e4c57600080fd5b8286015b84811015611e01578035611e6381611d80565b8352918301918301611e50565b8035611e7b81611d80565b919050565b600060408284031215611e9257600080fd5b611e9a611c37565b90508135611ea781611d80565b808252506020820135602082015292915050565b600060808284031215611ecd57600080fd5b611ed5611c5f565b9050611ee18383611e80565b81526040820135611ef181611d80565b6020820152606091909101356040820152919050565b600082601f830112611f1857600080fd5b81356020611f28611db983611d5d565b82815260079290921b84018101918181019086841115611f4757600080fd5b8286015b84811015611e0157611f5d8882611ebb565b835291830191608001611f4b565b80356001600160801b0381168114611e7b57600080fd5b600082601f830112611f9357600080fd5b81356001600160401b03811115611fac57611fac611c21565b611fbf601f8201601f1916602001611d2d565b818152846020838601011115611fd457600080fd5b816020850160208301376000918101602001919091529392505050565b60006080828403121561200357600080fd5b61200b611c81565b905081356001600160401b038082111561202457600080fd5b61203085838601611d98565b835261203e60208501611f6b565b602084015261204f60408501611f6b565b6040840152606084013591508082111561206857600080fd5b5061207584828501611f82565b60608301525092915050565b600082601f83011261209257600080fd5b813560206120a2611db983611d5d565b82815260059290921b840181019181810190868411156120c157600080fd5b8286015b84811015611e015780356001600160401b03808211156120e55760008081fd5b9088019060a0828b03601f19018113156120ff5760008081fd5b612107611ca3565b8784013561211481611d80565b808252506040808501358983015260608086013582840152608091508186013561213d81611d80565b908301529184013591838311156121545760008081fd5b6121628d8a85880101611f82565b9082015286525050509183019183016120c5565b60006060828403121561218857600080fd5b612190611c5f565b9050813561219d81611d80565b815260208201356121ad81611d80565b6020820152604082013562ffffff811681146121c857600080fd5b604082015292915050565b8035600281900b8114611e7b57600080fd5b6000604082840312156121f757600080fd5b6121ff611c37565b905081356001600160401b038082111561221857600080fd5b61222485838601612081565b8352602084013591508082111561223a57600080fd5b90830190610180828603121561224f57600080fd5b612257611cc5565b61226083611e70565b8152602083013560208201526122798660408501612176565b604082015261228a60a084016121d3565b606082015261229b60c084016121d3565b608082015260e083013560a08201526101008084013560c08301526101208085013560e0840152610140850135828401526101608501359150838211156122e157600080fd5b6122ed88838701611f82565b9083015250602084015250909392505050565b600082601f83011261231157600080fd5b81356020612321611db983611d5d565b82815260059290921b8401810191818101908684111561234057600080fd5b8286015b84811015611e015780356001600160401b03808211156123645760008081fd5b908801906040828b03601f190181131561237e5760008081fd5b612386611c37565b87840135838111156123985760008081fd5b6123a68d8a83880101611ff1565b8252509083013590828211156123bc5760008081fd5b6123ca8c89848701016121e5565b818901528652505050918301918301612344565b8015158114611d9557600080fd5b600082601f8301126123fd57600080fd5b8135602061240d611db983611d5d565b82815260059290921b8401810191818101908684111561242c57600080fd5b8286015b84811015611e01578035612443816123de565b8352918301918301612430565b600082601f83011261246157600080fd5b81356020612471611db983611d5d565b82815260059290921b8401810191818101908684111561249057600080fd5b8286015b84811015611e015780356001600160401b038111156124b35760008081fd5b6124c18986838b0101611d98565b845250918301918301612494565b60008060008060008060c087890312156124e857600080fd5b86356001600160401b03808211156124ff57600080fd5b61250b8a838b01611d98565b9750602089013591508082111561252157600080fd5b61252d8a838b01611e0c565b9650604089013591508082111561254357600080fd5b61254f8a838b01611f07565b9550606089013591508082111561256557600080fd5b6125718a838b01612300565b9450608089013591508082111561258757600080fd5b6125938a838b016123ec565b935060a08901359150808211156125a957600080fd5b506125b689828a01612450565b9150509295509295509295565b600082601f8301126125d457600080fd5b813560206125e4611db983611d5d565b82815260069290921b8401810191818101908684111561260357600080fd5b8286015b84811015611e01576126198882611e80565b835291830191604001612607565b600082601f83011261263857600080fd5b81356020612648611db983611d5d565b82815260059290921b8401810191818101908684111561266757600080fd5b8286015b84811015611e015780356001600160401b038082111561268b5760008081fd5b908801906060828b03601f19018113156126a55760008081fd5b6126ad611c5f565b87840135838111156126bf5760008081fd5b6126cd8d8a83880101612081565b825250604080850135848111156126e45760008081fd5b6126f28e8b83890101611f82565b838b01525091840135918383111561270a5760008081fd5b6127188d8a85880101611d98565b90820152865250505091830191830161266b565b600082601f83011261273d57600080fd5b8135602061274d611db983611d5d565b82815260059290921b8401810191818101908684111561276c57600080fd5b8286015b84811015611e015780358352918301918301612770565b600082601f83011261279857600080fd5b6127a5611db98335611d5d565b82358082526020808301929160051b8501018510156127c357600080fd5b602084015b6020853560051b8601018110156129b2576001600160401b0380823511156127ef57600080fd5b81358601601f196060828a038201121561280857600080fd5b612810611c5f565b836020840135111561282157600080fd5b6128338a602080860135860101611f82565b8152836040840135111561284657600080fd5b60408301358301604083828d0301121561285f57600080fd5b612867611c37565b856020830135111561287857600080fd5b6020820135820160c085828f0301121561289157600080fd5b612899611ce8565b94506128a760208201611e70565b85526128b560408201611e70565b602086015286606082013511156128cb57600080fd5b6128de8d60206060840135840101611d98565b6040860152608081013560608601528660a082013511156128fe57600080fd5b6129118d602060a084013584010161272c565b60808601528660c0820135111561292757600080fd5b61293a8d602060c0840135840101611f82565b60a086015250838152856040830135111561295457600080fd5b6129678c60206040850135850101612081565b60208201528060208401525050836060840135111561298557600080fd5b6129988a60206060860135860101611d98565b6040820152865250506020938401939190910190506127c8565b50949350505050565b600080600080600080600060e0888a0312156129d657600080fd5b87356001600160401b03808211156129ed57600080fd5b6129f98b838c01611d98565b985060208a0135915080821115612a0f57600080fd5b612a1b8b838c01611e0c565b975060408a0135915080821115612a3157600080fd5b612a3d8b838c016125c3565b965060608a0135915080821115612a5357600080fd5b612a5f8b838c01612627565b955060808a0135915080821115612a7557600080fd5b612a818b838c01612450565b945060a08a0135915080821115612a9757600080fd5b612aa38b838c01612787565b935060c08a0135915080821115612ab957600080fd5b50612ac68a828b01612450565b91505092959891949750929550565b60008083601f840112612ae757600080fd5b5081356001600160401b03811115612afe57600080fd5b6020830191508360208260051b8501011115612b1957600080fd5b9250929050565b60008060008060408587031215612b3657600080fd5b84356001600160401b0380821115612b4d57600080fd5b612b5988838901612ad5565b90965094506020870135915080821115612b7257600080fd5b50612b7f87828801612ad5565b95989497509550505050565b600060208284031215612b9d57600080fd5b8135612ba881611d80565b9392505050565b600080600080600060a08688031215612bc757600080fd5b85356001600160401b0380821115612bde57600080fd5b612bea89838a01611d98565b96506020880135915080821115612c0057600080fd5b612c0c89838a01611e0c565b95506040880135915080821115612c2257600080fd5b612c2e89838a016125c3565b94506060880135915080821115612c4457600080fd5b612c5089838a01612627565b93506080880135915080821115612c6657600080fd5b50612c7388828901612450565b9150509295509295909350565b600060808284031215612c9257600080fd5b612c9a611c81565b905081356001600160401b0380821115612cb357600080fd5b612cbf85838601611ff1565b83526020840135915080821115612cd557600080fd5b612ce185838601612081565b60208401526040840135915080821115612cfa57600080fd5b612d0685838601611d98565b60408401526060840135915080821115612d1f57600080fd5b5061207584828501611d98565b600082601f830112612d3d57600080fd5b81356020612d4d611db983611d5d565b82815260059290921b84018101918181019086841115612d6c57600080fd5b8286015b84811015611e015780356001600160401b03811115612d8f5760008081fd5b612d9d8986838b0101612c80565b845250918301918301612d70565b60008060008060808587031215612dc157600080fd5b84356001600160401b0380821115612dd857600080fd5b612de488838901611d98565b95506020870135915080821115612dfa57600080fd5b612e0688838901611e0c565b94506040870135915080821115612e1c57600080fd5b612e2888838901611f07565b93506060870135915080821115612e3e57600080fd5b50612e4b87828801612d2c565b91505092959194509250565b600060408284031215612e6957600080fd5b612e71611c37565b905081356001600160401b0380821115612e8a57600080fd5b612e9685838601612081565b83526020840135915080821115612eac57600080fd5b9083019060c08286031215612ec057600080fd5b612ec8611ce8565b612ed183611e70565b8152612edf60208401611e70565b6020820152604083013582811115612ef657600080fd5b612f0287828601611d98565b604083015250606083013582811115612f1a57600080fd5b612f268782860161272c565b606083015250608083013582811115612f3e57600080fd5b612f4a8782860161272c565b60808301525060a083013582811115612f6257600080fd5b612f6e87828601611f82565b60a083015250602084015250909392505050565b60008060008060808587031215612f9857600080fd5b6001600160401b038086351115612fae57600080fd5b612fbb8787358801611d98565b9450602086013581811115612fcf57600080fd5b612fdb88828901611e0c565b945050604086013581811115612ff057600080fd5b8601601f8101881361300157600080fd5b61300e611db98235611d5d565b81358082526020808301929160051b8401018a81111561302d57600080fd5b602084015b8181101561313657858135111561304857600080fd5b80358501610100818e03601f1901121561306157600080fd5b613069611ce8565b6130768e60208401611e80565b815260608201358881111561308a57600080fd5b6130998f602083860101611f82565b6020830152506080820135888111156130b157600080fd5b6130c08f602083860101611d98565b60408301525060a0820135888111156130d857600080fd5b6130e78f602083860101612e57565b6060830152506130fa8e60c08401611e80565b60808201526101008201358881111561311257600080fd5b6131218f602083860101611f82565b60a08301525085525060209384019301613032565b5090955050505060608601358181111561314f57600080fd5b61315b88828901612450565b9250505092959194509250565b60006060828403121561317a57600080fd5b613182611c5f565b905081356001600160401b038082111561319b57600080fd5b90830190604082860312156131af57600080fd5b6131b7611c37565b8235828111156131c657600080fd5b830161010081880312156131d957600080fd5b6131e1611d0a565b6131ea82611e70565b81526020808301358183015261320260408401611f6b565b6040830152606083013560608301526080830135608083015261322760a08401611f6b565b60a083015261323860c08401611f6b565b60c083015260e08301358581111561324f57600080fd5b61325b8a828601611f82565b60e0840152508184528086013592508483111561327757600080fd5b61328389848801612081565b818501528387528088013595508486111561329d57600080fd5b6132a989878a01611d98565b9087015250505060408401359150808211156132c457600080fd5b506132d184828501611f82565b60408301525092915050565b6000608082840312156132ef57600080fd5b6132f7611c81565b905081356001600160401b038082111561331057600080fd5b61331c85838601611d98565b8352602084013591508082111561333257600080fd5b61333e8583860161272c565b6020840152604084013591508082111561335757600080fd5b61204f858386016121e5565b6000806000806080858703121561337957600080fd5b6001600160401b03808635111561338f57600080fd5b61339c8787358801611d98565b94506020860135818111156133b057600080fd5b6133bc88828901611e0c565b9450506040860135818111156133d157600080fd5b8601601f810188136133e257600080fd5b6133ef611db98235611d5d565b81358082526020808301929160051b8401018a81111561340e57600080fd5b602084015b8181101561313657858135111561342957600080fd5b80358501610100818e03601f1901121561344257600080fd5b61344a611ca3565b61345660208301611e70565b81526134658e60408401611ebb565b602082015260c08201358881111561347c57600080fd5b61348b8f602083860101612c80565b60408301525060e0820135888111156134a357600080fd5b6134b28f602083860101613168565b606083015250610100820135888111156134cb57600080fd5b6134da8f6020838601016132dd565b60808301525085525060209384019301613413565b600082601f83011261350057600080fd5b81356020613510611db983611d5d565b82815260059290921b8401810191818101908684111561352f57600080fd5b8286015b84811015611e015780356001600160401b038111156135525760008081fd5b6135608986838b0101613168565b845250918301918301613533565b60008060008060008060c0878903121561358757600080fd5b86356001600160401b038082111561359e57600080fd5b6135aa8a838b01611d98565b975060208901359150808211156135c057600080fd5b6135cc8a838b01611e0c565b965060408901359150808211156135e257600080fd5b6135ee8a838b01611f07565b9550606089013591508082111561360457600080fd5b6136108a838b01612d2c565b9450608089013591508082111561362657600080fd5b6125938a838b016134ef565b634e487b7160e01b600052603260045260246000fd5b61366682825180516001600160a01b03168252602090810151910152565b60208101516001600160a01b03166040838101919091520151606090910152565b600081518084526020808501945080840160005b838110156136c05781516001600160a01b03168752958201959082019060010161369b565b509495945050505050565b6000815180845260005b818110156136f1576020818501810151868301820152016136d5565b506000602082860101526020601f19601f83011685010191505092915050565b60008151608084526137266080850182613687565b905060208301516001600160801b03808216602087015280604086015116604087015250506060830151848203606086015261376282826136cb565b95945050505050565b600081518084526020808501808196508360051b8101915082860160005b858110156137f5578284038952815180516001600160a01b0390811686528682015187870152604080830151908701526060808301519091169086015260809081015160a0918601829052906137e1818701836136cb565b9a87019a9550505090840190600101613789565b5091979650505050505050565b6000815160408452613817604085018261376b565b90506020830151848203602086015261018061383c8383516001600160a01b03169052565b6020828101518482015260408084015180516001600160a01b039081168388015292810151909216606086015281015162ffffff16608085015250606082015161388b60a085018260020b9052565b5060808201516138a060c085018260020b9052565b5060a082015160e084015260c0820151610100818186015260e08401519150610120828187015281850151610140870152808501519450505050806101608401526138ed818401836136cb565b9695505050505050565b6001600160a01b038616815260006101006139156020840188613648565b8060a08401528551604082850152613931610140850182613711565b915050602086015160ff19848303016101208501526139508282613802565b91505084151560c084015282810360e084015261396d8185613687565b98975050505050505050565b60006001820161399957634e487b7160e01b600052601160045260246000fd5b5060010190565b6040815260006139b36040830185613687565b6020838203818501528185518084528284019150828160051b85010183880160005b83811015613a0357601f198784030185526139f18383516136cb565b948601949250908501906001016139d5565b50909998505050505050505050565b6000815160608452613a27606085018261376b565b905060208301518482036020860152613a4082826136cb565b915050604083015184820360408601526137628282613687565b600081518084526020808501945080840160005b838110156136c057815187529582019590820190600101613a6e565b6001600160a01b0387811682526000906020613abb8185018a80516001600160a01b03168252602090810151910152565b60e06060850152613acf60e0850189613a12565b8481036080860152613ae18189613687565b905084810360a0860152865160608252613afe60608301826136cb565b9050828801518282038484015280516040835285815116604084015285858201511660608401526040810151955060c06080840152613b41610100840187613687565b9550606081015160a08401526080810151603f19808589030160c0860152613b698883613a5a565b975060a08301519250808589030160e08601525050613b8886826136cb565b95505083810151905081850384830152613ba2858261376b565b9450505060408701519150808303604082015250613bc08282613687565b91505082810360c0840152613bd58185613687565b9998505050505050505050565b600060208284031215613bf457600080fd5b8151612ba8816123de565b6000808335601e19843603018112613c1657600080fd5b8301803591506001600160401b03821115613c3057600080fd5b602001915036819003821315612b1957600080fd5b8183823760009101908152919050565b6001600160a01b0385168152613c81602082018580516001600160a01b03168252602090810151910152565b60a060608201526000613c9760a0830185613a12565b8281036080840152613ca98185613687565b979650505050505050565b6000815160808452613cc96080850182613711565b905060208301518482036020860152613ce2828261376b565b91505060408301518482036040860152613cfc8282613687565b915050606083015184820360608601526137628282613687565b6001600160a01b0384168152613d2f6020820184613648565b60c060a0820152600061376260c0830184613cb4565b600060018060a01b0380861683526020606081850152613d7c60608501875180516001600160a01b03168252602090810151910152565b808601516101008060a0870152613d976101608701836136cb565b9150604080890151605f19808986030160c08a0152613db68583613687565b945060608b01519150808986030160e08a01528151838652613dda8487018261376b565b9050868301519250858103878701528783511681528787840151168782015283830151975060c084820152613e1260c0820189613687565b9750606083015196508088036060820152613e2d8888613a5a565b9750608083015196508088036080820152613e488888613a5a565b975060a0830151965080880360a082015250613e6487876136cb565b965060808b01519550613e8c848a018780516001600160a01b03168252602090810151910152565b60a08b0151955080898803016101408a01525050613eaa85856136cb565b945086850381880152505050506138ed8185613687565b600081516060845280516040606086015260018060a01b0381511660a0860152602081015160c08601526040810151613f0560e08701826001600160801b03169052565b5060608101516101008181880152608083015161012088015260a08301519150613f3b6101408801836001600160801b03169052565b60c08301516001600160801b031661016088015260e09092015161018087019290925250613f6d6101a08601826136cb565b905060208201519150605f19858203016080860152613f8c818361376b565b91505060208301518482036020860152613fa68282613687565b9150506040830151848203604086015261376282826136cb565b6001600160a01b03848116825260606020808401829052855190921690830152830151600090613ff36080840182613648565b5060408401516101008381015261400e610160840182613cb4565b90506060850151605f19808584030161012086015261402d8383613ec1565b9250608087015191508085840301610140860152508051608083526140556080840182613687565b90506020820151838203602085015261406e8282613a5a565b915050604082015183820360408501526140888282613802565b9150506060820151915082810360608401526140a481836136cb565b9250505082810360408401526138ed8185613687565b6001600160a01b038616815260006101006140d86020840188613648565b8060a08401526140ea81840187613cb4565b905082810360c08401526140fe8186613ec1565b905082810360e084015261396d818561368756fea264697066735822122080f41b7a6078697ce256d93cf29dc593dc1fba14ab5fa363f37dafdfa02c1d8a64736f6c6343000813003300000000000000000000000008f0f10ef017cc57d2af1e1c2365807bdff99e9c000000000000000000000000b0bada5d45d939a03c6d211d24a61a4418d7cd13000000000000000000000000bde48624f9e1dd4107df324d1ba3c07004640206
Deployed Bytecode
0x6080604052600436106100fe5760003560e01c80638da5cb5b11610095578063e6fb317f11610064578063e6fb317f146102a9578063f25c4fa9146102c9578063f5b3f424146102e9578063f851a44014610319578063fb0289ca1461033957600080fd5b80638da5cb5b146102295780639969e9ee1461024957806399e2a63b14610269578063bd42d8481461028957600080fd5b806363fb0b96116100d157806363fb0b96146101a2578063704b6c02146101b5578063745a7b3b146101d55780637b103999146101f557600080fd5b806319d40b0814610103578063216f5a891461014057806329df02cf146101625780634179eebc14610182575b600080fd5b34801561010f57600080fd5b50600254610123906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561014c57600080fd5b5061016061015b3660046124cf565b610359565b005b34801561016e57600080fd5b5061016061017d3660046129bb565b610664565b34801561018e57600080fd5b50600354610123906001600160a01b031681565b6101606101b0366004612b20565b6109e1565b3480156101c157600080fd5b506101606101d0366004612b8b565b610d12565b3480156101e157600080fd5b506101606101f0366004612b8b565b610da6565b34801561020157600080fd5b506101237f00000000000000000000000008f0f10ef017cc57d2af1e1c2365807bdff99e9c81565b34801561023557600080fd5b50600154610123906001600160a01b031681565b34801561025557600080fd5b50610160610264366004612baf565b610e26565b34801561027557600080fd5b50610160610284366004612dab565b61110f565b34801561029557600080fd5b506101606102a4366004612f82565b6113d6565b3480156102b557600080fd5b506101606102c4366004613363565b611654565b3480156102d557600080fd5b506101606102e436600461356e565b6118c2565b3480156102f557600080fd5b50610309610304366004612b8b565b611b76565b6040519015158152602001610137565b34801561032557600080fd5b50600054610123906001600160a01b031681565b34801561034557600080fd5b50610160610354366004612b8b565b611ba8565b6003546001600160a01b031633146103845760405163198f48cb60e31b815260040160405180910390fd5b8551855181141580610397575084518114155b806103a3575083518114155b806103af575081518114155b156103cd57604051637db491eb60e01b815260040160405180910390fd5b6000816001600160401b038111156103e7576103e7611c21565b604051908082528060200260200182016040528015610410578160200160208202803683370190505b5090506000826001600160401b0381111561042d5761042d611c21565b60405190808252806020026020018201604052801561046057816020015b606081526020019060019003908161044b5790505b50905060005b8381101561060157600089828151811061048257610482613632565b6020026020010151905060008983815181106104a0576104a0613632565b602002602001015190508b83815181106104bc576104bc613632565b60200260200101518584815181106104d6576104d6613632565b60200260200101906001600160a01b031690816001600160a01b03168152505081818a858151811061050a5761050a613632565b60200260200101518a868151811061052457610524613632565b60200260200101518a878151811061053e5761053e613632565b602002602001015160405160240161055a9594939291906138f7565b60408051601f198184030181529190526020810180516001600160e01b031663f0806a7f60e01b179052845185908590811061059857610598613632565b6020026020010181905250806040015181602001516001600160a01b0316836001600160a01b03167f62d08c7b40038caee4cbb8d156cdba7f6c9cc8e53163de4b9c5d986f253fd7d860405160405180910390a4505080806105f990613979565b915050610466565b506040516331fd85cb60e11b815230906363fb0b969061062790859085906004016139a0565b600060405180830381600087803b15801561064157600080fd5b505af1158015610655573d6000803e3d6000fd5b50505050505050505050505050565b6003546001600160a01b0316331461068f5760405163198f48cb60e31b815260040160405180910390fd5b86518651811415806106a2575085518114155b806106ae575084518114155b806106ba575082518114155b806106c6575083518114155b806106d2575081518114155b156106f057604051637db491eb60e01b815260040160405180910390fd5b6000816001600160401b0381111561070a5761070a611c21565b604051908082528060200260200182016040528015610733578160200160208202803683370190505b5090506000826001600160401b0381111561075057610750611c21565b60405190808252806020026020018201604052801561078357816020015b606081526020019060019003908161076e5790505b50905060005b8381101561097d578a81815181106107a3576107a3613632565b60200260200101518382815181106107bd576107bd613632565b60200260200101906001600160a01b031690816001600160a01b0316815250508981815181106107ef576107ef613632565b602002602001015189828151811061080957610809613632565b602002602001015189838151811061082357610823613632565b602002602001015189848151811061083d5761083d613632565b602002602001015189858151811061085757610857613632565b602002602001015189868151811061087157610871613632565b602002602001015160405160240161088e96959493929190613a8a565b60408051601f198184030181529190526020810180516001600160e01b031663f1a9e60360e01b17905282518390839081106108cc576108cc613632565b60200260200101819052508881815181106108e9576108e9613632565b60200260200101516020015189828151811061090757610907613632565b6020026020010151600001516001600160a01b03168b838151811061092e5761092e613632565b60200260200101516001600160a01b03167f60072b5585d4e6f71a97d87f0e001a6482f2cf1d00c33a30437a3b6f6ebd0a8f60405160405180910390a48061097581613979565b915050610789565b506040516331fd85cb60e11b815230906363fb0b96906109a390859085906004016139a0565b600060405180830381600087803b1580156109bd57600080fd5b505af11580156109d1573d6000803e3d6000fd5b5050505050505050505050505050565b828114610a015760405163c1e637c960e01b815260040160405180910390fd5b6040516332afe8a160e21b81523360048201527f00000000000000000000000008f0f10ef017cc57d2af1e1c2365807bdff99e9c6001600160a01b03169063cabfa28490602401602060405180830381865afa158015610a65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a899190613be2565b610aad5760405163252c827360e01b81523360048201526024015b60405180910390fd5b60005b808214610d0b576000858583818110610acb57610acb613632565b9050602002016020810190610ae09190612b8b565b6001600160a01b031603610af657600101610ab0565b30858583818110610b0957610b09613632565b9050602002016020810190610b1e9190612b8b565b6001600160a01b031614610c3a577f00000000000000000000000008f0f10ef017cc57d2af1e1c2365807bdff99e9c6001600160a01b031663907caa00868684818110610b6d57610b6d613632565b9050602002016020810190610b829190612b8b565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610bc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bea9190613be2565b610c3a57848482818110610c0057610c00613632565b9050602002016020810190610c159190612b8b565b6040516347ccabe760e01b81526001600160a01b039091166004820152602401610aa4565b600080868684818110610c4f57610c4f613632565b9050602002016020810190610c649190612b8b565b6001600160a01b0316858585818110610c7f57610c7f613632565b9050602002810190610c919190613bff565b604051610c9f929190613c45565b6000604051808303816000865af19150503d8060008114610cdc576040519150601f19603f3d011682016040523d82523d6000602084013e610ce1565b606091505b509150915081610d01578051600003610cf957600080fd5b805181602001fd5b5050600101610ab0565b5050505050565b6000546001600160a01b03163314610d3d5760405163b5c42b3b60e01b815260040160405180910390fd5b600054604080516001600160a01b03928316815291831660208301527fbf265e8326285a2747e33e54d5945f7111f2b5edb826eb8c08d4677779b3ff97910160405180910390a1600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610dd15760405163b5c42b3b60e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527f7b24afe53ea3c0eb8558ae101198e86c392b4055609b2be0e0b23b89b2b8f013906020015b60405180910390a150565b6003546001600160a01b03163314610e515760405163198f48cb60e31b815260040160405180910390fd5b8451845181141580610e64575082518114155b80610e70575081518114155b15610e8e57604051637db491eb60e01b815260040160405180910390fd5b6000816001600160401b03811115610ea857610ea8611c21565b604051908082528060200260200182016040528015610ed1578160200160208202803683370190505b5090506000826001600160401b03811115610eee57610eee611c21565b604051908082528060200260200182016040528015610f2157816020015b6060815260200190600190039081610f0c5790505b50905060005b838110156110ad576000888281518110610f4357610f43613632565b602002602001015190506000888381518110610f6157610f61613632565b602002602001015190506000888481518110610f7f57610f7f613632565b602002602001015190508b8481518110610f9b57610f9b613632565b6020026020010151868581518110610fb557610fb5613632565b60200260200101906001600160a01b031690816001600160a01b0316815250508282828a8781518110610fea57610fea613632565b60200260200101516040516024016110059493929190613c55565b60408051601f198184030181529190526020810180516001600160e01b031663aaec71d760e01b179052855186908690811061104357611043613632565b6020026020010181905250816020015182600001516001600160a01b0316846001600160a01b03167fbeb1a0a003f297419afd0c65340a684e8c5e9b576a1a705a4ac19762f8e89c0460405160405180910390a450505080806110a590613979565b915050610f27565b506040516331fd85cb60e11b815230906363fb0b96906110d390859085906004016139a0565b600060405180830381600087803b1580156110ed57600080fd5b505af1158015611101573d6000803e3d6000fd5b505050505050505050505050565b6003546001600160a01b0316331461113a5760405163198f48cb60e31b815260040160405180910390fd5b835183518114158061114d575082518114155b80611159575081518114155b1561117757604051637db491eb60e01b815260040160405180910390fd5b6000816001600160401b0381111561119157611191611c21565b6040519080825280602002602001820160405280156111ba578160200160208202803683370190505b5090506000826001600160401b038111156111d7576111d7611c21565b60405190808252806020026020018201604052801561120a57816020015b60608152602001906001900390816111f55790505b50905060005b8381101561137557600087828151811061122c5761122c613632565b60200260200101519050600087838151811061124a5761124a613632565b6020026020010151905089838151811061126657611266613632565b602002602001015185848151811061128057611280613632565b60200260200101906001600160a01b031690816001600160a01b03168152505081818885815181106112b4576112b4613632565b60200260200101516040516024016112ce93929190613d16565b60408051601f198184030181529190526020810180516001600160e01b0316634a2462b560e11b179052845185908590811061130c5761130c613632565b6020026020010181905250806040015181602001516001600160a01b0316836001600160a01b03167f845400de7ed0a439c0685ef185e4e48ab874482b2bbba826983593c7b9bb114b60405160405180910390a45050808061136d90613979565b915050611210565b506040516331fd85cb60e11b815230906363fb0b969061139b90859085906004016139a0565b600060405180830381600087803b1580156113b557600080fd5b505af11580156113c9573d6000803e3d6000fd5b5050505050505050505050565b6003546001600160a01b031633146114015760405163198f48cb60e31b815260040160405180910390fd5b8351835181141580611414575082518114155b80611420575081518114155b1561143e57604051637db491eb60e01b815260040160405180910390fd5b6000816001600160401b0381111561145857611458611c21565b604051908082528060200260200182016040528015611481578160200160208202803683370190505b5090506000826001600160401b0381111561149e5761149e611c21565b6040519080825280602002602001820160405280156114d157816020015b60608152602001906001900390816114bc5790505b50905060005b838110156113755760008782815181106114f3576114f3613632565b60200260200101519050600087838151811061151157611511613632565b6020026020010151905089838151811061152d5761152d613632565b602002602001015185848151811061154757611547613632565b60200260200101906001600160a01b031690816001600160a01b031681525050818188858151811061157b5761157b613632565b602002602001015160405160240161159593929190613d45565b60408051601f198184030181529190526020810180516001600160e01b031663814a1f1560e01b17905284518590859081106115d3576115d3613632565b6020908102919091018101919091526080820151805183518051908401519284015160408051948552948401526001600160a01b039182169390821692918616917fa7618589b4ad2eca6c42db5d1b67fe22fd78e950354363e80700e97e021614c6910160405180910390a45050808061164c90613979565b9150506114d7565b6003546001600160a01b0316331461167f5760405163198f48cb60e31b815260040160405180910390fd5b8351835181141580611692575082518114155b8061169e575081518114155b156116bc57604051637db491eb60e01b815260040160405180910390fd5b6000816001600160401b038111156116d6576116d6611c21565b6040519080825280602002602001820160405280156116ff578160200160208202803683370190505b5090506000826001600160401b0381111561171c5761171c611c21565b60405190808252806020026020018201604052801561174f57816020015b606081526020019060019003908161173a5790505b50905060005b8381101561137557600086828151811061177157611771613632565b60200260200101519050600088838151811061178f5761178f613632565b602002602001015190508983815181106117ab576117ab613632565b60200260200101518584815181106117c5576117c5613632565b60200260200101906001600160a01b031690816001600160a01b03168152505080828885815181106117f9576117f9613632565b602002602001015160405160240161181393929190613fc0565b60408051601f198184030181529190526020810180516001600160e01b0316631c03256560e31b179052845185908590811061185157611851613632565b60200260200101819052508160200151604001518260200151602001516001600160a01b0316826001600160a01b03167fb26a0db4cf85bbeaf7c8a6dcf47ab1bab082afd520f0120d76781ec53f67df6e60405160405180910390a4505080806118ba90613979565b915050611755565b6003546001600160a01b031633146118ed5760405163198f48cb60e31b815260040160405180910390fd5b8551855181141580611900575084518114155b8061190c575083518114155b80611918575082518114155b80611924575081518114155b1561194257604051637db491eb60e01b815260040160405180910390fd5b6000816001600160401b0381111561195c5761195c611c21565b604051908082528060200260200182016040528015611985578160200160208202803683370190505b5090506000826001600160401b038111156119a2576119a2611c21565b6040519080825280602002602001820160405280156119d557816020015b60608152602001906001900390816119c05790505b50905060005b838110156106015760008982815181106119f7576119f7613632565b602002602001015190506000898381518110611a1557611a15613632565b602002602001015190508b8381518110611a3157611a31613632565b6020026020010151858481518110611a4b57611a4b613632565b60200260200101906001600160a01b031690816001600160a01b03168152505081818a8581518110611a7f57611a7f613632565b60200260200101518a8681518110611a9957611a99613632565b60200260200101518a8781518110611ab357611ab3613632565b6020026020010151604051602401611acf9594939291906140ba565b60408051601f198184030181529190526020810180516001600160e01b03166338f6f92760e01b1790528451859085908110611b0d57611b0d613632565b6020026020010181905250806040015181602001516001600160a01b0316836001600160a01b03167f24a5e161bb55a0a758c5ce5e6621fc0494f946bd2e70162ed7d785c7b914079160405160405180910390a450508080611b6e90613979565b9150506119db565b6001546000906001600160a01b0383811691161480611ba257506002546001600160a01b038381169116145b92915050565b6001546001600160a01b03163314611bd3576040516374a2152760e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527f5e5dee98c8f51165e719725b40ebe485de8ce07b39ad552e40a31d58b5be764690602001610e1b565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715611c5957611c59611c21565b60405290565b604051606081016001600160401b0381118282101715611c5957611c59611c21565b604051608081016001600160401b0381118282101715611c5957611c59611c21565b60405160a081016001600160401b0381118282101715611c5957611c59611c21565b60405161014081016001600160401b0381118282101715611c5957611c59611c21565b60405160c081016001600160401b0381118282101715611c5957611c59611c21565b60405161010081016001600160401b0381118282101715611c5957611c59611c21565b604051601f8201601f191681016001600160401b0381118282101715611d5557611d55611c21565b604052919050565b60006001600160401b03821115611d7657611d76611c21565b5060051b60200190565b6001600160a01b0381168114611d9557600080fd5b50565b600082601f830112611da957600080fd5b81356020611dbe611db983611d5d565b611d2d565b82815260059290921b84018101918181019086841115611ddd57600080fd5b8286015b84811015611e01578035611df481611d80565b8352918301918301611de1565b509695505050505050565b600082601f830112611e1d57600080fd5b81356020611e2d611db983611d5d565b82815260059290921b84018101918181019086841115611e4c57600080fd5b8286015b84811015611e01578035611e6381611d80565b8352918301918301611e50565b8035611e7b81611d80565b919050565b600060408284031215611e9257600080fd5b611e9a611c37565b90508135611ea781611d80565b808252506020820135602082015292915050565b600060808284031215611ecd57600080fd5b611ed5611c5f565b9050611ee18383611e80565b81526040820135611ef181611d80565b6020820152606091909101356040820152919050565b600082601f830112611f1857600080fd5b81356020611f28611db983611d5d565b82815260079290921b84018101918181019086841115611f4757600080fd5b8286015b84811015611e0157611f5d8882611ebb565b835291830191608001611f4b565b80356001600160801b0381168114611e7b57600080fd5b600082601f830112611f9357600080fd5b81356001600160401b03811115611fac57611fac611c21565b611fbf601f8201601f1916602001611d2d565b818152846020838601011115611fd457600080fd5b816020850160208301376000918101602001919091529392505050565b60006080828403121561200357600080fd5b61200b611c81565b905081356001600160401b038082111561202457600080fd5b61203085838601611d98565b835261203e60208501611f6b565b602084015261204f60408501611f6b565b6040840152606084013591508082111561206857600080fd5b5061207584828501611f82565b60608301525092915050565b600082601f83011261209257600080fd5b813560206120a2611db983611d5d565b82815260059290921b840181019181810190868411156120c157600080fd5b8286015b84811015611e015780356001600160401b03808211156120e55760008081fd5b9088019060a0828b03601f19018113156120ff5760008081fd5b612107611ca3565b8784013561211481611d80565b808252506040808501358983015260608086013582840152608091508186013561213d81611d80565b908301529184013591838311156121545760008081fd5b6121628d8a85880101611f82565b9082015286525050509183019183016120c5565b60006060828403121561218857600080fd5b612190611c5f565b9050813561219d81611d80565b815260208201356121ad81611d80565b6020820152604082013562ffffff811681146121c857600080fd5b604082015292915050565b8035600281900b8114611e7b57600080fd5b6000604082840312156121f757600080fd5b6121ff611c37565b905081356001600160401b038082111561221857600080fd5b61222485838601612081565b8352602084013591508082111561223a57600080fd5b90830190610180828603121561224f57600080fd5b612257611cc5565b61226083611e70565b8152602083013560208201526122798660408501612176565b604082015261228a60a084016121d3565b606082015261229b60c084016121d3565b608082015260e083013560a08201526101008084013560c08301526101208085013560e0840152610140850135828401526101608501359150838211156122e157600080fd5b6122ed88838701611f82565b9083015250602084015250909392505050565b600082601f83011261231157600080fd5b81356020612321611db983611d5d565b82815260059290921b8401810191818101908684111561234057600080fd5b8286015b84811015611e015780356001600160401b03808211156123645760008081fd5b908801906040828b03601f190181131561237e5760008081fd5b612386611c37565b87840135838111156123985760008081fd5b6123a68d8a83880101611ff1565b8252509083013590828211156123bc5760008081fd5b6123ca8c89848701016121e5565b818901528652505050918301918301612344565b8015158114611d9557600080fd5b600082601f8301126123fd57600080fd5b8135602061240d611db983611d5d565b82815260059290921b8401810191818101908684111561242c57600080fd5b8286015b84811015611e01578035612443816123de565b8352918301918301612430565b600082601f83011261246157600080fd5b81356020612471611db983611d5d565b82815260059290921b8401810191818101908684111561249057600080fd5b8286015b84811015611e015780356001600160401b038111156124b35760008081fd5b6124c18986838b0101611d98565b845250918301918301612494565b60008060008060008060c087890312156124e857600080fd5b86356001600160401b03808211156124ff57600080fd5b61250b8a838b01611d98565b9750602089013591508082111561252157600080fd5b61252d8a838b01611e0c565b9650604089013591508082111561254357600080fd5b61254f8a838b01611f07565b9550606089013591508082111561256557600080fd5b6125718a838b01612300565b9450608089013591508082111561258757600080fd5b6125938a838b016123ec565b935060a08901359150808211156125a957600080fd5b506125b689828a01612450565b9150509295509295509295565b600082601f8301126125d457600080fd5b813560206125e4611db983611d5d565b82815260069290921b8401810191818101908684111561260357600080fd5b8286015b84811015611e01576126198882611e80565b835291830191604001612607565b600082601f83011261263857600080fd5b81356020612648611db983611d5d565b82815260059290921b8401810191818101908684111561266757600080fd5b8286015b84811015611e015780356001600160401b038082111561268b5760008081fd5b908801906060828b03601f19018113156126a55760008081fd5b6126ad611c5f565b87840135838111156126bf5760008081fd5b6126cd8d8a83880101612081565b825250604080850135848111156126e45760008081fd5b6126f28e8b83890101611f82565b838b01525091840135918383111561270a5760008081fd5b6127188d8a85880101611d98565b90820152865250505091830191830161266b565b600082601f83011261273d57600080fd5b8135602061274d611db983611d5d565b82815260059290921b8401810191818101908684111561276c57600080fd5b8286015b84811015611e015780358352918301918301612770565b600082601f83011261279857600080fd5b6127a5611db98335611d5d565b82358082526020808301929160051b8501018510156127c357600080fd5b602084015b6020853560051b8601018110156129b2576001600160401b0380823511156127ef57600080fd5b81358601601f196060828a038201121561280857600080fd5b612810611c5f565b836020840135111561282157600080fd5b6128338a602080860135860101611f82565b8152836040840135111561284657600080fd5b60408301358301604083828d0301121561285f57600080fd5b612867611c37565b856020830135111561287857600080fd5b6020820135820160c085828f0301121561289157600080fd5b612899611ce8565b94506128a760208201611e70565b85526128b560408201611e70565b602086015286606082013511156128cb57600080fd5b6128de8d60206060840135840101611d98565b6040860152608081013560608601528660a082013511156128fe57600080fd5b6129118d602060a084013584010161272c565b60808601528660c0820135111561292757600080fd5b61293a8d602060c0840135840101611f82565b60a086015250838152856040830135111561295457600080fd5b6129678c60206040850135850101612081565b60208201528060208401525050836060840135111561298557600080fd5b6129988a60206060860135860101611d98565b6040820152865250506020938401939190910190506127c8565b50949350505050565b600080600080600080600060e0888a0312156129d657600080fd5b87356001600160401b03808211156129ed57600080fd5b6129f98b838c01611d98565b985060208a0135915080821115612a0f57600080fd5b612a1b8b838c01611e0c565b975060408a0135915080821115612a3157600080fd5b612a3d8b838c016125c3565b965060608a0135915080821115612a5357600080fd5b612a5f8b838c01612627565b955060808a0135915080821115612a7557600080fd5b612a818b838c01612450565b945060a08a0135915080821115612a9757600080fd5b612aa38b838c01612787565b935060c08a0135915080821115612ab957600080fd5b50612ac68a828b01612450565b91505092959891949750929550565b60008083601f840112612ae757600080fd5b5081356001600160401b03811115612afe57600080fd5b6020830191508360208260051b8501011115612b1957600080fd5b9250929050565b60008060008060408587031215612b3657600080fd5b84356001600160401b0380821115612b4d57600080fd5b612b5988838901612ad5565b90965094506020870135915080821115612b7257600080fd5b50612b7f87828801612ad5565b95989497509550505050565b600060208284031215612b9d57600080fd5b8135612ba881611d80565b9392505050565b600080600080600060a08688031215612bc757600080fd5b85356001600160401b0380821115612bde57600080fd5b612bea89838a01611d98565b96506020880135915080821115612c0057600080fd5b612c0c89838a01611e0c565b95506040880135915080821115612c2257600080fd5b612c2e89838a016125c3565b94506060880135915080821115612c4457600080fd5b612c5089838a01612627565b93506080880135915080821115612c6657600080fd5b50612c7388828901612450565b9150509295509295909350565b600060808284031215612c9257600080fd5b612c9a611c81565b905081356001600160401b0380821115612cb357600080fd5b612cbf85838601611ff1565b83526020840135915080821115612cd557600080fd5b612ce185838601612081565b60208401526040840135915080821115612cfa57600080fd5b612d0685838601611d98565b60408401526060840135915080821115612d1f57600080fd5b5061207584828501611d98565b600082601f830112612d3d57600080fd5b81356020612d4d611db983611d5d565b82815260059290921b84018101918181019086841115612d6c57600080fd5b8286015b84811015611e015780356001600160401b03811115612d8f5760008081fd5b612d9d8986838b0101612c80565b845250918301918301612d70565b60008060008060808587031215612dc157600080fd5b84356001600160401b0380821115612dd857600080fd5b612de488838901611d98565b95506020870135915080821115612dfa57600080fd5b612e0688838901611e0c565b94506040870135915080821115612e1c57600080fd5b612e2888838901611f07565b93506060870135915080821115612e3e57600080fd5b50612e4b87828801612d2c565b91505092959194509250565b600060408284031215612e6957600080fd5b612e71611c37565b905081356001600160401b0380821115612e8a57600080fd5b612e9685838601612081565b83526020840135915080821115612eac57600080fd5b9083019060c08286031215612ec057600080fd5b612ec8611ce8565b612ed183611e70565b8152612edf60208401611e70565b6020820152604083013582811115612ef657600080fd5b612f0287828601611d98565b604083015250606083013582811115612f1a57600080fd5b612f268782860161272c565b606083015250608083013582811115612f3e57600080fd5b612f4a8782860161272c565b60808301525060a083013582811115612f6257600080fd5b612f6e87828601611f82565b60a083015250602084015250909392505050565b60008060008060808587031215612f9857600080fd5b6001600160401b038086351115612fae57600080fd5b612fbb8787358801611d98565b9450602086013581811115612fcf57600080fd5b612fdb88828901611e0c565b945050604086013581811115612ff057600080fd5b8601601f8101881361300157600080fd5b61300e611db98235611d5d565b81358082526020808301929160051b8401018a81111561302d57600080fd5b602084015b8181101561313657858135111561304857600080fd5b80358501610100818e03601f1901121561306157600080fd5b613069611ce8565b6130768e60208401611e80565b815260608201358881111561308a57600080fd5b6130998f602083860101611f82565b6020830152506080820135888111156130b157600080fd5b6130c08f602083860101611d98565b60408301525060a0820135888111156130d857600080fd5b6130e78f602083860101612e57565b6060830152506130fa8e60c08401611e80565b60808201526101008201358881111561311257600080fd5b6131218f602083860101611f82565b60a08301525085525060209384019301613032565b5090955050505060608601358181111561314f57600080fd5b61315b88828901612450565b9250505092959194509250565b60006060828403121561317a57600080fd5b613182611c5f565b905081356001600160401b038082111561319b57600080fd5b90830190604082860312156131af57600080fd5b6131b7611c37565b8235828111156131c657600080fd5b830161010081880312156131d957600080fd5b6131e1611d0a565b6131ea82611e70565b81526020808301358183015261320260408401611f6b565b6040830152606083013560608301526080830135608083015261322760a08401611f6b565b60a083015261323860c08401611f6b565b60c083015260e08301358581111561324f57600080fd5b61325b8a828601611f82565b60e0840152508184528086013592508483111561327757600080fd5b61328389848801612081565b818501528387528088013595508486111561329d57600080fd5b6132a989878a01611d98565b9087015250505060408401359150808211156132c457600080fd5b506132d184828501611f82565b60408301525092915050565b6000608082840312156132ef57600080fd5b6132f7611c81565b905081356001600160401b038082111561331057600080fd5b61331c85838601611d98565b8352602084013591508082111561333257600080fd5b61333e8583860161272c565b6020840152604084013591508082111561335757600080fd5b61204f858386016121e5565b6000806000806080858703121561337957600080fd5b6001600160401b03808635111561338f57600080fd5b61339c8787358801611d98565b94506020860135818111156133b057600080fd5b6133bc88828901611e0c565b9450506040860135818111156133d157600080fd5b8601601f810188136133e257600080fd5b6133ef611db98235611d5d565b81358082526020808301929160051b8401018a81111561340e57600080fd5b602084015b8181101561313657858135111561342957600080fd5b80358501610100818e03601f1901121561344257600080fd5b61344a611ca3565b61345660208301611e70565b81526134658e60408401611ebb565b602082015260c08201358881111561347c57600080fd5b61348b8f602083860101612c80565b60408301525060e0820135888111156134a357600080fd5b6134b28f602083860101613168565b606083015250610100820135888111156134cb57600080fd5b6134da8f6020838601016132dd565b60808301525085525060209384019301613413565b600082601f83011261350057600080fd5b81356020613510611db983611d5d565b82815260059290921b8401810191818101908684111561352f57600080fd5b8286015b84811015611e015780356001600160401b038111156135525760008081fd5b6135608986838b0101613168565b845250918301918301613533565b60008060008060008060c0878903121561358757600080fd5b86356001600160401b038082111561359e57600080fd5b6135aa8a838b01611d98565b975060208901359150808211156135c057600080fd5b6135cc8a838b01611e0c565b965060408901359150808211156135e257600080fd5b6135ee8a838b01611f07565b9550606089013591508082111561360457600080fd5b6136108a838b01612d2c565b9450608089013591508082111561362657600080fd5b6125938a838b016134ef565b634e487b7160e01b600052603260045260246000fd5b61366682825180516001600160a01b03168252602090810151910152565b60208101516001600160a01b03166040838101919091520151606090910152565b600081518084526020808501945080840160005b838110156136c05781516001600160a01b03168752958201959082019060010161369b565b509495945050505050565b6000815180845260005b818110156136f1576020818501810151868301820152016136d5565b506000602082860101526020601f19601f83011685010191505092915050565b60008151608084526137266080850182613687565b905060208301516001600160801b03808216602087015280604086015116604087015250506060830151848203606086015261376282826136cb565b95945050505050565b600081518084526020808501808196508360051b8101915082860160005b858110156137f5578284038952815180516001600160a01b0390811686528682015187870152604080830151908701526060808301519091169086015260809081015160a0918601829052906137e1818701836136cb565b9a87019a9550505090840190600101613789565b5091979650505050505050565b6000815160408452613817604085018261376b565b90506020830151848203602086015261018061383c8383516001600160a01b03169052565b6020828101518482015260408084015180516001600160a01b039081168388015292810151909216606086015281015162ffffff16608085015250606082015161388b60a085018260020b9052565b5060808201516138a060c085018260020b9052565b5060a082015160e084015260c0820151610100818186015260e08401519150610120828187015281850151610140870152808501519450505050806101608401526138ed818401836136cb565b9695505050505050565b6001600160a01b038616815260006101006139156020840188613648565b8060a08401528551604082850152613931610140850182613711565b915050602086015160ff19848303016101208501526139508282613802565b91505084151560c084015282810360e084015261396d8185613687565b98975050505050505050565b60006001820161399957634e487b7160e01b600052601160045260246000fd5b5060010190565b6040815260006139b36040830185613687565b6020838203818501528185518084528284019150828160051b85010183880160005b83811015613a0357601f198784030185526139f18383516136cb565b948601949250908501906001016139d5565b50909998505050505050505050565b6000815160608452613a27606085018261376b565b905060208301518482036020860152613a4082826136cb565b915050604083015184820360408601526137628282613687565b600081518084526020808501945080840160005b838110156136c057815187529582019590820190600101613a6e565b6001600160a01b0387811682526000906020613abb8185018a80516001600160a01b03168252602090810151910152565b60e06060850152613acf60e0850189613a12565b8481036080860152613ae18189613687565b905084810360a0860152865160608252613afe60608301826136cb565b9050828801518282038484015280516040835285815116604084015285858201511660608401526040810151955060c06080840152613b41610100840187613687565b9550606081015160a08401526080810151603f19808589030160c0860152613b698883613a5a565b975060a08301519250808589030160e08601525050613b8886826136cb565b95505083810151905081850384830152613ba2858261376b565b9450505060408701519150808303604082015250613bc08282613687565b91505082810360c0840152613bd58185613687565b9998505050505050505050565b600060208284031215613bf457600080fd5b8151612ba8816123de565b6000808335601e19843603018112613c1657600080fd5b8301803591506001600160401b03821115613c3057600080fd5b602001915036819003821315612b1957600080fd5b8183823760009101908152919050565b6001600160a01b0385168152613c81602082018580516001600160a01b03168252602090810151910152565b60a060608201526000613c9760a0830185613a12565b8281036080840152613ca98185613687565b979650505050505050565b6000815160808452613cc96080850182613711565b905060208301518482036020860152613ce2828261376b565b91505060408301518482036040860152613cfc8282613687565b915050606083015184820360608601526137628282613687565b6001600160a01b0384168152613d2f6020820184613648565b60c060a0820152600061376260c0830184613cb4565b600060018060a01b0380861683526020606081850152613d7c60608501875180516001600160a01b03168252602090810151910152565b808601516101008060a0870152613d976101608701836136cb565b9150604080890151605f19808986030160c08a0152613db68583613687565b945060608b01519150808986030160e08a01528151838652613dda8487018261376b565b9050868301519250858103878701528783511681528787840151168782015283830151975060c084820152613e1260c0820189613687565b9750606083015196508088036060820152613e2d8888613a5a565b9750608083015196508088036080820152613e488888613a5a565b975060a0830151965080880360a082015250613e6487876136cb565b965060808b01519550613e8c848a018780516001600160a01b03168252602090810151910152565b60a08b0151955080898803016101408a01525050613eaa85856136cb565b945086850381880152505050506138ed8185613687565b600081516060845280516040606086015260018060a01b0381511660a0860152602081015160c08601526040810151613f0560e08701826001600160801b03169052565b5060608101516101008181880152608083015161012088015260a08301519150613f3b6101408801836001600160801b03169052565b60c08301516001600160801b031661016088015260e09092015161018087019290925250613f6d6101a08601826136cb565b905060208201519150605f19858203016080860152613f8c818361376b565b91505060208301518482036020860152613fa68282613687565b9150506040830151848203604086015261376282826136cb565b6001600160a01b03848116825260606020808401829052855190921690830152830151600090613ff36080840182613648565b5060408401516101008381015261400e610160840182613cb4565b90506060850151605f19808584030161012086015261402d8383613ec1565b9250608087015191508085840301610140860152508051608083526140556080840182613687565b90506020820151838203602085015261406e8282613a5a565b915050604082015183820360408501526140888282613802565b9150506060820151915082810360608401526140a481836136cb565b9250505082810360408401526138ed8185613687565b6001600160a01b038616815260006101006140d86020840188613648565b8060a08401526140ea81840187613cb4565b905082810360c08401526140fe8186613ec1565b905082810360e084015261396d818561368756fea264697066735822122080f41b7a6078697ce256d93cf29dc593dc1fba14ab5fa363f37dafdfa02c1d8a64736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000008f0f10ef017cc57d2af1e1c2365807bdff99e9c000000000000000000000000b0bada5d45d939a03c6d211d24a61a4418d7cd13000000000000000000000000bde48624f9e1dd4107df324d1ba3c07004640206
-----Decoded View---------------
Arg [0] : registry_ (address): 0x08F0F10ef017Cc57D2af1E1C2365807BdFF99E9C
Arg [1] : approvedAutomator_ (address): 0xB0baDa5d45d939A03C6d211D24a61A4418D7cd13
Arg [2] : admin_ (address): 0xBDE48624F9E1dd4107df324D1BA3C07004640206
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000008f0f10ef017cc57d2af1e1c2365807bdff99e9c
Arg [1] : 000000000000000000000000b0bada5d45d939a03c6d211d24a61a4418d7cd13
Arg [2] : 000000000000000000000000bde48624f9e1dd4107df324d1ba3c07004640206
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
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.