Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x70bed0BA...52cf5038e The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
VaultFactory
Compiler Version
v0.8.22+commit.4fc1097e
Optimization Enabled:
Yes with 1000000 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.22;
import {
IERC165
} from "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol";
import {Clones} from "@openzeppelin/contracts/proxy/Clones.sol";
import {ISuspendable} from "contracts/interfaces/base/ISuspendable.sol";
import {IVault} from "contracts/interfaces/vault/IVault.sol";
import {
IVaultFactory,
IVaultInitializer,
IVaultInitializer
} from "contracts/interfaces/vault/IVaultFactory.sol";
import {BeaconUpgradeable} from "contracts/base/proxy/BeaconUpgradeable.sol";
import {ImmutableBeaconProxy} from "contracts/base/proxy/ImmutableBeaconProxy.sol";
contract VaultFactory is IVaultFactory, BeaconUpgradeable {
using Clones for address;
// keccak256(abi.encode(uint256(keccak256("vault.factory")) - 1)) & ~bytes32(uint256(0xff));
bytes32 internal constant STORAGE_SLOT =
0x0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b6500;
bytes32 public constant override ARKIS_RISK_OPERATOR_ROLE =
keccak256("Arkis Risk Operator Role");
modifier onlyValidVault(address vault) {
if (!_storage().vaults[vault]) revert InvalidVault(vault);
_;
}
constructor() {
_disableInitializers();
}
function initialize(address riskOperator) external override initializer {
__Ownable_init(msg.sender);
_grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
_grantRole(ARKIS_RISK_OPERATOR_ROLE, riskOperator);
}
function setImplementation(address implementation) external override whenPaused onlyOwner {
if (!IERC165(implementation).supportsInterface(type(IVault).interfaceId))
revert InvalidImplementation(implementation);
_setImplementation(implementation);
Storage storage $ = _storage();
if ($.vaultPrototype == address(0))
$.vaultPrototype = address(new ImmutableBeaconProxy(new bytes(0)));
}
function createVault(
IVaultInitializer.Metadata calldata metadata,
IVaultInitializer.LPTokenMetadata calldata lpTokenMetadata
) external override whenNotPaused onlyRole(ARKIS_RISK_OPERATOR_ROLE) returns (address vault) {
Storage storage $ = _storage();
vault = $.vaultPrototype.clone();
IVaultInitializer(vault).initialize(metadata, lpTokenMetadata);
$.vaults[vault] = true;
emit VaultCreated(vault);
}
function checkpoint(
address vault
) external override whenNotPaused onlyRole(ARKIS_RISK_OPERATOR_ROLE) onlyValidVault(vault) {
IVault(vault).checkpoint();
}
function addInvestors(
address vault,
address[] calldata investors
) external override whenNotPaused onlyRole(ARKIS_RISK_OPERATOR_ROLE) onlyValidVault(vault) {
IVault(vault).addInvestors(investors);
}
function addMarkets(
address vault,
address[] calldata markets
) external override whenNotPaused onlyRole(ARKIS_RISK_OPERATOR_ROLE) onlyValidVault(vault) {
IVault(vault).addMarkets(markets);
}
function changeCurator(
address vault,
address newCurator
) external override whenNotPaused onlyRole(ARKIS_RISK_OPERATOR_ROLE) onlyValidVault(vault) {
IVault(vault).changeCurator(newCurator);
}
function changePerformanceFee(
address vault,
uint80 newPerformanceFee
) external override whenNotPaused onlyRole(ARKIS_RISK_OPERATOR_ROLE) onlyValidVault(vault) {
IVault(vault).changePerformanceFee(newPerformanceFee);
}
function changeTotalAssetsThreshold(
address vault,
uint256 threshold
) external override whenNotPaused onlyRole(ARKIS_RISK_OPERATOR_ROLE) onlyValidVault(vault) {
IVault(vault).changeTotalAssetsThreshold(threshold);
}
function removeInvestors(
address vault,
address[] calldata investors
) external override whenNotPaused onlyRole(ARKIS_RISK_OPERATOR_ROLE) onlyValidVault(vault) {
IVault(vault).removeInvestors(investors);
}
function removeMarkets(
address vault,
address[] calldata markets
) external override whenNotPaused onlyRole(ARKIS_RISK_OPERATOR_ROLE) onlyValidVault(vault) {
IVault(vault).removeMarkets(markets);
}
function suspend(
address vault
) external override whenNotPaused onlyRole(ARKIS_RISK_OPERATOR_ROLE) onlyValidVault(vault) {
ISuspendable(vault).suspend();
}
function unsuspend(
address vault
) external override whenNotPaused onlyRole(ARKIS_RISK_OPERATOR_ROLE) onlyValidVault(vault) {
ISuspendable(vault).unsuspend();
}
function close(
address vault
) external override whenNotPaused onlyRole(ARKIS_RISK_OPERATOR_ROLE) onlyValidVault(vault) {
ISuspendable(vault).close();
}
function vaultPrototype() external view override returns (address) {
return _storage().vaultPrototype;
}
function hasVault(address vault) external view override onlyValidVault(vault) returns (bool) {
return _storage().vaults[vault];
}
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IVaultFactory).interfaceId;
}
function _storage() internal pure returns (Storage storage $) {
assembly {
$.slot := STORAGE_SLOT
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)
pragma solidity ^0.8.20;
import {IAccessControl} from "@openzeppelin/contracts/access/IAccessControl.sol";
import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol";
import {ERC165Upgradeable} from "../utils/introspection/ERC165Upgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.sol";
/**
* @dev Contract module that allows children to implement role-based access
* control mechanisms. This is a lightweight version that doesn't allow enumerating role
* members except through off-chain means by accessing the contract event logs. Some
* applications may benefit from on-chain enumerability, for those cases see
* {AccessControlEnumerable}.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```solidity
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
* Roles can be used to represent a set of permissions. To restrict access to a
* function call, use {hasRole}:
*
* ```solidity
* function foo() public {
* require(hasRole(MY_ROLE, msg.sender));
* ...
* }
* ```
*
* Roles can be granted and revoked dynamically via the {grantRole} and
* {revokeRole} functions. Each role has an associated admin role, and only
* accounts that have a role's admin role can call {grantRole} and {revokeRole}.
*
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
* that only accounts with this role will be able to grant or revoke other
* roles. More complex role relationships can be created by using
* {_setRoleAdmin}.
*
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
* grant and revoke this role. Extra precautions should be taken to secure
* accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}
* to enforce additional security measures for this role.
*/
abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControl, ERC165Upgradeable {
struct RoleData {
mapping(address account => bool) hasRole;
bytes32 adminRole;
}
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/// @custom:storage-location erc7201:openzeppelin.storage.AccessControl
struct AccessControlStorage {
mapping(bytes32 role => RoleData) _roles;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.AccessControl")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant AccessControlStorageLocation = 0x02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800;
function _getAccessControlStorage() private pure returns (AccessControlStorage storage $) {
assembly {
$.slot := AccessControlStorageLocation
}
}
/**
* @dev Modifier that checks that an account has a specific role. Reverts
* with an {AccessControlUnauthorizedAccount} error including the required role.
*/
modifier onlyRole(bytes32 role) {
_checkRole(role);
_;
}
function __AccessControl_init() internal onlyInitializing {
}
function __AccessControl_init_unchained() internal onlyInitializing {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) public view virtual returns (bool) {
AccessControlStorage storage $ = _getAccessControlStorage();
return $._roles[role].hasRole[account];
}
/**
* @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`
* is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.
*/
function _checkRole(bytes32 role) internal view virtual {
_checkRole(role, _msgSender());
}
/**
* @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`
* is missing `role`.
*/
function _checkRole(bytes32 role, address account) internal view virtual {
if (!hasRole(role, account)) {
revert AccessControlUnauthorizedAccount(account, role);
}
}
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) {
AccessControlStorage storage $ = _getAccessControlStorage();
return $._roles[role].adminRole;
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*
* May emit a {RoleGranted} event.
*/
function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
_grantRole(role, account);
}
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*
* May emit a {RoleRevoked} event.
*/
function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
_revokeRole(role, account);
}
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been revoked `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `callerConfirmation`.
*
* May emit a {RoleRevoked} event.
*/
function renounceRole(bytes32 role, address callerConfirmation) public virtual {
if (callerConfirmation != _msgSender()) {
revert AccessControlBadConfirmation();
}
_revokeRole(role, callerConfirmation);
}
/**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
AccessControlStorage storage $ = _getAccessControlStorage();
bytes32 previousAdminRole = getRoleAdmin(role);
$._roles[role].adminRole = adminRole;
emit RoleAdminChanged(role, previousAdminRole, adminRole);
}
/**
* @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.
*
* Internal function without access restriction.
*
* May emit a {RoleGranted} event.
*/
function _grantRole(bytes32 role, address account) internal virtual returns (bool) {
AccessControlStorage storage $ = _getAccessControlStorage();
if (!hasRole(role, account)) {
$._roles[role].hasRole[account] = true;
emit RoleGranted(role, account, _msgSender());
return true;
} else {
return false;
}
}
/**
* @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.
*
* Internal function without access restriction.
*
* May emit a {RoleRevoked} event.
*/
function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {
AccessControlStorage storage $ = _getAccessControlStorage();
if (hasRole(role, account)) {
$._roles[role].hasRole[account] = false;
emit RoleRevoked(role, account, _msgSender());
return true;
} else {
return false;
}
}
}// 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: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (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;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)
pragma solidity ^0.8.20;
import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import {Initializable} from "../../proxy/utils/Initializable.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*/
abstract contract ERC165Upgradeable is Initializable, IERC165 {
function __ERC165_init() internal onlyInitializing {
}
function __ERC165_init_unchained() internal onlyInitializing {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)
pragma solidity ^0.8.20;
import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.sol";
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract PausableUpgradeable is Initializable, ContextUpgradeable {
/// @custom:storage-location erc7201:openzeppelin.storage.Pausable
struct PausableStorage {
bool _paused;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Pausable")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant PausableStorageLocation = 0xcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300;
function _getPausableStorage() private pure returns (PausableStorage storage $) {
assembly {
$.slot := PausableStorageLocation
}
}
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
/**
* @dev The operation failed because the contract is paused.
*/
error EnforcedPause();
/**
* @dev The operation failed because the contract is not paused.
*/
error ExpectedPause();
/**
* @dev Initializes the contract in unpaused state.
*/
function __Pausable_init() internal onlyInitializing {
__Pausable_init_unchained();
}
function __Pausable_init_unchained() internal onlyInitializing {
PausableStorage storage $ = _getPausableStorage();
$._paused = false;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
_requireNotPaused();
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
_requirePaused();
_;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
PausableStorage storage $ = _getPausableStorage();
return $._paused;
}
/**
* @dev Throws if the contract is paused.
*/
function _requireNotPaused() internal view virtual {
if (paused()) {
revert EnforcedPause();
}
}
/**
* @dev Throws if the contract is not paused.
*/
function _requirePaused() internal view virtual {
if (!paused()) {
revert ExpectedPause();
}
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
PausableStorage storage $ = _getPausableStorage();
$._paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
PausableStorage storage $ = _getPausableStorage();
$._paused = false;
emit Unpaused(_msgSender());
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol)
pragma solidity ^0.8.20;
/**
* @dev External interface of AccessControl declared to support ERC165 detection.
*/
interface IAccessControl {
/**
* @dev The `account` is missing a role.
*/
error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);
/**
* @dev The caller of a function is not the expected one.
*
* NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
*/
error AccessControlBadConfirmation();
/**
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
*
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted signaling this.
*/
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
/**
* @dev Emitted when `account` is granted `role`.
*
* `sender` is the account that originated the contract call, an admin role
* bearer except when using {AccessControl-_setupRole}.
*/
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Emitted when `account` is revoked `role`.
*
* `sender` is the account that originated the contract call:
* - if using `revokeRole`, it is the admin role bearer
* - if using `renounceRole`, it is the role bearer (i.e. `account`)
*/
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) external view returns (bool);
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {AccessControl-_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) external view returns (bytes32);
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `callerConfirmation`.
*/
function renounceRole(bytes32 role, address callerConfirmation) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/Clones.sol)
pragma solidity ^0.8.20;
/**
* @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for
* deploying minimal proxy contracts, also known as "clones".
*
* > To simply and cheaply clone contract functionality in an immutable way, this standard specifies
* > a minimal bytecode implementation that delegates all calls to a known, fixed address.
*
* The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`
* (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the
* deterministic method.
*/
library Clones {
/**
* @dev A clone instance deployment failed.
*/
error ERC1167FailedCreateClone();
/**
* @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
*
* This function uses the create opcode, which should never revert.
*/
function clone(address implementation) internal returns (address instance) {
/// @solidity memory-safe-assembly
assembly {
// Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes
// of the `implementation` address with the bytecode before the address.
mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))
// Packs the remaining 17 bytes of `implementation` with the bytecode after the address.
mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))
instance := create(0, 0x09, 0x37)
}
if (instance == address(0)) {
revert ERC1167FailedCreateClone();
}
}
/**
* @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
*
* This function uses the create2 opcode and a `salt` to deterministically deploy
* the clone. Using the same `implementation` and `salt` multiple time will revert, since
* the clones cannot be deployed twice at the same address.
*/
function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) {
/// @solidity memory-safe-assembly
assembly {
// Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes
// of the `implementation` address with the bytecode before the address.
mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))
// Packs the remaining 17 bytes of `implementation` with the bytecode after the address.
mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))
instance := create2(0, 0x09, 0x37, salt)
}
if (instance == address(0)) {
revert ERC1167FailedCreateClone();
}
}
/**
* @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
*/
function predictDeterministicAddress(
address implementation,
bytes32 salt,
address deployer
) internal pure returns (address predicted) {
/// @solidity memory-safe-assembly
assembly {
let ptr := mload(0x40)
mstore(add(ptr, 0x38), deployer)
mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff)
mstore(add(ptr, 0x14), implementation)
mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73)
mstore(add(ptr, 0x58), salt)
mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37))
predicted := keccak256(add(ptr, 0x43), 0x55)
}
}
/**
* @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
*/
function predictDeterministicAddress(
address implementation,
bytes32 salt
) internal view returns (address predicted) {
return predictDeterministicAddress(implementation, salt, address(this));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/Proxy.sol)
pragma solidity ^0.8.20;
/**
* @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM
* instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to
* be specified by overriding the virtual {_implementation} function.
*
* Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a
* different contract through the {_delegate} function.
*
* The success and return data of the delegated call will be returned back to the caller of the proxy.
*/
abstract contract Proxy {
/**
* @dev Delegates the current call to `implementation`.
*
* This function does not return to its internal call site, it will return directly to the external caller.
*/
function _delegate(address implementation) internal virtual {
assembly {
// Copy msg.data. We take full control of memory in this inline assembly
// block because it will not return to Solidity code. We overwrite the
// Solidity scratch pad at memory position 0.
calldatacopy(0, 0, calldatasize())
// Call the implementation.
// out and outsize are 0 because we don't know the size yet.
let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)
// Copy the returned data.
returndatacopy(0, 0, returndatasize())
switch result
// delegatecall returns 0 on error.
case 0 {
revert(0, returndatasize())
}
default {
return(0, returndatasize())
}
}
}
/**
* @dev This is a virtual function that should be overridden so it returns the address to which the fallback
* function and {_fallback} should delegate.
*/
function _implementation() internal view virtual returns (address);
/**
* @dev Delegates the current call to the address returned by `_implementation()`.
*
* This function does not return to its internal call site, it will return directly to the external caller.
*/
function _fallback() internal virtual {
_delegate(_implementation());
}
/**
* @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other
* function in the contract matches the call data.
*/
fallback() external payable virtual {
_fallback();
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the 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.0.0) (utils/Address.sol)
pragma solidity ^0.8.20;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev The ETH balance of the account is not enough to perform the operation.
*/
error AddressInsufficientBalance(address account);
/**
* @dev There's no code at `target` (it is not a contract).
*/
error AddressEmptyCode(address target);
/**
* @dev A call to an address target failed. The target may have reverted.
*/
error FailedInnerCall();
/**
* @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 AddressInsufficientBalance(address(this));
}
(bool success, ) = recipient.call{value: amount}("");
if (!success) {
revert FailedInnerCall();
}
}
/**
* @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
* {FailedInnerCall} 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 AddressInsufficientBalance(address(this));
}
(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 {FailedInnerCall}) 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 {FailedInnerCall} 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 {FailedInnerCall}.
*/
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
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert FailedInnerCall();
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.22;
import {
PausableUpgradeable
} from "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol";
import {IPausable} from "contracts/interfaces/base/pauser/IPausable.sol";
abstract contract PausableBase is IPausable, PausableUpgradeable {
bytes32 public constant override PAUSER_ROLE = keccak256("Pauser Role");
modifier onlyPauserRole() {
_checkRole(PAUSER_ROLE);
_;
}
function pause() external override onlyPauserRole {
_pause();
}
function unpause() external override onlyPauserRole {
_unpause();
}
function paused() public view override(IPausable, PausableUpgradeable) returns (bool) {
return PausableUpgradeable.paused();
}
/*
* @dev Contracts inheriting from PausableBase should inherit OpenZeppelin's AccessControlUpgradeable
* override and implement _checkRole()
*/
/* solhint-disable-next-line no-empty-blocks */
function _checkRole(bytes32 role) internal view virtual {}
}// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.22;
import {
AccessControlUpgradeable
} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import {PausableBase} from "contracts/base/pauser/base/PausableBase.sol";
contract Pausable is PausableBase, AccessControlUpgradeable {
function _checkRole(
bytes32 role
) internal view override(AccessControlUpgradeable, PausableBase) {
AccessControlUpgradeable._checkRole(role);
}
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.22;
import {AlreadyUpToDate} from "contracts/interfaces/base/CommonErrors.sol";
abstract contract BeaconImplementation {
// keccak256("Implementation slot inside BeaconImplementation")
bytes32 internal constant IMPLEMENTATION_SLOT =
0x5a8947f50575ddcaa31a5721cef4bf0d765e78dbe7d7a1182efca602a9dfd034;
function _setImplementation(address newImpl) internal {
address impl;
assembly {
impl := sload(IMPLEMENTATION_SLOT)
}
if (impl == newImpl) revert AlreadyUpToDate();
assembly {
sstore(IMPLEMENTATION_SLOT, newImpl)
}
}
function _implementation() internal view returns (address impl) {
assembly {
impl := sload(IMPLEMENTATION_SLOT)
}
}
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.22;
import {
OwnableUpgradeable
} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import {IBeacon} from "contracts/interfaces/base/proxy/IBeacon.sol";
import {Pausable} from "contracts/base/pauser/Pausable.sol";
import {BeaconImplementation} from "./BeaconImplementation.sol";
abstract contract BeaconUpgradeable is IBeacon, BeaconImplementation, OwnableUpgradeable, Pausable {
/* @dev Implementation is not set in the BeaconUpgradeable,
* contracts inheriting from this contract should override and implement setImplementation()
*/
/* solhint-disable-next-line no-empty-blocks */
function setImplementation(address newImplementation) external virtual override whenPaused {}
function implementation() external view override whenNotPaused returns (address) {
return _implementation();
}
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.22;
import {Proxy} from "@openzeppelin/contracts/proxy/Proxy.sol";
import {IBeacon} from "contracts/interfaces/base/proxy/IBeacon.sol";
import {SafeCall} from "contracts/libraries/SafeCall.sol";
contract ImmutableBeaconProxy is Proxy {
using {SafeCall.safeDelegateCall} for address;
address private immutable beacon;
error BeaconCallFailed();
error BeaconReturnedUnexpectedNumberOfBytes(uint256);
error BeaconReturnedAddressZero();
constructor(bytes memory initDataWithSelector) {
beacon = msg.sender;
if (initDataWithSelector.length > 0) {
_implementation().safeDelegateCall(initDataWithSelector);
}
}
function _implementation() internal view override returns (address impl) {
(bool success, bytes memory result) = beacon.staticcall(
abi.encodeWithSelector(IBeacon.implementation.selector)
);
if (!success) revert BeaconCallFailed();
if (result.length != 32) revert BeaconReturnedUnexpectedNumberOfBytes(result.length);
impl = abi.decode(result, (address));
if (impl == address(0)) revert BeaconReturnedAddressZero();
}
}// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.22; /** * @notice An error indicating that the amount for the specified token is zero. * @param token The address of the token with a zero amount. */ error AmountMustNotBeZero(address token); /** * @notice An error indicating that an address must not be zero. */ error AddressMustNotBeZero(); /** * @notice An error indicating that an array must not be empty. */ error ArrayMustNotBeEmpty(); /** * @notice An error indicating that an string must not be empty. */ error StringMustNotBeEmpty(); /** * @notice An error indicating storage is already up to date and doesn't need further processing. * @dev This error is thrown when attempting to update an entity(s) that is(are) already up to date. */ error AlreadyUpToDate(); /** * @notice An error indicating that an action is unauthorized for the specified account. * @param account The address of the unauthorized account. */ error UnauthorizedAccount(address account); /** * @notice An error indicating that the min amount out must not be zero. */ error MinAmountOutMustNotBeZero();
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.22;
interface ISuspendable {
function suspend() external;
function unsuspend() external;
function close() external;
function suspended() external view returns (bool);
function closed() external view returns (bool);
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.22;
/**
* @dev Interface for contracts that can be paused or unpaused.
* This interface provides the methods to pause and unpause the contract
* as well as check its paused status. It also includes the definition of
* the `PAUSER_ROLE` that is required to perform the pause/unpause actions.
*/
interface IPausable {
/**
* @notice Pauses the contract.
* @dev Can only be called by an address with the `PAUSER_ROLE`.
* This function will halt any operations that are paused in the contract.
*/
function pause() external;
/**
* @notice Unpauses the contract.
* @dev Can only be called by an address with the `PAUSER_ROLE`.
* This function will resume any operations that were paused in the contract.
*/
function unpause() external;
/**
* @notice Returns whether the contract is paused.
* @return bool True if the contract is paused, false otherwise.
* @dev This function checks the contract's paused status, which is typically
* managed by an internal flag set by the `pause` and `unpause` functions.
*/
function paused() external view returns (bool);
/**
* @notice Returns the role identifier for the `PAUSER_ROLE`.
* @return bytes32 The role identifier for the `PAUSER_ROLE`.
* @dev The `PAUSER_ROLE` is required for the caller to invoke the `pause` or `unpause` functions.
*/
/* solhint-disable-next-line func-name-mixedcase */
function PAUSER_ROLE() external view returns (bytes32);
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.22;
interface IBeacon {
error InvalidImplementation(address implementation);
/**
* This upgrade will affect all Beacon Proxies that use this Beacon
* @param newImplementation New implementation to delegate calls from Beacon Proxies
*/
function setImplementation(address newImplementation) external;
/**
* Returns address of the current used by Beacon Proxies
*/
function implementation() external view returns (address);
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.22;
import {CommandLibrary} from "contracts/libraries/CommandLibrary.sol";
/**
* @title Command
* @notice Contains arguments for a low-level call.
* @dev This struct allows deferring the call's execution, suspending it by passing it to another function or contract.
* @dev `target` The address to be called.
* @dev `value` Value to send in the call.
* @dev `payload` Encoded call with function selector and arguments.
*/
struct Command {
address target;
uint256 value;
bytes payload;
}
using CommandLibrary for Command global;// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.22;
import {ISuspendable} from "contracts/interfaces/base/ISuspendable.sol";
import {IVaultInitializer} from "./IVaultInitializer.sol";
/**
* @title IVault
* @notice Interface for managing vaults, including adding/removing collateral and borrowers.
* @dev Inherits ISuspendable and IVaultInitializer.
*/
interface IVault is ISuspendable, IVaultInitializer {
/**
* @notice Emitted when the vault is initialized.
* @param leverage The address of the leverage contract.
*/
event Initialized(address leverage);
/**
* @notice Triggers a checkpoint to update the vault's state.
* @dev Can only be called by the factory contract.
*/
function checkpoint() external;
/**
* @notice Adds investors to the vault.
* @dev Can only be called by the factory contract.
* @param investors The addresses of the investors to add.
*/
function addInvestors(address[] calldata investors) external;
/**
* @notice Adds markets to the vault.
* @dev Can only be called by the factory contract.
* @param markets The addresses of the markets to add.
*/
function addMarkets(address[] calldata markets) external;
/**
* @notice Changes the curator of the vault.
* @dev Can only be called by the factory contract.
* @param newCurator The address of the new curator.
*/
function changeCurator(address newCurator) external;
/**
* @notice Changes the performance fee of the vault.
* @dev Can only be called by the factory contract.
* @param newPerformanceFee The new performance fee value.
*/
function changePerformanceFee(uint80 newPerformanceFee) external;
/**
* @notice Sets the threshold for the total amount of assets.
* @dev Can be called by authorized accounts to define the maximum allowed total assets.
* @param threshold The maximum assets threshold.
*/
function changeTotalAssetsThreshold(uint256 threshold) external;
/**
* @notice Removes investors from the vault.
* @dev Can only be called by the factory contract.
* @param investors The addresses of the investors to remove.
*/
function removeInvestors(address[] calldata investors) external;
/**
* @notice Removes markets from the vault.
* @dev Can only be called by the factory contract.
* @param markets The addresses of the markets to remove.
*/
function removeMarkets(address[] calldata markets) external;
/**
* @notice Returns the address of the current curator.
* @return The address of the curator.
*/
function curator() external view returns (address);
/**
* @notice Checks if a specific investor is associated with the vault.
* @param investor The address of the investor to check.
* @return True if the investor exists in the vault, false otherwise.
*/
function hasInvestor(address investor) external view returns (bool);
/**
* @notice Checks if a specific market is associated with the vault.
* @param market The address of the market to check.
* @return True if the market exists in the vault, false otherwise.
*/
function hasMarket(address market) external view returns (bool);
/**
* @notice Checks if the vault is private.
* @return True if the vault is private, false otherwise.
*/
function isPrivate() external view returns (bool);
/**
* @notice Returns the metadata and whitelist information of the vault.
* @return A tuple containing the [Metadata](../IVaultInitializer.sol/interface.IVaultInitializer.html#metadata) struct.
*/
function info() external view returns (Metadata memory);
/**
* @notice Returns the address of the factory contract for version tracking.
* @return The address of the factory contract.
*/
function factory() external view returns (address);
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.22;
import {IVaultFactoryInitializer} from "contracts/interfaces/vault/IVaultFactoryInitializer.sol";
import {IVaultInitializer} from "contracts/interfaces/vault/IVaultInitializer.sol";
/**
* @title IVaultFactory
* @notice Interface for the Vault Factory, responsible for creating and managing vaults.
* @dev Inherits from IVaultFactoryInitializer.
*/
interface IVaultFactory is IVaultFactoryInitializer {
struct Storage {
address vaultPrototype;
mapping(address => bool) vaults;
}
/**
* @notice Emitted when a new vault is created.
* @param vault The address of the newly created vault.
*/
event VaultCreated(address vault);
/**
* @notice Thrown when attempting to interact with an vault that does not exist in the vaults mapping.
* @dev This error is thrown when the provided vault address is not found in the vaults mapping.
* Ensures that only vaults deployed by this factory can be managed through its functions.
* @param vault The address of the vault provided.
*/
error InvalidVault(address vault);
/**
* @notice Creates a new vault with the specified metadata and whitelist.
* @param metadata The [Metadata](./IVaultInitializer.sol/interface.IVaultInitializer.html#metadata) struct containing details about the vault.
* @param lpTokenMetadata The [LPTokenMetadata](./IVaultInitializer.sol/interface.IVaultInitializer.html#lpTokenMetadata) struct containing metadata for the LP token associated with the vault.
* @return vault The address of the newly created vault.
*/
function createVault(
IVaultInitializer.Metadata calldata metadata,
IVaultInitializer.LPTokenMetadata calldata lpTokenMetadata
) external returns (address vault);
/**
* @notice Triggers a checkpoint to update the vault's state.
* @param vault The address of the vault.
*/
function checkpoint(address vault) external;
/**
* @notice Adds investors to the vault.
* @param vault The address of the vault.
* @param investors The addresses of the investors to add.
*/
function addInvestors(address vault, address[] calldata investors) external;
/**
* @notice Adds markets to the vault.
* @param vault The address of the vault.
* @param markets The addresses of the markets to add.
*/
function addMarkets(address vault, address[] calldata markets) external;
/**
* @notice Changes the curator of the vault.
* @param vault The address of the vault.
* @param newCurator The addresses of the new curators.
*/
function changeCurator(address vault, address newCurator) external;
/**
* @notice Changes the performance fee of the vault.
* @param vault The address of the vault.
* @param newPerformanceFee The new performance fee value.
*/
function changePerformanceFee(address vault, uint80 newPerformanceFee) external;
/**
* @notice Changes the threshold on the total assets for an vault.
* @param vault The address of the vault.
* @param threshold The new threshold value for the total assets.
*/
function changeTotalAssetsThreshold(address vault, uint256 threshold) external;
/**
* @notice Removes investors from the vault.
* @param vault The address of the vault.
* @param investors The addresses of the investors to remove.
*/
function removeInvestors(address vault, address[] calldata investors) external;
/**
* @notice Removes markets from the vault.
* @param vault The address of the vault.
* @param markets The addresses of the markets to remove.
*/
function removeMarkets(address vault, address[] calldata markets) external;
/**
* @notice Suspends an existing vault.
* @param vault The address of the vault to be suspended.
*/
function suspend(address vault) external;
/**
* @notice Unsuspend an existing vault.
* @param vault The address of the vault to unsuspend.
*/
function unsuspend(address vault) external;
/**
* @notice Close an existing vault.
* @param vault The address of the vault to close.
*/
function close(address vault) external;
/**
* @notice Returns the role identifier for the Arkis Risk Operator.
* @dev This role manages permissions related to Arkis Risk Operator's functions.
* It allows the address holding this role to:
* - Control the state of vaults and margin accounts.
* - Trigger automatic and manual liquidations initiated by the Arkis Risk Operator.
* - Respond to collected approvals according to predefined policies.
* @return A bytes32 value representing the ARKIS_RISK_OPERATOR_ROLE.
*/
/* solhint-disable-next-line func-name-mixedcase */
function ARKIS_RISK_OPERATOR_ROLE() external view returns (bytes32);
/**
* @notice Returns the address of the vault prototype.
* @return The address of the ImmutableBeaconProxy vault prototype.
*/
function vaultPrototype() external view returns (address);
/**
* @notice Checks if an vault exists.
* @param vault The address of the vault to check.
* @return A boolean indicating whether the vault exists or not.
*/
function hasVault(address vault) external view returns (bool);
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.22;
interface IVaultFactoryInitializer {
/**
* @notice Initializes the vault factory contract with the specified admin and compliance address.
* @param admin The address of the admin who will have administrative control over the contract.
* @dev This function sets up the initial administrative and compliance addresses for the factory.
* It is intended to be called once during the deployment or setup of the factory.
*/
function initialize(address admin) external;
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.22;
interface IVaultInitializer {
/**
* @notice Contains metadata required for initializing an vault.
* @param asset The address of the token utilized as asset in the vault.
* @param totalAssetsThreshold The maximum threshold value for total assets permitted in the vault.
* @param markets An array of addresses representing the markets whitelisted the vault.
* @param investors An array of addresses representing the investors allowed in the vault in case if vault is private.
* @param curator The curator associated with the vault.
* @param isPrivate Indicates whether the vault is private or public.
*/
struct Metadata {
address asset;
uint256 totalAssetsThreshold;
address[] markets;
address[] investors;
address curator;
uint80 performanceFee;
bool isPrivate;
}
/**
* @notice Contains metadata for the LP token associated with the vault.
* @param name The name of the LP token.
* @param symbol The symbol of the LP token.
*/
struct LPTokenMetadata {
string name;
string symbol;
}
/**
* @notice Initializes the vault with metadata.
* @param metadata The metadata to initialize the vault.
*/
function initialize(
Metadata calldata metadata,
LPTokenMetadata calldata lpTokenMetadata
) external;
/**
* @notice Migrates old vaults for internal asset accounting introduced to prevent inflation attacks.
*/
function migrateInternalAccounting() external;
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.22;
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {Command} from "contracts/interfaces/compiler/Command.sol";
import {SafeCall} from "contracts/libraries/SafeCall.sol";
/**
* @notice Utility to convert often-used methods into a Command object
*/
library CommandPresets {
function approve(
address _token,
address _to,
uint256 _amount
) internal pure returns (Command[] memory result_) {
result_ = new Command[](2);
result_[0] = Command(_token, 0, abi.encodeCall(IERC20.approve, (_to, 0)));
result_[1] = Command(_token, 0, abi.encodeCall(IERC20.approve, (_to, _amount)));
}
function transfer(
address _token,
address _to,
uint256 _amount
) internal pure returns (Command memory cmd_) {
cmd_.target = _token;
cmd_.payload = abi.encodeCall(IERC20.transfer, (_to, _amount));
}
}
library CommandExecutor {
using SafeCall for Command[];
function execute(Command[] calldata _cmds) external {
_cmds.safeCallAll();
}
}
library CommandLibrary {
using CommandLibrary for Command[];
function last(Command[] memory _self) internal pure returns (Command memory) {
return _self[_self.length - 1];
}
function asArray(Command memory _self) internal pure returns (Command[] memory result_) {
result_ = new Command[](1);
result_[0] = _self;
}
function append(
Command[] memory _self,
Command[] memory _cmds
) internal pure returns (Command[] memory result_) {
result_ = new Command[](_self.length + _cmds.length);
uint256 i;
for (; i < _self.length; i++) {
result_[i] = _self[i];
}
for (; i < result_.length; i++) {
result_[i] = _cmds[i - _self.length];
}
}
function push(
Command[] memory _self,
Command memory _cmd
) internal pure returns (Command[] memory result_) {
result_ = new Command[](_self.length + 1);
for (uint256 i; i < _self.length; i++) {
result_[i] = _self[i];
}
result_[_self.length] = _cmd;
}
function populateWithApprove(
Command memory _self,
address _token,
uint256 _amount
) internal pure returns (Command[] memory result_) {
if (_amount != 0) {
result_ = CommandPresets.approve(_token, _self.target, _amount).push(_self);
} else {
result_ = _self.asArray();
}
}
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.22;
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
import {Command} from "contracts/interfaces/compiler/Command.sol";
/**
* @notice Safe methods performing a low-level calls that revert
* if the call was not successful
*/
library SafeCall {
using Address for address;
function safeCallAll(Command[] memory _cmds) internal {
for (uint256 i; i < _cmds.length; i++) {
safeCall(_cmds[i]);
}
}
function safeCall(Command memory _cmd) internal returns (bytes memory result_) {
result_ = safeCall(_cmd.target, _cmd.value, _cmd.payload);
}
function safeCall(address _target, bytes memory _data) internal returns (bytes memory result_) {
result_ = safeCall(_target, 0, _data);
}
function safeCall(
address _target,
uint256 _value,
bytes memory _data
) internal returns (bytes memory result_) {
result_ = _target.functionCallWithValue(_data, _value);
}
function safeDelegateCall(
address _target,
bytes memory _data
) internal returns (bytes memory result_) {
result_ = _target.functionDelegateCall(_data);
}
}{
"viaIR": false,
"optimizer": {
"enabled": true,
"runs": 1000000,
"details": {
"yulDetails": {
"optimizerSteps": "u"
}
}
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"metadata": {
"useLiteralContent": true
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[],"name":"AlreadyUpToDate","type":"error"},{"inputs":[],"name":"ERC1167FailedCreateClone","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"InvalidImplementation","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[{"internalType":"address","name":"vault","type":"address"}],"name":"InvalidVault","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":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":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"vault","type":"address"}],"name":"VaultCreated","type":"event"},{"inputs":[],"name":"ARKIS_RISK_OPERATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"address[]","name":"investors","type":"address[]"}],"name":"addInvestors","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"address[]","name":"markets","type":"address[]"}],"name":"addMarkets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"address","name":"newCurator","type":"address"}],"name":"changeCurator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"uint80","name":"newPerformanceFee","type":"uint80"}],"name":"changePerformanceFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"uint256","name":"threshold","type":"uint256"}],"name":"changeTotalAssetsThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"}],"name":"checkpoint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"}],"name":"close","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"totalAssetsThreshold","type":"uint256"},{"internalType":"address[]","name":"markets","type":"address[]"},{"internalType":"address[]","name":"investors","type":"address[]"},{"internalType":"address","name":"curator","type":"address"},{"internalType":"uint80","name":"performanceFee","type":"uint80"},{"internalType":"bool","name":"isPrivate","type":"bool"}],"internalType":"struct IVaultInitializer.Metadata","name":"metadata","type":"tuple"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"}],"internalType":"struct IVaultInitializer.LPTokenMetadata","name":"lpTokenMetadata","type":"tuple"}],"name":"createVault","outputs":[{"internalType":"address","name":"vault","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"}],"name":"hasVault","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"riskOperator","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"address[]","name":"investors","type":"address[]"}],"name":"removeInvestors","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"address[]","name":"markets","type":"address[]"}],"name":"removeMarkets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"setImplementation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"}],"name":"suspend","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"}],"name":"unsuspend","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vaultPrototype","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]Contract Creation Code
0x60806040523480156200001157600080fd5b506200001c62000022565b620000d6565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff1615620000735760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b0390811614620000d35780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6131d680620000e66000396000f3fe60806040523480156200001157600080fd5b5060043610620002195760003560e01c806383e9bec71162000125578063bec6372911620000af578063d547741f116200007a578063d547741f1462000559578063d784d4261462000570578063e63ab1e91462000587578063f2fde38b14620005af57600080fd5b8063bec6372914620004d6578063c4d66de81462000514578063c74073a1146200052b578063cd20a3a9146200054257600080fd5b806391d1485411620000f057806391d1485414620004775780639a279ebb146200048e578063a217fddf14620004b6578063a972985e14620004bf57600080fd5b806383e9bec714620004015780638456cb5914620004185780638da5cb5b14620004225780638ee49842146200046057600080fd5b806336568abe11620001a757806358be3686116200017257806358be368614620003cc5780635c60da1b14620003e35780635c975abb14620003ed578063715018a614620003f757600080fd5b806336568abe146200037d5780633f4ba83a14620003945780634cb9e2ce146200039e5780634d92534b14620003b557600080fd5b80631bec02f711620001e85780631bec02f714620002e4578063248a9ca314620002fb578063286781c7146200034f5780632f2ff15d146200036657600080fd5b806301ffc9a7146200021e57806303f2852d146200028e5780630d453efb14620002b45780631bc0750c14620002cb575b600080fd5b620002766200022f36600462002170565b7fffffffff00000000000000000000000000000000000000000000000000000000167ff5970da8000000000000000000000000000000000000000000000000000000001490565b604051620002859190620021a4565b60405180910390f35b620002a56200029f366004620021e8565b620005c6565b6040516200028591906200228e565b62000276620002c5366004620022b6565b62000762565b620002e2620002dc366004620022b6565b6200083c565b005b620002e2620002f5366004620022d9565b6200095e565b620003406200030c3660046200232b565b60009081527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052604090206001015490565b60405162000285919062002355565b620002e262000360366004620022b6565b62000aa7565b620002e26200037736600462002365565b62000bab565b620002e26200038e36600462002365565b62000bf9565b620002e262000c5a565b620002e2620003af366004620023e1565b62000c91565b620002e2620003c6366004620023e1565b62000ddd565b620002e2620003dd36600462002442565b62000eee565b620002a562000ffd565b6200027662001034565b620002e262001062565b620002e262000412366004620023e1565b62001078565b620002e262001189565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005473ffffffffffffffffffffffffffffffffffffffff16620002a5565b620002e262000471366004620023e1565b620011be565b620002766200048836600462002365565b620012cf565b620003407fd1dbc53aaf96ea1eec7861b3e75f8dc7e9bbb171a4b446fc6cb3bc0f8ffbf31281565b62000340600081565b620002e2620004d0366004620022b6565b62001328565b7f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b65005473ffffffffffffffffffffffffffffffffffffffff16620002a5565b620002e262000525366004620022b6565b6200142c565b620002e26200053c366004620022b6565b620015f6565b620002e26200055336600462002497565b620016fa565b620002e26200056a36600462002365565b62001809565b620002e262000581366004620022b6565b62001851565b620003407fba7074597567dce64aca1d040cfab2d94389b1b1db25050380c5aeb78b3cef6c81565b620002e2620005c0366004620022b6565b62001a2c565b6000620005d262001a97565b7fd1dbc53aaf96ea1eec7861b3e75f8dc7e9bbb171a4b446fc6cb3bc0f8ffbf312620005fe8162001ad9565b7f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b65008054620006429073ffffffffffffffffffffffffffffffffffffffff1662001ae4565b6040517fa66d0e8400000000000000000000000000000000000000000000000000000000815290935073ffffffffffffffffffffffffffffffffffffffff84169063a66d0e84906200069b90889088906004016200281e565b600060405180830381600087803b158015620006b657600080fd5b505af1158015620006cb573d6000803e3d6000fd5b50505073ffffffffffffffffffffffffffffffffffffffff84166000908152600183810160205260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169091179055517f2e49a5810fda2439a23771848b4acec786b0a64d4de3d124ac57fc8739c388759150620007529085906200228e565b60405180910390a1505092915050565b73ffffffffffffffffffffffffffffffffffffffff811660009081527f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b65016020526040812054829060ff16620007f057806040517faf7301ae000000000000000000000000000000000000000000000000000000008152600401620007e791906200228e565b60405180910390fd5b505073ffffffffffffffffffffffffffffffffffffffff1660009081527f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b6501602052604090205460ff1690565b6200084662001a97565b7fd1dbc53aaf96ea1eec7861b3e75f8dc7e9bbb171a4b446fc6cb3bc0f8ffbf312620008728162001ad9565b73ffffffffffffffffffffffffffffffffffffffff821660009081527f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b65016020526040902054829060ff16620008f757806040517faf7301ae000000000000000000000000000000000000000000000000000000008152600401620007e791906200228e565b8273ffffffffffffffffffffffffffffffffffffffff16635c58ce876040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200094057600080fd5b505af115801562000955573d6000803e3d6000fd5b50505050505050565b6200096862001a97565b7fd1dbc53aaf96ea1eec7861b3e75f8dc7e9bbb171a4b446fc6cb3bc0f8ffbf312620009948162001ad9565b73ffffffffffffffffffffffffffffffffffffffff831660009081527f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b65016020526040902054839060ff1662000a1957806040517faf7301ae000000000000000000000000000000000000000000000000000000008152600401620007e791906200228e565b6040517f6d515afb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff851690636d515afb9062000a6d9086906004016200228e565b600060405180830381600087803b15801562000a8857600080fd5b505af115801562000a9d573d6000803e3d6000fd5b5050505050505050565b62000ab162001a97565b7fd1dbc53aaf96ea1eec7861b3e75f8dc7e9bbb171a4b446fc6cb3bc0f8ffbf31262000add8162001ad9565b73ffffffffffffffffffffffffffffffffffffffff821660009081527f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b65016020526040902054829060ff1662000b6257806040517faf7301ae000000000000000000000000000000000000000000000000000000008152600401620007e791906200228e565b8273ffffffffffffffffffffffffffffffffffffffff1663e6400bbe6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200094057600080fd5b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052604090206001015462000be78162001ad9565b62000bf3838362001b7d565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8116331462000c49576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62000c55828262001c7f565b505050565b62000c857fba7074597567dce64aca1d040cfab2d94389b1b1db25050380c5aeb78b3cef6c62001ad9565b62000c8f62001d3c565b565b62000c9b62001a97565b7fd1dbc53aaf96ea1eec7861b3e75f8dc7e9bbb171a4b446fc6cb3bc0f8ffbf31262000cc78162001ad9565b73ffffffffffffffffffffffffffffffffffffffff841660009081527f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b65016020526040902054849060ff1662000d4c57806040517faf7301ae000000000000000000000000000000000000000000000000000000008152600401620007e791906200228e565b6040517fda40385d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86169063da40385d9062000da2908790879060040162002892565b600060405180830381600087803b15801562000dbd57600080fd5b505af115801562000dd2573d6000803e3d6000fd5b505050505050505050565b62000de762001a97565b7fd1dbc53aaf96ea1eec7861b3e75f8dc7e9bbb171a4b446fc6cb3bc0f8ffbf31262000e138162001ad9565b73ffffffffffffffffffffffffffffffffffffffff841660009081527f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b65016020526040902054849060ff1662000e9857806040517faf7301ae000000000000000000000000000000000000000000000000000000008152600401620007e791906200228e565b6040517faddee47100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86169063addee4719062000da2908790879060040162002892565b62000ef862001a97565b7fd1dbc53aaf96ea1eec7861b3e75f8dc7e9bbb171a4b446fc6cb3bc0f8ffbf31262000f248162001ad9565b73ffffffffffffffffffffffffffffffffffffffff831660009081527f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b65016020526040902054839060ff1662000fa957806040517faf7301ae000000000000000000000000000000000000000000000000000000008152600401620007e791906200228e565b6040517fafc08ebf00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063afc08ebf9062000a6d90869060040162002355565b60006200100962001a97565b507f5a8947f50575ddcaa31a5721cef4bf0d765e78dbe7d7a1182efca602a9dfd0345490565b905090565b60006200102f7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff1690565b6200106c62001dca565b62000c8f600062001e5c565b6200108262001a97565b7fd1dbc53aaf96ea1eec7861b3e75f8dc7e9bbb171a4b446fc6cb3bc0f8ffbf312620010ae8162001ad9565b73ffffffffffffffffffffffffffffffffffffffff841660009081527f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b65016020526040902054849060ff166200113357806040517faf7301ae000000000000000000000000000000000000000000000000000000008152600401620007e791906200228e565b6040517f277b7d4300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86169063277b7d439062000da2908790879060040162002892565b620011b47fba7074597567dce64aca1d040cfab2d94389b1b1db25050380c5aeb78b3cef6c62001ad9565b62000c8f62001ef2565b620011c862001a97565b7fd1dbc53aaf96ea1eec7861b3e75f8dc7e9bbb171a4b446fc6cb3bc0f8ffbf312620011f48162001ad9565b73ffffffffffffffffffffffffffffffffffffffff841660009081527f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b65016020526040902054849060ff166200127957806040517faf7301ae000000000000000000000000000000000000000000000000000000008152600401620007e791906200228e565b6040517fbfef7bdf00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86169063bfef7bdf9062000da2908790879060040162002892565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff165b92915050565b6200133262001a97565b7fd1dbc53aaf96ea1eec7861b3e75f8dc7e9bbb171a4b446fc6cb3bc0f8ffbf3126200135e8162001ad9565b73ffffffffffffffffffffffffffffffffffffffff821660009081527f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b65016020526040902054829060ff16620013e357806040517faf7301ae000000000000000000000000000000000000000000000000000000008152600401620007e791906200228e565b8273ffffffffffffffffffffffffffffffffffffffff1663c2c4c5c16040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200094057600080fd5b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff16600081158015620014785750825b905060008267ffffffffffffffff166001148015620014965750303b155b905081158015620014a5575080155b15620014dd576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000016600117855583156200153f5784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000001785555b6200154a3362001f6e565b6200155760003362001b7d565b50620015847fd1dbc53aaf96ea1eec7861b3e75f8dc7e9bbb171a4b446fc6cb3bc0f8ffbf3128762001b7d565b508315620015ee5784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff1685556040517fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290620015e590600190620028c4565b60405180910390a15b505050505050565b6200160062001a97565b7fd1dbc53aaf96ea1eec7861b3e75f8dc7e9bbb171a4b446fc6cb3bc0f8ffbf3126200162c8162001ad9565b73ffffffffffffffffffffffffffffffffffffffff821660009081527f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b65016020526040902054829060ff16620016b157806040517faf7301ae000000000000000000000000000000000000000000000000000000008152600401620007e791906200228e565b8273ffffffffffffffffffffffffffffffffffffffff166343d726d66040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200094057600080fd5b6200170462001a97565b7fd1dbc53aaf96ea1eec7861b3e75f8dc7e9bbb171a4b446fc6cb3bc0f8ffbf312620017308162001ad9565b73ffffffffffffffffffffffffffffffffffffffff831660009081527f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b65016020526040902054839060ff16620017b557806040517faf7301ae000000000000000000000000000000000000000000000000000000008152600401620007e791906200228e565b6040517fc5314af800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063c5314af89062000a6d908690600401620028d4565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020526040902060010154620018458162001ad9565b62000bf3838362001c7f565b6200185b62001f83565b6200186562001dca565b6040517f01ffc9a700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790620018d9907fb30d3f0e00000000000000000000000000000000000000000000000000000000906004016200290d565b602060405180830381865afa158015620018f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200191d91906200292a565b6200195857806040517f0c760937000000000000000000000000000000000000000000000000000000008152600401620007e791906200228e565b620019638162001fc4565b7f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b6500805473ffffffffffffffffffffffffffffffffffffffff1662001a28576040805160008152602081019182905290620019bd9062002125565b620019c99190620029c6565b604051809103906000f080158015620019e6573d6000803e3d6000fd5b5081547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff919091161781555b5050565b62001a3662001dca565b73ffffffffffffffffffffffffffffffffffffffff811662001a895760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401620007e791906200228e565b62001a948162001e5c565b50565b62001aa162001034565b1562000c8f576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62001a94816200205e565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008260601b60e81c176000526e5af43d82803e903d91602b57fd5bf38260781b17602052603760096000f0905073ffffffffffffffffffffffffffffffffffffffff811662001b78576040517fc2f868f400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b60007f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680062001bac8484620012cf565b62001c745760008481526020828152604080832073ffffffffffffffffffffffffffffffffffffffff87168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905562001c0f3390565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4600191505062001322565b600091505062001322565b60007f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680062001cae8484620012cf565b1562001c745760008481526020828152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a4600191505062001322565b62001d4662001f83565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001681557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405162001dbf91906200228e565b60405180910390a150565b3362001e0a7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff161462000c8f57336040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401620007e791906200228e565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080547fffffffffffffffffffffffff0000000000000000000000000000000000000000811673ffffffffffffffffffffffffffffffffffffffff848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b62001efc62001a97565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2583362001db0565b62001f786200206a565b62001a9481620020d2565b62001f8d62001034565b62000c8f576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f5a8947f50575ddcaa31a5721cef4bf0d765e78dbe7d7a1182efca602a9dfd0345473ffffffffffffffffffffffffffffffffffffffff8083169082160362002039576040517fde5f46d700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b507f5a8947f50575ddcaa31a5721cef4bf0d765e78dbe7d7a1182efca602a9dfd03455565b62001a948133620020dc565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff1662000c8f576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62001a366200206a565b620020e88282620012cf565b62001a285780826040517fe2517d3f000000000000000000000000000000000000000000000000000000008152600401620007e7929190620029d9565b6107a880620029f983390190565b7fffffffff0000000000000000000000000000000000000000000000000000000081165b811462001a9457600080fd5b8035620013228162002133565b600060208284031215620021875762002187600080fd5b62002193838362002163565b9392505050565b8015155b82525050565b602081016200132282846200219a565b600060e08284031215620021cb57620021cb600080fd5b50919050565b600060408284031215620021cb57620021cb600080fd5b60008060408385031215620022005762002200600080fd5b823567ffffffffffffffff8111156200221c576200221c600080fd5b6200222a85828601620021b4565b925050602083013567ffffffffffffffff8111156200224c576200224c600080fd5b6200225a85828601620021d1565b9150509250929050565b600073ffffffffffffffffffffffffffffffffffffffff821662001322565b6200219e8162002264565b6020810162001322828462002283565b620021578162002264565b803562001322816200229e565b600060208284031215620022cd57620022cd600080fd5b620021938383620022a9565b60008060408385031215620022f157620022f1600080fd5b620022fd8484620022a9565b91506200230e8460208501620022a9565b90509250929050565b8062002157565b8035620013228162002317565b600060208284031215620023425762002342600080fd5b6200219383836200231e565b806200219e565b602081016200132282846200234e565b600080604083850312156200237d576200237d600080fd5b620022fd84846200231e565b60008083601f840112620023a057620023a0600080fd5b50813567ffffffffffffffff811115620023bd57620023bd600080fd5b602083019150836020820283011115620023da57620023da600080fd5b9250929050565b600080600060408486031215620023fb57620023fb600080fd5b620024078585620022a9565b9250602084013567ffffffffffffffff811115620024285762002428600080fd5b620024368682870162002389565b92509250509250925092565b600080604083850312156200245a576200245a600080fd5b620024668484620022a9565b91506200230e84602085016200231e565b69ffffffffffffffffffff811662002157565b8035620013228162002477565b60008060408385031215620024af57620024af600080fd5b620024bb8484620022a9565b91506200230e84602085016200248a565b506000620013226020830183620022a9565b5060006200132260208301836200231e565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1368590030181126200252b576200252b600080fd5b830160208101925035905067ffffffffffffffff811115620025505762002550600080fd5b602081023603821315620023da57620023da600080fd5b62002573828262002283565b5060200190565b8183526020830192506000818060005b85811015620025bd576200259f8284620024cc565b620025ab888262002567565b9750506020820191506001016200258a565b509495945050505050565b5060006200132260208301836200248a565b69ffffffffffffffffffff81166200219e565b80151562002157565b80356200132281620025ed565b506000620013226020830183620025f6565b600060e08301620026278380620024cc565b62002633858262002283565b50620026436020840184620024de565b6200265260208601826200234e565b50620026626040840184620024f0565b8583036040870152620026778382846200257a565b925050506200268a6060840184620024f0565b85830360608701526200269f8382846200257a565b92505050620026b26080840184620024cc565b620026c1608086018262002283565b50620026d160a0840184620025c8565b620026e060a0860182620025da565b50620026f060c084018462002603565b620026ff60c08601826200219a565b509392505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe136859003018112620027425762002742600080fd5b830160208101925035905067ffffffffffffffff811115620027675762002767600080fd5b36819003821315620023da57620023da600080fd5b82818337506000910152565b8183526020830192506200279e8284836200277c565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160190565b600060408301620027da838062002707565b8583038652620027ec83828462002788565b92505050620027ff602084018462002707565b85830360208701526200281483828462002788565b9695505050505050565b6040808252810162002831818562002615565b90508181036020830152620028478184620027c8565b949350505050565b8183526020830192506000818060005b85811015620025bd57620028748284620024cc565b62002880888262002567565b9750506020820191506001016200285f565b60208082528101620028478184866200284f565b600067ffffffffffffffff821662001322565b6200219e81620028a6565b60208101620013228284620028b9565b60208101620013228284620025da565b7fffffffff0000000000000000000000000000000000000000000000000000000081166200219e565b60208101620013228284620028e4565b80516200132281620025ed565b600060208284031215620029415762002941600080fd5b6200219383836200291d565b60005b838110156200296a57818101518382015260200162002950565b50506000910152565b60006200297e825190565b808452602084019350620029978185602086016200294d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920192915050565b6020808252810162002193818462002973565b60408101620029e9828562002283565b6200219360208301846200234e56fe60a060405234801561001057600080fd5b506040516107a83803806107a883398101604081905261002f9161039e565b33608052805115610057576100558161004661005d565b6001600160a01b03169061017a565b505b50610480565b60805160408051600481526024810182526020810180516001600160e01b0316635c60da1b60e01b1790529051600092839283926001600160a01b03909216916100a791906103fa565b600060405180830381855afa9150503d80600081146100e2576040519150601f19603f3d011682016040523d82523d6000602084013e6100e7565b606091505b50915091508161010a576040516373a769bf60e01b815260040160405180910390fd5b8051602014610138578051604051630f9cc98f60e31b815260040161012f919061040c565b60405180910390fd5b8080602001905181019061014c919061044a565b92506001600160a01b03831661017557604051630fb678c360e41b815260040160405180910390fd5b505090565b606061018f6001600160a01b03841683610196565b9392505050565b6060600080846001600160a01b0316846040516101b391906103fa565b600060405180830381855af49150503d80600081146101ee576040519150601f19603f3d011682016040523d82523d6000602084013e6101f3565b606091505b50909250905061020485838361020f565b925050505b92915050565b6060826102245761021f82610262565b61018f565b815115801561023b57506001600160a01b0384163b155b1561025b5783604051639996b31560e01b815260040161012f9190610472565b5092915050565b8051156102725780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b50565b634e487b7160e01b600052604160045260246000fd5b601f19601f83011681016001600160401b03811182821017156102c9576102c961028e565b6040525050565b60006102db60405190565b90506102e782826102a4565b919050565b60006001600160401b038211156103055761030561028e565b601f19601f83011660200192915050565b60005b83811015610331578181015183820152602001610319565b50506000910152565b600061034d610348846102ec565b6102d0565b905082815283838301111561036457610364600080fd5b61018f836020830184610316565b600082601f83011261038657610386600080fd5b815161039684826020860161033a565b949350505050565b6000602082840312156103b3576103b3600080fd5b81516001600160401b038111156103cc576103cc600080fd5b61039684828501610372565b60006103e2825190565b6103f0818560208601610316565b9290920192915050565b61020981836103d8565b805b82525050565b602081016102098284610404565b60006001600160a01b038216610209565b6104348161041a565b811461028b57600080fd5b80516102098161042b565b60006020828403121561045f5761045f600080fd5b61018f838361043f565b6104068161041a565b602081016102098284610469565b60805161030e61049a60003960006096015261030e6000f3fe608060405261000c61000e565b005b61001e610019610020565b6101ec565b565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f5c60da1b0000000000000000000000000000000000000000000000000000000017905290516000918291829173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016916100c19190610256565b600060405180830381855afa9150503d80600081146100fc576040519150601f19603f3d011682016040523d82523d6000602084013e610101565b606091505b50915091508161013d576040517f73a769bf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516020146101845780516040517f7ce64c7800000000000000000000000000000000000000000000000000000000815260040161017b9190610266565b60405180910390fd5b8080602001905181019061019891906102b2565b925073ffffffffffffffffffffffffffffffffffffffff83166101e7576040517ffb678c3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505090565b3660008037600080366000845af43d6000803e80801561020b573d6000f35b3d6000fd5b60005b8381101561022b578181015183820152602001610213565b50506000910152565b600061023e825190565b61024c818560208601610210565b9290920192915050565b6102608183610234565b92915050565b81815260208101610260565b600073ffffffffffffffffffffffffffffffffffffffff8216610260565b61029981610272565b81146102a457600080fd5b50565b805161026081610290565b6000602082840312156102c7576102c7600080fd5b6102d183836102a7565b939250505056fea2646970667358221220e9d21e73399766fd4a2b1c6e9767ef0aba61b69658e29e680e6c3d0c0b50155f64736f6c63430008160033a26469706673582212207b7f597a7b0837742d75ed256da65d29e9d1e0b7e7c10df8d2c979d74923646564736f6c63430008160033
Deployed Bytecode
0x60806040523480156200001157600080fd5b5060043610620002195760003560e01c806383e9bec71162000125578063bec6372911620000af578063d547741f116200007a578063d547741f1462000559578063d784d4261462000570578063e63ab1e91462000587578063f2fde38b14620005af57600080fd5b8063bec6372914620004d6578063c4d66de81462000514578063c74073a1146200052b578063cd20a3a9146200054257600080fd5b806391d1485411620000f057806391d1485414620004775780639a279ebb146200048e578063a217fddf14620004b6578063a972985e14620004bf57600080fd5b806383e9bec714620004015780638456cb5914620004185780638da5cb5b14620004225780638ee49842146200046057600080fd5b806336568abe11620001a757806358be3686116200017257806358be368614620003cc5780635c60da1b14620003e35780635c975abb14620003ed578063715018a614620003f757600080fd5b806336568abe146200037d5780633f4ba83a14620003945780634cb9e2ce146200039e5780634d92534b14620003b557600080fd5b80631bec02f711620001e85780631bec02f714620002e4578063248a9ca314620002fb578063286781c7146200034f5780632f2ff15d146200036657600080fd5b806301ffc9a7146200021e57806303f2852d146200028e5780630d453efb14620002b45780631bc0750c14620002cb575b600080fd5b620002766200022f36600462002170565b7fffffffff00000000000000000000000000000000000000000000000000000000167ff5970da8000000000000000000000000000000000000000000000000000000001490565b604051620002859190620021a4565b60405180910390f35b620002a56200029f366004620021e8565b620005c6565b6040516200028591906200228e565b62000276620002c5366004620022b6565b62000762565b620002e2620002dc366004620022b6565b6200083c565b005b620002e2620002f5366004620022d9565b6200095e565b620003406200030c3660046200232b565b60009081527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052604090206001015490565b60405162000285919062002355565b620002e262000360366004620022b6565b62000aa7565b620002e26200037736600462002365565b62000bab565b620002e26200038e36600462002365565b62000bf9565b620002e262000c5a565b620002e2620003af366004620023e1565b62000c91565b620002e2620003c6366004620023e1565b62000ddd565b620002e2620003dd36600462002442565b62000eee565b620002a562000ffd565b6200027662001034565b620002e262001062565b620002e262000412366004620023e1565b62001078565b620002e262001189565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005473ffffffffffffffffffffffffffffffffffffffff16620002a5565b620002e262000471366004620023e1565b620011be565b620002766200048836600462002365565b620012cf565b620003407fd1dbc53aaf96ea1eec7861b3e75f8dc7e9bbb171a4b446fc6cb3bc0f8ffbf31281565b62000340600081565b620002e2620004d0366004620022b6565b62001328565b7f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b65005473ffffffffffffffffffffffffffffffffffffffff16620002a5565b620002e262000525366004620022b6565b6200142c565b620002e26200053c366004620022b6565b620015f6565b620002e26200055336600462002497565b620016fa565b620002e26200056a36600462002365565b62001809565b620002e262000581366004620022b6565b62001851565b620003407fba7074597567dce64aca1d040cfab2d94389b1b1db25050380c5aeb78b3cef6c81565b620002e2620005c0366004620022b6565b62001a2c565b6000620005d262001a97565b7fd1dbc53aaf96ea1eec7861b3e75f8dc7e9bbb171a4b446fc6cb3bc0f8ffbf312620005fe8162001ad9565b7f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b65008054620006429073ffffffffffffffffffffffffffffffffffffffff1662001ae4565b6040517fa66d0e8400000000000000000000000000000000000000000000000000000000815290935073ffffffffffffffffffffffffffffffffffffffff84169063a66d0e84906200069b90889088906004016200281e565b600060405180830381600087803b158015620006b657600080fd5b505af1158015620006cb573d6000803e3d6000fd5b50505073ffffffffffffffffffffffffffffffffffffffff84166000908152600183810160205260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169091179055517f2e49a5810fda2439a23771848b4acec786b0a64d4de3d124ac57fc8739c388759150620007529085906200228e565b60405180910390a1505092915050565b73ffffffffffffffffffffffffffffffffffffffff811660009081527f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b65016020526040812054829060ff16620007f057806040517faf7301ae000000000000000000000000000000000000000000000000000000008152600401620007e791906200228e565b60405180910390fd5b505073ffffffffffffffffffffffffffffffffffffffff1660009081527f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b6501602052604090205460ff1690565b6200084662001a97565b7fd1dbc53aaf96ea1eec7861b3e75f8dc7e9bbb171a4b446fc6cb3bc0f8ffbf312620008728162001ad9565b73ffffffffffffffffffffffffffffffffffffffff821660009081527f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b65016020526040902054829060ff16620008f757806040517faf7301ae000000000000000000000000000000000000000000000000000000008152600401620007e791906200228e565b8273ffffffffffffffffffffffffffffffffffffffff16635c58ce876040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200094057600080fd5b505af115801562000955573d6000803e3d6000fd5b50505050505050565b6200096862001a97565b7fd1dbc53aaf96ea1eec7861b3e75f8dc7e9bbb171a4b446fc6cb3bc0f8ffbf312620009948162001ad9565b73ffffffffffffffffffffffffffffffffffffffff831660009081527f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b65016020526040902054839060ff1662000a1957806040517faf7301ae000000000000000000000000000000000000000000000000000000008152600401620007e791906200228e565b6040517f6d515afb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff851690636d515afb9062000a6d9086906004016200228e565b600060405180830381600087803b15801562000a8857600080fd5b505af115801562000a9d573d6000803e3d6000fd5b5050505050505050565b62000ab162001a97565b7fd1dbc53aaf96ea1eec7861b3e75f8dc7e9bbb171a4b446fc6cb3bc0f8ffbf31262000add8162001ad9565b73ffffffffffffffffffffffffffffffffffffffff821660009081527f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b65016020526040902054829060ff1662000b6257806040517faf7301ae000000000000000000000000000000000000000000000000000000008152600401620007e791906200228e565b8273ffffffffffffffffffffffffffffffffffffffff1663e6400bbe6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200094057600080fd5b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052604090206001015462000be78162001ad9565b62000bf3838362001b7d565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8116331462000c49576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62000c55828262001c7f565b505050565b62000c857fba7074597567dce64aca1d040cfab2d94389b1b1db25050380c5aeb78b3cef6c62001ad9565b62000c8f62001d3c565b565b62000c9b62001a97565b7fd1dbc53aaf96ea1eec7861b3e75f8dc7e9bbb171a4b446fc6cb3bc0f8ffbf31262000cc78162001ad9565b73ffffffffffffffffffffffffffffffffffffffff841660009081527f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b65016020526040902054849060ff1662000d4c57806040517faf7301ae000000000000000000000000000000000000000000000000000000008152600401620007e791906200228e565b6040517fda40385d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86169063da40385d9062000da2908790879060040162002892565b600060405180830381600087803b15801562000dbd57600080fd5b505af115801562000dd2573d6000803e3d6000fd5b505050505050505050565b62000de762001a97565b7fd1dbc53aaf96ea1eec7861b3e75f8dc7e9bbb171a4b446fc6cb3bc0f8ffbf31262000e138162001ad9565b73ffffffffffffffffffffffffffffffffffffffff841660009081527f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b65016020526040902054849060ff1662000e9857806040517faf7301ae000000000000000000000000000000000000000000000000000000008152600401620007e791906200228e565b6040517faddee47100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86169063addee4719062000da2908790879060040162002892565b62000ef862001a97565b7fd1dbc53aaf96ea1eec7861b3e75f8dc7e9bbb171a4b446fc6cb3bc0f8ffbf31262000f248162001ad9565b73ffffffffffffffffffffffffffffffffffffffff831660009081527f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b65016020526040902054839060ff1662000fa957806040517faf7301ae000000000000000000000000000000000000000000000000000000008152600401620007e791906200228e565b6040517fafc08ebf00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063afc08ebf9062000a6d90869060040162002355565b60006200100962001a97565b507f5a8947f50575ddcaa31a5721cef4bf0d765e78dbe7d7a1182efca602a9dfd0345490565b905090565b60006200102f7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff1690565b6200106c62001dca565b62000c8f600062001e5c565b6200108262001a97565b7fd1dbc53aaf96ea1eec7861b3e75f8dc7e9bbb171a4b446fc6cb3bc0f8ffbf312620010ae8162001ad9565b73ffffffffffffffffffffffffffffffffffffffff841660009081527f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b65016020526040902054849060ff166200113357806040517faf7301ae000000000000000000000000000000000000000000000000000000008152600401620007e791906200228e565b6040517f277b7d4300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86169063277b7d439062000da2908790879060040162002892565b620011b47fba7074597567dce64aca1d040cfab2d94389b1b1db25050380c5aeb78b3cef6c62001ad9565b62000c8f62001ef2565b620011c862001a97565b7fd1dbc53aaf96ea1eec7861b3e75f8dc7e9bbb171a4b446fc6cb3bc0f8ffbf312620011f48162001ad9565b73ffffffffffffffffffffffffffffffffffffffff841660009081527f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b65016020526040902054849060ff166200127957806040517faf7301ae000000000000000000000000000000000000000000000000000000008152600401620007e791906200228e565b6040517fbfef7bdf00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86169063bfef7bdf9062000da2908790879060040162002892565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff165b92915050565b6200133262001a97565b7fd1dbc53aaf96ea1eec7861b3e75f8dc7e9bbb171a4b446fc6cb3bc0f8ffbf3126200135e8162001ad9565b73ffffffffffffffffffffffffffffffffffffffff821660009081527f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b65016020526040902054829060ff16620013e357806040517faf7301ae000000000000000000000000000000000000000000000000000000008152600401620007e791906200228e565b8273ffffffffffffffffffffffffffffffffffffffff1663c2c4c5c16040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200094057600080fd5b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff16600081158015620014785750825b905060008267ffffffffffffffff166001148015620014965750303b155b905081158015620014a5575080155b15620014dd576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000016600117855583156200153f5784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000001785555b6200154a3362001f6e565b6200155760003362001b7d565b50620015847fd1dbc53aaf96ea1eec7861b3e75f8dc7e9bbb171a4b446fc6cb3bc0f8ffbf3128762001b7d565b508315620015ee5784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff1685556040517fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290620015e590600190620028c4565b60405180910390a15b505050505050565b6200160062001a97565b7fd1dbc53aaf96ea1eec7861b3e75f8dc7e9bbb171a4b446fc6cb3bc0f8ffbf3126200162c8162001ad9565b73ffffffffffffffffffffffffffffffffffffffff821660009081527f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b65016020526040902054829060ff16620016b157806040517faf7301ae000000000000000000000000000000000000000000000000000000008152600401620007e791906200228e565b8273ffffffffffffffffffffffffffffffffffffffff166343d726d66040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200094057600080fd5b6200170462001a97565b7fd1dbc53aaf96ea1eec7861b3e75f8dc7e9bbb171a4b446fc6cb3bc0f8ffbf312620017308162001ad9565b73ffffffffffffffffffffffffffffffffffffffff831660009081527f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b65016020526040902054839060ff16620017b557806040517faf7301ae000000000000000000000000000000000000000000000000000000008152600401620007e791906200228e565b6040517fc5314af800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063c5314af89062000a6d908690600401620028d4565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020526040902060010154620018458162001ad9565b62000bf3838362001c7f565b6200185b62001f83565b6200186562001dca565b6040517f01ffc9a700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790620018d9907fb30d3f0e00000000000000000000000000000000000000000000000000000000906004016200290d565b602060405180830381865afa158015620018f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200191d91906200292a565b6200195857806040517f0c760937000000000000000000000000000000000000000000000000000000008152600401620007e791906200228e565b620019638162001fc4565b7f0fe9f7095f5e3230f0cc13629f127d82adf3e8d84c74faaff9a3ce83905b6500805473ffffffffffffffffffffffffffffffffffffffff1662001a28576040805160008152602081019182905290620019bd9062002125565b620019c99190620029c6565b604051809103906000f080158015620019e6573d6000803e3d6000fd5b5081547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff919091161781555b5050565b62001a3662001dca565b73ffffffffffffffffffffffffffffffffffffffff811662001a895760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401620007e791906200228e565b62001a948162001e5c565b50565b62001aa162001034565b1562000c8f576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62001a94816200205e565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008260601b60e81c176000526e5af43d82803e903d91602b57fd5bf38260781b17602052603760096000f0905073ffffffffffffffffffffffffffffffffffffffff811662001b78576040517fc2f868f400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b60007f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680062001bac8484620012cf565b62001c745760008481526020828152604080832073ffffffffffffffffffffffffffffffffffffffff87168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905562001c0f3390565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4600191505062001322565b600091505062001322565b60007f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680062001cae8484620012cf565b1562001c745760008481526020828152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a4600191505062001322565b62001d4662001f83565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001681557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405162001dbf91906200228e565b60405180910390a150565b3362001e0a7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff161462000c8f57336040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401620007e791906200228e565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080547fffffffffffffffffffffffff0000000000000000000000000000000000000000811673ffffffffffffffffffffffffffffffffffffffff848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b62001efc62001a97565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2583362001db0565b62001f786200206a565b62001a9481620020d2565b62001f8d62001034565b62000c8f576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f5a8947f50575ddcaa31a5721cef4bf0d765e78dbe7d7a1182efca602a9dfd0345473ffffffffffffffffffffffffffffffffffffffff8083169082160362002039576040517fde5f46d700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b507f5a8947f50575ddcaa31a5721cef4bf0d765e78dbe7d7a1182efca602a9dfd03455565b62001a948133620020dc565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff1662000c8f576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62001a366200206a565b620020e88282620012cf565b62001a285780826040517fe2517d3f000000000000000000000000000000000000000000000000000000008152600401620007e7929190620029d9565b6107a880620029f983390190565b7fffffffff0000000000000000000000000000000000000000000000000000000081165b811462001a9457600080fd5b8035620013228162002133565b600060208284031215620021875762002187600080fd5b62002193838362002163565b9392505050565b8015155b82525050565b602081016200132282846200219a565b600060e08284031215620021cb57620021cb600080fd5b50919050565b600060408284031215620021cb57620021cb600080fd5b60008060408385031215620022005762002200600080fd5b823567ffffffffffffffff8111156200221c576200221c600080fd5b6200222a85828601620021b4565b925050602083013567ffffffffffffffff8111156200224c576200224c600080fd5b6200225a85828601620021d1565b9150509250929050565b600073ffffffffffffffffffffffffffffffffffffffff821662001322565b6200219e8162002264565b6020810162001322828462002283565b620021578162002264565b803562001322816200229e565b600060208284031215620022cd57620022cd600080fd5b620021938383620022a9565b60008060408385031215620022f157620022f1600080fd5b620022fd8484620022a9565b91506200230e8460208501620022a9565b90509250929050565b8062002157565b8035620013228162002317565b600060208284031215620023425762002342600080fd5b6200219383836200231e565b806200219e565b602081016200132282846200234e565b600080604083850312156200237d576200237d600080fd5b620022fd84846200231e565b60008083601f840112620023a057620023a0600080fd5b50813567ffffffffffffffff811115620023bd57620023bd600080fd5b602083019150836020820283011115620023da57620023da600080fd5b9250929050565b600080600060408486031215620023fb57620023fb600080fd5b620024078585620022a9565b9250602084013567ffffffffffffffff811115620024285762002428600080fd5b620024368682870162002389565b92509250509250925092565b600080604083850312156200245a576200245a600080fd5b620024668484620022a9565b91506200230e84602085016200231e565b69ffffffffffffffffffff811662002157565b8035620013228162002477565b60008060408385031215620024af57620024af600080fd5b620024bb8484620022a9565b91506200230e84602085016200248a565b506000620013226020830183620022a9565b5060006200132260208301836200231e565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1368590030181126200252b576200252b600080fd5b830160208101925035905067ffffffffffffffff811115620025505762002550600080fd5b602081023603821315620023da57620023da600080fd5b62002573828262002283565b5060200190565b8183526020830192506000818060005b85811015620025bd576200259f8284620024cc565b620025ab888262002567565b9750506020820191506001016200258a565b509495945050505050565b5060006200132260208301836200248a565b69ffffffffffffffffffff81166200219e565b80151562002157565b80356200132281620025ed565b506000620013226020830183620025f6565b600060e08301620026278380620024cc565b62002633858262002283565b50620026436020840184620024de565b6200265260208601826200234e565b50620026626040840184620024f0565b8583036040870152620026778382846200257a565b925050506200268a6060840184620024f0565b85830360608701526200269f8382846200257a565b92505050620026b26080840184620024cc565b620026c1608086018262002283565b50620026d160a0840184620025c8565b620026e060a0860182620025da565b50620026f060c084018462002603565b620026ff60c08601826200219a565b509392505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe136859003018112620027425762002742600080fd5b830160208101925035905067ffffffffffffffff811115620027675762002767600080fd5b36819003821315620023da57620023da600080fd5b82818337506000910152565b8183526020830192506200279e8284836200277c565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160190565b600060408301620027da838062002707565b8583038652620027ec83828462002788565b92505050620027ff602084018462002707565b85830360208701526200281483828462002788565b9695505050505050565b6040808252810162002831818562002615565b90508181036020830152620028478184620027c8565b949350505050565b8183526020830192506000818060005b85811015620025bd57620028748284620024cc565b62002880888262002567565b9750506020820191506001016200285f565b60208082528101620028478184866200284f565b600067ffffffffffffffff821662001322565b6200219e81620028a6565b60208101620013228284620028b9565b60208101620013228284620025da565b7fffffffff0000000000000000000000000000000000000000000000000000000081166200219e565b60208101620013228284620028e4565b80516200132281620025ed565b600060208284031215620029415762002941600080fd5b6200219383836200291d565b60005b838110156200296a57818101518382015260200162002950565b50506000910152565b60006200297e825190565b808452602084019350620029978185602086016200294d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920192915050565b6020808252810162002193818462002973565b60408101620029e9828562002283565b6200219360208301846200234e56fe60a060405234801561001057600080fd5b506040516107a83803806107a883398101604081905261002f9161039e565b33608052805115610057576100558161004661005d565b6001600160a01b03169061017a565b505b50610480565b60805160408051600481526024810182526020810180516001600160e01b0316635c60da1b60e01b1790529051600092839283926001600160a01b03909216916100a791906103fa565b600060405180830381855afa9150503d80600081146100e2576040519150601f19603f3d011682016040523d82523d6000602084013e6100e7565b606091505b50915091508161010a576040516373a769bf60e01b815260040160405180910390fd5b8051602014610138578051604051630f9cc98f60e31b815260040161012f919061040c565b60405180910390fd5b8080602001905181019061014c919061044a565b92506001600160a01b03831661017557604051630fb678c360e41b815260040160405180910390fd5b505090565b606061018f6001600160a01b03841683610196565b9392505050565b6060600080846001600160a01b0316846040516101b391906103fa565b600060405180830381855af49150503d80600081146101ee576040519150601f19603f3d011682016040523d82523d6000602084013e6101f3565b606091505b50909250905061020485838361020f565b925050505b92915050565b6060826102245761021f82610262565b61018f565b815115801561023b57506001600160a01b0384163b155b1561025b5783604051639996b31560e01b815260040161012f9190610472565b5092915050565b8051156102725780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b50565b634e487b7160e01b600052604160045260246000fd5b601f19601f83011681016001600160401b03811182821017156102c9576102c961028e565b6040525050565b60006102db60405190565b90506102e782826102a4565b919050565b60006001600160401b038211156103055761030561028e565b601f19601f83011660200192915050565b60005b83811015610331578181015183820152602001610319565b50506000910152565b600061034d610348846102ec565b6102d0565b905082815283838301111561036457610364600080fd5b61018f836020830184610316565b600082601f83011261038657610386600080fd5b815161039684826020860161033a565b949350505050565b6000602082840312156103b3576103b3600080fd5b81516001600160401b038111156103cc576103cc600080fd5b61039684828501610372565b60006103e2825190565b6103f0818560208601610316565b9290920192915050565b61020981836103d8565b805b82525050565b602081016102098284610404565b60006001600160a01b038216610209565b6104348161041a565b811461028b57600080fd5b80516102098161042b565b60006020828403121561045f5761045f600080fd5b61018f838361043f565b6104068161041a565b602081016102098284610469565b60805161030e61049a60003960006096015261030e6000f3fe608060405261000c61000e565b005b61001e610019610020565b6101ec565b565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f5c60da1b0000000000000000000000000000000000000000000000000000000017905290516000918291829173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016916100c19190610256565b600060405180830381855afa9150503d80600081146100fc576040519150601f19603f3d011682016040523d82523d6000602084013e610101565b606091505b50915091508161013d576040517f73a769bf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516020146101845780516040517f7ce64c7800000000000000000000000000000000000000000000000000000000815260040161017b9190610266565b60405180910390fd5b8080602001905181019061019891906102b2565b925073ffffffffffffffffffffffffffffffffffffffff83166101e7576040517ffb678c3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505090565b3660008037600080366000845af43d6000803e80801561020b573d6000f35b3d6000fd5b60005b8381101561022b578181015183820152602001610213565b50506000910152565b600061023e825190565b61024c818560208601610210565b9290920192915050565b6102608183610234565b92915050565b81815260208101610260565b600073ffffffffffffffffffffffffffffffffffffffff8216610260565b61029981610272565b81146102a457600080fd5b50565b805161026081610290565b6000602082840312156102c7576102c7600080fd5b6102d183836102a7565b939250505056fea2646970667358221220e9d21e73399766fd4a2b1c6e9767ef0aba61b69658e29e680e6c3d0c0b50155f64736f6c63430008160033a26469706673582212207b7f597a7b0837742d75ed256da65d29e9d1e0b7e7c10df8d2c979d74923646564736f6c63430008160033
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.