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.
Contract Name:
Vesting
Compiler Version
v0.8.28+commit.7893614a
Optimization Enabled:
No with 200 runs
Other Settings:
prague EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";
import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {VestingStorage} from "./VestingStorage.sol";
contract Vesting is Initializable, UUPSUpgradeable {
using VestingStorage for VestingStorage.Layout;
using SafeERC20 for IERC20;
uint256 public constant OWNER_RESTRICTION_PERIOD = 180 days;
event PrimaryOwnerChanged(address indexed oldOwner, address indexed newOwner);
event SecondaryOwnerChanged(address indexed oldOwner, address indexed newOwner);
event StartTimeChanged(uint256 oldStartTime, uint256 newStartTime);
event TokenChanged(address indexed oldToken, address indexed newToken);
event LockedAmountChanged(uint256 oldAmount, uint256 newAmount);
event UnlockSchedulesChanged();
event EmergencyWithdraw(address indexed to, uint256 amount);
event Withdraw(address indexed to, uint256 amount);
error InvalidUnlockSchedule(uint256 index, uint256 reason);
error Unauthorized();
error InvalidAddress();
error InvalidNumber();
error InsufficientBalance();
error NoUnlockAvailable();
constructor() {
_disableInitializers();
}
function initialize(
address _primaryOwner,
address _secondaryOwner,
uint256 _startTime,
address _token,
uint256 _lockedAmount,
VestingStorage.UnlockSchedule[] memory _unlockSchedules
) public initializer {
if (_primaryOwner == address(0)) {
revert InvalidAddress();
}
if (_startTime == 0) revert InvalidNumber();
if (_token == address(0)) revert InvalidAddress();
if (_lockedAmount == 0) revert InvalidNumber();
VestingStorage.Layout storage s = VestingStorage.layout();
s.primaryOwner = _primaryOwner;
s.secondaryOwner = _secondaryOwner;
s.startTime = _startTime;
s.token = _token;
s.lockedAmount = _lockedAmount;
_validateUnlockSchedules(_startTime, _lockedAmount, _unlockSchedules);
_setUnlockSchedules(_unlockSchedules);
}
modifier onlyAuthorized() {
_onlyAuthorized();
_;
}
modifier onlyPrimaryOwner() {
_onlyPrimaryOwner();
_;
}
modifier onlySecondaryOwner() {
_onlySecondaryOwner();
_;
}
function _onlyAuthorized() internal view {
VestingStorage.Layout storage s = VestingStorage.layout();
if (msg.sender != s.primaryOwner && msg.sender != s.secondaryOwner) {
revert Unauthorized();
}
if (block.timestamp < s.startTime + OWNER_RESTRICTION_PERIOD) {
if (msg.sender != s.primaryOwner) {
revert Unauthorized();
}
}
}
function _onlyPrimaryOwner() internal view {
VestingStorage.Layout storage s = VestingStorage.layout();
if (msg.sender != s.primaryOwner) {
revert Unauthorized();
}
}
function _onlySecondaryOwner() internal view {
VestingStorage.Layout storage s = VestingStorage.layout();
if (msg.sender != s.secondaryOwner) {
revert Unauthorized();
}
}
function _validateUnlockSchedules(
uint256 _startTime,
uint256 _lockedAmount,
VestingStorage.UnlockSchedule[] memory _unlockSchedules
) internal pure {
if (_unlockSchedules.length == 0) revert InvalidUnlockSchedule(0, 0);
if (_unlockSchedules[0].timestamp <= _startTime) {
revert InvalidUnlockSchedule(0, 1);
}
for (uint256 i = 1; i < _unlockSchedules.length; i++) {
if (_unlockSchedules[i].timestamp <= _unlockSchedules[i - 1].timestamp) {
revert InvalidUnlockSchedule(i, 2);
}
if (_unlockSchedules[i].amount <= _unlockSchedules[i - 1].amount) {
revert InvalidUnlockSchedule(i, 3);
}
}
if (_unlockSchedules[_unlockSchedules.length - 1].amount != _lockedAmount) {
revert InvalidUnlockSchedule(0, 4);
}
}
function _setUnlockSchedules(VestingStorage.UnlockSchedule[] memory _unlockSchedules) internal {
VestingStorage.Layout storage s = VestingStorage.layout();
delete s.unlockSchedules;
for (uint256 i = 0; i < _unlockSchedules.length; i++) {
s.unlockSchedules.push(_unlockSchedules[i]);
}
}
function _convertToMemoryArray(VestingStorage.UnlockSchedule[] storage _storageArray)
internal
view
returns (VestingStorage.UnlockSchedule[] memory)
{
VestingStorage.UnlockSchedule[] memory memoryArray = new VestingStorage.UnlockSchedule[](_storageArray.length);
for (uint256 i = 0; i < _storageArray.length; i++) {
memoryArray[i] = _storageArray[i];
}
return memoryArray;
}
function primaryOwner() public view returns (address) {
return VestingStorage.layout().primaryOwner;
}
function secondaryOwner() public view returns (address) {
return VestingStorage.layout().secondaryOwner;
}
function startTime() public view returns (uint256) {
return VestingStorage.layout().startTime;
}
function token() public view returns (address) {
return VestingStorage.layout().token;
}
function lockedAmount() public view returns (uint256) {
return VestingStorage.layout().lockedAmount;
}
function lockedAmountMatched() public view returns (bool, uint256) {
VestingStorage.Layout storage s = VestingStorage.layout();
uint256 currentBalance = IERC20(s.token).balanceOf(address(this));
return (currentBalance == s.lockedAmount, currentBalance);
}
function withdrawnAmount() public view returns (uint256) {
return VestingStorage.layout().withdrawnAmount;
}
function getUnlockSchedulesCount() public view returns (uint256) {
return VestingStorage.layout().unlockSchedules.length;
}
function getUnlockSchedule(uint256 index) public view returns (uint256 timestamp, uint256 amount) {
VestingStorage.Layout storage s = VestingStorage.layout();
require(index < s.unlockSchedules.length, "Index out of bounds");
return (s.unlockSchedules[index].timestamp, s.unlockSchedules[index].amount);
}
function getUnlockSchedules() public view returns (VestingStorage.UnlockSchedule[] memory) {
return _convertToMemoryArray(VestingStorage.layout().unlockSchedules);
}
function getAvailableAmount() public view returns (uint256) {
VestingStorage.Layout storage s = VestingStorage.layout();
if (block.timestamp < s.startTime) {
return 0;
}
uint256 available = 0;
for (uint256 i = 0; i < s.unlockSchedules.length; i++) {
if (block.timestamp >= s.unlockSchedules[i].timestamp) {
available = s.unlockSchedules[i].amount;
}
}
return available > s.withdrawnAmount ? available - s.withdrawnAmount : 0;
}
function setPrimaryOwner(address _newPrimaryOwner) public onlyPrimaryOwner {
if (_newPrimaryOwner == address(0)) revert InvalidAddress();
VestingStorage.Layout storage s = VestingStorage.layout();
address oldOwner = s.primaryOwner;
s.primaryOwner = _newPrimaryOwner;
emit PrimaryOwnerChanged(oldOwner, _newPrimaryOwner);
}
function setSecondaryOwner(address _newSecondaryOwner) public onlyAuthorized {
VestingStorage.Layout storage s = VestingStorage.layout();
address oldOwner = s.secondaryOwner;
s.secondaryOwner = _newSecondaryOwner;
emit SecondaryOwnerChanged(oldOwner, _newSecondaryOwner);
}
function setStartTime(uint256 _newStartTime) public onlyAuthorized {
if (_newStartTime == 0) revert InvalidNumber();
VestingStorage.Layout storage s = VestingStorage.layout();
if (s.unlockSchedules.length > 0) {
_validateUnlockSchedules(_newStartTime, s.lockedAmount, _convertToMemoryArray(s.unlockSchedules));
}
uint256 oldStartTime = s.startTime;
s.startTime = _newStartTime;
emit StartTimeChanged(oldStartTime, _newStartTime);
}
function setToken(address _newToken) public onlyAuthorized {
if (_newToken == address(0)) revert InvalidAddress();
VestingStorage.Layout storage s = VestingStorage.layout();
address oldToken = s.token;
s.token = _newToken;
emit TokenChanged(oldToken, _newToken);
}
function setLockedAmount(uint256 _newLockedAmount, VestingStorage.UnlockSchedule[] memory _unlockSchedules)
public
onlyAuthorized
{
if (_newLockedAmount == 0) revert InvalidNumber();
VestingStorage.Layout storage s = VestingStorage.layout();
// 如果提供了新的解锁计划,使用新的解锁计划进行验证和设置
if (_unlockSchedules.length > 0) {
_validateUnlockSchedules(s.startTime, _newLockedAmount, _unlockSchedules);
_setUnlockSchedules(_unlockSchedules);
emit UnlockSchedulesChanged();
} else if (s.unlockSchedules.length > 0) {
// 如果没有提供新的解锁计划,验证现有解锁计划是否匹配新的锁定金额
_validateUnlockSchedules(s.startTime, _newLockedAmount, _convertToMemoryArray(s.unlockSchedules));
}
uint256 oldAmount = s.lockedAmount;
s.lockedAmount = _newLockedAmount;
emit LockedAmountChanged(oldAmount, _newLockedAmount);
}
function setUnlockSchedules(VestingStorage.UnlockSchedule[] memory _unlockSchedules) public onlyAuthorized {
VestingStorage.Layout storage s = VestingStorage.layout();
_validateUnlockSchedules(s.startTime, s.lockedAmount, _unlockSchedules);
_setUnlockSchedules(_unlockSchedules);
emit UnlockSchedulesChanged();
}
function withdraw() public onlySecondaryOwner {
uint256 available = getAvailableAmount();
if (available == 0) revert InsufficientBalance();
VestingStorage.Layout storage s = VestingStorage.layout();
s.withdrawnAmount += available;
IERC20(s.token).safeTransfer(s.secondaryOwner, available);
emit Withdraw(s.secondaryOwner, available);
}
function emergencyWithdraw(address _to, uint256 _amount) public onlyPrimaryOwner {
if (_to == address(0)) revert InvalidAddress();
VestingStorage.Layout storage s = VestingStorage.layout();
uint256 balance = IERC20(s.token).balanceOf(address(this));
if (balance < _amount) revert InsufficientBalance();
IERC20(s.token).safeTransfer(_to, _amount);
emit EmergencyWithdraw(_to, _amount);
}
function _authorizeUpgrade(address newImplementation) internal override onlyAuthorized {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.5.0) (proxy/utils/UUPSUpgradeable.sol)
pragma solidity ^0.8.22;
import {IERC1822Proxiable} from "../../interfaces/draft-IERC1822.sol";
import {ERC1967Utils} from "../ERC1967/ERC1967Utils.sol";
/**
* @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an
* {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.
*
* A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is
* reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing
* `UUPSUpgradeable` with a custom implementation of upgrades.
*
* The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.
*
* @custom:stateless
*/
abstract contract UUPSUpgradeable is IERC1822Proxiable {
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
address private immutable __self = address(this);
/**
* @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgradeTo(address)`
* and `upgradeToAndCall(address,bytes)` are present, and `upgradeTo` must be used if no function should be called,
* while `upgradeToAndCall` will invoke the `receive` function if the second argument is the empty byte string.
* If the getter returns `"5.0.0"`, only `upgradeToAndCall(address,bytes)` is present, and the second argument must
* be the empty byte string if no function should be called, making it impossible to invoke the `receive` function
* during an upgrade.
*/
string public constant UPGRADE_INTERFACE_VERSION = "5.0.0";
/**
* @dev The call is from an unauthorized context.
*/
error UUPSUnauthorizedCallContext();
/**
* @dev The storage `slot` is unsupported as a UUID.
*/
error UUPSUnsupportedProxiableUUID(bytes32 slot);
/**
* @dev Check that the execution is being performed through a delegatecall call and that the execution context is
* a proxy contract with an implementation (as defined in ERC-1967) pointing to self. This should only be the case
* for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a
* function through ERC-1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to
* fail.
*/
modifier onlyProxy() {
_checkProxy();
_;
}
/**
* @dev Check that the execution is not being performed through a delegate call. This allows a function to be
* callable on the implementing contract but not through proxies.
*/
modifier notDelegated() {
_checkNotDelegated();
_;
}
/**
* @dev Implementation of the ERC-1822 {proxiableUUID} function. This returns the storage slot used by the
* implementation. It is used to validate the implementation's compatibility when performing an upgrade.
*
* IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
* bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
* function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.
*/
function proxiableUUID() external view notDelegated returns (bytes32) {
return ERC1967Utils.IMPLEMENTATION_SLOT;
}
/**
* @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call
* encoded in `data`.
*
* Calls {_authorizeUpgrade}.
*
* Emits an {Upgraded} event.
*
* @custom:oz-upgrades-unsafe-allow-reachable delegatecall
*/
function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy {
_authorizeUpgrade(newImplementation);
_upgradeToAndCallUUPS(newImplementation, data);
}
/**
* @dev Reverts if the execution is not performed via delegatecall or the execution
* context is not of a proxy with an ERC-1967 compliant implementation pointing to self.
*/
function _checkProxy() internal view virtual {
if (
address(this) == __self || // Must be called through delegatecall
ERC1967Utils.getImplementation() != __self // Must be called through an active proxy
) {
revert UUPSUnauthorizedCallContext();
}
}
/**
* @dev Reverts if the execution is performed via delegatecall.
* See {notDelegated}.
*/
function _checkNotDelegated() internal view virtual {
if (address(this) != __self) {
// Must not be called through delegatecall
revert UUPSUnauthorizedCallContext();
}
}
/**
* @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by
* {upgradeToAndCall}.
*
* Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.
*
* ```solidity
* function _authorizeUpgrade(address) internal onlyOwner {}
* ```
*/
function _authorizeUpgrade(address newImplementation) internal virtual;
/**
* @dev Performs an implementation upgrade with a security check for UUPS proxies, and additional setup call.
*
* As a security check, {proxiableUUID} is invoked in the new implementation, and the return value
* is expected to be the implementation slot in ERC-1967.
*
* Emits an {IERC1967-Upgraded} event.
*/
function _upgradeToAndCallUUPS(address newImplementation, bytes memory data) private {
try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {
if (slot != ERC1967Utils.IMPLEMENTATION_SLOT) {
revert UUPSUnsupportedProxiableUUID(slot);
}
ERC1967Utils.upgradeToAndCall(newImplementation, data);
} catch {
// The implementation is not UUPS
revert ERC1967Utils.ERC1967InvalidImplementation(newImplementation);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.3.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 reinitialization) 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 Pointer to storage slot. Allows integrators to override it with a custom storage location.
*
* NOTE: Consider following the ERC-7201 formula to derive storage locations.
*/
function _initializableStorageSlot() internal pure virtual returns (bytes32) {
return INITIALIZABLE_STORAGE;
}
/**
* @dev Returns a pointer to the storage namespace.
*/
// solhint-disable-next-line var-name-mixedcase
function _getInitializableStorage() private pure returns (InitializableStorage storage $) {
bytes32 slot = _initializableStorageSlot();
assembly {
$.slot := slot
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)
pragma solidity >=0.4.16;
/**
* @dev Interface of the ERC-20 standard as defined in the ERC.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 value) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 value) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../IERC20.sol";
import {IERC1363} from "../../../interfaces/IERC1363.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC-20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
/**
* @dev An operation with an ERC-20 token failed.
*/
error SafeERC20FailedOperation(address token);
/**
* @dev Indicates a failed `decreaseAllowance` request.
*/
error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
if (!_safeTransfer(token, to, value, true)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
if (!_safeTransferFrom(token, from, to, value, true)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.
*/
function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {
return _safeTransfer(token, to, value, false);
}
/**
* @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.
*/
function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {
return _safeTransferFrom(token, from, to, value, false);
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*
* IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
* smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
* this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
* that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
forceApprove(token, spender, oldAllowance + value);
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
* value, non-reverting calls are assumed to be successful.
*
* IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
* smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
* this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
* that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
unchecked {
uint256 currentAllowance = token.allowance(address(this), spender);
if (currentAllowance < requestedDecrease) {
revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
}
forceApprove(token, spender, currentAllowance - requestedDecrease);
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*
* NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
* only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
* set here.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
if (!_safeApprove(token, spender, value, false)) {
if (!_safeApprove(token, spender, 0, true)) revert SafeERC20FailedOperation(address(token));
if (!_safeApprove(token, spender, value, true)) revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
* code. This can be used to implement an {ERC721}-like safe transfer that relies on {ERC1363} checks when
* targeting contracts.
*
* Reverts if the returned value is other than `true`.
*/
function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
if (to.code.length == 0) {
safeTransfer(token, to, value);
} else if (!token.transferAndCall(to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
* has no code. This can be used to implement an {ERC721}-like safe transfer that relies on {ERC1363} checks when
* targeting contracts.
*
* Reverts if the returned value is other than `true`.
*/
function transferFromAndCallRelaxed(
IERC1363 token,
address from,
address to,
uint256 value,
bytes memory data
) internal {
if (to.code.length == 0) {
safeTransferFrom(token, from, to, value);
} else if (!token.transferFromAndCall(from, to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
* code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
* Oppositely, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
* once without retrying, and relies on the returned value to be true.
*
* Reverts if the returned value is other than `true`.
*/
function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
if (to.code.length == 0) {
forceApprove(token, to, value);
} else if (!token.approveAndCall(to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Imitates a Solidity `token.transfer(to, value)` call, relaxing the requirement on the return value: the
* return value is optional (but if data is returned, it must not be false).
*
* @param token The token targeted by the call.
* @param to The recipient of the tokens
* @param value The amount of token to transfer
* @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.
*/
function _safeTransfer(IERC20 token, address to, uint256 value, bool bubble) private returns (bool success) {
bytes4 selector = IERC20.transfer.selector;
assembly ("memory-safe") {
let fmp := mload(0x40)
mstore(0x00, selector)
mstore(0x04, and(to, shr(96, not(0))))
mstore(0x24, value)
success := call(gas(), token, 0, 0x00, 0x44, 0x00, 0x20)
// if call success and return is true, all is good.
// otherwise (not success or return is not true), we need to perform further checks
if iszero(and(success, eq(mload(0x00), 1))) {
// if the call was a failure and bubble is enabled, bubble the error
if and(iszero(success), bubble) {
returndatacopy(fmp, 0x00, returndatasize())
revert(fmp, returndatasize())
}
// if the return value is not true, then the call is only successful if:
// - the token address has code
// - the returndata is empty
success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))
}
mstore(0x40, fmp)
}
}
/**
* @dev Imitates a Solidity `token.transferFrom(from, to, value)` call, relaxing the requirement on the return
* value: the return value is optional (but if data is returned, it must not be false).
*
* @param token The token targeted by the call.
* @param from The sender of the tokens
* @param to The recipient of the tokens
* @param value The amount of token to transfer
* @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.
*/
function _safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value,
bool bubble
) private returns (bool success) {
bytes4 selector = IERC20.transferFrom.selector;
assembly ("memory-safe") {
let fmp := mload(0x40)
mstore(0x00, selector)
mstore(0x04, and(from, shr(96, not(0))))
mstore(0x24, and(to, shr(96, not(0))))
mstore(0x44, value)
success := call(gas(), token, 0, 0x00, 0x64, 0x00, 0x20)
// if call success and return is true, all is good.
// otherwise (not success or return is not true), we need to perform further checks
if iszero(and(success, eq(mload(0x00), 1))) {
// if the call was a failure and bubble is enabled, bubble the error
if and(iszero(success), bubble) {
returndatacopy(fmp, 0x00, returndatasize())
revert(fmp, returndatasize())
}
// if the return value is not true, then the call is only successful if:
// - the token address has code
// - the returndata is empty
success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))
}
mstore(0x40, fmp)
mstore(0x60, 0)
}
}
/**
* @dev Imitates a Solidity `token.approve(spender, value)` call, relaxing the requirement on the return value:
* the return value is optional (but if data is returned, it must not be false).
*
* @param token The token targeted by the call.
* @param spender The spender of the tokens
* @param value The amount of token to transfer
* @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.
*/
function _safeApprove(IERC20 token, address spender, uint256 value, bool bubble) private returns (bool success) {
bytes4 selector = IERC20.approve.selector;
assembly ("memory-safe") {
let fmp := mload(0x40)
mstore(0x00, selector)
mstore(0x04, and(spender, shr(96, not(0))))
mstore(0x24, value)
success := call(gas(), token, 0, 0x00, 0x44, 0x00, 0x20)
// if call success and return is true, all is good.
// otherwise (not success or return is not true), we need to perform further checks
if iszero(and(success, eq(mload(0x00), 1))) {
// if the call was a failure and bubble is enabled, bubble the error
if and(iszero(success), bubble) {
returndatacopy(fmp, 0x00, returndatasize())
revert(fmp, returndatasize())
}
// if the return value is not true, then the call is only successful if:
// - the token address has code
// - the returndata is empty
success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))
}
mstore(0x40, fmp)
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
library VestingStorage {
bytes32 private constant STORAGE_SLOT = keccak256("Vesting.storage.v1");
struct UnlockSchedule {
uint256 timestamp;
uint256 amount;
}
struct Layout {
address primaryOwner;
address secondaryOwner;
uint256 startTime;
address token;
uint256 lockedAmount;
UnlockSchedule[] unlockSchedules;
uint256 withdrawnAmount;
}
function layout() internal pure returns (Layout storage l) {
bytes32 slot = STORAGE_SLOT;
assembly {
l.slot := slot
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/draft-IERC1822.sol)
pragma solidity >=0.4.16;
/**
* @dev ERC-1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified
* proxy whose upgrades are fully controlled by the current implementation.
*/
interface IERC1822Proxiable {
/**
* @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation
* address.
*
* IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
* bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
* function revert if invoked through a proxy.
*/
function proxiableUUID() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (proxy/ERC1967/ERC1967Utils.sol)
pragma solidity ^0.8.21;
import {IBeacon} from "../beacon/IBeacon.sol";
import {IERC1967} from "../../interfaces/IERC1967.sol";
import {Address} from "../../utils/Address.sol";
import {StorageSlot} from "../../utils/StorageSlot.sol";
/**
* @dev This library provides getters and event emitting update functions for
* https://eips.ethereum.org/EIPS/eip-1967[ERC-1967] slots.
*/
library ERC1967Utils {
/**
* @dev Storage slot with the address of the current implementation.
* This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1.
*/
// solhint-disable-next-line private-vars-leading-underscore
bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
/**
* @dev The `implementation` of the proxy is invalid.
*/
error ERC1967InvalidImplementation(address implementation);
/**
* @dev The `admin` of the proxy is invalid.
*/
error ERC1967InvalidAdmin(address admin);
/**
* @dev The `beacon` of the proxy is invalid.
*/
error ERC1967InvalidBeacon(address beacon);
/**
* @dev An upgrade function sees `msg.value > 0` that may be lost.
*/
error ERC1967NonPayable();
/**
* @dev Returns the current implementation address.
*/
function getImplementation() internal view returns (address) {
return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value;
}
/**
* @dev Stores a new address in the ERC-1967 implementation slot.
*/
function _setImplementation(address newImplementation) private {
if (newImplementation.code.length == 0) {
revert ERC1967InvalidImplementation(newImplementation);
}
StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation;
}
/**
* @dev Performs implementation upgrade with additional setup call if data is nonempty.
* This function is payable only if the setup call is performed, otherwise `msg.value` is rejected
* to avoid stuck value in the contract.
*
* Emits an {IERC1967-Upgraded} event.
*/
function upgradeToAndCall(address newImplementation, bytes memory data) internal {
_setImplementation(newImplementation);
emit IERC1967.Upgraded(newImplementation);
if (data.length > 0) {
Address.functionDelegateCall(newImplementation, data);
} else {
_checkNonPayable();
}
}
/**
* @dev Storage slot with the admin of the contract.
* This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1.
*/
// solhint-disable-next-line private-vars-leading-underscore
bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;
/**
* @dev Returns the current admin.
*
* TIP: To get this value clients can read directly from the storage slot shown below (specified by ERC-1967) using
* the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.
* `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`
*/
function getAdmin() internal view returns (address) {
return StorageSlot.getAddressSlot(ADMIN_SLOT).value;
}
/**
* @dev Stores a new address in the ERC-1967 admin slot.
*/
function _setAdmin(address newAdmin) private {
if (newAdmin == address(0)) {
revert ERC1967InvalidAdmin(address(0));
}
StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin;
}
/**
* @dev Changes the admin of the proxy.
*
* Emits an {IERC1967-AdminChanged} event.
*/
function changeAdmin(address newAdmin) internal {
emit IERC1967.AdminChanged(getAdmin(), newAdmin);
_setAdmin(newAdmin);
}
/**
* @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.
* This is the keccak-256 hash of "eip1967.proxy.beacon" subtracted by 1.
*/
// solhint-disable-next-line private-vars-leading-underscore
bytes32 internal constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;
/**
* @dev Returns the current beacon.
*/
function getBeacon() internal view returns (address) {
return StorageSlot.getAddressSlot(BEACON_SLOT).value;
}
/**
* @dev Stores a new beacon in the ERC-1967 beacon slot.
*/
function _setBeacon(address newBeacon) private {
if (newBeacon.code.length == 0) {
revert ERC1967InvalidBeacon(newBeacon);
}
StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon;
address beaconImplementation = IBeacon(newBeacon).implementation();
if (beaconImplementation.code.length == 0) {
revert ERC1967InvalidImplementation(beaconImplementation);
}
}
/**
* @dev Change the beacon and trigger a setup call if data is nonempty.
* This function is payable only if the setup call is performed, otherwise `msg.value` is rejected
* to avoid stuck value in the contract.
*
* Emits an {IERC1967-BeaconUpgraded} event.
*
* CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since
* it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for
* efficiency.
*/
function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal {
_setBeacon(newBeacon);
emit IERC1967.BeaconUpgraded(newBeacon);
if (data.length > 0) {
Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);
} else {
_checkNonPayable();
}
}
/**
* @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract
* if an upgrade doesn't perform an initialization call.
*/
function _checkNonPayable() private {
if (msg.value > 0) {
revert ERC1967NonPayable();
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)
pragma solidity >=0.6.2;
import {IERC20} from "./IERC20.sol";
import {IERC165} from "./IERC165.sol";
/**
* @title IERC1363
* @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].
*
* Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
* after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.
*/
interface IERC1363 is IERC20, IERC165 {
/*
* Note: the ERC-165 identifier for this interface is 0xb0202a11.
* 0xb0202a11 ===
* bytes4(keccak256('transferAndCall(address,uint256)')) ^
* bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
* bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
* bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^
* bytes4(keccak256('approveAndCall(address,uint256)')) ^
* bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
*/
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferAndCall(address to, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @param data Additional data with no specified format, sent in call to `to`.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param from The address which you want to send tokens from.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferFromAndCall(address from, address to, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param from The address which you want to send tokens from.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @param data Additional data with no specified format, sent in call to `to`.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function approveAndCall(address spender, uint256 value) external returns (bool);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
* @param data Additional data with no specified format, sent in call to `spender`.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (proxy/beacon/IBeacon.sol)
pragma solidity >=0.4.16;
/**
* @dev This is the interface that {BeaconProxy} expects of its beacon.
*/
interface IBeacon {
/**
* @dev Must return an address that can be used as a delegate call target.
*
* {UpgradeableBeacon} will check that this address is a contract.
*/
function implementation() external view returns (address);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1967.sol)
pragma solidity >=0.4.11;
/**
* @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.
*/
interface IERC1967 {
/**
* @dev Emitted when the implementation is upgraded.
*/
event Upgraded(address indexed implementation);
/**
* @dev Emitted when the admin account has changed.
*/
event AdminChanged(address previousAdmin, address newAdmin);
/**
* @dev Emitted when the beacon is changed.
*/
event BeaconUpgraded(address indexed beacon);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.5.0) (utils/Address.sol)
pragma solidity ^0.8.20;
import {Errors} from "./Errors.sol";
import {LowLevelCall} from "./LowLevelCall.sol";
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev There's no code at `target` (it is not a contract).
*/
error AddressEmptyCode(address target);
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
if (address(this).balance < amount) {
revert Errors.InsufficientBalance(address(this).balance, amount);
}
if (LowLevelCall.callNoReturn(recipient, amount, "")) {
// call successful, nothing to do
return;
} else if (LowLevelCall.returnDataSize() > 0) {
LowLevelCall.bubbleRevert();
} else {
revert Errors.FailedCall();
}
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason or custom error, it is bubbled
* up by this function (like regular Solidity function calls). However, if
* the call reverted with no returned reason, this function reverts with a
* {Errors.FailedCall} error.
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
if (address(this).balance < value) {
revert Errors.InsufficientBalance(address(this).balance, value);
}
bool success = LowLevelCall.callNoReturn(target, value, data);
if (success && (LowLevelCall.returnDataSize() > 0 || target.code.length > 0)) {
return LowLevelCall.returnData();
} else if (success) {
revert AddressEmptyCode(target);
} else if (LowLevelCall.returnDataSize() > 0) {
LowLevelCall.bubbleRevert();
} else {
revert Errors.FailedCall();
}
}
/**
* @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 = LowLevelCall.staticcallNoReturn(target, data);
if (success && (LowLevelCall.returnDataSize() > 0 || target.code.length > 0)) {
return LowLevelCall.returnData();
} else if (success) {
revert AddressEmptyCode(target);
} else if (LowLevelCall.returnDataSize() > 0) {
LowLevelCall.bubbleRevert();
} else {
revert Errors.FailedCall();
}
}
/**
* @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 = LowLevelCall.delegatecallNoReturn(target, data);
if (success && (LowLevelCall.returnDataSize() > 0 || target.code.length > 0)) {
return LowLevelCall.returnData();
} else if (success) {
revert AddressEmptyCode(target);
} else if (LowLevelCall.returnDataSize() > 0) {
LowLevelCall.bubbleRevert();
} else {
revert Errors.FailedCall();
}
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
* was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case
* of an unsuccessful call.
*
* NOTE: This function is DEPRECATED and may be removed in the next major release.
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata
) internal view returns (bytes memory) {
// 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 (success && (returndata.length > 0 || target.code.length > 0)) {
return returndata;
} else if (success) {
revert AddressEmptyCode(target);
} else if (returndata.length > 0) {
LowLevelCall.bubbleRevert(returndata);
} else {
revert Errors.FailedCall();
}
}
/**
* @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
* revert reason or with a default {Errors.FailedCall} error.
*/
function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else if (returndata.length > 0) {
LowLevelCall.bubbleRevert(returndata);
} else {
revert Errors.FailedCall();
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.
pragma solidity ^0.8.20;
/**
* @dev Library for reading and writing primitive types to specific storage slots.
*
* Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
* This library helps with reading and writing to such slots without the need for inline assembly.
*
* The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
*
* Example usage to set ERC-1967 implementation slot:
* ```solidity
* contract ERC1967 {
* // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.
* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
*
* function _getImplementation() internal view returns (address) {
* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
* }
*
* function _setImplementation(address newImplementation) internal {
* require(newImplementation.code.length > 0);
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
* }
* }
* ```
*
* TIP: Consider using this library along with {SlotDerivation}.
*/
library StorageSlot {
struct AddressSlot {
address value;
}
struct BooleanSlot {
bool value;
}
struct Bytes32Slot {
bytes32 value;
}
struct Uint256Slot {
uint256 value;
}
struct Int256Slot {
int256 value;
}
struct StringSlot {
string value;
}
struct BytesSlot {
bytes value;
}
/**
* @dev Returns an `AddressSlot` with member `value` located at `slot`.
*/
function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns a `BooleanSlot` with member `value` located at `slot`.
*/
function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns a `Bytes32Slot` with member `value` located at `slot`.
*/
function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns a `Uint256Slot` with member `value` located at `slot`.
*/
function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns a `Int256Slot` with member `value` located at `slot`.
*/
function getInt256Slot(bytes32 slot) internal pure returns (Int256Slot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns a `StringSlot` with member `value` located at `slot`.
*/
function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` representation of the string storage pointer `store`.
*/
function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
assembly ("memory-safe") {
r.slot := store.slot
}
}
/**
* @dev Returns a `BytesSlot` with member `value` located at `slot`.
*/
function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
*/
function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
assembly ("memory-safe") {
r.slot := store.slot
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)
pragma solidity >=0.4.16;
import {IERC20} from "../token/ERC20/IERC20.sol";// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)
pragma solidity >=0.4.16;
import {IERC165} from "../utils/introspection/IERC165.sol";// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol)
pragma solidity ^0.8.20;
/**
* @dev Collection of common custom errors used in multiple contracts
*
* IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.
* It is recommended to avoid relying on the error API for critical functionality.
*
* _Available since v5.1._
*/
library Errors {
/**
* @dev The ETH balance of the account is not enough to perform the operation.
*/
error InsufficientBalance(uint256 balance, uint256 needed);
/**
* @dev A call to an address target failed. The target may have reverted.
*/
error FailedCall();
/**
* @dev The deployment failed.
*/
error FailedDeployment();
/**
* @dev A necessary precompile is missing.
*/
error MissingPrecompile(address);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.5.0) (utils/LowLevelCall.sol)
pragma solidity ^0.8.20;
/**
* @dev Library of low level call functions that implement different calling strategies to deal with the return data.
*
* WARNING: Using this library requires an advanced understanding of Solidity and how the EVM works. It is recommended
* to use the {Address} library instead.
*/
library LowLevelCall {
/// @dev Performs a Solidity function call using a low level `call` and ignoring the return data.
function callNoReturn(address target, bytes memory data) internal returns (bool success) {
return callNoReturn(target, 0, data);
}
/// @dev Same as {callNoReturn}, but allows to specify the value to be sent in the call.
function callNoReturn(address target, uint256 value, bytes memory data) internal returns (bool success) {
assembly ("memory-safe") {
success := call(gas(), target, value, add(data, 0x20), mload(data), 0x00, 0x00)
}
}
/// @dev Performs a Solidity function call using a low level `call` and returns the first 64 bytes of the result
/// in the scratch space of memory. Useful for functions that return a tuple of single-word values.
///
/// WARNING: Do not assume that the results are zero if `success` is false. Memory can be already allocated
/// and this function doesn't zero it out.
function callReturn64Bytes(
address target,
bytes memory data
) internal returns (bool success, bytes32 result1, bytes32 result2) {
return callReturn64Bytes(target, 0, data);
}
/// @dev Same as {callReturnBytes32Pair}, but allows to specify the value to be sent in the call.
function callReturn64Bytes(
address target,
uint256 value,
bytes memory data
) internal returns (bool success, bytes32 result1, bytes32 result2) {
assembly ("memory-safe") {
success := call(gas(), target, value, add(data, 0x20), mload(data), 0x00, 0x40)
result1 := mload(0x00)
result2 := mload(0x20)
}
}
/// @dev Performs a Solidity function call using a low level `staticcall` and ignoring the return data.
function staticcallNoReturn(address target, bytes memory data) internal view returns (bool success) {
assembly ("memory-safe") {
success := staticcall(gas(), target, add(data, 0x20), mload(data), 0x00, 0x00)
}
}
/// @dev Performs a Solidity function call using a low level `staticcall` and returns the first 64 bytes of the result
/// in the scratch space of memory. Useful for functions that return a tuple of single-word values.
///
/// WARNING: Do not assume that the results are zero if `success` is false. Memory can be already allocated
/// and this function doesn't zero it out.
function staticcallReturn64Bytes(
address target,
bytes memory data
) internal view returns (bool success, bytes32 result1, bytes32 result2) {
assembly ("memory-safe") {
success := staticcall(gas(), target, add(data, 0x20), mload(data), 0x00, 0x40)
result1 := mload(0x00)
result2 := mload(0x20)
}
}
/// @dev Performs a Solidity function call using a low level `delegatecall` and ignoring the return data.
function delegatecallNoReturn(address target, bytes memory data) internal returns (bool success) {
assembly ("memory-safe") {
success := delegatecall(gas(), target, add(data, 0x20), mload(data), 0x00, 0x00)
}
}
/// @dev Performs a Solidity function call using a low level `delegatecall` and returns the first 64 bytes of the result
/// in the scratch space of memory. Useful for functions that return a tuple of single-word values.
///
/// WARNING: Do not assume that the results are zero if `success` is false. Memory can be already allocated
/// and this function doesn't zero it out.
function delegatecallReturn64Bytes(
address target,
bytes memory data
) internal returns (bool success, bytes32 result1, bytes32 result2) {
assembly ("memory-safe") {
success := delegatecall(gas(), target, add(data, 0x20), mload(data), 0x00, 0x40)
result1 := mload(0x00)
result2 := mload(0x20)
}
}
/// @dev Returns the size of the return data buffer.
function returnDataSize() internal pure returns (uint256 size) {
assembly ("memory-safe") {
size := returndatasize()
}
}
/// @dev Returns a buffer containing the return data from the last call.
function returnData() internal pure returns (bytes memory result) {
assembly ("memory-safe") {
result := mload(0x40)
mstore(result, returndatasize())
returndatacopy(add(result, 0x20), 0x00, returndatasize())
mstore(0x40, add(result, add(0x20, returndatasize())))
}
}
/// @dev Revert with the return data from the last call.
function bubbleRevert() internal pure {
assembly ("memory-safe") {
let fmp := mload(0x40)
returndatacopy(fmp, 0x00, returndatasize())
revert(fmp, returndatasize())
}
}
function bubbleRevert(bytes memory returndata) internal pure {
assembly ("memory-safe") {
revert(add(returndata, 0x20), mload(returndata))
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)
pragma solidity >=0.4.16;
/**
* @dev Interface of the ERC-165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[ERC].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}{
"remappings": [
"@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
"@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/",
"erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
"forge-std/=lib/forge-std/src/",
"halmos-cheatcodes/=lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/",
"openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
"openzeppelin-contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/"
],
"optimizer": {
"enabled": false,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "prague",
"viaIR": false
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"ERC1967InvalidImplementation","type":"error"},{"inputs":[],"name":"ERC1967NonPayable","type":"error"},{"inputs":[],"name":"FailedCall","type":"error"},{"inputs":[],"name":"InsufficientBalance","type":"error"},{"inputs":[],"name":"InvalidAddress","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"InvalidNumber","type":"error"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"reason","type":"uint256"}],"name":"InvalidUnlockSchedule","type":"error"},{"inputs":[],"name":"NoUnlockAvailable","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[],"name":"UUPSUnauthorizedCallContext","type":"error"},{"inputs":[{"internalType":"bytes32","name":"slot","type":"bytes32"}],"name":"UUPSUnsupportedProxiableUUID","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newAmount","type":"uint256"}],"name":"LockedAmountChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"PrimaryOwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"SecondaryOwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldStartTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newStartTime","type":"uint256"}],"name":"StartTimeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldToken","type":"address"},{"indexed":true,"internalType":"address","name":"newToken","type":"address"}],"name":"TokenChanged","type":"event"},{"anonymous":false,"inputs":[],"name":"UnlockSchedulesChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"OWNER_RESTRICTION_PERIOD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UPGRADE_INTERFACE_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAvailableAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getUnlockSchedule","outputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getUnlockSchedules","outputs":[{"components":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct VestingStorage.UnlockSchedule[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getUnlockSchedulesCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_primaryOwner","type":"address"},{"internalType":"address","name":"_secondaryOwner","type":"address"},{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_lockedAmount","type":"uint256"},{"components":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct VestingStorage.UnlockSchedule[]","name":"_unlockSchedules","type":"tuple[]"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockedAmountMatched","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"primaryOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"secondaryOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newLockedAmount","type":"uint256"},{"components":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct VestingStorage.UnlockSchedule[]","name":"_unlockSchedules","type":"tuple[]"}],"name":"setLockedAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newPrimaryOwner","type":"address"}],"name":"setPrimaryOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newSecondaryOwner","type":"address"}],"name":"setSecondaryOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newStartTime","type":"uint256"}],"name":"setStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newToken","type":"address"}],"name":"setToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct VestingStorage.UnlockSchedule[]","name":"_unlockSchedules","type":"tuple[]"}],"name":"setUnlockSchedules","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawnAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]Contract Creation Code
60a06040523073ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff16815250348015610042575f5ffd5b5061005161005660201b60201c565b6101d1565b5f61006561015460201b60201c565b9050805f0160089054906101000a900460ff16156100af576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8016815f015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff16146101515767ffffffffffffffff815f015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055507fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d267ffffffffffffffff60405161014891906101b8565b60405180910390a15b50565b5f5f61016461016d60201b60201c565b90508091505090565b5f7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005f1b905090565b5f67ffffffffffffffff82169050919050565b6101b281610196565b82525050565b5f6020820190506101cb5f8301846101a9565b92915050565b608051612ece6101f75f395f8181611c8401528181611cd90152611e930152612ece5ff3fe60806040526004361061014a575f3560e01c806352d1902d116100b55780638e10be331161006e5780638e10be331461042a57806395ccea6714610454578063ad3cb1cc1461047c578063c2bd89b9146104a6578063d52e7f93146104ce578063fc0c546a146104f65761014a565b806352d1902d1461032d5780635497e945146103575780636ab28bc81461038257806378e97925146103ac5780637bb476f5146103d6578063830de4b1146104005761014a565b806336a5a2311161010757806336a5a231146102445780633ccfd60b1461026e5780633e0a322d146102845780633f586e2c146102ac57806343bad081146102e95780634f1ef286146103115761014a565b8063028575791461014e57806303b92ce81461017857806313fb2827146101a2578063144fa6d7146101ca5780631c4f88d3146101f2578063297265911461021c575b5f5ffd5b348015610159575f5ffd5b50610162610520565b60405161016f91906123f4565b60405180910390f35b348015610183575f5ffd5b5061018c61053a565b6040516101999190612423565b60405180910390f35b3480156101ad575f5ffd5b506101c860048036038101906101c39190612672565b610541565b005b3480156101d5575f5ffd5b506101f060048036038101906101eb9190612717565b6108f1565b005b3480156101fd575f5ffd5b50610206610a31565b6040516102139190612423565b60405180910390f35b348015610227575f5ffd5b50610242600480360381019061023d9190612742565b610a46565b005b34801561024f575f5ffd5b50610258610aa5565b6040516102659190612798565b60405180910390f35b348015610279575f5ffd5b50610282610ad6565b005b34801561028f575f5ffd5b506102aa60048036038101906102a591906127b1565b610c2d565b005b3480156102b7575f5ffd5b506102d260048036038101906102cd91906127b1565b610cf2565b6040516102e09291906127dc565b60405180910390f35b3480156102f4575f5ffd5b5061030f600480360381019061030a9190612717565b610d9d565b005b61032b600480360381019061032691906128b3565b610edb565b005b348015610338575f5ffd5b50610341610efa565b60405161034e9190612925565b60405180910390f35b348015610362575f5ffd5b5061036b610f2b565b604051610379929190612958565b60405180910390f35b34801561038d575f5ffd5b50610396610fe8565b6040516103a39190612423565b60405180910390f35b3480156103b7575f5ffd5b506103c0610ffa565b6040516103cd9190612423565b60405180910390f35b3480156103e1575f5ffd5b506103ea61100c565b6040516103f79190612423565b60405180910390f35b34801561040b575f5ffd5b506104146110d1565b6040516104219190612423565b60405180910390f35b348015610435575f5ffd5b5061043e6110e3565b60405161044b9190612798565b60405180910390f35b34801561045f575f5ffd5b5061047a6004803603810190610475919061297f565b611113565b005b348015610487575f5ffd5b50610490611305565b60405161049d9190612a1d565b60405180910390f35b3480156104b1575f5ffd5b506104cc60048036038101906104c79190612a3d565b61133e565b005b3480156104d9575f5ffd5b506104f460048036038101906104ef9190612717565b611457565b005b348015610501575f5ffd5b5061050a611532565b6040516105179190612798565b60405180910390f35b606061053561052d611563565b60050161158f565b905090565b62ed4e0081565b5f61054a61166f565b90505f815f0160089054906101000a900460ff161590505f825f015f9054906101000a900467ffffffffffffffff1690505f5f8267ffffffffffffffff161480156105925750825b90505f60018367ffffffffffffffff161480156105c557505f3073ffffffffffffffffffffffffffffffffffffffff163b145b9050811580156105d3575080155b1561060a576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001855f015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508315610657576001855f0160086101000a81548160ff0219169083151502179055505b5f73ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff16036106bc576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f89036106f5576040517f74cbd35f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff160361075a576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8703610793576040517f74cbd35f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61079c611563565b90508b815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508a816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555089816002018190555088816003015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508781600401819055506108808a8989611682565b610889876118dd565b5083156108e4575f855f0160086101000a81548160ff0219169083151502179055507fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d260016040516108db9190612aec565b60405180910390a15b5050505050505050505050565b6108f9611970565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361095e576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f610967611563565b90505f816003015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082826003015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fec507b76e4056f09193394a4361b44129ec561809ddee312c7f97121f93bb58b60405160405180910390a3505050565b5f610a3a611563565b60050180549050905090565b610a4e611970565b5f610a57611563565b9050610a6c8160020154826004015484611682565b610a75826118dd565b7ff5eac85b9813f7323fee9dacb49b96f1a12f3e288a63ed64f46ff3f9b12db35060405160405180910390a15050565b5f610aae611563565b6001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610ade611b04565b5f610ae761100c565b90505f8103610b22576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f610b2b611563565b905081816006015f828254610b409190612b32565b92505081905550610bb8816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683836003015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611b9a9092919063ffffffff16565b806001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436483604051610c219190612423565b60405180910390a25050565b610c35611970565b5f8103610c6e576040517f74cbd35f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f610c77611563565b90505f81600501805490501115610ca357610ca2828260040154610c9d8460050161158f565b611682565b5b5f816002015490508282600201819055507fbefe8e3983c0dc663c4ba451fc82d4ff7eb2e4ccc4b944874abea1ecc841feae8184604051610ce59291906127dc565b60405180910390a1505050565b5f5f5f610cfd611563565b905080600501805490508410610d48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3f90612baf565b60405180910390fd5b806005018481548110610d5e57610d5d612bcd565b5b905f5260205f2090600202015f0154816005018581548110610d8357610d82612bcd565b5b905f5260205f209060020201600101549250925050915091565b610da5611bed565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610e0a576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f610e13611563565b90505f815f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082825f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fcacb62ef00d7d057af8a730953836c1302cc0ff75775992cab69ebb0861ed9ef60405160405180910390a3505050565b610ee3611c82565b610eec82611d68565b610ef68282611d73565b5050565b5f610f03611e91565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5f1b905090565b5f5f5f610f36611563565b90505f816003015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610f959190612798565b602060405180830381865afa158015610fb0573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610fd49190612c0e565b905081600401548114819350935050509091565b5f610ff1611563565b60040154905090565b5f611003611563565b60020154905090565b5f5f611016611563565b9050806002015442101561102d575f9150506110ce565b5f5f90505f5f90505b82600501805490508110156110a65782600501818154811061105b5761105a612bcd565b5b905f5260205f2090600202015f015442106110995782600501818154811061108657611085612bcd565b5b905f5260205f2090600202016001015491505b8080600101915050611036565b50816006015481116110b8575f6110c9565b8160060154816110c89190612c39565b5b925050505b90565b5f6110da611563565b60060154905090565b5f6110ec611563565b5f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61111b611bed565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611180576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611189611563565b90505f816003015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016111e89190612798565b602060405180830381865afa158015611203573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112279190612c0e565b905082811015611263576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6112b18484846003015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611b9a9092919063ffffffff16565b8373ffffffffffffffffffffffffffffffffffffffff167f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd9695846040516112f79190612423565b60405180910390a250505050565b6040518060400160405280600581526020017f352e302e3000000000000000000000000000000000000000000000000000000081525081565b611346611970565b5f820361137f576040517f74cbd35f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611388611563565b90505f825111156113dc576113a281600201548484611682565b6113ab826118dd565b7ff5eac85b9813f7323fee9dacb49b96f1a12f3e288a63ed64f46ff3f9b12db35060405160405180910390a1611407565b5f81600501805490501115611406576114058160020154846114008460050161158f565b611682565b5b5b5f816004015490508382600401819055507fbe7472397f55be64a29d6c8e3344ad1f90e5d2a975f021cd0e1520b3f116739881856040516114499291906127dc565b60405180910390a150505050565b61145f611970565b5f611468611563565b90505f816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082826001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fd3fe68f35104d9b97c46bd44222e5d30c699bee11fb150050de9a497698a1d4c60405160405180910390a3505050565b5f61153b611563565b6003015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f5f7fd661bcbe54f9423e8b1f55685e3864844de5500f265b3ea5deef75b4f674f92f90508091505090565b60605f828054905067ffffffffffffffff8111156115b0576115af6124e5565b5b6040519080825280602002602001820160405280156115e957816020015b6115d66122aa565b8152602001906001900390816115ce5790505b5090505f5f90505b8380549050811015611665578381815481106116105761160f612bcd565b5b905f5260205f2090600202016040518060400160405290815f820154815260200160018201548152505082828151811061164d5761164c612bcd565b5b602002602001018190525080806001019150506115f1565b5080915050919050565b5f5f611679611f18565b90508091505090565b5f8151036116c9575f5f6040517ff17c63770000000000000000000000000000000000000000000000000000000081526004016116c0929190612ca5565b60405180910390fd5b82815f815181106116dd576116dc612bcd565b5b60200260200101515f01511161172d575f60016040517ff17c6377000000000000000000000000000000000000000000000000000000008152600401611724929190612cfc565b60405180910390fd5b5f600190505b8151811015611865578160018261174a9190612c39565b8151811061175b5761175a612bcd565b5b60200260200101515f015182828151811061177957611778612bcd565b5b60200260200101515f0151116117c9578060026040517ff17c63770000000000000000000000000000000000000000000000000000000081526004016117c0929190612d5c565b60405180910390fd5b816001826117d79190612c39565b815181106117e8576117e7612bcd565b5b60200260200101516020015182828151811061180757611806612bcd565b5b60200260200101516020015111611858578060036040517ff17c637700000000000000000000000000000000000000000000000000000000815260040161184f929190612dbc565b60405180910390fd5b8080600101915050611733565b508181600183516118769190612c39565b8151811061188757611886612bcd565b5b602002602001015160200151146118d8575f60046040517ff17c63770000000000000000000000000000000000000000000000000000000081526004016118cf929190612e1c565b60405180910390fd5b505050565b5f6118e6611563565b9050806005015f6118f791906122c2565b5f5f90505b825181101561196b578160050183828151811061191c5761191b612bcd565b5b6020026020010151908060018154018082558091505060019003905f5260205f2090600202015f909190919091505f820151815f015560208201518160010155505080806001019150506118fc565b505050565b5f611979611563565b9050805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015611a285750806001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15611a5f576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62ed4e008160020154611a729190612b32565b421015611b0157805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611b00576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50565b5f611b0d611563565b9050806001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611b97576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b611ba78383836001611f41565b611be857826040517f5274afe7000000000000000000000000000000000000000000000000000000008152600401611bdf9190612798565b60405180910390fd5b505050565b5f611bf6611563565b9050805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611c7f576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161480611d2f57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611d16611fa3565b73ffffffffffffffffffffffffffffffffffffffff1614155b15611d66576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b611d70611970565b50565b8173ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611ddb57506040513d601f19601f82011682018060405250810190611dd89190612e6d565b60015b611e1c57816040517f4c9c8ce3000000000000000000000000000000000000000000000000000000008152600401611e139190612798565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5f1b8114611e8257806040517faa1d49a4000000000000000000000000000000000000000000000000000000008152600401611e799190612925565b60405180910390fd5b611e8c8383611ff6565b505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614611f16576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b5f7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005f1b905090565b5f5f63a9059cbb60e01b9050604051815f525f1960601c86166004528460245260205f60445f5f8b5af1925060015f51148316611f95578383151615611f89573d5f823e3d81fd5b5f873b113d1516831692505b806040525050949350505050565b5f611fcf7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5f1b612068565b5f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611fff82612071565b8173ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a25f8151111561205b57612055828261213a565b50612064565b61206361222b565b5b5050565b5f819050919050565b5f8173ffffffffffffffffffffffffffffffffffffffff163b036120cc57806040517f4c9c8ce30000000000000000000000000000000000000000000000000000000081526004016120c39190612798565b60405180910390fd5b806120f87f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5f1b612068565b5f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60605f6121478484612267565b905080801561217d57505f61215a61227b565b118061217c57505f8473ffffffffffffffffffffffffffffffffffffffff163b115b5b156121925761218a612282565b915050612225565b80156121d557836040517f9996b3150000000000000000000000000000000000000000000000000000000081526004016121cc9190612798565b60405180910390fd5b5f6121de61227b565b11156121f1576121ec61229f565b612223565b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b92915050565b5f341115612265576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b5f5f5f835160208501865af4905092915050565b5f3d905090565b606060405190503d81523d5f602083013e3d602001810160405290565b6040513d5f823e3d81fd5b60405180604001604052805f81526020015f81525090565b5080545f8255600202905f5260205f20908101906122e091906122e3565b50565b5b80821115612303575f5f82015f9055600182015f9055506002016122e4565b5090565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f819050919050565b61234281612330565b82525050565b604082015f82015161235c5f850182612339565b50602082015161236f6020850182612339565b50505050565b5f6123808383612348565b60408301905092915050565b5f602082019050919050565b5f6123a282612307565b6123ac8185612311565b93506123b783612321565b805f5b838110156123e75781516123ce8882612375565b97506123d98361238c565b9250506001810190506123ba565b5085935050505092915050565b5f6020820190508181035f83015261240c8184612398565b905092915050565b61241d81612330565b82525050565b5f6020820190506124365f830184612414565b92915050565b5f604051905090565b5f5ffd5b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6124768261244d565b9050919050565b6124868161246c565b8114612490575f5ffd5b50565b5f813590506124a18161247d565b92915050565b6124b081612330565b81146124ba575f5ffd5b50565b5f813590506124cb816124a7565b92915050565b5f5ffd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61251b826124d5565b810181811067ffffffffffffffff8211171561253a576125396124e5565b5b80604052505050565b5f61254c61243c565b90506125588282612512565b919050565b5f67ffffffffffffffff821115612577576125766124e5565b5b602082029050602081019050919050565b5f5ffd5b5f5ffd5b5f604082840312156125a5576125a461258c565b5b6125af6040612543565b90505f6125be848285016124bd565b5f8301525060206125d1848285016124bd565b60208301525092915050565b5f6125ef6125ea8461255d565b612543565b9050808382526020820190506040840283018581111561261257612611612588565b5b835b8181101561263b57806126278882612590565b845260208401935050604081019050612614565b5050509392505050565b5f82601f830112612659576126586124d1565b5b81356126698482602086016125dd565b91505092915050565b5f5f5f5f5f5f60c0878903121561268c5761268b612445565b5b5f61269989828a01612493565b96505060206126aa89828a01612493565b95505060406126bb89828a016124bd565b94505060606126cc89828a01612493565b93505060806126dd89828a016124bd565b92505060a087013567ffffffffffffffff8111156126fe576126fd612449565b5b61270a89828a01612645565b9150509295509295509295565b5f6020828403121561272c5761272b612445565b5b5f61273984828501612493565b91505092915050565b5f6020828403121561275757612756612445565b5b5f82013567ffffffffffffffff81111561277457612773612449565b5b61278084828501612645565b91505092915050565b6127928161246c565b82525050565b5f6020820190506127ab5f830184612789565b92915050565b5f602082840312156127c6576127c5612445565b5b5f6127d3848285016124bd565b91505092915050565b5f6040820190506127ef5f830185612414565b6127fc6020830184612414565b9392505050565b5f5ffd5b5f67ffffffffffffffff821115612821576128206124e5565b5b61282a826124d5565b9050602081019050919050565b828183375f83830152505050565b5f61285761285284612807565b612543565b90508281526020810184848401111561287357612872612803565b5b61287e848285612837565b509392505050565b5f82601f83011261289a576128996124d1565b5b81356128aa848260208601612845565b91505092915050565b5f5f604083850312156128c9576128c8612445565b5b5f6128d685828601612493565b925050602083013567ffffffffffffffff8111156128f7576128f6612449565b5b61290385828601612886565b9150509250929050565b5f819050919050565b61291f8161290d565b82525050565b5f6020820190506129385f830184612916565b92915050565b5f8115159050919050565b6129528161293e565b82525050565b5f60408201905061296b5f830185612949565b6129786020830184612414565b9392505050565b5f5f6040838503121561299557612994612445565b5b5f6129a285828601612493565b92505060206129b3858286016124bd565b9150509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f6129ef826129bd565b6129f981856129c7565b9350612a098185602086016129d7565b612a12816124d5565b840191505092915050565b5f6020820190508181035f830152612a3581846129e5565b905092915050565b5f5f60408385031215612a5357612a52612445565b5b5f612a60858286016124bd565b925050602083013567ffffffffffffffff811115612a8157612a80612449565b5b612a8d85828601612645565b9150509250929050565b5f819050919050565b5f67ffffffffffffffff82169050919050565b5f819050919050565b5f612ad6612ad1612acc84612a97565b612ab3565b612aa0565b9050919050565b612ae681612abc565b82525050565b5f602082019050612aff5f830184612add565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f612b3c82612330565b9150612b4783612330565b9250828201905080821115612b5f57612b5e612b05565b5b92915050565b7f496e646578206f7574206f6620626f756e6473000000000000000000000000005f82015250565b5f612b996013836129c7565b9150612ba482612b65565b602082019050919050565b5f6020820190508181035f830152612bc681612b8d565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f81519050612c08816124a7565b92915050565b5f60208284031215612c2357612c22612445565b5b5f612c3084828501612bfa565b91505092915050565b5f612c4382612330565b9150612c4e83612330565b9250828203905081811115612c6657612c65612b05565b5b92915050565b5f819050919050565b5f612c8f612c8a612c8584612c6c565b612ab3565b612330565b9050919050565b612c9f81612c75565b82525050565b5f604082019050612cb85f830185612c96565b612cc56020830184612c96565b9392505050565b5f612ce6612ce1612cdc84612a97565b612ab3565b612330565b9050919050565b612cf681612ccc565b82525050565b5f604082019050612d0f5f830185612c96565b612d1c6020830184612ced565b9392505050565b5f819050919050565b5f612d46612d41612d3c84612d23565b612ab3565b612330565b9050919050565b612d5681612d2c565b82525050565b5f604082019050612d6f5f830185612414565b612d7c6020830184612d4d565b9392505050565b5f819050919050565b5f612da6612da1612d9c84612d83565b612ab3565b612330565b9050919050565b612db681612d8c565b82525050565b5f604082019050612dcf5f830185612414565b612ddc6020830184612dad565b9392505050565b5f819050919050565b5f612e06612e01612dfc84612de3565b612ab3565b612330565b9050919050565b612e1681612dec565b82525050565b5f604082019050612e2f5f830185612c96565b612e3c6020830184612e0d565b9392505050565b612e4c8161290d565b8114612e56575f5ffd5b50565b5f81519050612e6781612e43565b92915050565b5f60208284031215612e8257612e81612445565b5b5f612e8f84828501612e59565b9150509291505056fea2646970667358221220e8f7ba38324956d078ce46e312f608f9dfccd4536919e129b75153782cf8cc9064736f6c634300081c0033
Deployed Bytecode
0x60806040526004361061014a575f3560e01c806352d1902d116100b55780638e10be331161006e5780638e10be331461042a57806395ccea6714610454578063ad3cb1cc1461047c578063c2bd89b9146104a6578063d52e7f93146104ce578063fc0c546a146104f65761014a565b806352d1902d1461032d5780635497e945146103575780636ab28bc81461038257806378e97925146103ac5780637bb476f5146103d6578063830de4b1146104005761014a565b806336a5a2311161010757806336a5a231146102445780633ccfd60b1461026e5780633e0a322d146102845780633f586e2c146102ac57806343bad081146102e95780634f1ef286146103115761014a565b8063028575791461014e57806303b92ce81461017857806313fb2827146101a2578063144fa6d7146101ca5780631c4f88d3146101f2578063297265911461021c575b5f5ffd5b348015610159575f5ffd5b50610162610520565b60405161016f91906123f4565b60405180910390f35b348015610183575f5ffd5b5061018c61053a565b6040516101999190612423565b60405180910390f35b3480156101ad575f5ffd5b506101c860048036038101906101c39190612672565b610541565b005b3480156101d5575f5ffd5b506101f060048036038101906101eb9190612717565b6108f1565b005b3480156101fd575f5ffd5b50610206610a31565b6040516102139190612423565b60405180910390f35b348015610227575f5ffd5b50610242600480360381019061023d9190612742565b610a46565b005b34801561024f575f5ffd5b50610258610aa5565b6040516102659190612798565b60405180910390f35b348015610279575f5ffd5b50610282610ad6565b005b34801561028f575f5ffd5b506102aa60048036038101906102a591906127b1565b610c2d565b005b3480156102b7575f5ffd5b506102d260048036038101906102cd91906127b1565b610cf2565b6040516102e09291906127dc565b60405180910390f35b3480156102f4575f5ffd5b5061030f600480360381019061030a9190612717565b610d9d565b005b61032b600480360381019061032691906128b3565b610edb565b005b348015610338575f5ffd5b50610341610efa565b60405161034e9190612925565b60405180910390f35b348015610362575f5ffd5b5061036b610f2b565b604051610379929190612958565b60405180910390f35b34801561038d575f5ffd5b50610396610fe8565b6040516103a39190612423565b60405180910390f35b3480156103b7575f5ffd5b506103c0610ffa565b6040516103cd9190612423565b60405180910390f35b3480156103e1575f5ffd5b506103ea61100c565b6040516103f79190612423565b60405180910390f35b34801561040b575f5ffd5b506104146110d1565b6040516104219190612423565b60405180910390f35b348015610435575f5ffd5b5061043e6110e3565b60405161044b9190612798565b60405180910390f35b34801561045f575f5ffd5b5061047a6004803603810190610475919061297f565b611113565b005b348015610487575f5ffd5b50610490611305565b60405161049d9190612a1d565b60405180910390f35b3480156104b1575f5ffd5b506104cc60048036038101906104c79190612a3d565b61133e565b005b3480156104d9575f5ffd5b506104f460048036038101906104ef9190612717565b611457565b005b348015610501575f5ffd5b5061050a611532565b6040516105179190612798565b60405180910390f35b606061053561052d611563565b60050161158f565b905090565b62ed4e0081565b5f61054a61166f565b90505f815f0160089054906101000a900460ff161590505f825f015f9054906101000a900467ffffffffffffffff1690505f5f8267ffffffffffffffff161480156105925750825b90505f60018367ffffffffffffffff161480156105c557505f3073ffffffffffffffffffffffffffffffffffffffff163b145b9050811580156105d3575080155b1561060a576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001855f015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508315610657576001855f0160086101000a81548160ff0219169083151502179055505b5f73ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff16036106bc576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f89036106f5576040517f74cbd35f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff160361075a576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8703610793576040517f74cbd35f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61079c611563565b90508b815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508a816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555089816002018190555088816003015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508781600401819055506108808a8989611682565b610889876118dd565b5083156108e4575f855f0160086101000a81548160ff0219169083151502179055507fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d260016040516108db9190612aec565b60405180910390a15b5050505050505050505050565b6108f9611970565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361095e576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f610967611563565b90505f816003015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082826003015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fec507b76e4056f09193394a4361b44129ec561809ddee312c7f97121f93bb58b60405160405180910390a3505050565b5f610a3a611563565b60050180549050905090565b610a4e611970565b5f610a57611563565b9050610a6c8160020154826004015484611682565b610a75826118dd565b7ff5eac85b9813f7323fee9dacb49b96f1a12f3e288a63ed64f46ff3f9b12db35060405160405180910390a15050565b5f610aae611563565b6001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610ade611b04565b5f610ae761100c565b90505f8103610b22576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f610b2b611563565b905081816006015f828254610b409190612b32565b92505081905550610bb8816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683836003015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611b9a9092919063ffffffff16565b806001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436483604051610c219190612423565b60405180910390a25050565b610c35611970565b5f8103610c6e576040517f74cbd35f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f610c77611563565b90505f81600501805490501115610ca357610ca2828260040154610c9d8460050161158f565b611682565b5b5f816002015490508282600201819055507fbefe8e3983c0dc663c4ba451fc82d4ff7eb2e4ccc4b944874abea1ecc841feae8184604051610ce59291906127dc565b60405180910390a1505050565b5f5f5f610cfd611563565b905080600501805490508410610d48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3f90612baf565b60405180910390fd5b806005018481548110610d5e57610d5d612bcd565b5b905f5260205f2090600202015f0154816005018581548110610d8357610d82612bcd565b5b905f5260205f209060020201600101549250925050915091565b610da5611bed565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610e0a576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f610e13611563565b90505f815f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082825f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fcacb62ef00d7d057af8a730953836c1302cc0ff75775992cab69ebb0861ed9ef60405160405180910390a3505050565b610ee3611c82565b610eec82611d68565b610ef68282611d73565b5050565b5f610f03611e91565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5f1b905090565b5f5f5f610f36611563565b90505f816003015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610f959190612798565b602060405180830381865afa158015610fb0573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610fd49190612c0e565b905081600401548114819350935050509091565b5f610ff1611563565b60040154905090565b5f611003611563565b60020154905090565b5f5f611016611563565b9050806002015442101561102d575f9150506110ce565b5f5f90505f5f90505b82600501805490508110156110a65782600501818154811061105b5761105a612bcd565b5b905f5260205f2090600202015f015442106110995782600501818154811061108657611085612bcd565b5b905f5260205f2090600202016001015491505b8080600101915050611036565b50816006015481116110b8575f6110c9565b8160060154816110c89190612c39565b5b925050505b90565b5f6110da611563565b60060154905090565b5f6110ec611563565b5f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61111b611bed565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611180576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611189611563565b90505f816003015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016111e89190612798565b602060405180830381865afa158015611203573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112279190612c0e565b905082811015611263576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6112b18484846003015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611b9a9092919063ffffffff16565b8373ffffffffffffffffffffffffffffffffffffffff167f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd9695846040516112f79190612423565b60405180910390a250505050565b6040518060400160405280600581526020017f352e302e3000000000000000000000000000000000000000000000000000000081525081565b611346611970565b5f820361137f576040517f74cbd35f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611388611563565b90505f825111156113dc576113a281600201548484611682565b6113ab826118dd565b7ff5eac85b9813f7323fee9dacb49b96f1a12f3e288a63ed64f46ff3f9b12db35060405160405180910390a1611407565b5f81600501805490501115611406576114058160020154846114008460050161158f565b611682565b5b5b5f816004015490508382600401819055507fbe7472397f55be64a29d6c8e3344ad1f90e5d2a975f021cd0e1520b3f116739881856040516114499291906127dc565b60405180910390a150505050565b61145f611970565b5f611468611563565b90505f816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082826001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fd3fe68f35104d9b97c46bd44222e5d30c699bee11fb150050de9a497698a1d4c60405160405180910390a3505050565b5f61153b611563565b6003015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f5f7fd661bcbe54f9423e8b1f55685e3864844de5500f265b3ea5deef75b4f674f92f90508091505090565b60605f828054905067ffffffffffffffff8111156115b0576115af6124e5565b5b6040519080825280602002602001820160405280156115e957816020015b6115d66122aa565b8152602001906001900390816115ce5790505b5090505f5f90505b8380549050811015611665578381815481106116105761160f612bcd565b5b905f5260205f2090600202016040518060400160405290815f820154815260200160018201548152505082828151811061164d5761164c612bcd565b5b602002602001018190525080806001019150506115f1565b5080915050919050565b5f5f611679611f18565b90508091505090565b5f8151036116c9575f5f6040517ff17c63770000000000000000000000000000000000000000000000000000000081526004016116c0929190612ca5565b60405180910390fd5b82815f815181106116dd576116dc612bcd565b5b60200260200101515f01511161172d575f60016040517ff17c6377000000000000000000000000000000000000000000000000000000008152600401611724929190612cfc565b60405180910390fd5b5f600190505b8151811015611865578160018261174a9190612c39565b8151811061175b5761175a612bcd565b5b60200260200101515f015182828151811061177957611778612bcd565b5b60200260200101515f0151116117c9578060026040517ff17c63770000000000000000000000000000000000000000000000000000000081526004016117c0929190612d5c565b60405180910390fd5b816001826117d79190612c39565b815181106117e8576117e7612bcd565b5b60200260200101516020015182828151811061180757611806612bcd565b5b60200260200101516020015111611858578060036040517ff17c637700000000000000000000000000000000000000000000000000000000815260040161184f929190612dbc565b60405180910390fd5b8080600101915050611733565b508181600183516118769190612c39565b8151811061188757611886612bcd565b5b602002602001015160200151146118d8575f60046040517ff17c63770000000000000000000000000000000000000000000000000000000081526004016118cf929190612e1c565b60405180910390fd5b505050565b5f6118e6611563565b9050806005015f6118f791906122c2565b5f5f90505b825181101561196b578160050183828151811061191c5761191b612bcd565b5b6020026020010151908060018154018082558091505060019003905f5260205f2090600202015f909190919091505f820151815f015560208201518160010155505080806001019150506118fc565b505050565b5f611979611563565b9050805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015611a285750806001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15611a5f576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62ed4e008160020154611a729190612b32565b421015611b0157805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611b00576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50565b5f611b0d611563565b9050806001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611b97576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b611ba78383836001611f41565b611be857826040517f5274afe7000000000000000000000000000000000000000000000000000000008152600401611bdf9190612798565b60405180910390fd5b505050565b5f611bf6611563565b9050805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611c7f576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b7f000000000000000000000000735bce12c83e6c6fb6cb0aff7ada9bcadba56c7573ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161480611d2f57507f000000000000000000000000735bce12c83e6c6fb6cb0aff7ada9bcadba56c7573ffffffffffffffffffffffffffffffffffffffff16611d16611fa3565b73ffffffffffffffffffffffffffffffffffffffff1614155b15611d66576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b611d70611970565b50565b8173ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611ddb57506040513d601f19601f82011682018060405250810190611dd89190612e6d565b60015b611e1c57816040517f4c9c8ce3000000000000000000000000000000000000000000000000000000008152600401611e139190612798565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5f1b8114611e8257806040517faa1d49a4000000000000000000000000000000000000000000000000000000008152600401611e799190612925565b60405180910390fd5b611e8c8383611ff6565b505050565b7f000000000000000000000000735bce12c83e6c6fb6cb0aff7ada9bcadba56c7573ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614611f16576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b5f7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005f1b905090565b5f5f63a9059cbb60e01b9050604051815f525f1960601c86166004528460245260205f60445f5f8b5af1925060015f51148316611f95578383151615611f89573d5f823e3d81fd5b5f873b113d1516831692505b806040525050949350505050565b5f611fcf7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5f1b612068565b5f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611fff82612071565b8173ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a25f8151111561205b57612055828261213a565b50612064565b61206361222b565b5b5050565b5f819050919050565b5f8173ffffffffffffffffffffffffffffffffffffffff163b036120cc57806040517f4c9c8ce30000000000000000000000000000000000000000000000000000000081526004016120c39190612798565b60405180910390fd5b806120f87f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5f1b612068565b5f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60605f6121478484612267565b905080801561217d57505f61215a61227b565b118061217c57505f8473ffffffffffffffffffffffffffffffffffffffff163b115b5b156121925761218a612282565b915050612225565b80156121d557836040517f9996b3150000000000000000000000000000000000000000000000000000000081526004016121cc9190612798565b60405180910390fd5b5f6121de61227b565b11156121f1576121ec61229f565b612223565b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b92915050565b5f341115612265576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b5f5f5f835160208501865af4905092915050565b5f3d905090565b606060405190503d81523d5f602083013e3d602001810160405290565b6040513d5f823e3d81fd5b60405180604001604052805f81526020015f81525090565b5080545f8255600202905f5260205f20908101906122e091906122e3565b50565b5b80821115612303575f5f82015f9055600182015f9055506002016122e4565b5090565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f819050919050565b61234281612330565b82525050565b604082015f82015161235c5f850182612339565b50602082015161236f6020850182612339565b50505050565b5f6123808383612348565b60408301905092915050565b5f602082019050919050565b5f6123a282612307565b6123ac8185612311565b93506123b783612321565b805f5b838110156123e75781516123ce8882612375565b97506123d98361238c565b9250506001810190506123ba565b5085935050505092915050565b5f6020820190508181035f83015261240c8184612398565b905092915050565b61241d81612330565b82525050565b5f6020820190506124365f830184612414565b92915050565b5f604051905090565b5f5ffd5b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6124768261244d565b9050919050565b6124868161246c565b8114612490575f5ffd5b50565b5f813590506124a18161247d565b92915050565b6124b081612330565b81146124ba575f5ffd5b50565b5f813590506124cb816124a7565b92915050565b5f5ffd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61251b826124d5565b810181811067ffffffffffffffff8211171561253a576125396124e5565b5b80604052505050565b5f61254c61243c565b90506125588282612512565b919050565b5f67ffffffffffffffff821115612577576125766124e5565b5b602082029050602081019050919050565b5f5ffd5b5f5ffd5b5f604082840312156125a5576125a461258c565b5b6125af6040612543565b90505f6125be848285016124bd565b5f8301525060206125d1848285016124bd565b60208301525092915050565b5f6125ef6125ea8461255d565b612543565b9050808382526020820190506040840283018581111561261257612611612588565b5b835b8181101561263b57806126278882612590565b845260208401935050604081019050612614565b5050509392505050565b5f82601f830112612659576126586124d1565b5b81356126698482602086016125dd565b91505092915050565b5f5f5f5f5f5f60c0878903121561268c5761268b612445565b5b5f61269989828a01612493565b96505060206126aa89828a01612493565b95505060406126bb89828a016124bd565b94505060606126cc89828a01612493565b93505060806126dd89828a016124bd565b92505060a087013567ffffffffffffffff8111156126fe576126fd612449565b5b61270a89828a01612645565b9150509295509295509295565b5f6020828403121561272c5761272b612445565b5b5f61273984828501612493565b91505092915050565b5f6020828403121561275757612756612445565b5b5f82013567ffffffffffffffff81111561277457612773612449565b5b61278084828501612645565b91505092915050565b6127928161246c565b82525050565b5f6020820190506127ab5f830184612789565b92915050565b5f602082840312156127c6576127c5612445565b5b5f6127d3848285016124bd565b91505092915050565b5f6040820190506127ef5f830185612414565b6127fc6020830184612414565b9392505050565b5f5ffd5b5f67ffffffffffffffff821115612821576128206124e5565b5b61282a826124d5565b9050602081019050919050565b828183375f83830152505050565b5f61285761285284612807565b612543565b90508281526020810184848401111561287357612872612803565b5b61287e848285612837565b509392505050565b5f82601f83011261289a576128996124d1565b5b81356128aa848260208601612845565b91505092915050565b5f5f604083850312156128c9576128c8612445565b5b5f6128d685828601612493565b925050602083013567ffffffffffffffff8111156128f7576128f6612449565b5b61290385828601612886565b9150509250929050565b5f819050919050565b61291f8161290d565b82525050565b5f6020820190506129385f830184612916565b92915050565b5f8115159050919050565b6129528161293e565b82525050565b5f60408201905061296b5f830185612949565b6129786020830184612414565b9392505050565b5f5f6040838503121561299557612994612445565b5b5f6129a285828601612493565b92505060206129b3858286016124bd565b9150509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f6129ef826129bd565b6129f981856129c7565b9350612a098185602086016129d7565b612a12816124d5565b840191505092915050565b5f6020820190508181035f830152612a3581846129e5565b905092915050565b5f5f60408385031215612a5357612a52612445565b5b5f612a60858286016124bd565b925050602083013567ffffffffffffffff811115612a8157612a80612449565b5b612a8d85828601612645565b9150509250929050565b5f819050919050565b5f67ffffffffffffffff82169050919050565b5f819050919050565b5f612ad6612ad1612acc84612a97565b612ab3565b612aa0565b9050919050565b612ae681612abc565b82525050565b5f602082019050612aff5f830184612add565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f612b3c82612330565b9150612b4783612330565b9250828201905080821115612b5f57612b5e612b05565b5b92915050565b7f496e646578206f7574206f6620626f756e6473000000000000000000000000005f82015250565b5f612b996013836129c7565b9150612ba482612b65565b602082019050919050565b5f6020820190508181035f830152612bc681612b8d565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f81519050612c08816124a7565b92915050565b5f60208284031215612c2357612c22612445565b5b5f612c3084828501612bfa565b91505092915050565b5f612c4382612330565b9150612c4e83612330565b9250828203905081811115612c6657612c65612b05565b5b92915050565b5f819050919050565b5f612c8f612c8a612c8584612c6c565b612ab3565b612330565b9050919050565b612c9f81612c75565b82525050565b5f604082019050612cb85f830185612c96565b612cc56020830184612c96565b9392505050565b5f612ce6612ce1612cdc84612a97565b612ab3565b612330565b9050919050565b612cf681612ccc565b82525050565b5f604082019050612d0f5f830185612c96565b612d1c6020830184612ced565b9392505050565b5f819050919050565b5f612d46612d41612d3c84612d23565b612ab3565b612330565b9050919050565b612d5681612d2c565b82525050565b5f604082019050612d6f5f830185612414565b612d7c6020830184612d4d565b9392505050565b5f819050919050565b5f612da6612da1612d9c84612d83565b612ab3565b612330565b9050919050565b612db681612d8c565b82525050565b5f604082019050612dcf5f830185612414565b612ddc6020830184612dad565b9392505050565b5f819050919050565b5f612e06612e01612dfc84612de3565b612ab3565b612330565b9050919050565b612e1681612dec565b82525050565b5f604082019050612e2f5f830185612c96565b612e3c6020830184612e0d565b9392505050565b612e4c8161290d565b8114612e56575f5ffd5b50565b5f81519050612e6781612e43565b92915050565b5f60208284031215612e8257612e81612445565b5b5f612e8f84828501612e59565b9150509291505056fea2646970667358221220e8f7ba38324956d078ce46e312f608f9dfccd4536919e129b75153782cf8cc9064736f6c634300081c0033
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 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.