Contract 0x07A1eB6f6339DAf50ce17230b866dc9B30806B88 6
Contract Overview
Balance:
0 ETH
EtherValue:
$0.00
My Name Tag:
Not Available, login to update
[ Download CSV Export ]
Latest 2 internal transactions
Parent Txn Hash | Block | From | To | Value | |||
---|---|---|---|---|---|---|---|
0xa580534659d251772da62642fc250f4816d3b2b879e379764e93b049eb3dfb65 | 109495356 | 197 days 10 hrs ago | 0x07a1eb6f6339daf50ce17230b866dc9b30806b88 | Contract Creation | 0 ETH | ||
0x206c77aeb1a51034ee6ad659ecc9127ca82c4d1fc58743e00f384642205d6e87 | 79444728 | 385 days 11 hrs ago | 0x07a1eb6f6339daf50ce17230b866dc9b30806b88 | Contract Creation | 0 ETH |
[ Download CSV Export ]
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
VestingTokenFactory
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 2000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (access/Ownable2Step.sol) pragma solidity ^0.8.0; import "./Ownable.sol"; /** * @dev Contract module which provides access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership} and {acceptOwnership}. * * This module is used through inheritance. It will make available all functions * from parent (Ownable). */ abstract contract Ownable2Step is Ownable { address private _pendingOwner; event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner); /** * @dev Returns the address of the pending owner. */ function pendingOwner() public view virtual returns (address) { return _pendingOwner; } /** * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual override onlyOwner { _pendingOwner = newOwner; emit OwnershipTransferStarted(owner(), newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual override { delete _pendingOwner; super._transferOwnership(newOwner); } /** * @dev The new owner accepts the ownership transfer. */ function acceptOwnership() external { address sender = _msgSender(); require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner"); _transferOwnership(sender); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol) pragma solidity ^0.8.0; /** * @dev ERC1822: 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 v4.7.0) (proxy/beacon/BeaconProxy.sol) pragma solidity ^0.8.0; import "./IBeacon.sol"; import "../Proxy.sol"; import "../ERC1967/ERC1967Upgrade.sol"; /** * @dev This contract implements a proxy that gets the implementation address for each call from an {UpgradeableBeacon}. * * The beacon address is stored in storage slot `uint256(keccak256('eip1967.proxy.beacon')) - 1`, so that it doesn't * conflict with the storage layout of the implementation behind the proxy. * * _Available since v3.4._ */ contract BeaconProxy is Proxy, ERC1967Upgrade { /** * @dev Initializes the proxy with `beacon`. * * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon. This * will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity * constructor. * * Requirements: * * - `beacon` must be a contract with the interface {IBeacon}. */ constructor(address beacon, bytes memory data) payable { _upgradeBeaconToAndCall(beacon, data, false); } /** * @dev Returns the current beacon address. */ function _beacon() internal view virtual returns (address) { return _getBeacon(); } /** * @dev Returns the current implementation address of the associated beacon. */ function _implementation() internal view virtual override returns (address) { return IBeacon(_getBeacon()).implementation(); } /** * @dev Changes the proxy to use a new beacon. Deprecated: see {_upgradeBeaconToAndCall}. * * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon. * * Requirements: * * - `beacon` must be a contract. * - The implementation returned by `beacon` must be a contract. */ function _setBeacon(address beacon, bytes memory data) internal virtual { _upgradeBeaconToAndCall(beacon, data, false); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.0; /** * @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. * * {BeaconProxy} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol) pragma solidity ^0.8.2; import "../beacon/IBeacon.sol"; import "../../interfaces/draft-IERC1822.sol"; import "../../utils/Address.sol"; import "../../utils/StorageSlot.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. * * _Available since v4.1._ * * @custom:oz-upgrades-unsafe-allow delegatecall */ abstract contract ERC1967Upgrade { // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @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 EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Perform implementation upgrade * * Emits an {Upgraded} event. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Perform implementation upgrade with additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCall( address newImplementation, bytes memory data, bool forceCall ) internal { _upgradeTo(newImplementation); if (data.length > 0 || forceCall) { Address.functionDelegateCall(newImplementation, data); } } /** * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCallUUPS( address newImplementation, bytes memory data, bool forceCall ) internal { // Upgrades from old implementations will perform a rollback test. This test requires the new // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing // this special case will break upgrade paths from old UUPS implementation to new ones. if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) { _setImplementation(newImplementation); } else { try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) { require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID"); } catch { revert("ERC1967Upgrade: new implementation is not UUPS"); } _upgradeToAndCall(newImplementation, data, forceCall); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Returns the current admin. */ function _getAdmin() internal view returns (address) { return StorageSlot.getAddressSlot(_ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { require(newAdmin != address(0), "ERC1967: new admin is the zero address"); StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. */ function _changeAdmin(address newAdmin) internal { emit AdminChanged(_getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. */ bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Emitted when the beacon is upgraded. */ event BeaconUpgraded(address indexed beacon); /** * @dev Returns the current beacon. */ function _getBeacon() internal view returns (address) { return StorageSlot.getAddressSlot(_BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { require(Address.isContract(newBeacon), "ERC1967: new beacon is not a contract"); require( Address.isContract(IBeacon(newBeacon).implementation()), "ERC1967: beacon implementation is not a contract" ); StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon; } /** * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). * * Emits a {BeaconUpgraded} event. */ function _upgradeBeaconToAndCall( address newBeacon, bytes memory data, bool forceCall ) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0 || forceCall) { Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol) pragma solidity ^0.8.0; /** * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to * be specified by overriding the virtual {_implementation} function. * * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a * different contract through the {_delegate} function. * * The success and return data of the delegated call will be returned back to the caller of the proxy. */ abstract contract Proxy { /** * @dev Delegates the current call to `implementation`. * * This function does not return to its internal call site, it will return directly to the external caller. */ function _delegate(address implementation) internal virtual { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) // Copy the returned data. returndatacopy(0, 0, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function * and {_fallback} should delegate. */ function _implementation() internal view virtual returns (address); /** * @dev Delegates the current call to the address returned by `_implementation()`. * * This function does not return to its internal call site, it will return directly to the external caller. */ function _fallback() internal virtual { _beforeFallback(); _delegate(_implementation()); } /** * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other * function in the contract matches the call data. */ fallback() external payable virtual { _fallback(); } /** * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data * is empty. */ receive() external payable virtual { _fallback(); } /** * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback` * call, or as part of the Solidity `fallback` or `receive` functions. * * If overridden should call `super._beforeFallback()`. */ function _beforeFallback() internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol) pragma solidity ^0.8.0; /** * @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 ERC1967 implementation slot: * ``` * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._ */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } }
// SPDX-License-Identifier: None // Unvest Contracts (last updated v2.0.0) (interfaces/IFeeManager.sol) pragma solidity 0.8.17; /** * @title IFeeManager * @dev Interface that describes the struct and accessor function for the data related to the collection of fees. */ interface IFeeManager { /** * @dev `feeCollector` is the address that will collect the fees of every transaction of `VestingToken`s * @dev `feePercentage` is the percentage of every transaction that will be collected. */ struct FeeData { address feeCollector; uint64 feePercentage; } /** * @notice Exposes the `FeeData` for `VestingToken`s to consume. */ function feeData() external view returns (FeeData memory); }
// SPDX-License-Identifier: None // Unvest Contracts (last updated v2.0.0) (interfaces/IVestingToken.sol) pragma solidity 0.8.17; /** * @title IVestingToken * @dev Interface that describes the Milestone struct and initialize function so the `VestingTokenFactory` knows how to * initialize the `VestingToken`. */ interface IVestingToken { /** * @dev Ramps describes how the periods between release tokens. * - Cliff releases nothing until the end of the period. * - Linear releases tokens every second according to a linear slope. * * (0) Cliff (1) Linear * | | * | _____ | _____ * | | | / * | | | / * |_______|_____ |_____/_______ * T0 T1 T0 T1 */ enum Ramp { Cliff, Linear } /** * @dev `timestamp` represents a moment in time when this Milestone is considered expired. * @dev `ramp` defines the behaviour of the release of tokens in period between the previous Milestone and the * current one. * @dev `percentage` is the percentage of tokens that should be released once this Milestone has expired. */ struct Milestone { uint64 timestamp; Ramp ramp; uint64 percentage; } /** * @notice Initializes the contract by setting up the ERC20 variables, the `underlyingToken`, and the * `milestonesArray` information. * * @param name The token collection name. * @param symbol The token collection symbol. * @param underlyingTokenAddress The ERC20 token that will be held by this contract. * @param milestonesArray Array of all Milestones for this Contract's lifetime. */ function initialize( string memory name, string memory symbol, address underlyingTokenAddress, Milestone[] calldata milestonesArray ) external; }
// SPDX-License-Identifier: None // Unvest Contracts (last updated v2.0.0) (VestingTokenFactory.sol) pragma solidity 0.8.17; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol"; import "@openzeppelin/contracts/access/Ownable2Step.sol"; import "./interfaces/IFeeManager.sol"; import "./interfaces/IVestingToken.sol"; error AddressCanNotBeZero(); error AddressIsNotAContract(); error FailedToDeploy(); error FeeOutOfRange(); error NotFeeCollector(); /** * @title VestingTokenFactory * @dev The VestingTokenFactory contract can be used to create vesting contracts for any ERC20 token. */ contract VestingTokenFactory is Ownable2Step, IFeeManager, IBeacon { /** * @dev `feePercentage` is the old fee percentage that will be valid until `feeValidUntil`. * @dev `feeValidUntil` is the timestamp that marks the point in time where the changes of feePercentage will take * effect. */ struct DelayedFeeData { uint64 feePercentage; uint64 feeValidUntil; } /** * @param underlyingToken Address of the ERC20 that will be vest into `vestingToken`. * @param vestingToken Address of the newly deployed `VestingToken`. */ event VestingTokenCreated(address indexed underlyingToken, address vestingToken); /** * @param feeCollector Address of the new fee collector. */ event FeeCollectorChange(address indexed feeCollector); /** * @param feePercentage Value for the new fee. */ event FeePercentageChange(uint64 feePercentage); /** * @dev Percentages and fees are calculated using 18 decimals where 0 ether is 0%. */ uint64 private constant MIN_FEE = 0; /** * @dev Percentages and fees are calculated using 18 decimals where 0.05 ether is 5%. */ uint64 private constant MAX_FEE = 0.05 ether; /** * @notice The address that will be used as a delegate call target for `VestingToken`s. */ address public immutable override implementation; /** * @dev It will be used as the salt for create2 */ bytes32 internal _salt; /** * @dev Stores the address that will collect the fees of every transaction of `VestingToken`s and the percentage * that will be charged. */ FeeData internal _feeData; /** * @dev Stores the info necessary for a delayed change of feePercentage. */ DelayedFeeData internal _delayedFeeData; /** * @dev Maps `underlyingToken`s to an array of `VestingToken`s. */ mapping(address => address[]) internal _vestingTokensByUnderlyingToken; /** * @dev Creates a vesting token factory contract. * * Requirements: * * - `implementationAddress` has to be a contract. * - `feeCollectorAddress` can't be address 0x0. * - `feePercentageValue` must be within minFee and maxFee. * * @param implementationAddress Address of `VestingToken` contract implementation. * @param feeCollectorAddress Address of `feeCollector`. * @param feePercentageValue Value for `feePercentage` that will be charged on `VestingToken`'s transfers. */ constructor(address implementationAddress, address feeCollectorAddress, uint64 feePercentageValue) { if (!Address.isContract(implementationAddress)) revert AddressIsNotAContract(); bytes32 seed; assembly ("memory-safe") { seed := chainid() } _salt = seed; implementation = implementationAddress; // feePercentage can only be set before feeCollector setFeePercentage(feePercentageValue); _delayedFeeData.feePercentage = feePercentageValue; setFeeCollector(feeCollectorAddress); } /** * @notice Increments the salt one step. * * @dev In the rare case that create2 fails, this function can be used to skip that particular salt. */ function nextSalt() public { _salt = keccak256(abi.encode(_salt)); } /** * @notice Creates new VestingToken contracts. * * Requirements: * * - `underlyingTokenAddress` cannot be the zero address. * - `timestamps` must be given in ascending order. * - `percentages` must be given in ascending order and the last one must always be 1 eth, where 1 eth equals to * 100%. * * @param name The token collection name. * @param symbol The token collection symbol. * @param underlyingTokenAddress The ERC20 token that will be held by this contract. * @param milestonesArray Array of all Milestones for this Contract's lifetime. */ function createVestingToken( string calldata name, string calldata symbol, address underlyingTokenAddress, IVestingToken.Milestone[] calldata milestonesArray ) public { address vestingToken; bytes memory bytecode = abi.encodePacked(type(BeaconProxy).creationCode, abi.encode(address(this), "")); bytes32 salt = _salt; assembly ("memory-safe") { vestingToken := create2(0, add(bytecode, 0x20), mload(bytecode), salt) } if (vestingToken == address(0)) revert FailedToDeploy(); nextSalt(); IVestingToken(vestingToken).initialize(name, symbol, underlyingTokenAddress, milestonesArray); _vestingTokensByUnderlyingToken[underlyingTokenAddress].push(vestingToken); emit VestingTokenCreated(underlyingTokenAddress, vestingToken); } /** * @dev Set address of fee collector. * * Requirements: * * - `msg.sender` has to be the owner of the contract. * - `newFeeCollector` can't be address 0x0. * * @param newFeeCollector Address of `feeCollector`. */ function setFeeCollector(address newFeeCollector) public onlyOwner { if (newFeeCollector == address(0)) revert AddressCanNotBeZero(); _feeData.feeCollector = newFeeCollector; emit FeeCollectorChange(newFeeCollector); } /** * @notice Sets a new fee within the range 0% - 5%. * * @dev Percentages and fees are calculated using 18 decimals where 1 ether is 100%. * * Requirements: * * - `msg.sender` has to be `feeCollector`. * - `newFeePercentage` must be within minFee and maxFee. * * @param newFeePercentage Value for `feePercentage` that will be charged on `VestingToken`'s transfers. */ function setFeePercentage(uint64 newFeePercentage) public { if (_msgSender() != _feeData.feeCollector && _feeData.feeCollector != address(0)) revert NotFeeCollector(); if (newFeePercentage < MIN_FEE || newFeePercentage > MAX_FEE) revert FeeOutOfRange(); if (_delayedFeeData.feeValidUntil <= block.timestamp) { _delayedFeeData.feePercentage = _feeData.feePercentage; } _delayedFeeData.feeValidUntil = uint64(block.timestamp + 1 hours); _feeData.feePercentage = newFeePercentage; emit FeePercentageChange(newFeePercentage); } /** * @dev Exposes MIN_FEE in a lowerCamelCase. */ function minFee() external pure returns (uint64) { return MIN_FEE; } /** * @dev Exposes MAX_FEE in a lowerCamelCase. */ function maxFee() external pure returns (uint64) { return MAX_FEE; } /** * @notice Exposes the whole array that `_vestingTokensByUnderlyingToken` maps. */ function vestingTokens(address underlyingToken) external view returns (address[] memory) { return _vestingTokensByUnderlyingToken[underlyingToken]; } /** * @notice Exposes the `FeeData.feeCollector` to users. */ function feeCollector() external view returns (address) { return _feeData.feeCollector; } /** * @notice Exposes the `FeeData.feePercentage` to users. */ function feePercentage() external view returns (uint64) { return feeData().feePercentage; } /** * @notice Exposes the `FeeData` for `VestingToken`s to consume. */ function feeData() public view override returns (FeeData memory) { if (_delayedFeeData.feeValidUntil > block.timestamp) return FeeData(_feeData.feeCollector, _delayedFeeData.feePercentage); return _feeData; } }
{ "optimizer": { "enabled": true, "runs": 2000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"implementationAddress","type":"address"},{"internalType":"address","name":"feeCollectorAddress","type":"address"},{"internalType":"uint64","name":"feePercentageValue","type":"uint64"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AddressCanNotBeZero","type":"error"},{"inputs":[],"name":"AddressIsNotAContract","type":"error"},{"inputs":[],"name":"FailedToDeploy","type":"error"},{"inputs":[],"name":"FeeOutOfRange","type":"error"},{"inputs":[],"name":"NotFeeCollector","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"feeCollector","type":"address"}],"name":"FeeCollectorChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"feePercentage","type":"uint64"}],"name":"FeePercentageChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"underlyingToken","type":"address"},{"indexed":false,"internalType":"address","name":"vestingToken","type":"address"}],"name":"VestingTokenCreated","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"underlyingTokenAddress","type":"address"},{"components":[{"internalType":"uint64","name":"timestamp","type":"uint64"},{"internalType":"enum IVestingToken.Ramp","name":"ramp","type":"uint8"},{"internalType":"uint64","name":"percentage","type":"uint64"}],"internalType":"struct IVestingToken.Milestone[]","name":"milestonesArray","type":"tuple[]"}],"name":"createVestingToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeCollector","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeData","outputs":[{"components":[{"internalType":"address","name":"feeCollector","type":"address"},{"internalType":"uint64","name":"feePercentage","type":"uint64"}],"internalType":"struct IFeeManager.FeeData","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feePercentage","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxFee","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"minFee","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"nextSalt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newFeeCollector","type":"address"}],"name":"setFeeCollector","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"newFeePercentage","type":"uint64"}],"name":"setFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"underlyingToken","type":"address"}],"name":"vestingTokens","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a06040523480156200001157600080fd5b5060405162001c7738038062001c7783398101604081905262000034916200039c565b6200003f33620000c1565b6200005583620000eb60201b620009cb1760201c565b62000073576040516356db3a0f60e01b815260040160405180910390fd5b4660028190556001600160a01b0384166080526200009182620000fa565b600480546001600160401b0319166001600160401b038416179055620000b78362000252565b505050506200041e565b600180546001600160a01b0319169055620000e881620002ce602090811b620009da17901c565b50565b6001600160a01b03163b151590565b6003546001600160a01b0316336001600160a01b0316141580156200012957506003546001600160a01b031615155b1562000148576040516339fe69ff60e11b815260040160405180910390fd5b66b1a2bc2ec500006001600160401b03821611156200017a57604051630c8249ad60e01b815260040160405180910390fd5b60045442680100000000000000009091046001600160401b031611620001c55760035460048054600160a01b9092046001600160401b03166001600160401b03199092169190911790555b620001d342610e10620003f6565b60048054600160401b600160801b031916680100000000000000006001600160401b039384160217905560038054600160a01b600160e01b031916600160a01b9284169283021790556040519081527f80ae3bbb9ba42aa990a026f01e7e41b458ba8d26749e171f9e0628d9cae952919060200160405180910390a150565b6200025c6200031e565b6001600160a01b0381166200028457604051630191b71b60e61b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517f3908cc4801f68d354a4e28f598ec87870f4b8a4b9a945c81b641d1b677575d5290600090a250565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000546001600160a01b031633146200037d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640160405180910390fd5b565b80516001600160a01b03811681146200039757600080fd5b919050565b600080600060608486031215620003b257600080fd5b620003bd846200037f565b9250620003cd602085016200037f565b60408501519092506001600160401b0381168114620003eb57600080fd5b809150509250925092565b808201808211156200041857634e487b7160e01b600052601160045260246000fd5b92915050565b60805161183d6200043a600039600061014f015261183d6000f3fe60806040523480156200001157600080fd5b5060043610620001155760003560e01c80638da5cb5b11620000a3578063c415b95c116200006e578063c415b95c1462000231578063e30c39781462000243578063e753e6001462000255578063f2fde38b146200028e57600080fd5b80638da5cb5b14620001e7578063a001ecdd14620001f9578063a364fc281462000203578063a42dce80146200021a57600080fd5b8063763b6d9e11620000e4578063763b6d9e146200019657806379ba509714620001bc57806387d5334814620001c65780638b3009d714620001d057600080fd5b806301f59d16146200011a57806324ec759014620001415780635c60da1b1462000149578063715018a6146200018a575b600080fd5b66b1a2bc2ec500005b60405167ffffffffffffffff90911681526020015b60405180910390f35b600062000123565b620001717f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200162000138565b62000194620002a5565b005b620001ad620001a736600462000b00565b620002bd565b60405162000138919062000b25565b6200019462000335565b62000194620003e5565b62000194620001e136600462000b8d565b62000418565b6000546001600160a01b031662000171565b620001236200060a565b620001946200021436600462000bf7565b6200061f565b620001946200022b36600462000b00565b62000800565b6003546001600160a01b031662000171565b6001546001600160a01b031662000171565b6200025f620008a2565b6040805182516001600160a01b0316815260209283015167ffffffffffffffff16928101929092520162000138565b620001946200029f36600462000b00565b6200094a565b620002af62000a37565b620002bb600062000aad565b565b6001600160a01b0381166000908152600560209081526040918290208054835181840281018401909452808452606093928301828280156200032957602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116200030a575b50505050509050919050565b60015433906001600160a01b03168114620003d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e6572000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b620003e28162000aad565b50565b600254604051602001620003fb91815260200190565b60408051601f198184030181529190528051602090910120600255565b6003546001600160a01b0316336001600160a01b0316141580156200044757506003546001600160a01b031615155b156200047f576040517f73fcd3fe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b66b1a2bc2ec5000067ffffffffffffffff82161115620004cb576040517f0c8249ad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600454426801000000000000000090910467ffffffffffffffff16116200054157600354600480547401000000000000000000000000000000000000000090920467ffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009092169190911790555b6200054f42610e1062000ce2565b600480547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff166801000000000000000067ffffffffffffffff93841602179055600380547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000009284169283021790556040519081527f80ae3bbb9ba42aa990a026f01e7e41b458ba8d26749e171f9e0628d9cae952919060200160405180910390a150565b600062000616620008a2565b60200151905090565b60008060405180602001620006349062000ad5565b601f1982820381018352601f909101166040818152306020830152808201526000606082015260800160408051601f19818403018152908290526200067d929160200162000d55565b604051602081830303815290604052905060006002549050808251602084016000f592506001600160a01b038316620006e2576040517f2628e9f300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b620006ec620003e5565b6040517f3e2a34730000000000000000000000000000000000000000000000000000000081526001600160a01b03841690633e2a3473906200073f908d908d908d908d908d908d908d9060040162000da1565b600060405180830381600087803b1580156200075a57600080fd5b505af11580156200076f573d6000803e3d6000fd5b505050506001600160a01b038681166000818152600560209081526040808320805460018101825590845292829020909201805473ffffffffffffffffffffffffffffffffffffffff19169488169485179055905192835290917f9020e4abe651b6323f3420a1335588cd97e6c1407ba23ab0b00ca8c5db73bb65910160405180910390a250505050505050505050565b6200080a62000a37565b6001600160a01b0381166200084b576040517f646dc6c000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6003805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f3908cc4801f68d354a4e28f598ec87870f4b8a4b9a945c81b641d1b677575d5290600090a250565b6040805180820190915260008082526020820152600454426801000000000000000090910467ffffffffffffffff161115620009065750604080518082019091526003546001600160a01b0316815260045467ffffffffffffffff16602082015290565b50604080518082019091526003546001600160a01b038116825274010000000000000000000000000000000000000000900467ffffffffffffffff16602082015290565b6200095462000a37565b600180546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff199091168117909155620009936000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6001600160a01b03163b151590565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000546001600160a01b03163314620002bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620003ce565b6001805473ffffffffffffffffffffffffffffffffffffffff19169055620003e281620009da565b6109a08062000e6883390190565b80356001600160a01b038116811462000afb57600080fd5b919050565b60006020828403121562000b1357600080fd5b62000b1e8262000ae3565b9392505050565b6020808252825182820181905260009190848201906040850190845b8181101562000b685783516001600160a01b03168352928401929184019160010162000b41565b50909695505050505050565b803567ffffffffffffffff8116811462000afb57600080fd5b60006020828403121562000ba057600080fd5b62000b1e8262000b74565b60008083601f84011262000bbe57600080fd5b50813567ffffffffffffffff81111562000bd757600080fd5b60208301915083602082850101111562000bf057600080fd5b9250929050565b60008060008060008060006080888a03121562000c1357600080fd5b873567ffffffffffffffff8082111562000c2c57600080fd5b62000c3a8b838c0162000bab565b909950975060208a013591508082111562000c5457600080fd5b62000c628b838c0162000bab565b909750955085915062000c7860408b0162000ae3565b945060608a013591508082111562000c8f57600080fd5b818a0191508a601f83011262000ca457600080fd5b81358181111562000cb457600080fd5b8b602060608302850101111562000cca57600080fd5b60208301945080935050505092959891949750929550565b8082018082111562000d1d577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b6000815160005b8181101562000d46576020818501810151868301520162000d2a565b50600093019283525090919050565b600062000d6e62000d67838662000d23565b8462000d23565b949350505050565b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b60808152600062000db760808301898b62000d76565b60208382038185015262000dcd82898b62000d76565b915060406001600160a01b038816818601526060858403818701528387855283850190508894506000805b8981101562000e535767ffffffffffffffff8062000e168962000b74565b168452868801356002811062000e2a578384fd5b848801528062000e3c89880162000b74565b168487015250958301959183019160010162000df8565b50909e9d505050505050505050505050505056fe60806040526040516109a03803806109a08339810160408190526100229161045b565b61002e82826000610035565b5050610585565b61003e83610100565b6040516001600160a01b038416907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e90600090a260008251118061007f5750805b156100fb576100f9836001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100e9919061051b565b836102a360201b6100291760201c565b505b505050565b610113816102cf60201b6100551760201c565b6101725760405162461bcd60e51b815260206004820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e6044820152641d1c9858dd60da1b60648201526084015b60405180910390fd5b6101e6816001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d7919061051b565b6102cf60201b6100551760201c565b61024b5760405162461bcd60e51b815260206004820152603060248201527f455243313936373a20626561636f6e20696d706c656d656e746174696f6e206960448201526f1cc81b9bdd08184818dbdb9d1c9858dd60821b6064820152608401610169565b806102827fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5060001b6102de60201b6100711760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606102c88383604051806060016040528060278152602001610979602791396102e1565b9392505050565b6001600160a01b03163b151590565b90565b6060600080856001600160a01b0316856040516102fe9190610536565b600060405180830381855af49150503d8060008114610339576040519150601f19603f3d011682016040523d82523d6000602084013e61033e565b606091505b5090925090506103508683838761035a565b9695505050505050565b606083156103c95782516000036103c2576001600160a01b0385163b6103c25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610169565b50816103d3565b6103d383836103db565b949350505050565b8151156103eb5781518083602001fd5b8060405162461bcd60e51b81526004016101699190610552565b80516001600160a01b038116811461041c57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561045257818101518382015260200161043a565b50506000910152565b6000806040838503121561046e57600080fd5b61047783610405565b60208401519092506001600160401b038082111561049457600080fd5b818501915085601f8301126104a857600080fd5b8151818111156104ba576104ba610421565b604051601f8201601f19908116603f011681019083821181831017156104e2576104e2610421565b816040528281528860208487010111156104fb57600080fd5b61050c836020830160208801610437565b80955050505050509250929050565b60006020828403121561052d57600080fd5b6102c882610405565b60008251610548818460208701610437565b9190910192915050565b6020815260008251806020840152610571816040850160208701610437565b601f01601f19169190910160400192915050565b6103e5806105946000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610074565b610127565b565b606061004e83836040518060600160405280602781526020016103896027913961014b565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d505473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061012291906102c1565b905090565b3660008037600080366000845af43d6000803e808015610146573d6000f35b3d6000fd5b60606000808573ffffffffffffffffffffffffffffffffffffffff1685604051610175919061031b565b600060405180830381855af49150503d80600081146101b0576040519150601f19603f3d011682016040523d82523d6000602084013e6101b5565b606091505b50915091506101c6868383876101d0565b9695505050505050565b6060831561026b5782516000036102645773ffffffffffffffffffffffffffffffffffffffff85163b610264576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b5081610275565b610275838361027d565b949350505050565b81511561028d5781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161025b9190610337565b6000602082840312156102d357600080fd5b815173ffffffffffffffffffffffffffffffffffffffff8116811461004e57600080fd5b60005b838110156103125781810151838201526020016102fa565b50506000910152565b6000825161032d8184602087016102f7565b9190910192915050565b60208152600082518060208401526103568160408501602087016102f7565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220cb18b7ae5d0f548ad68efafcf1925984f0c96a9695633268520a49af440ccb7b64736f6c63430008110033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220c447de57a8d62e17b56dd5f1015d07f4ba76571f6a53d1acc8ac69095818902764736f6c634300081100330000000000000000000000008f57ba15d3f576fa518f89fd8045a5e51c744e640000000000000000000000009bf8cf33916403f2b66d3390e50d1931e18ae8940000000000000000000000000000000000000000000000000058d15e17628000
Deployed Bytecode
0x60806040523480156200001157600080fd5b5060043610620001155760003560e01c80638da5cb5b11620000a3578063c415b95c116200006e578063c415b95c1462000231578063e30c39781462000243578063e753e6001462000255578063f2fde38b146200028e57600080fd5b80638da5cb5b14620001e7578063a001ecdd14620001f9578063a364fc281462000203578063a42dce80146200021a57600080fd5b8063763b6d9e11620000e4578063763b6d9e146200019657806379ba509714620001bc57806387d5334814620001c65780638b3009d714620001d057600080fd5b806301f59d16146200011a57806324ec759014620001415780635c60da1b1462000149578063715018a6146200018a575b600080fd5b66b1a2bc2ec500005b60405167ffffffffffffffff90911681526020015b60405180910390f35b600062000123565b620001717f0000000000000000000000008f57ba15d3f576fa518f89fd8045a5e51c744e6481565b6040516001600160a01b03909116815260200162000138565b62000194620002a5565b005b620001ad620001a736600462000b00565b620002bd565b60405162000138919062000b25565b6200019462000335565b62000194620003e5565b62000194620001e136600462000b8d565b62000418565b6000546001600160a01b031662000171565b620001236200060a565b620001946200021436600462000bf7565b6200061f565b620001946200022b36600462000b00565b62000800565b6003546001600160a01b031662000171565b6001546001600160a01b031662000171565b6200025f620008a2565b6040805182516001600160a01b0316815260209283015167ffffffffffffffff16928101929092520162000138565b620001946200029f36600462000b00565b6200094a565b620002af62000a37565b620002bb600062000aad565b565b6001600160a01b0381166000908152600560209081526040918290208054835181840281018401909452808452606093928301828280156200032957602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116200030a575b50505050509050919050565b60015433906001600160a01b03168114620003d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e6572000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b620003e28162000aad565b50565b600254604051602001620003fb91815260200190565b60408051601f198184030181529190528051602090910120600255565b6003546001600160a01b0316336001600160a01b0316141580156200044757506003546001600160a01b031615155b156200047f576040517f73fcd3fe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b66b1a2bc2ec5000067ffffffffffffffff82161115620004cb576040517f0c8249ad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600454426801000000000000000090910467ffffffffffffffff16116200054157600354600480547401000000000000000000000000000000000000000090920467ffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009092169190911790555b6200054f42610e1062000ce2565b600480547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff166801000000000000000067ffffffffffffffff93841602179055600380547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000009284169283021790556040519081527f80ae3bbb9ba42aa990a026f01e7e41b458ba8d26749e171f9e0628d9cae952919060200160405180910390a150565b600062000616620008a2565b60200151905090565b60008060405180602001620006349062000ad5565b601f1982820381018352601f909101166040818152306020830152808201526000606082015260800160408051601f19818403018152908290526200067d929160200162000d55565b604051602081830303815290604052905060006002549050808251602084016000f592506001600160a01b038316620006e2576040517f2628e9f300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b620006ec620003e5565b6040517f3e2a34730000000000000000000000000000000000000000000000000000000081526001600160a01b03841690633e2a3473906200073f908d908d908d908d908d908d908d9060040162000da1565b600060405180830381600087803b1580156200075a57600080fd5b505af11580156200076f573d6000803e3d6000fd5b505050506001600160a01b038681166000818152600560209081526040808320805460018101825590845292829020909201805473ffffffffffffffffffffffffffffffffffffffff19169488169485179055905192835290917f9020e4abe651b6323f3420a1335588cd97e6c1407ba23ab0b00ca8c5db73bb65910160405180910390a250505050505050505050565b6200080a62000a37565b6001600160a01b0381166200084b576040517f646dc6c000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6003805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f3908cc4801f68d354a4e28f598ec87870f4b8a4b9a945c81b641d1b677575d5290600090a250565b6040805180820190915260008082526020820152600454426801000000000000000090910467ffffffffffffffff161115620009065750604080518082019091526003546001600160a01b0316815260045467ffffffffffffffff16602082015290565b50604080518082019091526003546001600160a01b038116825274010000000000000000000000000000000000000000900467ffffffffffffffff16602082015290565b6200095462000a37565b600180546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff199091168117909155620009936000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6001600160a01b03163b151590565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000546001600160a01b03163314620002bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620003ce565b6001805473ffffffffffffffffffffffffffffffffffffffff19169055620003e281620009da565b6109a08062000e6883390190565b80356001600160a01b038116811462000afb57600080fd5b919050565b60006020828403121562000b1357600080fd5b62000b1e8262000ae3565b9392505050565b6020808252825182820181905260009190848201906040850190845b8181101562000b685783516001600160a01b03168352928401929184019160010162000b41565b50909695505050505050565b803567ffffffffffffffff8116811462000afb57600080fd5b60006020828403121562000ba057600080fd5b62000b1e8262000b74565b60008083601f84011262000bbe57600080fd5b50813567ffffffffffffffff81111562000bd757600080fd5b60208301915083602082850101111562000bf057600080fd5b9250929050565b60008060008060008060006080888a03121562000c1357600080fd5b873567ffffffffffffffff8082111562000c2c57600080fd5b62000c3a8b838c0162000bab565b909950975060208a013591508082111562000c5457600080fd5b62000c628b838c0162000bab565b909750955085915062000c7860408b0162000ae3565b945060608a013591508082111562000c8f57600080fd5b818a0191508a601f83011262000ca457600080fd5b81358181111562000cb457600080fd5b8b602060608302850101111562000cca57600080fd5b60208301945080935050505092959891949750929550565b8082018082111562000d1d577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b6000815160005b8181101562000d46576020818501810151868301520162000d2a565b50600093019283525090919050565b600062000d6e62000d67838662000d23565b8462000d23565b949350505050565b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b60808152600062000db760808301898b62000d76565b60208382038185015262000dcd82898b62000d76565b915060406001600160a01b038816818601526060858403818701528387855283850190508894506000805b8981101562000e535767ffffffffffffffff8062000e168962000b74565b168452868801356002811062000e2a578384fd5b848801528062000e3c89880162000b74565b168487015250958301959183019160010162000df8565b50909e9d505050505050505050505050505056fe60806040526040516109a03803806109a08339810160408190526100229161045b565b61002e82826000610035565b5050610585565b61003e83610100565b6040516001600160a01b038416907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e90600090a260008251118061007f5750805b156100fb576100f9836001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100e9919061051b565b836102a360201b6100291760201c565b505b505050565b610113816102cf60201b6100551760201c565b6101725760405162461bcd60e51b815260206004820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e6044820152641d1c9858dd60da1b60648201526084015b60405180910390fd5b6101e6816001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d7919061051b565b6102cf60201b6100551760201c565b61024b5760405162461bcd60e51b815260206004820152603060248201527f455243313936373a20626561636f6e20696d706c656d656e746174696f6e206960448201526f1cc81b9bdd08184818dbdb9d1c9858dd60821b6064820152608401610169565b806102827fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5060001b6102de60201b6100711760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606102c88383604051806060016040528060278152602001610979602791396102e1565b9392505050565b6001600160a01b03163b151590565b90565b6060600080856001600160a01b0316856040516102fe9190610536565b600060405180830381855af49150503d8060008114610339576040519150601f19603f3d011682016040523d82523d6000602084013e61033e565b606091505b5090925090506103508683838761035a565b9695505050505050565b606083156103c95782516000036103c2576001600160a01b0385163b6103c25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610169565b50816103d3565b6103d383836103db565b949350505050565b8151156103eb5781518083602001fd5b8060405162461bcd60e51b81526004016101699190610552565b80516001600160a01b038116811461041c57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561045257818101518382015260200161043a565b50506000910152565b6000806040838503121561046e57600080fd5b61047783610405565b60208401519092506001600160401b038082111561049457600080fd5b818501915085601f8301126104a857600080fd5b8151818111156104ba576104ba610421565b604051601f8201601f19908116603f011681019083821181831017156104e2576104e2610421565b816040528281528860208487010111156104fb57600080fd5b61050c836020830160208801610437565b80955050505050509250929050565b60006020828403121561052d57600080fd5b6102c882610405565b60008251610548818460208701610437565b9190910192915050565b6020815260008251806020840152610571816040850160208701610437565b601f01601f19169190910160400192915050565b6103e5806105946000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610074565b610127565b565b606061004e83836040518060600160405280602781526020016103896027913961014b565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d505473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061012291906102c1565b905090565b3660008037600080366000845af43d6000803e808015610146573d6000f35b3d6000fd5b60606000808573ffffffffffffffffffffffffffffffffffffffff1685604051610175919061031b565b600060405180830381855af49150503d80600081146101b0576040519150601f19603f3d011682016040523d82523d6000602084013e6101b5565b606091505b50915091506101c6868383876101d0565b9695505050505050565b6060831561026b5782516000036102645773ffffffffffffffffffffffffffffffffffffffff85163b610264576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b5081610275565b610275838361027d565b949350505050565b81511561028d5781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161025b9190610337565b6000602082840312156102d357600080fd5b815173ffffffffffffffffffffffffffffffffffffffff8116811461004e57600080fd5b60005b838110156103125781810151838201526020016102fa565b50506000910152565b6000825161032d8184602087016102f7565b9190910192915050565b60208152600082518060208401526103568160408501602087016102f7565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220cb18b7ae5d0f548ad68efafcf1925984f0c96a9695633268520a49af440ccb7b64736f6c63430008110033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220c447de57a8d62e17b56dd5f1015d07f4ba76571f6a53d1acc8ac69095818902764736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000008f57ba15d3f576fa518f89fd8045a5e51c744e640000000000000000000000009bf8cf33916403f2b66d3390e50d1931e18ae8940000000000000000000000000000000000000000000000000058d15e17628000
-----Decoded View---------------
Arg [0] : implementationAddress (address): 0x8F57Ba15D3F576FA518f89Fd8045A5E51C744e64
Arg [1] : feeCollectorAddress (address): 0x9Bf8cF33916403F2B66d3390E50d1931e18ae894
Arg [2] : feePercentageValue (uint64): 25000000000000000
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000008f57ba15d3f576fa518f89fd8045a5e51c744e64
Arg [1] : 0000000000000000000000009bf8cf33916403f2b66d3390e50d1931e18ae894
Arg [2] : 0000000000000000000000000000000000000000000000000058d15e17628000
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.