Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xFcAF676f...bC27183E7 The constructor portion of the code might be different and could alter the actual behaviour of the contract
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();
assembly {
let codeSize := extcodesize(_token)
if iszero(codeSize) {
revert(0, 0)
}
}
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
0x60a06040523073ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff16815250348015610042575f5ffd5b5061005161005660201b60201c565b6101d1565b5f61006561015460201b60201c565b9050805f0160089054906101000a900460ff16156100af576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8016815f015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff16146101515767ffffffffffffffff815f015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055507fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d267ffffffffffffffff60405161014891906101b8565b60405180910390a15b50565b5f5f61016461016d60201b60201c565b90508091505090565b5f7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005f1b905090565b5f67ffffffffffffffff82169050919050565b6101b281610196565b82525050565b5f6020820190506101cb5f8301846101a9565b92915050565b608051612edb6101f75f395f8181611c9101528181611ce60152611ea00152612edb5ff3fe60806040526004361061014a575f3560e01c806352d1902d116100b55780638e10be331161006e5780638e10be331461042a57806395ccea6714610454578063ad3cb1cc1461047c578063c2bd89b9146104a6578063d52e7f93146104ce578063fc0c546a146104f65761014a565b806352d1902d1461032d5780635497e945146103575780636ab28bc81461038257806378e97925146103ac5780637bb476f5146103d6578063830de4b1146104005761014a565b806336a5a2311161010757806336a5a231146102445780633ccfd60b1461026e5780633e0a322d146102845780633f586e2c146102ac57806343bad081146102e95780634f1ef286146103115761014a565b8063028575791461014e57806303b92ce81461017857806313fb2827146101a2578063144fa6d7146101ca5780631c4f88d3146101f2578063297265911461021c575b5f5ffd5b348015610159575f5ffd5b50610162610520565b60405161016f9190612401565b60405180910390f35b348015610183575f5ffd5b5061018c61053a565b6040516101999190612430565b60405180910390f35b3480156101ad575f5ffd5b506101c860048036038101906101c3919061267f565b610541565b005b3480156101d5575f5ffd5b506101f060048036038101906101eb9190612724565b6108fd565b005b3480156101fd575f5ffd5b50610206610a3d565b6040516102139190612430565b60405180910390f35b348015610227575f5ffd5b50610242600480360381019061023d919061274f565b610a52565b005b34801561024f575f5ffd5b50610258610ab1565b60405161026591906127a5565b60405180910390f35b348015610279575f5ffd5b50610282610ae2565b005b34801561028f575f5ffd5b506102aa60048036038101906102a591906127be565b610c39565b005b3480156102b7575f5ffd5b506102d260048036038101906102cd91906127be565b610cfe565b6040516102e09291906127e9565b60405180910390f35b3480156102f4575f5ffd5b5061030f600480360381019061030a9190612724565b610da9565b005b61032b600480360381019061032691906128c0565b610ee7565b005b348015610338575f5ffd5b50610341610f06565b60405161034e9190612932565b60405180910390f35b348015610362575f5ffd5b5061036b610f37565b604051610379929190612965565b60405180910390f35b34801561038d575f5ffd5b50610396610ff5565b6040516103a39190612430565b60405180910390f35b3480156103b7575f5ffd5b506103c0611007565b6040516103cd9190612430565b60405180910390f35b3480156103e1575f5ffd5b506103ea611019565b6040516103f79190612430565b60405180910390f35b34801561040b575f5ffd5b506104146110de565b6040516104219190612430565b60405180910390f35b348015610435575f5ffd5b5061043e6110f0565b60405161044b91906127a5565b60405180910390f35b34801561045f575f5ffd5b5061047a6004803603810190610475919061298c565b611120565b005b348015610487575f5ffd5b50610490611312565b60405161049d9190612a2a565b60405180910390f35b3480156104b1575f5ffd5b506104cc60048036038101906104c79190612a4a565b61134b565b005b3480156104d9575f5ffd5b506104f460048036038101906104ef9190612724565b611464565b005b348015610501575f5ffd5b5061050a61153f565b60405161051791906127a5565b60405180910390f35b606061053561052d611570565b60050161159c565b905090565b62ed4e0081565b5f61054a61167c565b90505f815f0160089054906101000a900460ff161590505f825f015f9054906101000a900467ffffffffffffffff1690505f5f8267ffffffffffffffff161480156105925750825b90505f60018367ffffffffffffffff161480156105c557505f3073ffffffffffffffffffffffffffffffffffffffff163b145b9050811580156105d3575080155b1561060a576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001855f015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508315610657576001855f0160086101000a81548160ff0219169083151502179055505b5f73ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff16036106bc576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f89036106f5576040517f74cbd35f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff160361075a576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8703610793576040517f74cbd35f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b873b8061079e575f5ffd5b505f6107a8611570565b90508b815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508a816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555089816002018190555088816003015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555087816004018190555061088c8a898961168f565b610895876118ea565b5083156108f0575f855f0160086101000a81548160ff0219169083151502179055507fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d260016040516108e79190612af9565b60405180910390a15b5050505050505050505050565b61090561197d565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361096a576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f610973611570565b90505f816003015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082826003015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fec507b76e4056f09193394a4361b44129ec561809ddee312c7f97121f93bb58b60405160405180910390a3505050565b5f610a46611570565b60050180549050905090565b610a5a61197d565b5f610a63611570565b9050610a78816002015482600401548461168f565b610a81826118ea565b7ff5eac85b9813f7323fee9dacb49b96f1a12f3e288a63ed64f46ff3f9b12db35060405160405180910390a15050565b5f610aba611570565b6001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610aea611b11565b5f610af3611019565b90505f8103610b2e576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f610b37611570565b905081816006015f828254610b4c9190612b3f565b92505081905550610bc4816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683836003015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611ba79092919063ffffffff16565b806001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436483604051610c2d9190612430565b60405180910390a25050565b610c4161197d565b5f8103610c7a576040517f74cbd35f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f610c83611570565b90505f81600501805490501115610caf57610cae828260040154610ca98460050161159c565b61168f565b5b5f816002015490508282600201819055507fbefe8e3983c0dc663c4ba451fc82d4ff7eb2e4ccc4b944874abea1ecc841feae8184604051610cf19291906127e9565b60405180910390a1505050565b5f5f5f610d09611570565b905080600501805490508410610d54576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4b90612bbc565b60405180910390fd5b806005018481548110610d6a57610d69612bda565b5b905f5260205f2090600202015f0154816005018581548110610d8f57610d8e612bda565b5b905f5260205f209060020201600101549250925050915091565b610db1611bfa565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610e16576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f610e1f611570565b90505f815f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082825f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fcacb62ef00d7d057af8a730953836c1302cc0ff75775992cab69ebb0861ed9ef60405160405180910390a3505050565b610eef611c8f565b610ef882611d75565b610f028282611d80565b5050565b5f610f0f611e9e565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5f1b905090565b5f5f5f610f42611570565b90505f816003015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610fa191906127a5565b602060405180830381865afa158015610fbc573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610fe09190612c1b565b90508160040154811015819350935050509091565b5f610ffe611570565b60040154905090565b5f611010611570565b60020154905090565b5f5f611023611570565b9050806002015442101561103a575f9150506110db565b5f5f90505f5f90505b82600501805490508110156110b35782600501818154811061106857611067612bda565b5b905f5260205f2090600202015f015442106110a65782600501818154811061109357611092612bda565b5b905f5260205f2090600202016001015491505b8080600101915050611043565b50816006015481116110c5575f6110d6565b8160060154816110d59190612c46565b5b925050505b90565b5f6110e7611570565b60060154905090565b5f6110f9611570565b5f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611128611bfa565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361118d576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611196611570565b90505f816003015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016111f591906127a5565b602060405180830381865afa158015611210573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112349190612c1b565b905082811015611270576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6112be8484846003015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611ba79092919063ffffffff16565b8373ffffffffffffffffffffffffffffffffffffffff167f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd9695846040516113049190612430565b60405180910390a250505050565b6040518060400160405280600581526020017f352e302e3000000000000000000000000000000000000000000000000000000081525081565b61135361197d565b5f820361138c576040517f74cbd35f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611395611570565b90505f825111156113e9576113af8160020154848461168f565b6113b8826118ea565b7ff5eac85b9813f7323fee9dacb49b96f1a12f3e288a63ed64f46ff3f9b12db35060405160405180910390a1611414565b5f816005018054905011156114135761141281600201548461140d8460050161159c565b61168f565b5b5b5f816004015490508382600401819055507fbe7472397f55be64a29d6c8e3344ad1f90e5d2a975f021cd0e1520b3f116739881856040516114569291906127e9565b60405180910390a150505050565b61146c61197d565b5f611475611570565b90505f816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082826001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fd3fe68f35104d9b97c46bd44222e5d30c699bee11fb150050de9a497698a1d4c60405160405180910390a3505050565b5f611548611570565b6003015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f5f7fd661bcbe54f9423e8b1f55685e3864844de5500f265b3ea5deef75b4f674f92f90508091505090565b60605f828054905067ffffffffffffffff8111156115bd576115bc6124f2565b5b6040519080825280602002602001820160405280156115f657816020015b6115e36122b7565b8152602001906001900390816115db5790505b5090505f5f90505b83805490508110156116725783818154811061161d5761161c612bda565b5b905f5260205f2090600202016040518060400160405290815f820154815260200160018201548152505082828151811061165a57611659612bda565b5b602002602001018190525080806001019150506115fe565b5080915050919050565b5f5f611686611f25565b90508091505090565b5f8151036116d6575f5f6040517ff17c63770000000000000000000000000000000000000000000000000000000081526004016116cd929190612cb2565b60405180910390fd5b82815f815181106116ea576116e9612bda565b5b60200260200101515f01511161173a575f60016040517ff17c6377000000000000000000000000000000000000000000000000000000008152600401611731929190612d09565b60405180910390fd5b5f600190505b815181101561187257816001826117579190612c46565b8151811061176857611767612bda565b5b60200260200101515f015182828151811061178657611785612bda565b5b60200260200101515f0151116117d6578060026040517ff17c63770000000000000000000000000000000000000000000000000000000081526004016117cd929190612d69565b60405180910390fd5b816001826117e49190612c46565b815181106117f5576117f4612bda565b5b60200260200101516020015182828151811061181457611813612bda565b5b60200260200101516020015111611865578060036040517ff17c637700000000000000000000000000000000000000000000000000000000815260040161185c929190612dc9565b60405180910390fd5b8080600101915050611740565b508181600183516118839190612c46565b8151811061189457611893612bda565b5b602002602001015160200151146118e5575f60046040517ff17c63770000000000000000000000000000000000000000000000000000000081526004016118dc929190612e29565b60405180910390fd5b505050565b5f6118f3611570565b9050806005015f61190491906122cf565b5f5f90505b8251811015611978578160050183828151811061192957611928612bda565b5b6020026020010151908060018154018082558091505060019003905f5260205f2090600202015f909190919091505f820151815f01556020820151816001015550508080600101915050611909565b505050565b5f611986611570565b9050805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015611a355750806001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15611a6c576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62ed4e008160020154611a7f9190612b3f565b421015611b0e57805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611b0d576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50565b5f611b1a611570565b9050806001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611ba4576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b611bb48383836001611f4e565b611bf557826040517f5274afe7000000000000000000000000000000000000000000000000000000008152600401611bec91906127a5565b60405180910390fd5b505050565b5f611c03611570565b9050805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611c8c576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161480611d3c57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611d23611fb0565b73ffffffffffffffffffffffffffffffffffffffff1614155b15611d73576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b611d7d61197d565b50565b8173ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611de857506040513d601f19601f82011682018060405250810190611de59190612e7a565b60015b611e2957816040517f4c9c8ce3000000000000000000000000000000000000000000000000000000008152600401611e2091906127a5565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5f1b8114611e8f57806040517faa1d49a4000000000000000000000000000000000000000000000000000000008152600401611e869190612932565b60405180910390fd5b611e998383612003565b505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614611f23576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b5f7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005f1b905090565b5f5f63a9059cbb60e01b9050604051815f525f1960601c86166004528460245260205f60445f5f8b5af1925060015f51148316611fa2578383151615611f96573d5f823e3d81fd5b5f873b113d1516831692505b806040525050949350505050565b5f611fdc7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5f1b612075565b5f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61200c8261207e565b8173ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a25f81511115612068576120628282612147565b50612071565b612070612238565b5b5050565b5f819050919050565b5f8173ffffffffffffffffffffffffffffffffffffffff163b036120d957806040517f4c9c8ce30000000000000000000000000000000000000000000000000000000081526004016120d091906127a5565b60405180910390fd5b806121057f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5f1b612075565b5f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60605f6121548484612274565b905080801561218a57505f612167612288565b118061218957505f8473ffffffffffffffffffffffffffffffffffffffff163b115b5b1561219f5761219761228f565b915050612232565b80156121e257836040517f9996b3150000000000000000000000000000000000000000000000000000000081526004016121d991906127a5565b60405180910390fd5b5f6121eb612288565b11156121fe576121f96122ac565b612230565b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b92915050565b5f341115612272576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b5f5f5f835160208501865af4905092915050565b5f3d905090565b606060405190503d81523d5f602083013e3d602001810160405290565b6040513d5f823e3d81fd5b60405180604001604052805f81526020015f81525090565b5080545f8255600202905f5260205f20908101906122ed91906122f0565b50565b5b80821115612310575f5f82015f9055600182015f9055506002016122f1565b5090565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f819050919050565b61234f8161233d565b82525050565b604082015f8201516123695f850182612346565b50602082015161237c6020850182612346565b50505050565b5f61238d8383612355565b60408301905092915050565b5f602082019050919050565b5f6123af82612314565b6123b9818561231e565b93506123c48361232e565b805f5b838110156123f45781516123db8882612382565b97506123e683612399565b9250506001810190506123c7565b5085935050505092915050565b5f6020820190508181035f83015261241981846123a5565b905092915050565b61242a8161233d565b82525050565b5f6020820190506124435f830184612421565b92915050565b5f604051905090565b5f5ffd5b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6124838261245a565b9050919050565b61249381612479565b811461249d575f5ffd5b50565b5f813590506124ae8161248a565b92915050565b6124bd8161233d565b81146124c7575f5ffd5b50565b5f813590506124d8816124b4565b92915050565b5f5ffd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b612528826124e2565b810181811067ffffffffffffffff82111715612547576125466124f2565b5b80604052505050565b5f612559612449565b9050612565828261251f565b919050565b5f67ffffffffffffffff821115612584576125836124f2565b5b602082029050602081019050919050565b5f5ffd5b5f5ffd5b5f604082840312156125b2576125b1612599565b5b6125bc6040612550565b90505f6125cb848285016124ca565b5f8301525060206125de848285016124ca565b60208301525092915050565b5f6125fc6125f78461256a565b612550565b9050808382526020820190506040840283018581111561261f5761261e612595565b5b835b818110156126485780612634888261259d565b845260208401935050604081019050612621565b5050509392505050565b5f82601f830112612666576126656124de565b5b81356126768482602086016125ea565b91505092915050565b5f5f5f5f5f5f60c0878903121561269957612698612452565b5b5f6126a689828a016124a0565b96505060206126b789828a016124a0565b95505060406126c889828a016124ca565b94505060606126d989828a016124a0565b93505060806126ea89828a016124ca565b92505060a087013567ffffffffffffffff81111561270b5761270a612456565b5b61271789828a01612652565b9150509295509295509295565b5f6020828403121561273957612738612452565b5b5f612746848285016124a0565b91505092915050565b5f6020828403121561276457612763612452565b5b5f82013567ffffffffffffffff81111561278157612780612456565b5b61278d84828501612652565b91505092915050565b61279f81612479565b82525050565b5f6020820190506127b85f830184612796565b92915050565b5f602082840312156127d3576127d2612452565b5b5f6127e0848285016124ca565b91505092915050565b5f6040820190506127fc5f830185612421565b6128096020830184612421565b9392505050565b5f5ffd5b5f67ffffffffffffffff82111561282e5761282d6124f2565b5b612837826124e2565b9050602081019050919050565b828183375f83830152505050565b5f61286461285f84612814565b612550565b9050828152602081018484840111156128805761287f612810565b5b61288b848285612844565b509392505050565b5f82601f8301126128a7576128a66124de565b5b81356128b7848260208601612852565b91505092915050565b5f5f604083850312156128d6576128d5612452565b5b5f6128e3858286016124a0565b925050602083013567ffffffffffffffff81111561290457612903612456565b5b61291085828601612893565b9150509250929050565b5f819050919050565b61292c8161291a565b82525050565b5f6020820190506129455f830184612923565b92915050565b5f8115159050919050565b61295f8161294b565b82525050565b5f6040820190506129785f830185612956565b6129856020830184612421565b9392505050565b5f5f604083850312156129a2576129a1612452565b5b5f6129af858286016124a0565b92505060206129c0858286016124ca565b9150509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f6129fc826129ca565b612a0681856129d4565b9350612a168185602086016129e4565b612a1f816124e2565b840191505092915050565b5f6020820190508181035f830152612a4281846129f2565b905092915050565b5f5f60408385031215612a6057612a5f612452565b5b5f612a6d858286016124ca565b925050602083013567ffffffffffffffff811115612a8e57612a8d612456565b5b612a9a85828601612652565b9150509250929050565b5f819050919050565b5f67ffffffffffffffff82169050919050565b5f819050919050565b5f612ae3612ade612ad984612aa4565b612ac0565b612aad565b9050919050565b612af381612ac9565b82525050565b5f602082019050612b0c5f830184612aea565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f612b498261233d565b9150612b548361233d565b9250828201905080821115612b6c57612b6b612b12565b5b92915050565b7f496e646578206f7574206f6620626f756e6473000000000000000000000000005f82015250565b5f612ba66013836129d4565b9150612bb182612b72565b602082019050919050565b5f6020820190508181035f830152612bd381612b9a565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f81519050612c15816124b4565b92915050565b5f60208284031215612c3057612c2f612452565b5b5f612c3d84828501612c07565b91505092915050565b5f612c508261233d565b9150612c5b8361233d565b9250828203905081811115612c7357612c72612b12565b5b92915050565b5f819050919050565b5f612c9c612c97612c9284612c79565b612ac0565b61233d565b9050919050565b612cac81612c82565b82525050565b5f604082019050612cc55f830185612ca3565b612cd26020830184612ca3565b9392505050565b5f612cf3612cee612ce984612aa4565b612ac0565b61233d565b9050919050565b612d0381612cd9565b82525050565b5f604082019050612d1c5f830185612ca3565b612d296020830184612cfa565b9392505050565b5f819050919050565b5f612d53612d4e612d4984612d30565b612ac0565b61233d565b9050919050565b612d6381612d39565b82525050565b5f604082019050612d7c5f830185612421565b612d896020830184612d5a565b9392505050565b5f819050919050565b5f612db3612dae612da984612d90565b612ac0565b61233d565b9050919050565b612dc381612d99565b82525050565b5f604082019050612ddc5f830185612421565b612de96020830184612dba565b9392505050565b5f819050919050565b5f612e13612e0e612e0984612df0565b612ac0565b61233d565b9050919050565b612e2381612df9565b82525050565b5f604082019050612e3c5f830185612ca3565b612e496020830184612e1a565b9392505050565b612e598161291a565b8114612e63575f5ffd5b50565b5f81519050612e7481612e50565b92915050565b5f60208284031215612e8f57612e8e612452565b5b5f612e9c84828501612e66565b9150509291505056fea26469706673582212203cde76c7219b061472853ffe0092e1fae455f680b2d4dfa29287b0c25e90578764736f6c634300081c0033
Deployed Bytecode
0x60806040526004361061014a575f3560e01c806352d1902d116100b55780638e10be331161006e5780638e10be331461042a57806395ccea6714610454578063ad3cb1cc1461047c578063c2bd89b9146104a6578063d52e7f93146104ce578063fc0c546a146104f65761014a565b806352d1902d1461032d5780635497e945146103575780636ab28bc81461038257806378e97925146103ac5780637bb476f5146103d6578063830de4b1146104005761014a565b806336a5a2311161010757806336a5a231146102445780633ccfd60b1461026e5780633e0a322d146102845780633f586e2c146102ac57806343bad081146102e95780634f1ef286146103115761014a565b8063028575791461014e57806303b92ce81461017857806313fb2827146101a2578063144fa6d7146101ca5780631c4f88d3146101f2578063297265911461021c575b5f5ffd5b348015610159575f5ffd5b50610162610520565b60405161016f9190612401565b60405180910390f35b348015610183575f5ffd5b5061018c61053a565b6040516101999190612430565b60405180910390f35b3480156101ad575f5ffd5b506101c860048036038101906101c3919061267f565b610541565b005b3480156101d5575f5ffd5b506101f060048036038101906101eb9190612724565b6108fd565b005b3480156101fd575f5ffd5b50610206610a3d565b6040516102139190612430565b60405180910390f35b348015610227575f5ffd5b50610242600480360381019061023d919061274f565b610a52565b005b34801561024f575f5ffd5b50610258610ab1565b60405161026591906127a5565b60405180910390f35b348015610279575f5ffd5b50610282610ae2565b005b34801561028f575f5ffd5b506102aa60048036038101906102a591906127be565b610c39565b005b3480156102b7575f5ffd5b506102d260048036038101906102cd91906127be565b610cfe565b6040516102e09291906127e9565b60405180910390f35b3480156102f4575f5ffd5b5061030f600480360381019061030a9190612724565b610da9565b005b61032b600480360381019061032691906128c0565b610ee7565b005b348015610338575f5ffd5b50610341610f06565b60405161034e9190612932565b60405180910390f35b348015610362575f5ffd5b5061036b610f37565b604051610379929190612965565b60405180910390f35b34801561038d575f5ffd5b50610396610ff5565b6040516103a39190612430565b60405180910390f35b3480156103b7575f5ffd5b506103c0611007565b6040516103cd9190612430565b60405180910390f35b3480156103e1575f5ffd5b506103ea611019565b6040516103f79190612430565b60405180910390f35b34801561040b575f5ffd5b506104146110de565b6040516104219190612430565b60405180910390f35b348015610435575f5ffd5b5061043e6110f0565b60405161044b91906127a5565b60405180910390f35b34801561045f575f5ffd5b5061047a6004803603810190610475919061298c565b611120565b005b348015610487575f5ffd5b50610490611312565b60405161049d9190612a2a565b60405180910390f35b3480156104b1575f5ffd5b506104cc60048036038101906104c79190612a4a565b61134b565b005b3480156104d9575f5ffd5b506104f460048036038101906104ef9190612724565b611464565b005b348015610501575f5ffd5b5061050a61153f565b60405161051791906127a5565b60405180910390f35b606061053561052d611570565b60050161159c565b905090565b62ed4e0081565b5f61054a61167c565b90505f815f0160089054906101000a900460ff161590505f825f015f9054906101000a900467ffffffffffffffff1690505f5f8267ffffffffffffffff161480156105925750825b90505f60018367ffffffffffffffff161480156105c557505f3073ffffffffffffffffffffffffffffffffffffffff163b145b9050811580156105d3575080155b1561060a576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001855f015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508315610657576001855f0160086101000a81548160ff0219169083151502179055505b5f73ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff16036106bc576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f89036106f5576040517f74cbd35f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff160361075a576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8703610793576040517f74cbd35f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b873b8061079e575f5ffd5b505f6107a8611570565b90508b815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508a816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555089816002018190555088816003015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555087816004018190555061088c8a898961168f565b610895876118ea565b5083156108f0575f855f0160086101000a81548160ff0219169083151502179055507fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d260016040516108e79190612af9565b60405180910390a15b5050505050505050505050565b61090561197d565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361096a576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f610973611570565b90505f816003015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082826003015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fec507b76e4056f09193394a4361b44129ec561809ddee312c7f97121f93bb58b60405160405180910390a3505050565b5f610a46611570565b60050180549050905090565b610a5a61197d565b5f610a63611570565b9050610a78816002015482600401548461168f565b610a81826118ea565b7ff5eac85b9813f7323fee9dacb49b96f1a12f3e288a63ed64f46ff3f9b12db35060405160405180910390a15050565b5f610aba611570565b6001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610aea611b11565b5f610af3611019565b90505f8103610b2e576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f610b37611570565b905081816006015f828254610b4c9190612b3f565b92505081905550610bc4816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683836003015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611ba79092919063ffffffff16565b806001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436483604051610c2d9190612430565b60405180910390a25050565b610c4161197d565b5f8103610c7a576040517f74cbd35f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f610c83611570565b90505f81600501805490501115610caf57610cae828260040154610ca98460050161159c565b61168f565b5b5f816002015490508282600201819055507fbefe8e3983c0dc663c4ba451fc82d4ff7eb2e4ccc4b944874abea1ecc841feae8184604051610cf19291906127e9565b60405180910390a1505050565b5f5f5f610d09611570565b905080600501805490508410610d54576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4b90612bbc565b60405180910390fd5b806005018481548110610d6a57610d69612bda565b5b905f5260205f2090600202015f0154816005018581548110610d8f57610d8e612bda565b5b905f5260205f209060020201600101549250925050915091565b610db1611bfa565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610e16576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f610e1f611570565b90505f815f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082825f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fcacb62ef00d7d057af8a730953836c1302cc0ff75775992cab69ebb0861ed9ef60405160405180910390a3505050565b610eef611c8f565b610ef882611d75565b610f028282611d80565b5050565b5f610f0f611e9e565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5f1b905090565b5f5f5f610f42611570565b90505f816003015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610fa191906127a5565b602060405180830381865afa158015610fbc573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610fe09190612c1b565b90508160040154811015819350935050509091565b5f610ffe611570565b60040154905090565b5f611010611570565b60020154905090565b5f5f611023611570565b9050806002015442101561103a575f9150506110db565b5f5f90505f5f90505b82600501805490508110156110b35782600501818154811061106857611067612bda565b5b905f5260205f2090600202015f015442106110a65782600501818154811061109357611092612bda565b5b905f5260205f2090600202016001015491505b8080600101915050611043565b50816006015481116110c5575f6110d6565b8160060154816110d59190612c46565b5b925050505b90565b5f6110e7611570565b60060154905090565b5f6110f9611570565b5f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611128611bfa565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361118d576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611196611570565b90505f816003015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016111f591906127a5565b602060405180830381865afa158015611210573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112349190612c1b565b905082811015611270576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6112be8484846003015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611ba79092919063ffffffff16565b8373ffffffffffffffffffffffffffffffffffffffff167f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd9695846040516113049190612430565b60405180910390a250505050565b6040518060400160405280600581526020017f352e302e3000000000000000000000000000000000000000000000000000000081525081565b61135361197d565b5f820361138c576040517f74cbd35f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611395611570565b90505f825111156113e9576113af8160020154848461168f565b6113b8826118ea565b7ff5eac85b9813f7323fee9dacb49b96f1a12f3e288a63ed64f46ff3f9b12db35060405160405180910390a1611414565b5f816005018054905011156114135761141281600201548461140d8460050161159c565b61168f565b5b5b5f816004015490508382600401819055507fbe7472397f55be64a29d6c8e3344ad1f90e5d2a975f021cd0e1520b3f116739881856040516114569291906127e9565b60405180910390a150505050565b61146c61197d565b5f611475611570565b90505f816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082826001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fd3fe68f35104d9b97c46bd44222e5d30c699bee11fb150050de9a497698a1d4c60405160405180910390a3505050565b5f611548611570565b6003015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f5f7fd661bcbe54f9423e8b1f55685e3864844de5500f265b3ea5deef75b4f674f92f90508091505090565b60605f828054905067ffffffffffffffff8111156115bd576115bc6124f2565b5b6040519080825280602002602001820160405280156115f657816020015b6115e36122b7565b8152602001906001900390816115db5790505b5090505f5f90505b83805490508110156116725783818154811061161d5761161c612bda565b5b905f5260205f2090600202016040518060400160405290815f820154815260200160018201548152505082828151811061165a57611659612bda565b5b602002602001018190525080806001019150506115fe565b5080915050919050565b5f5f611686611f25565b90508091505090565b5f8151036116d6575f5f6040517ff17c63770000000000000000000000000000000000000000000000000000000081526004016116cd929190612cb2565b60405180910390fd5b82815f815181106116ea576116e9612bda565b5b60200260200101515f01511161173a575f60016040517ff17c6377000000000000000000000000000000000000000000000000000000008152600401611731929190612d09565b60405180910390fd5b5f600190505b815181101561187257816001826117579190612c46565b8151811061176857611767612bda565b5b60200260200101515f015182828151811061178657611785612bda565b5b60200260200101515f0151116117d6578060026040517ff17c63770000000000000000000000000000000000000000000000000000000081526004016117cd929190612d69565b60405180910390fd5b816001826117e49190612c46565b815181106117f5576117f4612bda565b5b60200260200101516020015182828151811061181457611813612bda565b5b60200260200101516020015111611865578060036040517ff17c637700000000000000000000000000000000000000000000000000000000815260040161185c929190612dc9565b60405180910390fd5b8080600101915050611740565b508181600183516118839190612c46565b8151811061189457611893612bda565b5b602002602001015160200151146118e5575f60046040517ff17c63770000000000000000000000000000000000000000000000000000000081526004016118dc929190612e29565b60405180910390fd5b505050565b5f6118f3611570565b9050806005015f61190491906122cf565b5f5f90505b8251811015611978578160050183828151811061192957611928612bda565b5b6020026020010151908060018154018082558091505060019003905f5260205f2090600202015f909190919091505f820151815f01556020820151816001015550508080600101915050611909565b505050565b5f611986611570565b9050805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015611a355750806001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15611a6c576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62ed4e008160020154611a7f9190612b3f565b421015611b0e57805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611b0d576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50565b5f611b1a611570565b9050806001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611ba4576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b611bb48383836001611f4e565b611bf557826040517f5274afe7000000000000000000000000000000000000000000000000000000008152600401611bec91906127a5565b60405180910390fd5b505050565b5f611c03611570565b9050805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611c8c576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b7f000000000000000000000000c745fe40c997e1598d17d2279330bb46e272cc4c73ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161480611d3c57507f000000000000000000000000c745fe40c997e1598d17d2279330bb46e272cc4c73ffffffffffffffffffffffffffffffffffffffff16611d23611fb0565b73ffffffffffffffffffffffffffffffffffffffff1614155b15611d73576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b611d7d61197d565b50565b8173ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611de857506040513d601f19601f82011682018060405250810190611de59190612e7a565b60015b611e2957816040517f4c9c8ce3000000000000000000000000000000000000000000000000000000008152600401611e2091906127a5565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5f1b8114611e8f57806040517faa1d49a4000000000000000000000000000000000000000000000000000000008152600401611e869190612932565b60405180910390fd5b611e998383612003565b505050565b7f000000000000000000000000c745fe40c997e1598d17d2279330bb46e272cc4c73ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614611f23576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b5f7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005f1b905090565b5f5f63a9059cbb60e01b9050604051815f525f1960601c86166004528460245260205f60445f5f8b5af1925060015f51148316611fa2578383151615611f96573d5f823e3d81fd5b5f873b113d1516831692505b806040525050949350505050565b5f611fdc7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5f1b612075565b5f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61200c8261207e565b8173ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a25f81511115612068576120628282612147565b50612071565b612070612238565b5b5050565b5f819050919050565b5f8173ffffffffffffffffffffffffffffffffffffffff163b036120d957806040517f4c9c8ce30000000000000000000000000000000000000000000000000000000081526004016120d091906127a5565b60405180910390fd5b806121057f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5f1b612075565b5f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60605f6121548484612274565b905080801561218a57505f612167612288565b118061218957505f8473ffffffffffffffffffffffffffffffffffffffff163b115b5b1561219f5761219761228f565b915050612232565b80156121e257836040517f9996b3150000000000000000000000000000000000000000000000000000000081526004016121d991906127a5565b60405180910390fd5b5f6121eb612288565b11156121fe576121f96122ac565b612230565b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b92915050565b5f341115612272576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b5f5f5f835160208501865af4905092915050565b5f3d905090565b606060405190503d81523d5f602083013e3d602001810160405290565b6040513d5f823e3d81fd5b60405180604001604052805f81526020015f81525090565b5080545f8255600202905f5260205f20908101906122ed91906122f0565b50565b5b80821115612310575f5f82015f9055600182015f9055506002016122f1565b5090565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f819050919050565b61234f8161233d565b82525050565b604082015f8201516123695f850182612346565b50602082015161237c6020850182612346565b50505050565b5f61238d8383612355565b60408301905092915050565b5f602082019050919050565b5f6123af82612314565b6123b9818561231e565b93506123c48361232e565b805f5b838110156123f45781516123db8882612382565b97506123e683612399565b9250506001810190506123c7565b5085935050505092915050565b5f6020820190508181035f83015261241981846123a5565b905092915050565b61242a8161233d565b82525050565b5f6020820190506124435f830184612421565b92915050565b5f604051905090565b5f5ffd5b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6124838261245a565b9050919050565b61249381612479565b811461249d575f5ffd5b50565b5f813590506124ae8161248a565b92915050565b6124bd8161233d565b81146124c7575f5ffd5b50565b5f813590506124d8816124b4565b92915050565b5f5ffd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b612528826124e2565b810181811067ffffffffffffffff82111715612547576125466124f2565b5b80604052505050565b5f612559612449565b9050612565828261251f565b919050565b5f67ffffffffffffffff821115612584576125836124f2565b5b602082029050602081019050919050565b5f5ffd5b5f5ffd5b5f604082840312156125b2576125b1612599565b5b6125bc6040612550565b90505f6125cb848285016124ca565b5f8301525060206125de848285016124ca565b60208301525092915050565b5f6125fc6125f78461256a565b612550565b9050808382526020820190506040840283018581111561261f5761261e612595565b5b835b818110156126485780612634888261259d565b845260208401935050604081019050612621565b5050509392505050565b5f82601f830112612666576126656124de565b5b81356126768482602086016125ea565b91505092915050565b5f5f5f5f5f5f60c0878903121561269957612698612452565b5b5f6126a689828a016124a0565b96505060206126b789828a016124a0565b95505060406126c889828a016124ca565b94505060606126d989828a016124a0565b93505060806126ea89828a016124ca565b92505060a087013567ffffffffffffffff81111561270b5761270a612456565b5b61271789828a01612652565b9150509295509295509295565b5f6020828403121561273957612738612452565b5b5f612746848285016124a0565b91505092915050565b5f6020828403121561276457612763612452565b5b5f82013567ffffffffffffffff81111561278157612780612456565b5b61278d84828501612652565b91505092915050565b61279f81612479565b82525050565b5f6020820190506127b85f830184612796565b92915050565b5f602082840312156127d3576127d2612452565b5b5f6127e0848285016124ca565b91505092915050565b5f6040820190506127fc5f830185612421565b6128096020830184612421565b9392505050565b5f5ffd5b5f67ffffffffffffffff82111561282e5761282d6124f2565b5b612837826124e2565b9050602081019050919050565b828183375f83830152505050565b5f61286461285f84612814565b612550565b9050828152602081018484840111156128805761287f612810565b5b61288b848285612844565b509392505050565b5f82601f8301126128a7576128a66124de565b5b81356128b7848260208601612852565b91505092915050565b5f5f604083850312156128d6576128d5612452565b5b5f6128e3858286016124a0565b925050602083013567ffffffffffffffff81111561290457612903612456565b5b61291085828601612893565b9150509250929050565b5f819050919050565b61292c8161291a565b82525050565b5f6020820190506129455f830184612923565b92915050565b5f8115159050919050565b61295f8161294b565b82525050565b5f6040820190506129785f830185612956565b6129856020830184612421565b9392505050565b5f5f604083850312156129a2576129a1612452565b5b5f6129af858286016124a0565b92505060206129c0858286016124ca565b9150509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f6129fc826129ca565b612a0681856129d4565b9350612a168185602086016129e4565b612a1f816124e2565b840191505092915050565b5f6020820190508181035f830152612a4281846129f2565b905092915050565b5f5f60408385031215612a6057612a5f612452565b5b5f612a6d858286016124ca565b925050602083013567ffffffffffffffff811115612a8e57612a8d612456565b5b612a9a85828601612652565b9150509250929050565b5f819050919050565b5f67ffffffffffffffff82169050919050565b5f819050919050565b5f612ae3612ade612ad984612aa4565b612ac0565b612aad565b9050919050565b612af381612ac9565b82525050565b5f602082019050612b0c5f830184612aea565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f612b498261233d565b9150612b548361233d565b9250828201905080821115612b6c57612b6b612b12565b5b92915050565b7f496e646578206f7574206f6620626f756e6473000000000000000000000000005f82015250565b5f612ba66013836129d4565b9150612bb182612b72565b602082019050919050565b5f6020820190508181035f830152612bd381612b9a565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f81519050612c15816124b4565b92915050565b5f60208284031215612c3057612c2f612452565b5b5f612c3d84828501612c07565b91505092915050565b5f612c508261233d565b9150612c5b8361233d565b9250828203905081811115612c7357612c72612b12565b5b92915050565b5f819050919050565b5f612c9c612c97612c9284612c79565b612ac0565b61233d565b9050919050565b612cac81612c82565b82525050565b5f604082019050612cc55f830185612ca3565b612cd26020830184612ca3565b9392505050565b5f612cf3612cee612ce984612aa4565b612ac0565b61233d565b9050919050565b612d0381612cd9565b82525050565b5f604082019050612d1c5f830185612ca3565b612d296020830184612cfa565b9392505050565b5f819050919050565b5f612d53612d4e612d4984612d30565b612ac0565b61233d565b9050919050565b612d6381612d39565b82525050565b5f604082019050612d7c5f830185612421565b612d896020830184612d5a565b9392505050565b5f819050919050565b5f612db3612dae612da984612d90565b612ac0565b61233d565b9050919050565b612dc381612d99565b82525050565b5f604082019050612ddc5f830185612421565b612de96020830184612dba565b9392505050565b5f819050919050565b5f612e13612e0e612e0984612df0565b612ac0565b61233d565b9050919050565b612e2381612df9565b82525050565b5f604082019050612e3c5f830185612ca3565b612e496020830184612e1a565b9392505050565b612e598161291a565b8114612e63575f5ffd5b50565b5f81519050612e7481612e50565b92915050565b5f60208284031215612e8f57612e8e612452565b5b5f612e9c84828501612e66565b9150509291505056fea26469706673582212203cde76c7219b061472853ffe0092e1fae455f680b2d4dfa29287b0c25e90578764736f6c634300081c0033
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.