Source Code
Overview
ETH Balance
0 ETH
ETH Value
$0.00| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 25195777 | 118 days ago | Contract Creation | 0 ETH |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
VLFStrategyExecutor
Compiler Version
v0.8.30+commit.73712a01
Optimization Enabled:
Yes with 150 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.28;
import { IERC20 } from '@oz/token/ERC20/IERC20.sol';
import { SafeERC20 } from '@oz/token/ERC20/utils/SafeERC20.sol';
import { Address } from '@oz/utils/Address.sol';
import { ReentrancyGuard } from '@oz/utils/ReentrancyGuard.sol';
import { Ownable2StepUpgradeable } from '@ozu/access/Ownable2StepUpgradeable.sol';
import { IMitosisVault } from '../../interfaces/branch/IMitosisVault.sol';
import { IStrategyExecutor } from '../../interfaces/branch/strategy/IStrategyExecutor.sol';
import { IVLFStrategyExecutor } from '../../interfaces/branch/strategy/IVLFStrategyExecutor.sol';
import { ITally } from '../../interfaces/branch/strategy/tally/ITally.sol';
import { StdError } from '../../lib/StdError.sol';
import { Versioned } from '../../lib/Versioned.sol';
import { VLFStrategyExecutorStorageV1 } from './VLFStrategyExecutorStorageV1.sol';
contract VLFStrategyExecutor is
IStrategyExecutor,
IVLFStrategyExecutor,
Ownable2StepUpgradeable,
ReentrancyGuard,
VLFStrategyExecutorStorageV1,
Versioned
{
using SafeERC20 for IERC20;
using Address for address;
//=========== NOTE: INITIALIZATION FUNCTIONS ===========//
constructor() {
_disableInitializers();
}
fallback() external payable {
revert StdError.NotSupported();
}
receive() external payable {
Address.sendValue(payable(_getStorageV1().strategist), msg.value);
}
function initialize(IMitosisVault vault_, IERC20 asset_, address hubVLFVault_, address owner_) public initializer {
__Ownable2Step_init();
__Ownable_init(owner_);
StorageV1 storage $ = _getStorageV1();
$.vault = vault_;
$.asset = asset_;
$.hubVLFVault = hubVLFVault_;
}
//=========== NOTE: VIEW FUNCTIONS ===========//
function vault() external view returns (IMitosisVault) {
return _getStorageV1().vault;
}
function asset() external view returns (IERC20) {
return _getStorageV1().asset;
}
function hubVLFVault() external view returns (address) {
return _getStorageV1().hubVLFVault;
}
function strategist() external view returns (address) {
return _getStorageV1().strategist;
}
function executor() external view returns (address) {
return _getStorageV1().executor;
}
function tally() external view returns (ITally) {
return _getStorageV1().tally;
}
function totalBalance() external view returns (uint256) {
return _totalBalance(_getStorageV1());
}
function storedTotalBalance() external view returns (uint256) {
return _getStorageV1().storedTotalBalance;
}
function quoteDeallocateLiquidity(uint256 amount) external view returns (uint256) {
StorageV1 memory $ = _getStorageV1();
return $.vault.quoteDeallocateVLF($.hubVLFVault, amount);
}
function quoteSettleYield(uint256 amount) external view returns (uint256) {
StorageV1 memory $ = _getStorageV1();
return $.vault.quoteSettleVLFYield($.hubVLFVault, amount);
}
function quoteSettleLoss(uint256 amount) external view returns (uint256) {
StorageV1 memory $ = _getStorageV1();
return $.vault.quoteSettleVLFLoss($.hubVLFVault, amount);
}
function quoteSettleExtraRewards(address reward, uint256 amount) external view returns (uint256) {
StorageV1 memory $ = _getStorageV1();
return $.vault.quoteSettleVLFExtraRewards($.hubVLFVault, reward, amount);
}
//=========== NOTE: STRATEGIST FUNCTIONS ===========//
function deallocateLiquidity(uint256 amount) external payable {
require(amount > 0, StdError.ZeroAmount());
StorageV1 memory $ = _getStorageV1();
_assertOnlyStrategist($);
$.vault.deallocateVLF{ value: msg.value }($.hubVLFVault, amount);
}
function fetchLiquidity(uint256 amount) external {
require(amount > 0, StdError.ZeroAmount());
StorageV1 storage $ = _getStorageV1();
_assertOnlyStrategist($);
$.vault.fetchVLF($.hubVLFVault, amount);
$.storedTotalBalance += amount;
}
function returnLiquidity(uint256 amount) external {
require(amount > 0, StdError.ZeroAmount());
StorageV1 storage $ = _getStorageV1();
_assertOnlyStrategist($);
$.asset.forceApprove(address($.vault), amount);
$.vault.returnVLF($.hubVLFVault, amount);
$.storedTotalBalance -= amount;
}
function settle() external payable nonReentrant {
StorageV1 storage $ = _getStorageV1();
_assertOnlyStrategist($);
uint256 totalBalance_ = _totalBalance($);
uint256 storedTotalBalance_ = $.storedTotalBalance;
$.storedTotalBalance = totalBalance_;
if (totalBalance_ >= storedTotalBalance_) {
$.vault.settleVLFYield{ value: msg.value }($.hubVLFVault, totalBalance_ - storedTotalBalance_);
} else {
$.vault.settleVLFLoss{ value: msg.value }($.hubVLFVault, storedTotalBalance_ - totalBalance_);
}
}
function settleExtraRewards(address reward, uint256 amount) external payable {
require(amount > 0, StdError.ZeroAmount());
StorageV1 memory $ = _getStorageV1();
_assertOnlyStrategist($);
require(reward != address($.asset), StdError.InvalidAddress('reward'));
IERC20(reward).forceApprove(address($.vault), amount);
$.vault.settleVLFExtraRewards{ value: msg.value }($.hubVLFVault, reward, amount);
}
//=========== NOTE: EXECUTOR FUNCTIONS ===========//
function execute(address target, bytes calldata data, uint256 value)
external
payable
nonReentrant
returns (bytes memory result)
{
StorageV1 memory $ = _getStorageV1();
_assertOnlyExecutor($);
result = target.functionCallWithValue(data, value);
}
function execute(address[] calldata targets, bytes[] calldata data, uint256[] calldata values)
external
payable
nonReentrant
returns (bytes[] memory results)
{
require(targets.length == data.length && data.length == values.length, StdError.InvalidParameter('executeData'));
StorageV1 memory $ = _getStorageV1();
_assertOnlyExecutor($);
uint256 targetsLength = targets.length;
results = new bytes[](targetsLength);
for (uint256 i; i < targetsLength; ++i) {
results[i] = targets[i].functionCallWithValue(data[i], values[i]);
}
}
//=========== NOTE: OWNABLE FUNCTIONS ===========//
function setTally(address implementation) external onlyOwner {
require(implementation.code.length > 0, StdError.InvalidAddress('implementation'));
StorageV1 storage $ = _getStorageV1();
require(
address($.tally) == address(0) || _tallyTotalBalance($) == 0,
IVLFStrategyExecutor.IVLFStrategyExecutor__TallyTotalBalanceNotZero(implementation)
);
$.tally = ITally(implementation);
emit TallySet(implementation);
}
function setStrategist(address strategist_) external onlyOwner {
require(strategist_ != address(0), StdError.InvalidAddress('strategist'));
_getStorageV1().strategist = strategist_;
emit StrategistSet(strategist_);
}
function setExecutor(address executor_) external onlyOwner {
require(executor_ != address(0), StdError.InvalidAddress('executor'));
_getStorageV1().executor = executor_;
emit ExecutorSet(executor_);
}
function unsetStrategist() external onlyOwner {
_getStorageV1().strategist = address(0);
emit StrategistSet(address(0));
}
function unsetExecutor() external onlyOwner {
_getStorageV1().executor = address(0);
emit ExecutorSet(address(0));
}
//=========== NOTE: INTERNAL FUNCTIONS ===========//
function _assertOnlyStrategist(StorageV1 memory $) internal view {
address strategist_ = $.strategist;
require(strategist_ != address(0), IVLFStrategyExecutor.IVLFStrategyExecutor__StrategistNotSet());
require(_msgSender() == strategist_, StdError.Unauthorized());
}
function _assertOnlyExecutor(StorageV1 memory $) internal view {
address executor_ = $.executor;
require(executor_ != address(0), IVLFStrategyExecutor.IVLFStrategyExecutor__ExecutorNotSet());
require(_msgSender() == executor_, StdError.Unauthorized());
}
function _tallyTotalBalance(StorageV1 storage $) internal view returns (uint256) {
bytes memory context;
return
$.tally.pendingDepositBalance(context) + $.tally.totalBalance(context) + $.tally.pendingWithdrawBalance(context);
}
function _totalBalance(StorageV1 storage $) internal view returns (uint256) {
return $.asset.balanceOf(address(this)) + _tallyTotalBalance($);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC-20 standard as defined in the ERC.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 value) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 value) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.2.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../IERC20.sol";
import {IERC1363} from "../../../interfaces/IERC1363.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC-20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
/**
* @dev An operation with an ERC-20 token failed.
*/
error SafeERC20FailedOperation(address token);
/**
* @dev Indicates a failed `decreaseAllowance` request.
*/
error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*
* IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
* smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
* this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
* that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
forceApprove(token, spender, oldAllowance + value);
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
* value, non-reverting calls are assumed to be successful.
*
* IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
* smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
* this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
* that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
unchecked {
uint256 currentAllowance = token.allowance(address(this), spender);
if (currentAllowance < requestedDecrease) {
revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
}
forceApprove(token, spender, currentAllowance - requestedDecrease);
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*
* NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
* only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
* set here.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
* code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* Reverts if the returned value is other than `true`.
*/
function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
if (to.code.length == 0) {
safeTransfer(token, to, value);
} else if (!token.transferAndCall(to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
* has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* Reverts if the returned value is other than `true`.
*/
function transferFromAndCallRelaxed(
IERC1363 token,
address from,
address to,
uint256 value,
bytes memory data
) internal {
if (to.code.length == 0) {
safeTransferFrom(token, from, to, value);
} else if (!token.transferFromAndCall(from, to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
* code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
* Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
* once without retrying, and relies on the returned value to be true.
*
* Reverts if the returned value is other than `true`.
*/
function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
if (to.code.length == 0) {
forceApprove(token, to, value);
} else if (!token.approveAndCall(to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*
* This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
uint256 returnSize;
uint256 returnValue;
assembly ("memory-safe") {
let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
// bubble errors
if iszero(success) {
let ptr := mload(0x40)
returndatacopy(ptr, 0, returndatasize())
revert(ptr, returndatasize())
}
returnSize := returndatasize()
returnValue := mload(0)
}
if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*
* This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
bool success;
uint256 returnSize;
uint256 returnValue;
assembly ("memory-safe") {
success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
returnSize := returndatasize()
returnValue := mload(0)
}
return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.2.0) (utils/Address.sol)
pragma solidity ^0.8.20;
import {Errors} from "./Errors.sol";
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev There's no code at `target` (it is not a contract).
*/
error AddressEmptyCode(address target);
/**
* @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://consensys.net/diligence/blog/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.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
if (address(this).balance < amount) {
revert Errors.InsufficientBalance(address(this).balance, amount);
}
(bool success, bytes memory returndata) = recipient.call{value: amount}("");
if (!success) {
_revert(returndata);
}
}
/**
* @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 or custom error, it is bubbled
* up by this function (like regular Solidity function calls). However, if
* the call reverted with no returned reason, this function reverts with a
* {Errors.FailedCall} error.
*
* 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.
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0);
}
/**
* @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`.
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
if (address(this).balance < value) {
revert Errors.InsufficientBalance(address(this).balance, value);
}
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
* was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case
* of an unsuccessful call.
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata
) internal view returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
// only check if target is a contract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
if (returndata.length == 0 && target.code.length == 0) {
revert AddressEmptyCode(target);
}
return returndata;
}
}
/**
* @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
* revert reason or with a default {Errors.FailedCall} error.
*/
function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
return returndata;
}
}
/**
* @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}.
*/
function _revert(bytes memory returndata) 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
assembly ("memory-safe") {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert Errors.FailedCall();
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)
pragma solidity ^0.8.20;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at,
* consider using {ReentrancyGuardTransient} instead.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant NOT_ENTERED = 1;
uint256 private constant ENTERED = 2;
uint256 private _status;
/**
* @dev Unauthorized reentrant call.
*/
error ReentrancyGuardReentrantCall();
constructor() {
_status = NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be NOT_ENTERED
if (_status == ENTERED) {
revert ReentrancyGuardReentrantCall();
}
// Any calls to nonReentrant after this point will fail
_status = ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == ENTERED;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (access/Ownable2Step.sol)
pragma solidity ^0.8.20;
import {OwnableUpgradeable} from "./OwnableUpgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.sol";
/**
* @dev Contract module which provides access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* This extension of the {Ownable} contract includes a two-step mechanism to transfer
* ownership, where the new owner must call {acceptOwnership} in order to replace the
* old one. This can help prevent common mistakes, such as transfers of ownership to
* incorrect accounts, or to contracts that are unable to interact with the
* permission system.
*
* The initial owner is specified at deployment time in the constructor for `Ownable`. This
* can later be changed with {transferOwnership} and {acceptOwnership}.
*
* This module is used through inheritance. It will make available all functions
* from parent (Ownable).
*/
abstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable {
/// @custom:storage-location erc7201:openzeppelin.storage.Ownable2Step
struct Ownable2StepStorage {
address _pendingOwner;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable2Step")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant Ownable2StepStorageLocation = 0x237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00;
function _getOwnable2StepStorage() private pure returns (Ownable2StepStorage storage $) {
assembly {
$.slot := Ownable2StepStorageLocation
}
}
event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);
function __Ownable2Step_init() internal onlyInitializing {
}
function __Ownable2Step_init_unchained() internal onlyInitializing {
}
/**
* @dev Returns the address of the pending owner.
*/
function pendingOwner() public view virtual returns (address) {
Ownable2StepStorage storage $ = _getOwnable2StepStorage();
return $._pendingOwner;
}
/**
* @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
* Can only be called by the current owner.
*
* Setting `newOwner` to the zero address is allowed; this can be used to cancel an initiated ownership transfer.
*/
function transferOwnership(address newOwner) public virtual override onlyOwner {
Ownable2StepStorage storage $ = _getOwnable2StepStorage();
$._pendingOwner = newOwner;
emit OwnershipTransferStarted(owner(), newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual override {
Ownable2StepStorage storage $ = _getOwnable2StepStorage();
delete $._pendingOwner;
super._transferOwnership(newOwner);
}
/**
* @dev The new owner accepts the ownership transfer.
*/
function acceptOwnership() public virtual {
address sender = _msgSender();
if (pendingOwner() != sender) {
revert OwnableUnauthorizedAccount(sender);
}
_transferOwnership(sender);
}
}// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.28;
import { IMitosisVaultVLF } from './IMitosisVaultVLF.sol';
enum AssetAction {
None,
Deposit
}
interface IMitosisVault is IMitosisVaultVLF {
//=========== NOTE: EVENT DEFINITIONS ===========//
event CapSet(address indexed setter, address indexed asset, uint256 prevMaxCap, uint256 newMaxCap);
event AssetInitialized(address asset);
event Deposited(address indexed asset, address indexed to, uint256 amount);
event Withdrawn(address indexed asset, address indexed to, uint256 amount);
event EntrypointSet(address entrypoint);
event AssetHalted(address indexed asset, AssetAction action);
event AssetResumed(address indexed asset, AssetAction action);
//=========== NOTE: ERROR DEFINITIONS ===========//
error IMitosisVault__ExceededCap(address asset, uint256 increasedSupply, uint256 availableCap);
error IMitosisVault__InsufficientBalance(address asset, uint256 amount);
error IMitosisVault__AssetNotInitialized(address asset);
error IMitosisVault__AssetAlreadyInitialized(address asset);
//=========== NOTE: View functions ===========//
function isAssetInitialized(address asset) external view returns (bool);
function entrypoint() external view returns (address);
function quoteDeposit(address asset, address to, uint256 amount) external view returns (uint256);
//=========== NOTE: Asset ===========//
/// @dev Hyperlane message receiver
function initializeAsset(address asset) external;
/// @dev Hyperlane message sender
function deposit(address asset, address to, uint256 amount) external payable;
/// @dev Hyperlane message receiver
function withdraw(address asset, address to, uint256 amount) external;
//=========== NOTE: OWNABLE FUNCTIONS ===========//
function setEntrypoint(address entrypoint) external;
}// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.28;
import { IERC20 } from '@oz/token/ERC20/IERC20.sol';
import { IMitosisVault } from '../IMitosisVault.sol';
interface IStrategyExecutor {
//=========== NOTE: EVENT DEFINITIONS ===========//
event TallySet(address indexed implementation);
event StrategistSet(address indexed strategist);
event ExecutorSet(address indexed executor);
function execute(address target, bytes calldata data, uint256 value) external payable returns (bytes memory result);
function execute(address[] calldata targets, bytes[] calldata data, uint256[] calldata values)
external
payable
returns (bytes[] memory results);
}// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.28;
import { IERC20 } from '@oz/token/ERC20/IERC20.sol';
import { IMitosisVault } from '../IMitosisVault.sol';
import { IStrategyExecutor } from './IStrategyExecutor.sol';
import { ITally } from './tally/ITally.sol';
interface IVLFStrategyExecutor is IStrategyExecutor {
error IVLFStrategyExecutor__TallyTotalBalanceNotZero(address implementation);
error IVLFStrategyExecutor__TallyAlreadySet(address implementation);
error IVLFStrategyExecutor__StrategistNotSet();
error IVLFStrategyExecutor__ExecutorNotSet();
function vault() external view returns (IMitosisVault);
function asset() external view returns (IERC20);
function hubVLFVault() external view returns (address);
function strategist() external view returns (address);
function executor() external view returns (address);
function tally() external view returns (ITally);
function totalBalance() external view returns (uint256);
function storedTotalBalance() external view returns (uint256);
function quoteDeallocateLiquidity(uint256 amount) external view returns (uint256);
function quoteSettleYield(uint256 amount) external view returns (uint256);
function quoteSettleLoss(uint256 amount) external view returns (uint256);
function quoteSettleExtraRewards(address reward, uint256 amount) external view returns (uint256);
function deallocateLiquidity(uint256 amount) external payable;
function fetchLiquidity(uint256 amount) external;
function returnLiquidity(uint256 amount) external;
function settle() external payable;
function settleExtraRewards(address reward, uint256 amount) external payable;
function setTally(address implementation) external;
function setStrategist(address strategist_) external;
function setExecutor(address executor_) external;
function unsetStrategist() external;
function unsetExecutor() external;
}// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.28;
interface ITally {
function totalBalance(bytes memory context) external view returns (uint256 totalBalance_);
function withdrawableBalance(bytes memory context) external view returns (uint256 withdrawableBalance_);
function pendingDepositBalance(bytes memory context) external view returns (uint256 pendingDepositBalance_);
function pendingWithdrawBalance(bytes memory context) external view returns (uint256 pendingWithdrawBalance_);
}// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.28;
library StdError {
error Halted();
error Unauthorized();
error NotFound(string description);
error NotImplemented();
error NotSupported();
error InvalidId(string description);
error InvalidAddress(string description);
error InvalidParameter(string description);
error ZeroAmount();
error ZeroAddress(string description);
error EnumOutOfBounds(uint8 max, uint8 actual);
}// SPDX-License-Identifier: Apache-2.0
// THIS IS GENERATED FILE. DO NOT EDIT.
pragma solidity ^0.8.28;
import { IVersioned } from '../interfaces/lib/IVersioned.sol';
contract Versioned is IVersioned {
string public constant GIT_TAG = 'v1.1.0';
string public constant GIT_COMMIT = '4f6a15a0854cb1db34ba7ccc11aa61e1f7c13bac';
}// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.28;
import { IERC20 } from '@oz/token/ERC20/utils/SafeERC20.sol';
import { IMitosisVault } from '../../interfaces/branch/IMitosisVault.sol';
import { ITally } from '../../interfaces/branch/strategy/tally/ITally.sol';
import { ERC7201Utils } from '../../lib/ERC7201Utils.sol';
abstract contract VLFStrategyExecutorStorageV1 {
using ERC7201Utils for string;
struct StorageV1 {
IMitosisVault vault;
IERC20 asset;
address hubVLFVault;
address strategist;
address executor;
uint256 storedTotalBalance;
ITally tally;
}
string private constant _NAMESPACE = 'mitosis.storage.VLFStrategyExecutorStorage.v1';
bytes32 private immutable _slot = _NAMESPACE.storageSlot();
function _getStorageV1() internal view returns (StorageV1 storage $) {
bytes32 slot = _slot;
// slither-disable-next-line assembly
assembly {
$.slot := slot
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)
pragma solidity ^0.8.20;
import {IERC20} from "./IERC20.sol";
import {IERC165} from "./IERC165.sol";
/**
* @title IERC1363
* @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].
*
* Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
* after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.
*/
interface IERC1363 is IERC20, IERC165 {
/*
* Note: the ERC-165 identifier for this interface is 0xb0202a11.
* 0xb0202a11 ===
* bytes4(keccak256('transferAndCall(address,uint256)')) ^
* bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
* bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
* bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^
* bytes4(keccak256('approveAndCall(address,uint256)')) ^
* bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
*/
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferAndCall(address to, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @param data Additional data with no specified format, sent in call to `to`.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param from The address which you want to send tokens from.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferFromAndCall(address from, address to, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param from The address which you want to send tokens from.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @param data Additional data with no specified format, sent in call to `to`.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function approveAndCall(address spender, uint256 value) external returns (bool);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
* @param data Additional data with no specified format, sent in call to `spender`.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol)
pragma solidity ^0.8.20;
/**
* @dev Collection of common custom errors used in multiple contracts
*
* IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.
* It is recommended to avoid relying on the error API for critical functionality.
*
* _Available since v5.1._
*/
library Errors {
/**
* @dev The ETH balance of the account is not enough to perform the operation.
*/
error InsufficientBalance(uint256 balance, uint256 needed);
/**
* @dev A call to an address target failed. The target may have reverted.
*/
error FailedCall();
/**
* @dev The deployment failed.
*/
error FailedDeployment();
/**
* @dev A necessary precompile is missing.
*/
error MissingPrecompile(address);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* The initial owner is set to the address provided by the deployer. This can
* later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
/// @custom:storage-location erc7201:openzeppelin.storage.Ownable
struct OwnableStorage {
address _owner;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;
function _getOwnableStorage() private pure returns (OwnableStorage storage $) {
assembly {
$.slot := OwnableStorageLocation
}
}
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
function __Ownable_init(address initialOwner) internal onlyInitializing {
__Ownable_init_unchained(initialOwner);
}
function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
OwnableStorage storage $ = _getOwnableStorage();
return $._owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
OwnableStorage storage $ = _getOwnableStorage();
address oldOwner = $._owner;
$._owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.20;
/**
* @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]
* ```solidity
* 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 Storage of the initializable contract.
*
* It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions
* when using with upgradeable contracts.
*
* @custom:storage-location erc7201:openzeppelin.storage.Initializable
*/
struct InitializableStorage {
/**
* @dev Indicates that the contract has been initialized.
*/
uint64 _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool _initializing;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;
/**
* @dev The contract is already initialized.
*/
error InvalidInitialization();
/**
* @dev The contract is not initializing.
*/
error NotInitializing();
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint64 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 in the context of a constructor an `initializer` may be invoked any
* number of times. This behavior in the constructor can be useful during testing and is not expected to be used in
* production.
*
* Emits an {Initialized} event.
*/
modifier initializer() {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
// Cache values to avoid duplicated sloads
bool isTopLevelCall = !$._initializing;
uint64 initialized = $._initialized;
// Allowed calls:
// - initialSetup: the contract is not in the initializing state and no previous version was
// initialized
// - construction: the contract is initialized at version 1 (no reininitialization) and the
// current contract is just being deployed
bool initialSetup = initialized == 0 && isTopLevelCall;
bool construction = initialized == 1 && address(this).code.length == 0;
if (!initialSetup && !construction) {
revert InvalidInitialization();
}
$._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 2**64 - 1 will prevent any future reinitialization.
*
* Emits an {Initialized} event.
*/
modifier reinitializer(uint64 version) {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
if ($._initializing || $._initialized >= version) {
revert InvalidInitialization();
}
$._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() {
_checkInitializing();
_;
}
/**
* @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.
*/
function _checkInitializing() internal view virtual {
if (!_isInitializing()) {
revert NotInitializing();
}
}
/**
* @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 {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
if ($._initializing) {
revert InvalidInitialization();
}
if ($._initialized != type(uint64).max) {
$._initialized = type(uint64).max;
emit Initialized(type(uint64).max);
}
}
/**
* @dev Returns the highest version that has been initialized. See {reinitializer}.
*/
function _getInitializedVersion() internal view returns (uint64) {
return _getInitializableStorage()._initialized;
}
/**
* @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
*/
function _isInitializing() internal view returns (bool) {
return _getInitializableStorage()._initializing;
}
/**
* @dev Returns a pointer to the storage namespace.
*/
// solhint-disable-next-line var-name-mixedcase
function _getInitializableStorage() private pure returns (InitializableStorage storage $) {
assembly {
$.slot := INITIALIZABLE_STORAGE
}
}
}// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.28;
enum VLFAction {
None,
FetchVLF
}
interface IMitosisVaultVLF {
//=========== NOTE: EVENT DEFINITIONS ===========//
event VLFInitialized(address hubVLFVault, address asset);
event VLFDepositedWithSupply(address indexed asset, address indexed to, address indexed hubVLFVault, uint256 amount);
event VLFAllocated(address indexed hubVLFVault, uint256 amount);
event VLFDeallocated(address indexed hubVLFVault, uint256 amount);
event VLFFetched(address indexed hubVLFVault, uint256 amount);
event VLFReturned(address indexed hubVLFVault, uint256 amount);
event VLFYieldSettled(address indexed hubVLFVault, uint256 amount);
event VLFLossSettled(address indexed hubVLFVault, uint256 amount);
event VLFExtraRewardsSettled(address indexed hubVLFVault, address indexed reward, uint256 amount);
event VLFHalted(address indexed hubVLFVault, VLFAction action);
event VLFResumed(address indexed hubVLFVault, VLFAction action);
event VLFStrategyExecutorSet(address indexed hubVLFVault, address indexed strategyExecutor);
//=========== NOTE: ERROR DEFINITIONS ===========//
error IMitosisVaultVLF__VLFNotInitialized(address hubVLFVault);
error IMitosisVaultVLF__VLFAlreadyInitialized(address hubVLFVault);
error IMitosisVaultVLF__InvalidVLF(address hubVLFVault, address asset);
error IMitosisVaultVLF__StrategyExecutorNotDrained(address hubVLFVault, address strategyExecutor);
//=========== NOTE: View functions ===========//
function isVLFInitialized(address hubVLFVault) external view returns (bool);
function availableVLF(address hubVLFVault) external view returns (uint256);
function vlfStrategyExecutor(address hubVLFVault) external view returns (address);
//=========== NOTE: QUOTE FUNCTIONS ===========//
function quoteDepositWithSupplyVLF(address asset, address to, address hubVLFVault, uint256 amount)
external
view
returns (uint256);
function quoteDeallocateVLF(address hubVLFVault, uint256 amount) external view returns (uint256);
function quoteSettleVLFYield(address hubVLFVault, uint256 amount) external view returns (uint256);
function quoteSettleVLFLoss(address hubVLFVault, uint256 amount) external view returns (uint256);
function quoteSettleVLFExtraRewards(address hubVLFVault, address reward, uint256 amount)
external
view
returns (uint256);
//=========== NOTE: Asset ===========//
function depositWithSupplyVLF(address asset, address to, address hubVLFVault, uint256 amount) external payable;
//=========== NOTE: VLF ===========//
function initializeVLF(address hubVLFVault, address asset) external;
function allocateVLF(address hubVLFVault, uint256 amount) external;
function deallocateVLF(address hubVLFVault, uint256 amount) external payable;
function fetchVLF(address hubVLFVault, uint256 amount) external;
function returnVLF(address hubVLFVault, uint256 amount) external;
function settleVLFYield(address hubVLFVault, uint256 amount) external payable;
function settleVLFLoss(address hubVLFVault, uint256 amount) external payable;
function settleVLFExtraRewards(address hubVLFVault, address reward, uint256 amount) external payable;
//=========== NOTE: Ownable ===========//
function setVLFStrategyExecutor(address hubVLFVault, address strategyExecutor) external;
}// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.28;
interface IVersioned {
function GIT_TAG() external view returns (string memory);
function GIT_COMMIT() external view returns (string memory);
}// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.28;
library ERC7201Utils {
function storageSlot(string memory namespace) internal pure returns (bytes32 slot) {
/// @solidity memory-safe-assembly
assembly {
mstore(0x00, sub(keccak256(add(namespace, 0x20), mload(namespace)), 1))
slot := and(keccak256(0x00, 0x20), not(0xff))
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../token/ERC20/IERC20.sol";// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)
pragma solidity ^0.8.20;
import {IERC165} from "../utils/introspection/IERC165.sol";// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
import {Initializable} from "../proxy/utils/Initializable.sol";
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract ContextUpgradeable is Initializable {
function __Context_init() internal onlyInitializing {
}
function __Context_init_unchained() internal onlyInitializing {
}
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC-165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[ERC].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}{
"remappings": [
"@elliptic-curve-solidity/=dependencies/@elliptic-curve-solidity-0.2.5/",
"@hpl/=node_modules/@hyperlane-xyz/core/contracts/",
"@mito-expedition/=dependencies/mito-expedition-0.0.3/src/",
"@mito-mainnet/=dependencies/mitosis-1.1.0/",
"@mito-tracle/=dependencies/mito-tracle-0.0.1/src/",
"@mito-utils/=dependencies/mito-utils-0.0.1/src/",
"@oz/=dependencies/@openzeppelin-contracts-5.2.0/",
"@ozu/=dependencies/@openzeppelin-contracts-upgradeable-5.2.0/",
"@solady/=dependencies/solady-0.1.21/src/",
"@solmate/=dependencies/solmate-6.8.0/src/",
"@std/=dependencies/forge-std-1.9.6/src/",
"@oz-v4/=dependencies/mito-expedition-0.0.3/dependencies/@openzeppelin-contracts-4.9.6/",
"@ozu-v4/=dependencies/mito-expedition-0.0.3/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/",
"@openzeppelin/contracts-upgradeable/=dependencies/@openzeppelin-contracts-upgradeable-5.2.0/",
"@openzeppelin/contracts/=dependencies/@openzeppelin-contracts-5.2.0/",
"dependencies/mito-expedition-0.0.3:@hpl-v3/=dependencies/mito-expedition-0.0.3/dependencies/@hpl-3.0.0/contracts/",
"dependencies/mito-expedition-0.0.3:@oz-v4/=dependencies/mito-expedition-0.0.3/dependencies/@openzeppelin-contracts-4.9.6/",
"dependencies/mito-expedition-0.0.3:@ozu-v4/=dependencies/mito-expedition-0.0.3/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/",
"node_modules/@hyperlane-xyz/core:@openzeppelin/=node_modules/@openzeppelin/",
"@arbitrum/=node_modules/@arbitrum/",
"@chainlink/=node_modules/@chainlink/",
"@elliptic-curve-solidity-0.2.5/=dependencies/@elliptic-curve-solidity-0.2.5/",
"@eth-optimism/=node_modules/@eth-optimism/",
"@hpl-v3/=dependencies/mito-expedition-0.0.3/dependencies/@hpl-3.0.0/contracts/",
"@hyperlane-xyz/=node_modules/@hyperlane-xyz/",
"@layerzerolabs/=node_modules/@layerzerolabs/",
"@mito/=dependencies/mito-utils-0.0.1/dependencies/mitosis-1.0.1/",
"@murky-0.0.1/=dependencies/mitosis-1.1.0/dependencies/@murky-0.0.1/",
"@murky/=dependencies/mitosis-1.1.0/dependencies/@murky-0.0.1/src/",
"@offchainlabs/=node_modules/@offchainlabs/",
"@openzeppelin-contracts-5.2.0/=dependencies/@openzeppelin-contracts-5.2.0/",
"@openzeppelin-contracts-upgradeable-5.2.0/=dependencies/@openzeppelin-contracts-upgradeable-5.2.0/",
"@scroll-tech/=node_modules/@scroll-tech/",
"@zksync/=node_modules/@zksync/",
"forge-std-1.9.6/=dependencies/forge-std-1.9.6/src/",
"forge-std/=dependencies/solady-0.1.21/test/utils/forge-std/",
"fx-portal/=node_modules/fx-portal/",
"mito-expedition-0.0.3/=dependencies/mito-expedition-0.0.3/src/",
"mito-tracle-0.0.1/=dependencies/mito-tracle-0.0.1/src/",
"mito-utils-0.0.1/=dependencies/mito-utils-0.0.1/src/",
"mitosis-1.1.0/=dependencies/mitosis-1.1.0/",
"proxy/=dependencies/mitosis-1.1.0/lib/proxy/",
"solady-0.1.12/=dependencies/mitosis-1.1.0/dependencies/solady-0.1.12/",
"solady-0.1.21/=dependencies/solady-0.1.21/src/",
"solady/=node_modules/solady/",
"solmate-6.8.0/=dependencies/solmate-6.8.0/src/",
"dependencies/@openzeppelin-contracts-upgradeable-5.1.0:@openzeppelin/contracts/=dependencies/mitosis-1.1.0/dependencies/@openzeppelin-contracts-5.1.0/"
],
"optimizer": {
"enabled": true,
"runs": 150
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "cancun",
"viaIR": false
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[],"name":"FailedCall","type":"error"},{"inputs":[],"name":"IVLFStrategyExecutor__ExecutorNotSet","type":"error"},{"inputs":[],"name":"IVLFStrategyExecutor__StrategistNotSet","type":"error"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"IVLFStrategyExecutor__TallyAlreadySet","type":"error"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"IVLFStrategyExecutor__TallyTotalBalanceNotZero","type":"error"},{"inputs":[{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"InsufficientBalance","type":"error"},{"inputs":[{"internalType":"string","name":"description","type":"string"}],"name":"InvalidAddress","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[{"internalType":"string","name":"description","type":"string"}],"name":"InvalidParameter","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[],"name":"NotSupported","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"inputs":[],"name":"ZeroAmount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"executor","type":"address"}],"name":"ExecutorSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"strategist","type":"address"}],"name":"StrategistSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"TallySet","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"GIT_COMMIT","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GIT_TAG","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"asset","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deallocateLiquidity","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"bytes[]","name":"data","type":"bytes[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"execute","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"execute","outputs":[{"internalType":"bytes","name":"result","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"executor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"fetchLiquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"hubVLFVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IMitosisVault","name":"vault_","type":"address"},{"internalType":"contract IERC20","name":"asset_","type":"address"},{"internalType":"address","name":"hubVLFVault_","type":"address"},{"internalType":"address","name":"owner_","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"quoteDeallocateLiquidity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"reward","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"quoteSettleExtraRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"quoteSettleLoss","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"quoteSettleYield","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"returnLiquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"executor_","type":"address"}],"name":"setExecutor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"strategist_","type":"address"}],"name":"setStrategist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"setTally","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"settle","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"reward","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"settleExtraRewards","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"storedTotalBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"strategist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tally","outputs":[{"internalType":"contract ITally","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unsetExecutor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unsetStrategist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"contract IMitosisVault","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
610100604052602d60a081815261002d9161243960c03980516020918201205f19015f9081522060ff191690565b60805234801561003b575f5ffd5b5060015f5561004861004d565b6100ff565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161561009d5760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146100fc5780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516123226101175f395f61056601526123225ff3fe6080604052600436106101e6575f3560e01c8063947fe81211610101578063d971b38a11610094578063f2fde38b11610063578063f2fde38b146104f3578063f8c8765e14610512578063fbfa77cf14610531578063fe370871146105455761020b565b8063d971b38a14610498578063e30c3978146104b7578063e3ab10cb146104cb578063e9f5bcfd146104df5761020b565b8063b8a15e3a116100d0578063b8a15e3a14610432578063c34c08e514610446578063c7b9d5301461045a578063d3785a81146104795761020b565b8063947fe812146103ad578063a04a0908146103cd578063ad7a672f146103ed578063b175eb4d146104015761020b565b80634410462711610179578063715018a611610148578063715018a61461035e57806379ba5097146103725780638da5cb5b146103865780638e0ad2b01461039a5761020b565b8063441046271461030457806345cbdf85146103235780634d7ce0f81461033757806350dcefc51461034a5761020b565b8063244c1148116101b5578063244c11481461029e5780632ad541e0146102bd57806338d52e0f146102dc578063410673e5146102f05761020b565b80630f95e8ec1461022457806311da60b4146102565780631c3c0ea81461025e5780631fe4a6861461027d5761020b565b3661020b576102096101f6610564565b600301546001600160a01b031634610588565b005b604051630280e1e560e61b815260040160405180910390fd5b34801561022f575f5ffd5b5061024361023e366004611ee6565b61061f565b6040519081526020015b60405180910390f35b610209610702565b348015610269575f5ffd5b50610209610278366004611f10565b610895565b348015610288575f5ffd5b50610291610934565b60405161024d9190611f2b565b3480156102a9575f5ffd5b506102436102b8366004611f3f565b61094f565b3480156102c8575f5ffd5b506102096102d7366004611f10565b610a28565b3480156102e7575f5ffd5b50610291610b14565b3480156102fb575f5ffd5b50610291610b2f565b34801561030f575f5ffd5b5061020961031e366004611f3f565b610b4a565b34801561032e575f5ffd5b50610291610c7f565b610209610345366004611ee6565b610c9a565b348015610355575f5ffd5b50610243610e09565b348015610369575f5ffd5b50610209610e1b565b34801561037d575f5ffd5b50610209610e2c565b348015610391575f5ffd5b50610291610e6b565b6102096103a8366004611f3f565b610e9f565b6103c06103bb366004611f9d565b610f9c565b60405161024d9190612067565b6103e06103db3660046120ca565b6111a5565b60405161024d919061214f565b3480156103f8575f5ffd5b50610243611282565b34801561040c575f5ffd5b506103e060405180604001604052806006815260200165076312e312e360d41b81525081565b34801561043d575f5ffd5b506103e0611298565b348015610451575f5ffd5b506102916112b4565b348015610465575f5ffd5b50610209610474366004611f10565b6112cf565b348015610484575f5ffd5b50610243610493366004611f3f565b611370565b3480156104a3575f5ffd5b506102096104b2366004611f3f565b611403565b3480156104c2575f5ffd5b50610291611511565b3480156104d6575f5ffd5b50610209611526565b3480156104ea575f5ffd5b50610209611584565b3480156104fe575f5ffd5b5061020961050d366004611f10565b6115e2565b34801561051d575f5ffd5b5061020961052c366004612161565b611654565b34801561053c575f5ffd5b506102916117b4565b348015610550575f5ffd5b5061024361055f366004611f3f565b6117cc565b7f000000000000000000000000000000000000000000000000000000000000000090565b804710156105b75760405163cf47918160e01b8152476004820152602481018290526044015b60405180910390fd5b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114610601576040519150601f19603f3d011682016040523d82523d5f602084013e610606565b606091505b509150915081610619576106198161185f565b50505050565b5f5f610629610564565b6040805160e08101825282546001600160a01b039081168083526001850154821660208401526002850154821683850181905260038601548316606085015260048087015484166080860152600587015460a0860152600690960154831660c0850152935163bf779f1d60e01b815294850193909352871660248401526044830186905292509063bf779f1d90606401602060405180830381865afa1580156106d4573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106f891906121ba565b9150505b92915050565b61070a611888565b5f610713610564565b6040805160e08101825282546001600160a01b0390811682526001840154811660208301526002840154811692820192909252600383015482166060820152600483015482166080820152600583015460a0820152600683015490911660c0820152909150610781906118b0565b5f61078b82611908565b6005830180549082905590915080821061081557825460028401546001600160a01b039182169163f8688b16913491166107c585876121e5565b6040518463ffffffff1660e01b81526004016107e29291906121f8565b5f604051808303818588803b1580156107f9575f5ffd5b505af115801561080b573d5f5f3e3d5ffd5b5050505050610887565b825460028401546001600160a01b039182169163f25582fd9134911661083b86866121e5565b6040518463ffffffff1660e01b81526004016108589291906121f8565b5f604051808303818588803b15801561086f575f5ffd5b505af1158015610881573d5f5f3e3d5ffd5b50505050505b50505061089360015f55565b565b61089d61198d565b6001600160a01b0381166108df57604051630b0f5aa160e11b815260206004820152600860248201526732bc32b1baba37b960c11b60448201526064016105ae565b806108e8610564565b60040180546001600160a01b0319166001600160a01b03928316179055604051908216907f3e3c5e6d5b512eaa5d5a80669846cfbaf8bde70fc6f7a3be9828cffc9ba5f1db905f90a250565b5f61093d610564565b600301546001600160a01b0316919050565b5f5f610959610564565b6040805160e08101825282546001600160a01b039081168083526001850154821660208401526002850154821683850181905260038601548316606085015260048087015484166080860152600587015460a086015260069096015490921660c0840152925163d86f0de360e01b8152919450919263d86f0de3926109e29290918891016121f8565b602060405180830381865afa1580156109fd573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a2191906121ba565b9392505050565b610a3061198d565b5f816001600160a01b03163b11610a7b57604051630b0f5aa160e11b815260206004820152600e60248201526d34b6b83632b6b2b73a30ba34b7b760911b60448201526064016105ae565b5f610a84610564565b60068101549091506001600160a01b03161580610aa75750610aa5816119bf565b155b8290610ac757604051634df1792160e11b81526004016105ae9190611f2b565b506006810180546001600160a01b0319166001600160a01b0384169081179091556040517f55f72387e1b5744b5cf2b30b22ecd58541ba16e5ad53759cb4305131b61c31e5905f90a25050565b5f610b1d610564565b600101546001600160a01b0316919050565b5f610b38610564565b600601546001600160a01b0316919050565b5f8111610b6a57604051631f2a200560e01b815260040160405180910390fd5b5f610b73610564565b6040805160e08101825282546001600160a01b0390811682526001840154811660208301526002840154811692820192909252600383015482166060820152600483015482166080820152600583015460a0820152600683015490911660c0820152909150610be1906118b0565b80546001820154610bff916001600160a01b03918216911684611b2b565b805460028201546040516350b99f5d60e01b81526001600160a01b03928316926350b99f5d92610c369291169086906004016121f8565b5f604051808303815f87803b158015610c4d575f5ffd5b505af1158015610c5f573d5f5f3e3d5ffd5b5050505081816005015f828254610c7691906121e5565b90915550505050565b5f610c88610564565b600201546001600160a01b0316919050565b5f8111610cba57604051631f2a200560e01b815260040160405180910390fd5b5f610cc3610564565b6040805160e08101825282546001600160a01b0390811682526001840154811660208301526002840154811692820192909252600383015482166060820152600483015482166080820152600583015460a08201526006909201541660c08201529050610d2f816118b0565b80602001516001600160a01b0316836001600160a01b031603610d7e57604051630b0f5aa160e11b81526020600482015260066024820152651c995dd85c9960d21b60448201526064016105ae565b8051610d95906001600160a01b0385169084611b2b565b805160408083015190516359fd2f8960e01b81526001600160a01b0391821660048201528582166024820152604481018590529116906359fd2f899034906064015f604051808303818588803b158015610ded575f5ffd5b505af1158015610dff573d5f5f3e3d5ffd5b5050505050505050565b5f610e12610564565b60050154905090565b610e2361198d565b6108935f611bed565b3380610e36611511565b6001600160a01b031614610e5f578060405163118cdaa760e01b81526004016105ae9190611f2b565b610e6881611bed565b50565b5f807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b5f8111610ebf57604051631f2a200560e01b815260040160405180910390fd5b5f610ec8610564565b6040805160e08101825282546001600160a01b0390811682526001840154811660208301526002840154811692820192909252600383015482166060820152600483015482166080820152600583015460a08201526006909201541660c08201529050610f34816118b0565b805f01516001600160a01b031663f4164f01348360400151856040518463ffffffff1660e01b8152600401610f6a9291906121f8565b5f604051808303818588803b158015610f81575f5ffd5b505af1158015610f93573d5f5f3e3d5ffd5b50505050505050565b6060610fa6611888565b8584148015610fb457508382145b610fef576040516305519d6f60e51b815260206004820152600b60248201526a657865637574654461746160a81b60448201526064016105ae565b5f610ff8610564565b6040805160e08101825282546001600160a01b0390811682526001840154811660208301526002840154811692820192909252600383015482166060820152600483015482166080820152600583015460a08201526006909201541660c0820152905061106481611c12565b86806001600160401b0381111561107d5761107d612211565b6040519080825280602002602001820160405280156110b057816020015b606081526020019060019003908161109b5790505b5092505f5b8181101561118f5761116a8888838181106110d2576110d2612225565b90506020028101906110e49190612239565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508a925089915085905081811061112c5761112c612225565b905060200201358c8c8581811061114557611145612225565b905060200201602081019061115a9190611f10565b6001600160a01b03169190611c3e565b84828151811061117c5761117c612225565b60209081029190910101526001016110b5565b50505061119b60015f55565b9695505050505050565b60606111af611888565b5f6111b8610564565b6040805160e08101825282546001600160a01b0390811682526001840154811660208301526002840154811692820192909252600383015482166060820152600483015482166080820152600583015460a08201526006909201541660c0820152905061122481611c12565b61126e85858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525050506001600160a01b03891691905085611c3e565b91505061127a60015f55565b949350505050565b5f61129361128e610564565b611908565b905090565b6040518060600160405280602881526020016122c56028913981565b5f6112bd610564565b600401546001600160a01b0316919050565b6112d761198d565b6001600160a01b03811661131b57604051630b0f5aa160e11b815260206004820152600a6024820152691cdd1c985d1959da5cdd60b21b60448201526064016105ae565b80611324610564565b60030180546001600160a01b0319166001600160a01b03928316179055604051908216907f276625620b877c2ddc0a05d68b81971639085fa26d23dfa86eec6460e6fac5b9905f90a250565b5f5f61137a610564565b6040805160e08101825282546001600160a01b039081168083526001850154821660208401526002850154821683850181905260038601548316606085015260048087015484166080860152600587015460a086015260069096015490921660c0840152925163605873bb60e11b8152919450919263c0b0e776926109e29290918891016121f8565b5f811161142357604051631f2a200560e01b815260040160405180910390fd5b5f61142c610564565b6040805160e08101825282546001600160a01b0390811682526001840154811660208301526002840154811692820192909252600383015482166060820152600483015482166080820152600583015460a0820152600683015490911660c082015290915061149a906118b0565b8054600282015460405163417d834d60e11b81526001600160a01b03928316926382fb069a926114d19291169086906004016121f8565b5f604051808303815f87803b1580156114e8575f5ffd5b505af11580156114fa573d5f5f3e3d5ffd5b5050505081816005015f828254610c76919061227b565b5f805f5160206122a55f395f51905f52610e8f565b61152e61198d565b5f611537610564565b60040180546001600160a01b0319166001600160a01b03929092169190911790556040515f907f3e3c5e6d5b512eaa5d5a80669846cfbaf8bde70fc6f7a3be9828cffc9ba5f1db908290a2565b61158c61198d565b5f611595610564565b60030180546001600160a01b0319166001600160a01b03929092169190911790556040515f907f276625620b877c2ddc0a05d68b81971639085fa26d23dfa86eec6460e6fac5b9908290a2565b6115ea61198d565b5f5160206122a55f395f51905f5280546001600160a01b0319166001600160a01b038316908117825561161b610e6b565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b03165f811580156116985750825b90505f826001600160401b031660011480156116b35750303b155b9050811580156116c1575080155b156116df5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561170957845460ff60401b1916600160401b1785555b611711611cd4565b61171a86611cdc565b5f611723610564565b80546001600160a01b03808d166001600160a01b03199283161783556001830180548d831690841617905560029092018054928b16929091169190911790555083156117a957845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050565b5f6117bd610564565b546001600160a01b0316919050565b5f5f6117d6610564565b6040805160e08101825282546001600160a01b039081168083526001850154821660208401526002850154821683850181905260038601548316606085015260048087015484166080860152600587015460a086015260069096015490921660c0840152925163b83fd9ff60e01b8152919450919263b83fd9ff926109e29290918891016121f8565b80511561186f5780518082602001fd5b60405163d6bda27560e01b815260040160405180910390fd5b60025f54036118aa57604051633ee5aeb560e01b815260040160405180910390fd5b60025f55565b60608101516001600160a01b0381166118dc5760405163e2823bc360e01b815260040160405180910390fd5b336001600160a01b03821614611904576040516282b42960e81b815260040160405180910390fd5b5050565b5f611912826119bf565b60018301546040516370a0823160e01b81526001600160a01b03909116906370a0823190611944903090600401611f2b565b602060405180830381865afa15801561195f573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061198391906121ba565b6106fc919061227b565b33611996610e6b565b6001600160a01b031614610893573360405163118cdaa760e01b81526004016105ae9190611f2b565b6006810154604051631290215d60e31b81525f916060916001600160a01b03909116906394810ae8906119f690849060040161214f565b602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a3591906121ba565b600684015460405163f49ff4ed60e01b81526001600160a01b039091169063f49ff4ed90611a6790859060040161214f565b602060405180830381865afa158015611a82573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611aa691906121ba565b600685015460405163241bd61f60e01b81526001600160a01b039091169063241bd61f90611ad890869060040161214f565b602060405180830381865afa158015611af3573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b1791906121ba565b611b21919061227b565b610a21919061227b565b5f836001600160a01b031663095ea7b38484604051602401611b4e9291906121f8565b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050509050611b878482611ced565b61061957611be384856001600160a01b031663095ea7b3865f604051602401611bb19291906121f8565b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050611d32565b6106198482611d32565b5f5160206122a55f395f51905f5280546001600160a01b031916815561190482611d95565b60808101516001600160a01b0381166118dc57604051639b719d8f60e01b815260040160405180910390fd5b606081471015611c6a5760405163cf47918160e01b8152476004820152602481018390526044016105ae565b5f5f856001600160a01b03168486604051611c85919061228e565b5f6040518083038185875af1925050503d805f8114611cbf576040519150601f19603f3d011682016040523d82523d5f602084013e611cc4565b606091505b509150915061119b868383611e05565b610893611e58565b611ce4611e58565b610e6881611ea1565b5f5f5f5f60205f8651602088015f8a5af192503d91505f51905082801561119b57508115611d1e578060011461119b565b50505050506001600160a01b03163b151590565b5f5f60205f8451602086015f885af180611d51576040513d5f823e3d81fd5b50505f513d91508115611d68578060011415611d75565b6001600160a01b0384163b155b156106195783604051635274afe760e01b81526004016105ae9190611f2b565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b606082611e1a57611e158261185f565b610a21565b8151158015611e3157506001600160a01b0384163b155b15611e515783604051639996b31560e01b81526004016105ae9190611f2b565b5080610a21565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661089357604051631afcd79f60e31b815260040160405180910390fd5b611ea9611e58565b6001600160a01b038116610e5f575f604051631e4fbdf760e01b81526004016105ae9190611f2b565b6001600160a01b0381168114610e68575f5ffd5b5f5f60408385031215611ef7575f5ffd5b8235611f0281611ed2565b946020939093013593505050565b5f60208284031215611f20575f5ffd5b8135610a2181611ed2565b6001600160a01b0391909116815260200190565b5f60208284031215611f4f575f5ffd5b5035919050565b5f5f83601f840112611f66575f5ffd5b5081356001600160401b03811115611f7c575f5ffd5b6020830191508360208260051b8501011115611f96575f5ffd5b9250929050565b5f5f5f5f5f5f60608789031215611fb2575f5ffd5b86356001600160401b03811115611fc7575f5ffd5b611fd389828a01611f56565b90975095505060208701356001600160401b03811115611ff1575f5ffd5b611ffd89828a01611f56565b90955093505060408701356001600160401b0381111561201b575f5ffd5b61202789828a01611f56565b979a9699509497509295939492505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b828110156120be57603f198786030184526120a9858351612039565b9450602093840193919091019060010161208d565b50929695505050505050565b5f5f5f5f606085870312156120dd575f5ffd5b84356120e881611ed2565b935060208501356001600160401b03811115612102575f5ffd5b8501601f81018713612112575f5ffd5b80356001600160401b03811115612127575f5ffd5b876020828401011115612138575f5ffd5b949760209190910196509394604001359392505050565b602081525f610a216020830184612039565b5f5f5f5f60808587031215612174575f5ffd5b843561217f81611ed2565b9350602085013561218f81611ed2565b9250604085013561219f81611ed2565b915060608501356121af81611ed2565b939692955090935050565b5f602082840312156121ca575f5ffd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156106fc576106fc6121d1565b6001600160a01b03929092168252602082015260400190565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b5f5f8335601e1984360301811261224e575f5ffd5b8301803591506001600160401b03821115612267575f5ffd5b602001915036819003821315611f96575f5ffd5b808201808211156106fc576106fc6121d1565b5f82518060208501845e5f92019182525091905056fe237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0034663661313561303835346362316462333462613763636331316161363165316637633133626163a26469706673582212203b8730f597a6fcdc7a524d6e2931e3c2aadf0f2649475a1ce75ae18a104f831d64736f6c634300081e00336d69746f7369732e73746f726167652e564c4653747261746567794578656375746f7253746f726167652e7631
Deployed Bytecode
0x6080604052600436106101e6575f3560e01c8063947fe81211610101578063d971b38a11610094578063f2fde38b11610063578063f2fde38b146104f3578063f8c8765e14610512578063fbfa77cf14610531578063fe370871146105455761020b565b8063d971b38a14610498578063e30c3978146104b7578063e3ab10cb146104cb578063e9f5bcfd146104df5761020b565b8063b8a15e3a116100d0578063b8a15e3a14610432578063c34c08e514610446578063c7b9d5301461045a578063d3785a81146104795761020b565b8063947fe812146103ad578063a04a0908146103cd578063ad7a672f146103ed578063b175eb4d146104015761020b565b80634410462711610179578063715018a611610148578063715018a61461035e57806379ba5097146103725780638da5cb5b146103865780638e0ad2b01461039a5761020b565b8063441046271461030457806345cbdf85146103235780634d7ce0f81461033757806350dcefc51461034a5761020b565b8063244c1148116101b5578063244c11481461029e5780632ad541e0146102bd57806338d52e0f146102dc578063410673e5146102f05761020b565b80630f95e8ec1461022457806311da60b4146102565780631c3c0ea81461025e5780631fe4a6861461027d5761020b565b3661020b576102096101f6610564565b600301546001600160a01b031634610588565b005b604051630280e1e560e61b815260040160405180910390fd5b34801561022f575f5ffd5b5061024361023e366004611ee6565b61061f565b6040519081526020015b60405180910390f35b610209610702565b348015610269575f5ffd5b50610209610278366004611f10565b610895565b348015610288575f5ffd5b50610291610934565b60405161024d9190611f2b565b3480156102a9575f5ffd5b506102436102b8366004611f3f565b61094f565b3480156102c8575f5ffd5b506102096102d7366004611f10565b610a28565b3480156102e7575f5ffd5b50610291610b14565b3480156102fb575f5ffd5b50610291610b2f565b34801561030f575f5ffd5b5061020961031e366004611f3f565b610b4a565b34801561032e575f5ffd5b50610291610c7f565b610209610345366004611ee6565b610c9a565b348015610355575f5ffd5b50610243610e09565b348015610369575f5ffd5b50610209610e1b565b34801561037d575f5ffd5b50610209610e2c565b348015610391575f5ffd5b50610291610e6b565b6102096103a8366004611f3f565b610e9f565b6103c06103bb366004611f9d565b610f9c565b60405161024d9190612067565b6103e06103db3660046120ca565b6111a5565b60405161024d919061214f565b3480156103f8575f5ffd5b50610243611282565b34801561040c575f5ffd5b506103e060405180604001604052806006815260200165076312e312e360d41b81525081565b34801561043d575f5ffd5b506103e0611298565b348015610451575f5ffd5b506102916112b4565b348015610465575f5ffd5b50610209610474366004611f10565b6112cf565b348015610484575f5ffd5b50610243610493366004611f3f565b611370565b3480156104a3575f5ffd5b506102096104b2366004611f3f565b611403565b3480156104c2575f5ffd5b50610291611511565b3480156104d6575f5ffd5b50610209611526565b3480156104ea575f5ffd5b50610209611584565b3480156104fe575f5ffd5b5061020961050d366004611f10565b6115e2565b34801561051d575f5ffd5b5061020961052c366004612161565b611654565b34801561053c575f5ffd5b506102916117b4565b348015610550575f5ffd5b5061024361055f366004611f3f565b6117cc565b7f3c7eb38505b77c777c1849fd63865c20d7b892a5ec45669ff81278612db17e0090565b804710156105b75760405163cf47918160e01b8152476004820152602481018290526044015b60405180910390fd5b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114610601576040519150601f19603f3d011682016040523d82523d5f602084013e610606565b606091505b509150915081610619576106198161185f565b50505050565b5f5f610629610564565b6040805160e08101825282546001600160a01b039081168083526001850154821660208401526002850154821683850181905260038601548316606085015260048087015484166080860152600587015460a0860152600690960154831660c0850152935163bf779f1d60e01b815294850193909352871660248401526044830186905292509063bf779f1d90606401602060405180830381865afa1580156106d4573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106f891906121ba565b9150505b92915050565b61070a611888565b5f610713610564565b6040805160e08101825282546001600160a01b0390811682526001840154811660208301526002840154811692820192909252600383015482166060820152600483015482166080820152600583015460a0820152600683015490911660c0820152909150610781906118b0565b5f61078b82611908565b6005830180549082905590915080821061081557825460028401546001600160a01b039182169163f8688b16913491166107c585876121e5565b6040518463ffffffff1660e01b81526004016107e29291906121f8565b5f604051808303818588803b1580156107f9575f5ffd5b505af115801561080b573d5f5f3e3d5ffd5b5050505050610887565b825460028401546001600160a01b039182169163f25582fd9134911661083b86866121e5565b6040518463ffffffff1660e01b81526004016108589291906121f8565b5f604051808303818588803b15801561086f575f5ffd5b505af1158015610881573d5f5f3e3d5ffd5b50505050505b50505061089360015f55565b565b61089d61198d565b6001600160a01b0381166108df57604051630b0f5aa160e11b815260206004820152600860248201526732bc32b1baba37b960c11b60448201526064016105ae565b806108e8610564565b60040180546001600160a01b0319166001600160a01b03928316179055604051908216907f3e3c5e6d5b512eaa5d5a80669846cfbaf8bde70fc6f7a3be9828cffc9ba5f1db905f90a250565b5f61093d610564565b600301546001600160a01b0316919050565b5f5f610959610564565b6040805160e08101825282546001600160a01b039081168083526001850154821660208401526002850154821683850181905260038601548316606085015260048087015484166080860152600587015460a086015260069096015490921660c0840152925163d86f0de360e01b8152919450919263d86f0de3926109e29290918891016121f8565b602060405180830381865afa1580156109fd573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a2191906121ba565b9392505050565b610a3061198d565b5f816001600160a01b03163b11610a7b57604051630b0f5aa160e11b815260206004820152600e60248201526d34b6b83632b6b2b73a30ba34b7b760911b60448201526064016105ae565b5f610a84610564565b60068101549091506001600160a01b03161580610aa75750610aa5816119bf565b155b8290610ac757604051634df1792160e11b81526004016105ae9190611f2b565b506006810180546001600160a01b0319166001600160a01b0384169081179091556040517f55f72387e1b5744b5cf2b30b22ecd58541ba16e5ad53759cb4305131b61c31e5905f90a25050565b5f610b1d610564565b600101546001600160a01b0316919050565b5f610b38610564565b600601546001600160a01b0316919050565b5f8111610b6a57604051631f2a200560e01b815260040160405180910390fd5b5f610b73610564565b6040805160e08101825282546001600160a01b0390811682526001840154811660208301526002840154811692820192909252600383015482166060820152600483015482166080820152600583015460a0820152600683015490911660c0820152909150610be1906118b0565b80546001820154610bff916001600160a01b03918216911684611b2b565b805460028201546040516350b99f5d60e01b81526001600160a01b03928316926350b99f5d92610c369291169086906004016121f8565b5f604051808303815f87803b158015610c4d575f5ffd5b505af1158015610c5f573d5f5f3e3d5ffd5b5050505081816005015f828254610c7691906121e5565b90915550505050565b5f610c88610564565b600201546001600160a01b0316919050565b5f8111610cba57604051631f2a200560e01b815260040160405180910390fd5b5f610cc3610564565b6040805160e08101825282546001600160a01b0390811682526001840154811660208301526002840154811692820192909252600383015482166060820152600483015482166080820152600583015460a08201526006909201541660c08201529050610d2f816118b0565b80602001516001600160a01b0316836001600160a01b031603610d7e57604051630b0f5aa160e11b81526020600482015260066024820152651c995dd85c9960d21b60448201526064016105ae565b8051610d95906001600160a01b0385169084611b2b565b805160408083015190516359fd2f8960e01b81526001600160a01b0391821660048201528582166024820152604481018590529116906359fd2f899034906064015f604051808303818588803b158015610ded575f5ffd5b505af1158015610dff573d5f5f3e3d5ffd5b5050505050505050565b5f610e12610564565b60050154905090565b610e2361198d565b6108935f611bed565b3380610e36611511565b6001600160a01b031614610e5f578060405163118cdaa760e01b81526004016105ae9190611f2b565b610e6881611bed565b50565b5f807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b5f8111610ebf57604051631f2a200560e01b815260040160405180910390fd5b5f610ec8610564565b6040805160e08101825282546001600160a01b0390811682526001840154811660208301526002840154811692820192909252600383015482166060820152600483015482166080820152600583015460a08201526006909201541660c08201529050610f34816118b0565b805f01516001600160a01b031663f4164f01348360400151856040518463ffffffff1660e01b8152600401610f6a9291906121f8565b5f604051808303818588803b158015610f81575f5ffd5b505af1158015610f93573d5f5f3e3d5ffd5b50505050505050565b6060610fa6611888565b8584148015610fb457508382145b610fef576040516305519d6f60e51b815260206004820152600b60248201526a657865637574654461746160a81b60448201526064016105ae565b5f610ff8610564565b6040805160e08101825282546001600160a01b0390811682526001840154811660208301526002840154811692820192909252600383015482166060820152600483015482166080820152600583015460a08201526006909201541660c0820152905061106481611c12565b86806001600160401b0381111561107d5761107d612211565b6040519080825280602002602001820160405280156110b057816020015b606081526020019060019003908161109b5790505b5092505f5b8181101561118f5761116a8888838181106110d2576110d2612225565b90506020028101906110e49190612239565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508a925089915085905081811061112c5761112c612225565b905060200201358c8c8581811061114557611145612225565b905060200201602081019061115a9190611f10565b6001600160a01b03169190611c3e565b84828151811061117c5761117c612225565b60209081029190910101526001016110b5565b50505061119b60015f55565b9695505050505050565b60606111af611888565b5f6111b8610564565b6040805160e08101825282546001600160a01b0390811682526001840154811660208301526002840154811692820192909252600383015482166060820152600483015482166080820152600583015460a08201526006909201541660c0820152905061122481611c12565b61126e85858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525050506001600160a01b03891691905085611c3e565b91505061127a60015f55565b949350505050565b5f61129361128e610564565b611908565b905090565b6040518060600160405280602881526020016122c56028913981565b5f6112bd610564565b600401546001600160a01b0316919050565b6112d761198d565b6001600160a01b03811661131b57604051630b0f5aa160e11b815260206004820152600a6024820152691cdd1c985d1959da5cdd60b21b60448201526064016105ae565b80611324610564565b60030180546001600160a01b0319166001600160a01b03928316179055604051908216907f276625620b877c2ddc0a05d68b81971639085fa26d23dfa86eec6460e6fac5b9905f90a250565b5f5f61137a610564565b6040805160e08101825282546001600160a01b039081168083526001850154821660208401526002850154821683850181905260038601548316606085015260048087015484166080860152600587015460a086015260069096015490921660c0840152925163605873bb60e11b8152919450919263c0b0e776926109e29290918891016121f8565b5f811161142357604051631f2a200560e01b815260040160405180910390fd5b5f61142c610564565b6040805160e08101825282546001600160a01b0390811682526001840154811660208301526002840154811692820192909252600383015482166060820152600483015482166080820152600583015460a0820152600683015490911660c082015290915061149a906118b0565b8054600282015460405163417d834d60e11b81526001600160a01b03928316926382fb069a926114d19291169086906004016121f8565b5f604051808303815f87803b1580156114e8575f5ffd5b505af11580156114fa573d5f5f3e3d5ffd5b5050505081816005015f828254610c76919061227b565b5f805f5160206122a55f395f51905f52610e8f565b61152e61198d565b5f611537610564565b60040180546001600160a01b0319166001600160a01b03929092169190911790556040515f907f3e3c5e6d5b512eaa5d5a80669846cfbaf8bde70fc6f7a3be9828cffc9ba5f1db908290a2565b61158c61198d565b5f611595610564565b60030180546001600160a01b0319166001600160a01b03929092169190911790556040515f907f276625620b877c2ddc0a05d68b81971639085fa26d23dfa86eec6460e6fac5b9908290a2565b6115ea61198d565b5f5160206122a55f395f51905f5280546001600160a01b0319166001600160a01b038316908117825561161b610e6b565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b03165f811580156116985750825b90505f826001600160401b031660011480156116b35750303b155b9050811580156116c1575080155b156116df5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561170957845460ff60401b1916600160401b1785555b611711611cd4565b61171a86611cdc565b5f611723610564565b80546001600160a01b03808d166001600160a01b03199283161783556001830180548d831690841617905560029092018054928b16929091169190911790555083156117a957845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050565b5f6117bd610564565b546001600160a01b0316919050565b5f5f6117d6610564565b6040805160e08101825282546001600160a01b039081168083526001850154821660208401526002850154821683850181905260038601548316606085015260048087015484166080860152600587015460a086015260069096015490921660c0840152925163b83fd9ff60e01b8152919450919263b83fd9ff926109e29290918891016121f8565b80511561186f5780518082602001fd5b60405163d6bda27560e01b815260040160405180910390fd5b60025f54036118aa57604051633ee5aeb560e01b815260040160405180910390fd5b60025f55565b60608101516001600160a01b0381166118dc5760405163e2823bc360e01b815260040160405180910390fd5b336001600160a01b03821614611904576040516282b42960e81b815260040160405180910390fd5b5050565b5f611912826119bf565b60018301546040516370a0823160e01b81526001600160a01b03909116906370a0823190611944903090600401611f2b565b602060405180830381865afa15801561195f573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061198391906121ba565b6106fc919061227b565b33611996610e6b565b6001600160a01b031614610893573360405163118cdaa760e01b81526004016105ae9190611f2b565b6006810154604051631290215d60e31b81525f916060916001600160a01b03909116906394810ae8906119f690849060040161214f565b602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a3591906121ba565b600684015460405163f49ff4ed60e01b81526001600160a01b039091169063f49ff4ed90611a6790859060040161214f565b602060405180830381865afa158015611a82573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611aa691906121ba565b600685015460405163241bd61f60e01b81526001600160a01b039091169063241bd61f90611ad890869060040161214f565b602060405180830381865afa158015611af3573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b1791906121ba565b611b21919061227b565b610a21919061227b565b5f836001600160a01b031663095ea7b38484604051602401611b4e9291906121f8565b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050509050611b878482611ced565b61061957611be384856001600160a01b031663095ea7b3865f604051602401611bb19291906121f8565b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050611d32565b6106198482611d32565b5f5160206122a55f395f51905f5280546001600160a01b031916815561190482611d95565b60808101516001600160a01b0381166118dc57604051639b719d8f60e01b815260040160405180910390fd5b606081471015611c6a5760405163cf47918160e01b8152476004820152602481018390526044016105ae565b5f5f856001600160a01b03168486604051611c85919061228e565b5f6040518083038185875af1925050503d805f8114611cbf576040519150601f19603f3d011682016040523d82523d5f602084013e611cc4565b606091505b509150915061119b868383611e05565b610893611e58565b611ce4611e58565b610e6881611ea1565b5f5f5f5f60205f8651602088015f8a5af192503d91505f51905082801561119b57508115611d1e578060011461119b565b50505050506001600160a01b03163b151590565b5f5f60205f8451602086015f885af180611d51576040513d5f823e3d81fd5b50505f513d91508115611d68578060011415611d75565b6001600160a01b0384163b155b156106195783604051635274afe760e01b81526004016105ae9190611f2b565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b606082611e1a57611e158261185f565b610a21565b8151158015611e3157506001600160a01b0384163b155b15611e515783604051639996b31560e01b81526004016105ae9190611f2b565b5080610a21565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661089357604051631afcd79f60e31b815260040160405180910390fd5b611ea9611e58565b6001600160a01b038116610e5f575f604051631e4fbdf760e01b81526004016105ae9190611f2b565b6001600160a01b0381168114610e68575f5ffd5b5f5f60408385031215611ef7575f5ffd5b8235611f0281611ed2565b946020939093013593505050565b5f60208284031215611f20575f5ffd5b8135610a2181611ed2565b6001600160a01b0391909116815260200190565b5f60208284031215611f4f575f5ffd5b5035919050565b5f5f83601f840112611f66575f5ffd5b5081356001600160401b03811115611f7c575f5ffd5b6020830191508360208260051b8501011115611f96575f5ffd5b9250929050565b5f5f5f5f5f5f60608789031215611fb2575f5ffd5b86356001600160401b03811115611fc7575f5ffd5b611fd389828a01611f56565b90975095505060208701356001600160401b03811115611ff1575f5ffd5b611ffd89828a01611f56565b90955093505060408701356001600160401b0381111561201b575f5ffd5b61202789828a01611f56565b979a9699509497509295939492505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b828110156120be57603f198786030184526120a9858351612039565b9450602093840193919091019060010161208d565b50929695505050505050565b5f5f5f5f606085870312156120dd575f5ffd5b84356120e881611ed2565b935060208501356001600160401b03811115612102575f5ffd5b8501601f81018713612112575f5ffd5b80356001600160401b03811115612127575f5ffd5b876020828401011115612138575f5ffd5b949760209190910196509394604001359392505050565b602081525f610a216020830184612039565b5f5f5f5f60808587031215612174575f5ffd5b843561217f81611ed2565b9350602085013561218f81611ed2565b9250604085013561219f81611ed2565b915060608501356121af81611ed2565b939692955090935050565b5f602082840312156121ca575f5ffd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156106fc576106fc6121d1565b6001600160a01b03929092168252602082015260400190565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b5f5f8335601e1984360301811261224e575f5ffd5b8301803591506001600160401b03821115612267575f5ffd5b602001915036819003821315611f96575f5ffd5b808201808211156106fc576106fc6121d1565b5f82518060208501845e5f92019182525091905056fe237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0034663661313561303835346362316462333462613763636331316161363165316637633133626163a26469706673582212203b8730f597a6fcdc7a524d6e2931e3c2aadf0f2649475a1ce75ae18a104f831d64736f6c634300081e0033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
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.