Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60c06040 | 15799619 | 670 days ago | IN | 0 ETH | 0.05605078 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
Treasury
Compiler Version
v0.8.16+commit.07a7930e
Optimization Enabled:
Yes with 500000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; import { UUPS } from "../../lib/proxy/UUPS.sol"; import { Ownable } from "../../lib/utils/Ownable.sol"; import { ERC721TokenReceiver, ERC1155TokenReceiver } from "../../lib/utils/TokenReceiver.sol"; import { SafeCast } from "../../lib/utils/SafeCast.sol"; import { TreasuryStorageV1 } from "./storage/TreasuryStorageV1.sol"; import { ITreasury } from "./ITreasury.sol"; import { ProposalHasher } from "../governor/ProposalHasher.sol"; import { IManager } from "../../manager/IManager.sol"; /// @title Treasury /// @author Rohan Kulkarni /// @notice A DAO's treasury and transaction executor /// Modified from: /// - OpenZeppelin Contracts v4.7.3 (governance/TimelockController.sol) /// - NounsDAOExecutor.sol commit 2cbe6c7 - licensed under the BSD-3-Clause license. contract Treasury is ITreasury, UUPS, Ownable, ProposalHasher, TreasuryStorageV1 { /// /// /// CONSTANTS /// /// /// /// @notice The default grace period setting uint128 private constant INITIAL_GRACE_PERIOD = 2 weeks; /// /// /// IMMUTABLES /// /// /// /// @notice The contract upgrade manager IManager private immutable manager; /// /// /// CONSTRUCTOR /// /// /// /// @param _manager The contract upgrade manager address constructor(address _manager) payable initializer { manager = IManager(_manager); } /// /// /// INITIALIZER /// /// /// /// @notice Initializes an instance of a DAO's treasury /// @param _governor The DAO's governor address /// @param _delay The time delay to execute a queued transaction function initialize(address _governor, uint256 _delay) external initializer { // Ensure the caller is the contract manager if (msg.sender != address(manager)) revert ONLY_MANAGER(); // Ensure a governor address was provided if (_governor == address(0)) revert ADDRESS_ZERO(); // Grant ownership to the governor __Ownable_init(_governor); // Store the time delay settings.delay = SafeCast.toUint128(_delay); // Set the default grace period settings.gracePeriod = INITIAL_GRACE_PERIOD; emit DelayUpdated(0, _delay); } /// /// /// TRANSACTION STATE /// /// /// /// @notice The timestamp that a proposal is valid to execute /// @param _proposalId The proposal id function timestamp(bytes32 _proposalId) external view returns (uint256) { return timestamps[_proposalId]; } /// @notice If a queued proposal can no longer be executed /// @param _proposalId The proposal id function isExpired(bytes32 _proposalId) external view returns (bool) { unchecked { return block.timestamp > (timestamps[_proposalId] + settings.gracePeriod); } } /// @notice If a proposal is queued /// @param _proposalId The proposal id function isQueued(bytes32 _proposalId) public view returns (bool) { return timestamps[_proposalId] != 0; } /// @notice If a proposal is ready to execute (does not consider expiration) /// @param _proposalId The proposal id function isReady(bytes32 _proposalId) public view returns (bool) { return timestamps[_proposalId] != 0 && block.timestamp >= timestamps[_proposalId]; } /// /// /// QUEUE PROPOSAL /// /// /// /// @notice Schedules a proposal for execution /// @param _proposalId The proposal id function queue(bytes32 _proposalId) external onlyOwner returns (uint256 eta) { // Ensure the proposal was not already queued if (isQueued(_proposalId)) revert PROPOSAL_ALREADY_QUEUED(); // Cannot realistically overflow unchecked { // Compute the timestamp that the proposal will be valid to execute eta = block.timestamp + settings.delay; } // Store the timestamp timestamps[_proposalId] = eta; emit TransactionScheduled(_proposalId, eta); } /// /// /// EXECUTE PROPOSAL /// /// /// /// @notice Executes a queued proposal /// @param _targets The target addresses to call /// @param _values The ETH values of each call /// @param _calldatas The calldata of each call /// @param _descriptionHash The hash of the description /// @param _proposer The proposal creator function execute( address[] calldata _targets, uint256[] calldata _values, bytes[] calldata _calldatas, bytes32 _descriptionHash, address _proposer ) external payable onlyOwner { // Get the proposal id bytes32 proposalId = hashProposal(_targets, _values, _calldatas, _descriptionHash, _proposer); // Ensure the proposal is ready to execute if (!isReady(proposalId)) revert EXECUTION_NOT_READY(proposalId); // Remove the proposal from the queue delete timestamps[proposalId]; // Cache the number of targets uint256 numTargets = _targets.length; // Cannot realistically overflow unchecked { // For each target: for (uint256 i = 0; i < numTargets; ++i) { // Execute the transaction (bool success, ) = _targets[i].call{ value: _values[i] }(_calldatas[i]); // Ensure the transaction succeeded if (!success) revert EXECUTION_FAILED(i); } } emit TransactionExecuted(proposalId, _targets, _values, _calldatas); } /// /// /// CANCEL PROPOSAL /// /// /// /// @notice Removes a queued proposal /// @param _proposalId The proposal id function cancel(bytes32 _proposalId) external onlyOwner { // Ensure the proposal is queued if (!isQueued(_proposalId)) revert PROPOSAL_NOT_QUEUED(); // Remove the proposal from the queue delete timestamps[_proposalId]; emit TransactionCanceled(_proposalId); } /// /// /// TREASURY SETTINGS /// /// /// /// @notice The time delay to execute a queued transaction function delay() external view returns (uint256) { return settings.delay; } /// @notice The time period to execute a proposal function gracePeriod() external view returns (uint256) { return settings.gracePeriod; } /// /// /// UPDATE SETTINGS /// /// /// /// @notice Updates the transaction delay /// @param _newDelay The new time delay function updateDelay(uint256 _newDelay) external { // Ensure the caller is the treasury itself if (msg.sender != address(this)) revert ONLY_TREASURY(); emit DelayUpdated(settings.delay, _newDelay); // Update the delay settings.delay = SafeCast.toUint128(_newDelay); } /// @notice Updates the execution grace period /// @param _newGracePeriod The new grace period function updateGracePeriod(uint256 _newGracePeriod) external { // Ensure the caller is the treasury itself if (msg.sender != address(this)) revert ONLY_TREASURY(); emit GracePeriodUpdated(settings.gracePeriod, _newGracePeriod); // Update the grace period settings.gracePeriod = SafeCast.toUint128(_newGracePeriod); } /// /// /// RECEIVE TOKENS /// /// /// /// @dev Accepts all ERC-721 transfers function onERC721Received( address, address, uint256, bytes memory ) public pure returns (bytes4) { return ERC721TokenReceiver.onERC721Received.selector; } /// @dev Accepts all ERC-1155 single id transfers function onERC1155Received( address, address, uint256, uint256, bytes memory ) public pure returns (bytes4) { return ERC1155TokenReceiver.onERC1155Received.selector; } /// @dev Accept all ERC-1155 batch id transfers function onERC1155BatchReceived( address, address, uint256[] memory, uint256[] memory, bytes memory ) public pure returns (bytes4) { return ERC1155TokenReceiver.onERC1155BatchReceived.selector; } /// @dev Accepts ETH transfers receive() external payable {} /// /// /// TREASURY UPGRADE /// /// /// /// @notice Ensures the caller is authorized to upgrade the contract and that the new implementation is valid /// @dev This function is called in `upgradeTo` & `upgradeToAndCall` /// @param _newImpl The new implementation address function _authorizeUpgrade(address _newImpl) internal view override { // Ensure the caller is the treasury itself if (msg.sender != address(this)) revert ONLY_TREASURY(); // Ensure the new implementation is a registered upgrade if (!manager.isRegisteredUpgrade(_getImplementation(), _newImpl)) revert INVALID_UPGRADE(_newImpl); } }
// 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) (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: MIT pragma solidity 0.8.16; /// @title ProposalHasher /// @author tbtstl /// @notice Helper contract to ensure proposal hashing functions are unified abstract contract ProposalHasher { /// /// /// HASH PROPOSAL /// /// /// /// @notice Hashes a proposal's details into a proposal id /// @param _targets The target addresses to call /// @param _values The ETH values of each call /// @param _calldatas The calldata of each call /// @param _descriptionHash The hash of the description /// @param _proposer The original proposer of the transaction function hashProposal( address[] memory _targets, uint256[] memory _values, bytes[] memory _calldatas, bytes32 _descriptionHash, address _proposer ) public pure returns (bytes32) { return keccak256(abi.encode(_targets, _values, _calldatas, _descriptionHash, _proposer)); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; import { IOwnable } from "../../lib/utils/Ownable.sol"; import { IUUPS } from "../../lib/interfaces/IUUPS.sol"; /// @title ITreasury /// @author Rohan Kulkarni /// @notice The external Treasury events, errors and functions interface ITreasury is IUUPS, IOwnable { /// /// /// EVENTS /// /// /// /// @notice Emitted when a transaction is scheduled event TransactionScheduled(bytes32 proposalId, uint256 timestamp); /// @notice Emitted when a transaction is canceled event TransactionCanceled(bytes32 proposalId); /// @notice Emitted when a transaction is executed event TransactionExecuted(bytes32 proposalId, address[] targets, uint256[] values, bytes[] payloads); /// @notice Emitted when the transaction delay is updated event DelayUpdated(uint256 prevDelay, uint256 newDelay); /// @notice Emitted when the grace period is updated event GracePeriodUpdated(uint256 prevGracePeriod, uint256 newGracePeriod); /// /// /// ERRORS /// /// /// /// @dev Reverts if tx was already queued error PROPOSAL_ALREADY_QUEUED(); /// @dev Reverts if tx was not queued error PROPOSAL_NOT_QUEUED(); /// @dev Reverts if a tx isn't ready to execute /// @param proposalId The proposal id error EXECUTION_NOT_READY(bytes32 proposalId); /// @dev Reverts if a tx failed /// @param txIndex The index of the tx error EXECUTION_FAILED(uint256 txIndex); /// @dev Reverts if execution was attempted after the grace period error EXECUTION_EXPIRED(); /// @dev Reverts if the caller was not the treasury itself error ONLY_TREASURY(); /// @dev Reverts if the caller was not the contract manager error ONLY_MANAGER(); /// /// /// FUNCTIONS /// /// /// /// @notice Initializes a DAO's treasury /// @param governor The governor address /// @param timelockDelay The time delay to execute a queued transaction function initialize(address governor, uint256 timelockDelay) external; /// @notice The timestamp that a proposal is valid to execute /// @param proposalId The proposal id function timestamp(bytes32 proposalId) external view returns (uint256); /// @notice If a proposal has been queued /// @param proposalId The proposal ids function isQueued(bytes32 proposalId) external view returns (bool); /// @notice If a proposal is ready to execute (does not consider if a proposal has expired) /// @param proposalId The proposal id function isReady(bytes32 proposalId) external view returns (bool); /// @notice If a proposal has expired to execute /// @param proposalId The proposal id function isExpired(bytes32 proposalId) external view returns (bool); /// @notice Schedules a proposal for execution /// @param proposalId The proposal id function queue(bytes32 proposalId) external returns (uint256 eta); /// @notice Removes a queued proposal /// @param proposalId The proposal id function cancel(bytes32 proposalId) external; /// @notice Executes a queued proposal /// @param targets The target addresses to call /// @param values The ETH values of each call /// @param calldatas The calldata of each call /// @param descriptionHash The hash of the description /// @param proposer The proposal creator function execute( address[] calldata targets, uint256[] calldata values, bytes[] calldata calldatas, bytes32 descriptionHash, address proposer ) external payable; /// @notice The time delay to execute a queued transaction function delay() external view returns (uint256); /// @notice The time period to execute a transaction function gracePeriod() external view returns (uint256); /// @notice Updates the time delay /// @param newDelay The new time delay function updateDelay(uint256 newDelay) external; /// @notice Updates the grace period /// @param newGracePeriod The grace period function updateGracePeriod(uint256 newGracePeriod) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; import { TreasuryTypesV1 } from "../types/TreasuryTypesV1.sol"; /// @notice TreasuryStorageV1 /// @author Rohan Kulkarni /// @notice The Treasury storage contract contract TreasuryStorageV1 is TreasuryTypesV1 { /// @notice The treasury settings Settings internal settings; /// @notice The timestamp that a queued proposal is ready to execute /// @dev Proposal Id => Timestamp mapping(bytes32 => uint256) internal timestamps; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; /// @notice TreasuryTypesV1 /// @author Rohan Kulkarni /// @notice The treasury's custom data types contract TreasuryTypesV1 { /// @notice The settings type /// @param gracePeriod The time period to execute a proposal /// @param delay The time delay to execute a queued transaction struct Settings { uint128 gracePeriod; uint128 delay; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; /// @title IERC1967Upgrade /// @author Rohan Kulkarni /// @notice The external ERC1967Upgrade events and errors interface IERC1967Upgrade { /// /// /// EVENTS /// /// /// /// @notice Emitted when the implementation is upgraded /// @param impl The address of the implementation event Upgraded(address impl); /// /// /// ERRORS /// /// /// /// @dev Reverts if an implementation is an invalid upgrade /// @param impl The address of the invalid implementation error INVALID_UPGRADE(address impl); /// @dev Reverts if an implementation upgrade is not stored at the storage slot of the original error UNSUPPORTED_UUID(); /// @dev Reverts if an implementation does not support ERC1822 proxiableUUID() error ONLY_UUPS(); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; /// @title IInitializable /// @author Rohan Kulkarni /// @notice The external Initializable events and errors interface IInitializable { /// /// /// EVENTS /// /// /// /// @notice Emitted when the contract has been initialized or reinitialized event Initialized(uint256 version); /// /// /// ERRORS /// /// /// /// @dev Reverts if incorrectly initialized with address(0) error ADDRESS_ZERO(); /// @dev Reverts if disabling initializers during initialization error INITIALIZING(); /// @dev Reverts if calling an initialization function outside of initialization error NOT_INITIALIZING(); /// @dev Reverts if reinitializing incorrectly error ALREADY_INITIALIZED(); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; /// @title IOwnable /// @author Rohan Kulkarni /// @notice The external Ownable events, errors, and functions interface IOwnable { /// /// /// EVENTS /// /// /// /// @notice Emitted when ownership has been updated /// @param prevOwner The previous owner address /// @param newOwner The new owner address event OwnerUpdated(address indexed prevOwner, address indexed newOwner); /// @notice Emitted when an ownership transfer is pending /// @param owner The current owner address /// @param pendingOwner The pending new owner address event OwnerPending(address indexed owner, address indexed pendingOwner); /// @notice Emitted when a pending ownership transfer has been canceled /// @param owner The current owner address /// @param canceledOwner The canceled owner address event OwnerCanceled(address indexed owner, address indexed canceledOwner); /// /// /// ERRORS /// /// /// /// @dev Reverts if an unauthorized user calls an owner function error ONLY_OWNER(); /// @dev Reverts if an unauthorized user calls a pending owner function error ONLY_PENDING_OWNER(); /// /// /// FUNCTIONS /// /// /// /// @notice The address of the owner function owner() external view returns (address); /// @notice The address of the pending owner function pendingOwner() external view returns (address); /// @notice Forces an ownership transfer /// @param newOwner The new owner address function transferOwnership(address newOwner) external; /// @notice Initiates a two-step ownership transfer /// @param newOwner The new owner address function safeTransferOwnership(address newOwner) external; /// @notice Accepts an ownership transfer function acceptOwnership() external; /// @notice Cancels a pending ownership transfer function cancelOwnershipTransfer() external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; import { IERC1822Proxiable } from "@openzeppelin/contracts/interfaces/draft-IERC1822.sol"; import { IERC1967Upgrade } from "./IERC1967Upgrade.sol"; /// @title IUUPS /// @author Rohan Kulkarni /// @notice The external UUPS errors and functions interface IUUPS is IERC1967Upgrade, IERC1822Proxiable { /// /// /// ERRORS /// /// /// /// @dev Reverts if not called directly error ONLY_CALL(); /// @dev Reverts if not called via delegatecall error ONLY_DELEGATECALL(); /// @dev Reverts if not called via proxy error ONLY_PROXY(); /// /// /// FUNCTIONS /// /// /// /// @notice Upgrades to an implementation /// @param newImpl The new implementation address function upgradeTo(address newImpl) external; /// @notice Upgrades to an implementation with an additional function call /// @param newImpl The new implementation address /// @param data The encoded function call function upgradeToAndCall(address newImpl, bytes memory data) external payable; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; import { IERC1822Proxiable } from "@openzeppelin/contracts/interfaces/draft-IERC1822.sol"; import { StorageSlot } from "@openzeppelin/contracts/utils/StorageSlot.sol"; import { IERC1967Upgrade } from "../interfaces/IERC1967Upgrade.sol"; import { Address } from "../utils/Address.sol"; /// @title ERC1967Upgrade /// @author Rohan Kulkarni /// @notice Modified from OpenZeppelin Contracts v4.7.3 (proxy/ERC1967/ERC1967Upgrade.sol) /// - Uses custom errors declared in IERC1967Upgrade /// - Removes ERC1967 admin and beacon support abstract contract ERC1967Upgrade is IERC1967Upgrade { /// /// /// CONSTANTS /// /// /// /// @dev bytes32(uint256(keccak256('eip1967.proxy.rollback')) - 1) bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; /// @dev bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1) bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /// /// /// FUNCTIONS /// /// /// /// @dev Upgrades to an implementation with security checks for UUPS proxies and an additional function call /// @param _newImpl The new implementation address /// @param _data The encoded function call function _upgradeToAndCallUUPS( address _newImpl, bytes memory _data, bool _forceCall ) internal { if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) { _setImplementation(_newImpl); } else { try IERC1822Proxiable(_newImpl).proxiableUUID() returns (bytes32 slot) { if (slot != _IMPLEMENTATION_SLOT) revert UNSUPPORTED_UUID(); } catch { revert ONLY_UUPS(); } _upgradeToAndCall(_newImpl, _data, _forceCall); } } /// @dev Upgrades to an implementation with an additional function call /// @param _newImpl The new implementation address /// @param _data The encoded function call function _upgradeToAndCall( address _newImpl, bytes memory _data, bool _forceCall ) internal { _upgradeTo(_newImpl); if (_data.length > 0 || _forceCall) { Address.functionDelegateCall(_newImpl, _data); } } /// @dev Performs an implementation upgrade /// @param _newImpl The new implementation address function _upgradeTo(address _newImpl) internal { _setImplementation(_newImpl); emit Upgraded(_newImpl); } /// @dev Stores the address of an implementation /// @param _impl The implementation address function _setImplementation(address _impl) private { if (!Address.isContract(_impl)) revert INVALID_UPGRADE(_impl); StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = _impl; } /// @dev The address of the current implementation function _getImplementation() internal view returns (address) { return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; import { IUUPS } from "../interfaces/IUUPS.sol"; import { ERC1967Upgrade } from "./ERC1967Upgrade.sol"; /// @title UUPS /// @author Rohan Kulkarni /// @notice Modified from OpenZeppelin Contracts v4.7.3 (proxy/utils/UUPSUpgradeable.sol) /// - Uses custom errors declared in IUUPS /// - Inherits a modern, minimal ERC1967Upgrade abstract contract UUPS is IUUPS, ERC1967Upgrade { /// /// /// IMMUTABLES /// /// /// /// @dev The address of the implementation address private immutable __self = address(this); /// /// /// MODIFIERS /// /// /// /// @dev Ensures that execution is via proxy delegatecall with the correct implementation modifier onlyProxy() { if (address(this) == __self) revert ONLY_DELEGATECALL(); if (_getImplementation() != __self) revert ONLY_PROXY(); _; } /// @dev Ensures that execution is via direct call modifier notDelegated() { if (address(this) != __self) revert ONLY_CALL(); _; } /// /// /// FUNCTIONS /// /// /// /// @dev Hook to authorize an implementation upgrade /// @param _newImpl The new implementation address function _authorizeUpgrade(address _newImpl) internal virtual; /// @notice Upgrades to an implementation /// @param _newImpl The new implementation address function upgradeTo(address _newImpl) external onlyProxy { _authorizeUpgrade(_newImpl); _upgradeToAndCallUUPS(_newImpl, "", false); } /// @notice Upgrades to an implementation with an additional function call /// @param _newImpl The new implementation address /// @param _data The encoded function call function upgradeToAndCall(address _newImpl, bytes memory _data) external payable onlyProxy { _authorizeUpgrade(_newImpl); _upgradeToAndCallUUPS(_newImpl, _data, true); } /// @notice The storage slot of the implementation address function proxiableUUID() external view notDelegated returns (bytes32) { return _IMPLEMENTATION_SLOT; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; /// @title EIP712 /// @author Rohan Kulkarni /// @notice Modified from OpenZeppelin Contracts v4.7.3 (utils/Address.sol) /// - Uses custom errors `INVALID_TARGET()` & `DELEGATE_CALL_FAILED()` /// - Adds util converting address to bytes32 library Address { /// /// /// ERRORS /// /// /// /// @dev Reverts if the target of a delegatecall is not a contract error INVALID_TARGET(); /// @dev Reverts if a delegatecall has failed error DELEGATE_CALL_FAILED(); /// /// /// FUNCTIONS /// /// /// /// @dev Utility to convert an address to bytes32 function toBytes32(address _account) internal pure returns (bytes32) { return bytes32(uint256(uint160(_account)) << 96); } /// @dev If an address is a contract function isContract(address _account) internal view returns (bool rv) { assembly { rv := gt(extcodesize(_account), 0) } } /// @dev Performs a delegatecall on an address function functionDelegateCall(address _target, bytes memory _data) internal returns (bytes memory) { if (!isContract(_target)) revert INVALID_TARGET(); (bool success, bytes memory returndata) = _target.delegatecall(_data); return verifyCallResult(success, returndata); } /// @dev Verifies a delegatecall was successful function verifyCallResult(bool _success, bytes memory _returndata) internal pure returns (bytes memory) { if (_success) { return _returndata; } else { if (_returndata.length > 0) { assembly { let returndata_size := mload(_returndata) revert(add(32, _returndata), returndata_size) } } else { revert DELEGATE_CALL_FAILED(); } } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; import { IInitializable } from "../interfaces/IInitializable.sol"; import { Address } from "../utils/Address.sol"; /// @title Initializable /// @author Rohan Kulkarni /// @notice Modified from OpenZeppelin Contracts v4.7.3 (proxy/utils/Initializable.sol) /// - Uses custom errors declared in IInitializable abstract contract Initializable is IInitializable { /// /// /// STORAGE /// /// /// /// @dev Indicates the contract has been initialized uint8 internal _initialized; /// @dev Indicates the contract is being initialized bool internal _initializing; /// /// /// MODIFIERS /// /// /// /// @dev Ensures an initialization function is only called within an `initializer` or `reinitializer` function modifier onlyInitializing() { if (!_initializing) revert NOT_INITIALIZING(); _; } /// @dev Enables initializing upgradeable contracts modifier initializer() { bool isTopLevelCall = !_initializing; if ((!isTopLevelCall || _initialized != 0) && (Address.isContract(address(this)) || _initialized != 1)) revert ALREADY_INITIALIZED(); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /// @dev Enables initializer versioning /// @param _version The version to set modifier reinitializer(uint8 _version) { if (_initializing || _initialized >= _version) revert ALREADY_INITIALIZED(); _initialized = _version; _initializing = true; _; _initializing = false; emit Initialized(_version); } /// /// /// FUNCTIONS /// /// /// /// @dev Prevents future initialization function _disableInitializers() internal virtual { if (_initializing) revert INITIALIZING(); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; import { IOwnable } from "../interfaces/IOwnable.sol"; import { Initializable } from "../utils/Initializable.sol"; /// @title Ownable /// @author Rohan Kulkarni /// @notice Modified from OpenZeppelin Contracts v4.7.3 (access/OwnableUpgradeable.sol) /// - Uses custom errors declared in IOwnable /// - Adds optional two-step ownership transfer (`safeTransferOwnership` + `acceptOwnership`) abstract contract Ownable is IOwnable, Initializable { /// /// /// STORAGE /// /// /// /// @dev The address of the owner address internal _owner; /// @dev The address of the pending owner address internal _pendingOwner; /// /// /// MODIFIERS /// /// /// /// @dev Ensures the caller is the owner modifier onlyOwner() { if (msg.sender != _owner) revert ONLY_OWNER(); _; } /// @dev Ensures the caller is the pending owner modifier onlyPendingOwner() { if (msg.sender != _pendingOwner) revert ONLY_PENDING_OWNER(); _; } /// /// /// FUNCTIONS /// /// /// /// @dev Initializes contract ownership /// @param _initialOwner The initial owner address function __Ownable_init(address _initialOwner) internal onlyInitializing { _owner = _initialOwner; emit OwnerUpdated(address(0), _initialOwner); } /// @notice The address of the owner function owner() public virtual view returns (address) { return _owner; } /// @notice The address of the pending owner function pendingOwner() public view returns (address) { return _pendingOwner; } /// @notice Forces an ownership transfer from the last owner /// @param _newOwner The new owner address function transferOwnership(address _newOwner) public onlyOwner { _transferOwnership(_newOwner); } /// @notice Forces an ownership transfer from any sender /// @param _newOwner New owner to transfer contract to /// @dev Ensure is called only from trusted internal code, no access control checks. function _transferOwnership(address _newOwner) internal { emit OwnerUpdated(_owner, _newOwner); _owner = _newOwner; if (_pendingOwner != address(0)) delete _pendingOwner; } /// @notice Initiates a two-step ownership transfer /// @param _newOwner The new owner address function safeTransferOwnership(address _newOwner) public onlyOwner { _pendingOwner = _newOwner; emit OwnerPending(_owner, _newOwner); } /// @notice Accepts an ownership transfer function acceptOwnership() public onlyPendingOwner { emit OwnerUpdated(_owner, msg.sender); _owner = _pendingOwner; delete _pendingOwner; } /// @notice Cancels a pending ownership transfer function cancelOwnershipTransfer() public onlyOwner { emit OwnerCanceled(_owner, _pendingOwner); delete _pendingOwner; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; /// @notice Modified from OpenZeppelin Contracts v4.7.3 (utils/math/SafeCast.sol) /// - Uses custom error `UNSAFE_CAST()` library SafeCast { error UNSAFE_CAST(); function toUint128(uint256 x) internal pure returns (uint128) { if (x > type(uint128).max) revert UNSAFE_CAST(); return uint128(x); } function toUint64(uint256 x) internal pure returns (uint64) { if (x > type(uint64).max) revert UNSAFE_CAST(); return uint64(x); } function toUint48(uint256 x) internal pure returns (uint48) { if (x > type(uint48).max) revert UNSAFE_CAST(); return uint48(x); } function toUint40(uint256 x) internal pure returns (uint40) { if (x > type(uint40).max) revert UNSAFE_CAST(); return uint40(x); } function toUint32(uint256 x) internal pure returns (uint32) { if (x > type(uint32).max) revert UNSAFE_CAST(); return uint32(x); } function toUint16(uint256 x) internal pure returns (uint16) { if (x > type(uint16).max) revert UNSAFE_CAST(); return uint16(x); } function toUint8(uint256 x) internal pure returns (uint8) { if (x > type(uint8).max) revert UNSAFE_CAST(); return uint8(x); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @notice Modified from OpenZeppelin Contracts v4.7.3 (token/ERC721/utils/ERC721Holder.sol) abstract contract ERC721TokenReceiver { function onERC721Received( address, address, uint256, bytes calldata ) external virtual returns (bytes4) { return this.onERC721Received.selector; } } /// @notice Modified from OpenZeppelin Contracts v4.7.3 (token/ERC1155/utils/ERC1155Holder.sol) abstract contract ERC1155TokenReceiver { function onERC1155Received( address, address, uint256, uint256, bytes calldata ) external virtual returns (bytes4) { return this.onERC1155Received.selector; } function onERC1155BatchReceived( address, address, uint256[] calldata, uint256[] calldata, bytes calldata ) external virtual returns (bytes4) { return this.onERC1155BatchReceived.selector; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; import { IUUPS } from "../lib/interfaces/IUUPS.sol"; import { IOwnable } from "../lib/interfaces/IOwnable.sol"; /// @title IManager /// @author Rohan Kulkarni /// @notice The external Manager events, errors, structs and functions interface IManager is IUUPS, IOwnable { /// /// /// EVENTS /// /// /// /// @notice Emitted when a DAO is deployed /// @param token The ERC-721 token address /// @param metadata The metadata renderer address /// @param auction The auction address /// @param treasury The treasury address /// @param governor The governor address event DAODeployed(address token, address metadata, address auction, address treasury, address governor); /// @notice Emitted when an upgrade is registered by the Builder DAO /// @param baseImpl The base implementation address /// @param upgradeImpl The upgrade implementation address event UpgradeRegistered(address baseImpl, address upgradeImpl); /// @notice Emitted when an upgrade is unregistered by the Builder DAO /// @param baseImpl The base implementation address /// @param upgradeImpl The upgrade implementation address event UpgradeRemoved(address baseImpl, address upgradeImpl); /// /// /// ERRORS /// /// /// /// @dev Reverts if at least one founder is not provided upon deploy error FOUNDER_REQUIRED(); /// /// /// STRUCTS /// /// /// /// @notice The founder parameters /// @param wallet The wallet address /// @param ownershipPct The percent ownership of the token /// @param vestExpiry The timestamp that vesting expires struct FounderParams { address wallet; uint256 ownershipPct; uint256 vestExpiry; } /// @notice The ERC-721 token parameters /// @param initStrings The encoded token name, symbol, collection description, collection image uri, renderer base uri struct TokenParams { bytes initStrings; } /// @notice The auction parameters /// @param reservePrice The reserve price of each auction /// @param duration The duration of each auction struct AuctionParams { uint256 reservePrice; uint256 duration; } /// @notice The governance parameters /// @param timelockDelay The time delay to execute a queued transaction /// @param votingDelay The time delay to vote on a created proposal /// @param votingPeriod The time period to vote on a proposal /// @param proposalThresholdBps The basis points of the token supply required to create a proposal /// @param quorumThresholdBps The basis points of the token supply required to reach quorum /// @param vetoer The address authorized to veto proposals (address(0) if none desired) struct GovParams { uint256 timelockDelay; uint256 votingDelay; uint256 votingPeriod; uint256 proposalThresholdBps; uint256 quorumThresholdBps; address vetoer; } /// /// /// FUNCTIONS /// /// /// /// @notice The token implementation address function tokenImpl() external view returns (address); /// @notice The metadata renderer implementation address function metadataImpl() external view returns (address); /// @notice The auction house implementation address function auctionImpl() external view returns (address); /// @notice The treasury implementation address function treasuryImpl() external view returns (address); /// @notice The governor implementation address function governorImpl() external view returns (address); /// @notice Deploys a DAO with custom token, auction, and governance settings /// @param founderParams The DAO founder(s) /// @param tokenParams The ERC-721 token settings /// @param auctionParams The auction settings /// @param govParams The governance settings function deploy( FounderParams[] calldata founderParams, TokenParams calldata tokenParams, AuctionParams calldata auctionParams, GovParams calldata govParams ) external returns ( address token, address metadataRenderer, address auction, address treasury, address governor ); /// @notice A DAO's remaining contract addresses from its token address /// @param token The ERC-721 token address function getAddresses(address token) external returns ( address metadataRenderer, address auction, address treasury, address governor ); /// @notice If an implementation is registered by the Builder DAO as an optional upgrade /// @param baseImpl The base implementation address /// @param upgradeImpl The upgrade implementation address function isRegisteredUpgrade(address baseImpl, address upgradeImpl) external view returns (bool); /// @notice Called by the Builder DAO to offer opt-in implementation upgrades for all other DAOs /// @param baseImpl The base implementation address /// @param upgradeImpl The upgrade implementation address function registerUpgrade(address baseImpl, address upgradeImpl) external; /// @notice Called by the Builder DAO to remove an upgrade /// @param baseImpl The base implementation address /// @param upgradeImpl The upgrade implementation address function removeUpgrade(address baseImpl, address upgradeImpl) external; }
{ "remappings": [ "@openzeppelin/=node_modules/@openzeppelin/", "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "micro-onchain-metadata-utils/=node_modules/micro-onchain-metadata-utils/src/", "sol-uriencode/=node_modules/sol-uriencode/", "sol2string/=node_modules/sol2string/" ], "optimizer": { "enabled": true, "runs": 500000 }, "metadata": { "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_manager","type":"address"}],"stateMutability":"payable","type":"constructor"},{"inputs":[],"name":"ADDRESS_ZERO","type":"error"},{"inputs":[],"name":"ALREADY_INITIALIZED","type":"error"},{"inputs":[],"name":"DELEGATE_CALL_FAILED","type":"error"},{"inputs":[],"name":"EXECUTION_EXPIRED","type":"error"},{"inputs":[{"internalType":"uint256","name":"txIndex","type":"uint256"}],"name":"EXECUTION_FAILED","type":"error"},{"inputs":[{"internalType":"bytes32","name":"proposalId","type":"bytes32"}],"name":"EXECUTION_NOT_READY","type":"error"},{"inputs":[],"name":"INITIALIZING","type":"error"},{"inputs":[],"name":"INVALID_TARGET","type":"error"},{"inputs":[{"internalType":"address","name":"impl","type":"address"}],"name":"INVALID_UPGRADE","type":"error"},{"inputs":[],"name":"NOT_INITIALIZING","type":"error"},{"inputs":[],"name":"ONLY_CALL","type":"error"},{"inputs":[],"name":"ONLY_DELEGATECALL","type":"error"},{"inputs":[],"name":"ONLY_MANAGER","type":"error"},{"inputs":[],"name":"ONLY_OWNER","type":"error"},{"inputs":[],"name":"ONLY_PENDING_OWNER","type":"error"},{"inputs":[],"name":"ONLY_PROXY","type":"error"},{"inputs":[],"name":"ONLY_TREASURY","type":"error"},{"inputs":[],"name":"ONLY_UUPS","type":"error"},{"inputs":[],"name":"PROPOSAL_ALREADY_QUEUED","type":"error"},{"inputs":[],"name":"PROPOSAL_NOT_QUEUED","type":"error"},{"inputs":[],"name":"UNSAFE_CAST","type":"error"},{"inputs":[],"name":"UNSUPPORTED_UUID","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"prevDelay","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newDelay","type":"uint256"}],"name":"DelayUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"prevGracePeriod","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newGracePeriod","type":"uint256"}],"name":"GracePeriodUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"version","type":"uint256"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"canceledOwner","type":"address"}],"name":"OwnerCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"OwnerPending","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"prevOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"proposalId","type":"bytes32"}],"name":"TransactionCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"proposalId","type":"bytes32"},{"indexed":false,"internalType":"address[]","name":"targets","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"},{"indexed":false,"internalType":"bytes[]","name":"payloads","type":"bytes[]"}],"name":"TransactionExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"proposalId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"TransactionScheduled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"impl","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_proposalId","type":"bytes32"}],"name":"cancel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cancelOwnershipTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"delay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_targets","type":"address[]"},{"internalType":"uint256[]","name":"_values","type":"uint256[]"},{"internalType":"bytes[]","name":"_calldatas","type":"bytes[]"},{"internalType":"bytes32","name":"_descriptionHash","type":"bytes32"},{"internalType":"address","name":"_proposer","type":"address"}],"name":"execute","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"gracePeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_targets","type":"address[]"},{"internalType":"uint256[]","name":"_values","type":"uint256[]"},{"internalType":"bytes[]","name":"_calldatas","type":"bytes[]"},{"internalType":"bytes32","name":"_descriptionHash","type":"bytes32"},{"internalType":"address","name":"_proposer","type":"address"}],"name":"hashProposal","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_governor","type":"address"},{"internalType":"uint256","name":"_delay","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_proposalId","type":"bytes32"}],"name":"isExpired","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_proposalId","type":"bytes32"}],"name":"isQueued","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_proposalId","type":"bytes32"}],"name":"isReady","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","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":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_proposalId","type":"bytes32"}],"name":"queue","outputs":[{"internalType":"uint256","name":"eta","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"safeTransferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_proposalId","type":"bytes32"}],"name":"timestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newDelay","type":"uint256"}],"name":"updateDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newGracePeriod","type":"uint256"}],"name":"updateGracePeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newImpl","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newImpl","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60c0604081905230608052620029133881900390819083398101604081905262000029916200011c565b600054610100900460ff161580158062000047575060005460ff1615155b801562000077575062000065306200011660201b6200158f1760201c565b8062000077575060005460ff16600114155b15620000965760405163439a74c960e01b815260040160405180910390fd5b6000805460ff191660011790558015620000ba576000805461ff0019166101001790555b6001600160a01b03821660a05280156200010e576000805461ff0019169055604051600181527fbe9b076dc5b65990cca9dd9d7366682482e7817a6f6bc7f4faf4dc32af497f329060200160405180910390a15b50506200014e565b3b151590565b6000602082840312156200012f57600080fd5b81516001600160a01b03811681146200014757600080fd5b9392505050565b60805160a05161277c620001976000396000818161137e01526115d00152600081816106db0152818161073501528181610907015281816109610152610a54015261277c6000f3fe60806040526004361061019a5760003560e01c80636a42b8f8116100e1578063aedbfe331161008a578063cd6dc68711610064578063cd6dc68714610542578063e30c397814610562578063f23a6e611461058d578063f2fde38b146105d257600080fd5b8063aedbfe33146104bd578063bc197c81146104dd578063c4d252f51461052257600080fd5b80637c10dea6116100bb5780637c10dea6146104245780638da5cb5b14610444578063a06db7dc1461049657600080fd5b80636a42b8f81461038c5780636db2feb2146103c757806379ba50971461040f57600080fd5b80634f1ef2861161014357806360e69a7b1161011d57806360e69a7b1461033957806364d623531461034c57806364f9ad361461036c57600080fd5b80634f1ef286146102f157806352d1902d146103045780635ab98d5a1461031957600080fd5b80633659cfe6116101745780633659cfe614610276578063395db2cd146102965780634d003070146102b657600080fd5b80630dc051f8146101a6578063150b7a02146101ea57806323452b9c1461025f57600080fd5b366101a157005b600080fd5b3480156101b257600080fd5b506101d56101c1366004611c8e565b600090815260036020526040902054151590565b60405190151581526020015b60405180910390f35b3480156101f657600080fd5b5061022e610205366004611ddc565b7f150b7a0200000000000000000000000000000000000000000000000000000000949350505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101e1565b34801561026b57600080fd5b506102746105f2565b005b34801561028257600080fd5b50610274610291366004611e44565b6106c4565b3480156102a257600080fd5b506102746102b1366004611e44565b61081c565b3480156102c257600080fd5b506102e36102d1366004611c8e565b60009081526003602052604090205490565b6040519081526020016101e1565b6102746102ff366004611e66565b6108f0565b34801561031057600080fd5b506102e3610a3a565b34801561032557600080fd5b50610274610334366004611c8e565b610ad0565b610274610347366004611f00565b610ba5565b34801561035857600080fd5b50610274610367366004611c8e565b610e41565b34801561037857600080fd5b506101d5610387366004611c8e565b610f1b565b34801561039857600080fd5b5060025470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff166102e3565b3480156103d357600080fd5b506101d56103e2366004611c8e565b600254600091825260036020526040909120546fffffffffffffffffffffffffffffffff90911601421190565b34801561041b57600080fd5b50610274610f4c565b34801561043057600080fd5b506102e361043f366004611c8e565b611056565b34801561045057600080fd5b5060005462010000900473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101e1565b3480156104a257600080fd5b506002546fffffffffffffffffffffffffffffffff166102e3565b3480156104c957600080fd5b506102e36104d83660046120d6565b611172565b3480156104e957600080fd5b5061022e6104f83660046121d5565b7fbc197c810000000000000000000000000000000000000000000000000000000095945050505050565b34801561052e57600080fd5b5061027461053d366004611c8e565b6111ae565b34801561054e57600080fd5b5061027461055d36600461227f565b611298565b34801561056e57600080fd5b5060015473ffffffffffffffffffffffffffffffffffffffff16610471565b34801561059957600080fd5b5061022e6105a83660046122a9565b7ff23a6e610000000000000000000000000000000000000000000000000000000095945050505050565b3480156105de57600080fd5b506102746105ed366004611e44565b61152f565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff163314610649576040517fd238ed5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001546000805460405173ffffffffffffffffffffffffffffffffffffffff9384169362010000909204909116917f682679deecef4dcd49674845cc1e3a075fea9073680aa445a8207d5a4bdea3da91a3600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163003610733576040517f43d22ee900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166107a87f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff16146107f5576040517fe74d90a000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6107fe81611595565b6108198160405180602001604052806000815250600061172b565b50565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff163314610873576040517fd238ed5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8381169182179092556000805460405192936201000090910416917f4f2638f5949b9614ef8d5e268cb51348ad7f434a34812bf64b6e95014fbd357e9190a350565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016300361095f576040517f43d22ee900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166109d47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614610a21576040517fe74d90a000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a2a82611595565b610a368282600161172b565b5050565b60003073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610aab576040517f575bc92e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b333014610b09576040517f3d3fc0c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600254604080516fffffffffffffffffffffffffffffffff9092168252602082018390527f55c7a79c45e9a972909cd640f9336a14a84adbaf756211f16267001854110191910160405180910390a1610b618161187e565b600280547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff9290921691909117905550565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff163314610bfc576040517fd238ed5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610c7989898080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808d0282810182019093528c82529093508c92508b918291850190849080828437600092019190915250610c7292508991508a905061230e565b8686611172565b9050610c8481610f1b565b610cc2576040517f9b3906d9000000000000000000000000000000000000000000000000000000008152600481018290526024015b60405180910390fd5b600081815260036020526040812081905588905b81811015610df15760008b8b83818110610cf257610cf261231b565b9050602002016020810190610d079190611e44565b73ffffffffffffffffffffffffffffffffffffffff168a8a84818110610d2f57610d2f61231b565b90506020020135898985818110610d4857610d4861231b565b9050602002810190610d5a919061234a565b604051610d689291906123af565b60006040518083038185875af1925050503d8060008114610da5576040519150601f19603f3d011682016040523d82523d6000602084013e610daa565b606091505b5050905080610de8576040517f149c28d900000000000000000000000000000000000000000000000000000000815260048101839052602401610cb9565b50600101610cd6565b507f7e74d8579043af873f575ed17043a48d6beba2668c6b53325bcd8c9a550e5e9c828b8b8b8b8b8b604051610e2d97969594939291906124b8565b60405180910390a150505050505050505050565b333014610e7a576040517f3d3fc0c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600254604080517001000000000000000000000000000000009092046fffffffffffffffffffffffffffffffff168252602082018390527fa580b4a9812995ffed1b336481c3f3bfeb3414df9f587a9d73856bab25aa4eee910160405180910390a1610ee58161187e565b600280546fffffffffffffffffffffffffffffffff92831670010000000000000000000000000000000002921691909117905550565b60008181526003602052604081205415801590610f4657506000828152600360205260409020544210155b92915050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610f9d576040517f065cd53100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805460405133926201000090920473ffffffffffffffffffffffffffffffffffffffff16917f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7691a360018054600080547fffffffffffffffffffff0000000000000000000000000000000000000000ffff1673ffffffffffffffffffffffffffffffffffffffff831662010000021790557fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6000805462010000900473ffffffffffffffffffffffffffffffffffffffff1633146110ae576040517fd238ed5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260036020526040902054156110f4576040517f03773f3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506002546000828152600360209081526040918290207001000000000000000000000000000000009093046fffffffffffffffffffffffffffffffff1642019283905581518481529081018390527f7902f8969f6429dd0244329d34db6ea75cec3a150e8ddbb8945511e2f2c639ea910160405180910390a1919050565b6000858585858560405160200161118d959493929190612620565b60405160208183030381529060405280519060200120905095945050505050565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff163314611205576040517fd238ed5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526003602052604090205461124a576040517ff8b5a47d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526003602052604080822091909155517fdecc068a49633f4a89136211fcf06f0c95bb0756be29aaba7e7eec56da7945c59061128d9083815260200190565b60405180910390a150565b600054610100900460ff16158015806112b5575060005460ff1615155b80156112d15750303b1515806112d1575060005460ff16600114155b15611308576040517f439a74c900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561136657600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146113d5576040517fa2ddd97100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316611422576040517f66e7950900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61142b836118ce565b6114348261187e565b6fffffffffffffffffffffffffffffffff16700100000000000000000000000000000000027fffffffffffffffffffffffffffffffff000000000000000000000000000000001662127500176002556040517fa580b4a9812995ffed1b336481c3f3bfeb3414df9f587a9d73856bab25aa4eee906114bf906000908590918252602082015260400190565b60405180910390a1801561152a57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527fbe9b076dc5b65990cca9dd9d7366682482e7817a6f6bc7f4faf4dc32af497f329060200160405180910390a15b505050565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff163314611586576040517fd238ed5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61081981611987565b3b151590565b3330146115ce576040517f3d3fc0c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16639bb8dcfd6116487f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff91821660048201529084166024820152604401602060405180830381865afa1580156116b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116dd91906126ef565b610819576040517fc40d973400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610cb9565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff161561175e5761152a83611a53565b8273ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156117e3575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526117e091810190612711565b60015b611819576040517fc0bb20b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8114611872576040517f0849b49600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061152a838383611b09565b60006fffffffffffffffffffffffffffffffff8211156118ca576040517fb0a90f3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5090565b600054610100900460ff1661190f576040517f624bb4ce00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffff0000000000000000000000000000000000000000ffff166201000073ffffffffffffffffffffffffffffffffffffffff84169081029190911782556040519091907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d76908290a350565b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516936201000090930416917f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7691a36000805473ffffffffffffffffffffffffffffffffffffffff80841662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff90921691909117909155600154161561081957600180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905550565b803b611aa3576040517fc40d973400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610cb9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b611b1283611b34565b600082511180611b1f5750805b1561152a57611b2e8383611b83565b50505050565b611b3d81611a53565b60405173ffffffffffffffffffffffffffffffffffffffff821681527fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b9060200161128d565b6060823b611bbd576040517f37f2022900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000808473ffffffffffffffffffffffffffffffffffffffff1684604051611be5919061272a565b600060405180830381855af49150503d8060008114611c20576040519150601f19603f3d011682016040523d82523d6000602084013e611c25565b606091505b5091509150611c348282611c3d565b95945050505050565b60608215611c4c575080610f46565b815115611c5c5781518083602001fd5b6040517f62536b1000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060208284031215611ca057600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611ccb57600080fd5b919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715611d4657611d46611cd0565b604052919050565b600082601f830112611d5f57600080fd5b813567ffffffffffffffff811115611d7957611d79611cd0565b611daa60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611cff565b818152846020838601011115611dbf57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611df257600080fd5b611dfb85611ca7565b9350611e0960208601611ca7565b925060408501359150606085013567ffffffffffffffff811115611e2c57600080fd5b611e3887828801611d4e565b91505092959194509250565b600060208284031215611e5657600080fd5b611e5f82611ca7565b9392505050565b60008060408385031215611e7957600080fd5b611e8283611ca7565b9150602083013567ffffffffffffffff811115611e9e57600080fd5b611eaa85828601611d4e565b9150509250929050565b60008083601f840112611ec657600080fd5b50813567ffffffffffffffff811115611ede57600080fd5b6020830191508360208260051b8501011115611ef957600080fd5b9250929050565b60008060008060008060008060a0898b031215611f1c57600080fd5b883567ffffffffffffffff80821115611f3457600080fd5b611f408c838d01611eb4565b909a50985060208b0135915080821115611f5957600080fd5b611f658c838d01611eb4565b909850965060408b0135915080821115611f7e57600080fd5b50611f8b8b828c01611eb4565b90955093505060608901359150611fa460808a01611ca7565b90509295985092959890939650565b600067ffffffffffffffff821115611fcd57611fcd611cd0565b5060051b60200190565b600082601f830112611fe857600080fd5b81356020611ffd611ff883611fb3565b611cff565b82815260059290921b8401810191818101908684111561201c57600080fd5b8286015b848110156120375780358352918301918301612020565b509695505050505050565b6000612050611ff884611fb3565b8381529050602080820190600585901b84018681111561206f57600080fd5b845b818110156120ab57803567ffffffffffffffff8111156120915760008081fd5b61209d89828901611d4e565b855250928201928201612071565b505050509392505050565b600082601f8301126120c757600080fd5b611e5f83833560208501612042565b600080600080600060a086880312156120ee57600080fd5b853567ffffffffffffffff8082111561210657600080fd5b818801915088601f83011261211a57600080fd5b8135602061212a611ff883611fb3565b82815260059290921b8401810191818101908c84111561214957600080fd5b948201945b8386101561216e5761215f86611ca7565b8252948201949082019061214e565b9950508901359250508082111561218457600080fd5b61219089838a01611fd7565b955060408801359150808211156121a657600080fd5b506121b3888289016120b6565b935050606086013591506121c960808701611ca7565b90509295509295909350565b600080600080600060a086880312156121ed57600080fd5b6121f686611ca7565b945061220460208701611ca7565b9350604086013567ffffffffffffffff8082111561222157600080fd5b61222d89838a01611fd7565b9450606088013591508082111561224357600080fd5b61224f89838a01611fd7565b9350608088013591508082111561226557600080fd5b5061227288828901611d4e565b9150509295509295909350565b6000806040838503121561229257600080fd5b61229b83611ca7565b946020939093013593505050565b600080600080600060a086880312156122c157600080fd5b6122ca86611ca7565b94506122d860208701611ca7565b93506040860135925060608601359150608086013567ffffffffffffffff81111561230257600080fd5b61227288828901611d4e565b6000611e5f368484612042565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261237f57600080fd5b83018035915067ffffffffffffffff82111561239a57600080fd5b602001915036819003821315611ef957600080fd5b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b81835260006020808501808196508560051b810191508460005b878110156124ab57828403895281357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe188360301811261246157600080fd5b8701858101903567ffffffffffffffff81111561247d57600080fd5b80360382131561248c57600080fd5b6124978682846123bf565b9a87019a9550505090840190600101612422565b5091979650505050505050565b87815260806020808301829052908201879052600090889060a08401835b8a81101561250f5773ffffffffffffffffffffffffffffffffffffffff6124fc85611ca7565b16825292820192908201906001016124d6565b5084810360408601528781527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff88111561254857600080fd5b8760051b9250828983830137909101838103820160608501529061256f8183018688612408565b9b9a5050505050505050505050565b60005b83811015612599578181015183820152602001612581565b50506000910152565b600081518084526020808501808196508360051b8101915082860160005b858110156124ab578284038952815180518086526125e38188880189850161257e565b99860199601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169490940185019350908401906001016125c0565b60a0808252865190820181905260009060209060c0840190828a01845b8281101561266f57815173ffffffffffffffffffffffffffffffffffffffff168452928401929084019060010161263d565b5050508381038285015287518082528883019183019060005b818110156126a457835183529284019291840191600101612688565b505084810360408601526126b881896125a2565b93505050508360608301526126e5608083018473ffffffffffffffffffffffffffffffffffffffff169052565b9695505050505050565b60006020828403121561270157600080fd5b81518015158114611e5f57600080fd5b60006020828403121561272357600080fd5b5051919050565b6000825161273c81846020870161257e565b919091019291505056fea2646970667358221220b5823085eccf392f8f8c803a92fa3fa276b8abfa79e1d9412c06cd831a645c8f64736f6c63430008100033000000000000000000000000d310a3041dfcf14def5ccbc508668974b5da7174
Deployed Bytecode
0x60806040526004361061019a5760003560e01c80636a42b8f8116100e1578063aedbfe331161008a578063cd6dc68711610064578063cd6dc68714610542578063e30c397814610562578063f23a6e611461058d578063f2fde38b146105d257600080fd5b8063aedbfe33146104bd578063bc197c81146104dd578063c4d252f51461052257600080fd5b80637c10dea6116100bb5780637c10dea6146104245780638da5cb5b14610444578063a06db7dc1461049657600080fd5b80636a42b8f81461038c5780636db2feb2146103c757806379ba50971461040f57600080fd5b80634f1ef2861161014357806360e69a7b1161011d57806360e69a7b1461033957806364d623531461034c57806364f9ad361461036c57600080fd5b80634f1ef286146102f157806352d1902d146103045780635ab98d5a1461031957600080fd5b80633659cfe6116101745780633659cfe614610276578063395db2cd146102965780634d003070146102b657600080fd5b80630dc051f8146101a6578063150b7a02146101ea57806323452b9c1461025f57600080fd5b366101a157005b600080fd5b3480156101b257600080fd5b506101d56101c1366004611c8e565b600090815260036020526040902054151590565b60405190151581526020015b60405180910390f35b3480156101f657600080fd5b5061022e610205366004611ddc565b7f150b7a0200000000000000000000000000000000000000000000000000000000949350505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101e1565b34801561026b57600080fd5b506102746105f2565b005b34801561028257600080fd5b50610274610291366004611e44565b6106c4565b3480156102a257600080fd5b506102746102b1366004611e44565b61081c565b3480156102c257600080fd5b506102e36102d1366004611c8e565b60009081526003602052604090205490565b6040519081526020016101e1565b6102746102ff366004611e66565b6108f0565b34801561031057600080fd5b506102e3610a3a565b34801561032557600080fd5b50610274610334366004611c8e565b610ad0565b610274610347366004611f00565b610ba5565b34801561035857600080fd5b50610274610367366004611c8e565b610e41565b34801561037857600080fd5b506101d5610387366004611c8e565b610f1b565b34801561039857600080fd5b5060025470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff166102e3565b3480156103d357600080fd5b506101d56103e2366004611c8e565b600254600091825260036020526040909120546fffffffffffffffffffffffffffffffff90911601421190565b34801561041b57600080fd5b50610274610f4c565b34801561043057600080fd5b506102e361043f366004611c8e565b611056565b34801561045057600080fd5b5060005462010000900473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101e1565b3480156104a257600080fd5b506002546fffffffffffffffffffffffffffffffff166102e3565b3480156104c957600080fd5b506102e36104d83660046120d6565b611172565b3480156104e957600080fd5b5061022e6104f83660046121d5565b7fbc197c810000000000000000000000000000000000000000000000000000000095945050505050565b34801561052e57600080fd5b5061027461053d366004611c8e565b6111ae565b34801561054e57600080fd5b5061027461055d36600461227f565b611298565b34801561056e57600080fd5b5060015473ffffffffffffffffffffffffffffffffffffffff16610471565b34801561059957600080fd5b5061022e6105a83660046122a9565b7ff23a6e610000000000000000000000000000000000000000000000000000000095945050505050565b3480156105de57600080fd5b506102746105ed366004611e44565b61152f565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff163314610649576040517fd238ed5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001546000805460405173ffffffffffffffffffffffffffffffffffffffff9384169362010000909204909116917f682679deecef4dcd49674845cc1e3a075fea9073680aa445a8207d5a4bdea3da91a3600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c8f8ac74600d5a1c1ba677b10d1da0e7e806cf23163003610733576040517f43d22ee900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000c8f8ac74600d5a1c1ba677b10d1da0e7e806cf2373ffffffffffffffffffffffffffffffffffffffff166107a87f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff16146107f5576040517fe74d90a000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6107fe81611595565b6108198160405180602001604052806000815250600061172b565b50565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff163314610873576040517fd238ed5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8381169182179092556000805460405192936201000090910416917f4f2638f5949b9614ef8d5e268cb51348ad7f434a34812bf64b6e95014fbd357e9190a350565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c8f8ac74600d5a1c1ba677b10d1da0e7e806cf2316300361095f576040517f43d22ee900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000c8f8ac74600d5a1c1ba677b10d1da0e7e806cf2373ffffffffffffffffffffffffffffffffffffffff166109d47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614610a21576040517fe74d90a000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a2a82611595565b610a368282600161172b565b5050565b60003073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c8f8ac74600d5a1c1ba677b10d1da0e7e806cf231614610aab576040517f575bc92e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b333014610b09576040517f3d3fc0c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600254604080516fffffffffffffffffffffffffffffffff9092168252602082018390527f55c7a79c45e9a972909cd640f9336a14a84adbaf756211f16267001854110191910160405180910390a1610b618161187e565b600280547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff9290921691909117905550565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff163314610bfc576040517fd238ed5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610c7989898080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808d0282810182019093528c82529093508c92508b918291850190849080828437600092019190915250610c7292508991508a905061230e565b8686611172565b9050610c8481610f1b565b610cc2576040517f9b3906d9000000000000000000000000000000000000000000000000000000008152600481018290526024015b60405180910390fd5b600081815260036020526040812081905588905b81811015610df15760008b8b83818110610cf257610cf261231b565b9050602002016020810190610d079190611e44565b73ffffffffffffffffffffffffffffffffffffffff168a8a84818110610d2f57610d2f61231b565b90506020020135898985818110610d4857610d4861231b565b9050602002810190610d5a919061234a565b604051610d689291906123af565b60006040518083038185875af1925050503d8060008114610da5576040519150601f19603f3d011682016040523d82523d6000602084013e610daa565b606091505b5050905080610de8576040517f149c28d900000000000000000000000000000000000000000000000000000000815260048101839052602401610cb9565b50600101610cd6565b507f7e74d8579043af873f575ed17043a48d6beba2668c6b53325bcd8c9a550e5e9c828b8b8b8b8b8b604051610e2d97969594939291906124b8565b60405180910390a150505050505050505050565b333014610e7a576040517f3d3fc0c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600254604080517001000000000000000000000000000000009092046fffffffffffffffffffffffffffffffff168252602082018390527fa580b4a9812995ffed1b336481c3f3bfeb3414df9f587a9d73856bab25aa4eee910160405180910390a1610ee58161187e565b600280546fffffffffffffffffffffffffffffffff92831670010000000000000000000000000000000002921691909117905550565b60008181526003602052604081205415801590610f4657506000828152600360205260409020544210155b92915050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610f9d576040517f065cd53100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805460405133926201000090920473ffffffffffffffffffffffffffffffffffffffff16917f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7691a360018054600080547fffffffffffffffffffff0000000000000000000000000000000000000000ffff1673ffffffffffffffffffffffffffffffffffffffff831662010000021790557fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6000805462010000900473ffffffffffffffffffffffffffffffffffffffff1633146110ae576040517fd238ed5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260036020526040902054156110f4576040517f03773f3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506002546000828152600360209081526040918290207001000000000000000000000000000000009093046fffffffffffffffffffffffffffffffff1642019283905581518481529081018390527f7902f8969f6429dd0244329d34db6ea75cec3a150e8ddbb8945511e2f2c639ea910160405180910390a1919050565b6000858585858560405160200161118d959493929190612620565b60405160208183030381529060405280519060200120905095945050505050565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff163314611205576040517fd238ed5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526003602052604090205461124a576040517ff8b5a47d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526003602052604080822091909155517fdecc068a49633f4a89136211fcf06f0c95bb0756be29aaba7e7eec56da7945c59061128d9083815260200190565b60405180910390a150565b600054610100900460ff16158015806112b5575060005460ff1615155b80156112d15750303b1515806112d1575060005460ff16600114155b15611308576040517f439a74c900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561136657600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000d310a3041dfcf14def5ccbc508668974b5da717416146113d5576040517fa2ddd97100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316611422576040517f66e7950900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61142b836118ce565b6114348261187e565b6fffffffffffffffffffffffffffffffff16700100000000000000000000000000000000027fffffffffffffffffffffffffffffffff000000000000000000000000000000001662127500176002556040517fa580b4a9812995ffed1b336481c3f3bfeb3414df9f587a9d73856bab25aa4eee906114bf906000908590918252602082015260400190565b60405180910390a1801561152a57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527fbe9b076dc5b65990cca9dd9d7366682482e7817a6f6bc7f4faf4dc32af497f329060200160405180910390a15b505050565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff163314611586576040517fd238ed5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61081981611987565b3b151590565b3330146115ce576040517f3d3fc0c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000d310a3041dfcf14def5ccbc508668974b5da717473ffffffffffffffffffffffffffffffffffffffff16639bb8dcfd6116487f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff91821660048201529084166024820152604401602060405180830381865afa1580156116b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116dd91906126ef565b610819576040517fc40d973400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610cb9565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff161561175e5761152a83611a53565b8273ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156117e3575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526117e091810190612711565b60015b611819576040517fc0bb20b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8114611872576040517f0849b49600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061152a838383611b09565b60006fffffffffffffffffffffffffffffffff8211156118ca576040517fb0a90f3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5090565b600054610100900460ff1661190f576040517f624bb4ce00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffff0000000000000000000000000000000000000000ffff166201000073ffffffffffffffffffffffffffffffffffffffff84169081029190911782556040519091907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d76908290a350565b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516936201000090930416917f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7691a36000805473ffffffffffffffffffffffffffffffffffffffff80841662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff90921691909117909155600154161561081957600180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905550565b803b611aa3576040517fc40d973400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610cb9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b611b1283611b34565b600082511180611b1f5750805b1561152a57611b2e8383611b83565b50505050565b611b3d81611a53565b60405173ffffffffffffffffffffffffffffffffffffffff821681527fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b9060200161128d565b6060823b611bbd576040517f37f2022900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000808473ffffffffffffffffffffffffffffffffffffffff1684604051611be5919061272a565b600060405180830381855af49150503d8060008114611c20576040519150601f19603f3d011682016040523d82523d6000602084013e611c25565b606091505b5091509150611c348282611c3d565b95945050505050565b60608215611c4c575080610f46565b815115611c5c5781518083602001fd5b6040517f62536b1000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060208284031215611ca057600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611ccb57600080fd5b919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715611d4657611d46611cd0565b604052919050565b600082601f830112611d5f57600080fd5b813567ffffffffffffffff811115611d7957611d79611cd0565b611daa60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611cff565b818152846020838601011115611dbf57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611df257600080fd5b611dfb85611ca7565b9350611e0960208601611ca7565b925060408501359150606085013567ffffffffffffffff811115611e2c57600080fd5b611e3887828801611d4e565b91505092959194509250565b600060208284031215611e5657600080fd5b611e5f82611ca7565b9392505050565b60008060408385031215611e7957600080fd5b611e8283611ca7565b9150602083013567ffffffffffffffff811115611e9e57600080fd5b611eaa85828601611d4e565b9150509250929050565b60008083601f840112611ec657600080fd5b50813567ffffffffffffffff811115611ede57600080fd5b6020830191508360208260051b8501011115611ef957600080fd5b9250929050565b60008060008060008060008060a0898b031215611f1c57600080fd5b883567ffffffffffffffff80821115611f3457600080fd5b611f408c838d01611eb4565b909a50985060208b0135915080821115611f5957600080fd5b611f658c838d01611eb4565b909850965060408b0135915080821115611f7e57600080fd5b50611f8b8b828c01611eb4565b90955093505060608901359150611fa460808a01611ca7565b90509295985092959890939650565b600067ffffffffffffffff821115611fcd57611fcd611cd0565b5060051b60200190565b600082601f830112611fe857600080fd5b81356020611ffd611ff883611fb3565b611cff565b82815260059290921b8401810191818101908684111561201c57600080fd5b8286015b848110156120375780358352918301918301612020565b509695505050505050565b6000612050611ff884611fb3565b8381529050602080820190600585901b84018681111561206f57600080fd5b845b818110156120ab57803567ffffffffffffffff8111156120915760008081fd5b61209d89828901611d4e565b855250928201928201612071565b505050509392505050565b600082601f8301126120c757600080fd5b611e5f83833560208501612042565b600080600080600060a086880312156120ee57600080fd5b853567ffffffffffffffff8082111561210657600080fd5b818801915088601f83011261211a57600080fd5b8135602061212a611ff883611fb3565b82815260059290921b8401810191818101908c84111561214957600080fd5b948201945b8386101561216e5761215f86611ca7565b8252948201949082019061214e565b9950508901359250508082111561218457600080fd5b61219089838a01611fd7565b955060408801359150808211156121a657600080fd5b506121b3888289016120b6565b935050606086013591506121c960808701611ca7565b90509295509295909350565b600080600080600060a086880312156121ed57600080fd5b6121f686611ca7565b945061220460208701611ca7565b9350604086013567ffffffffffffffff8082111561222157600080fd5b61222d89838a01611fd7565b9450606088013591508082111561224357600080fd5b61224f89838a01611fd7565b9350608088013591508082111561226557600080fd5b5061227288828901611d4e565b9150509295509295909350565b6000806040838503121561229257600080fd5b61229b83611ca7565b946020939093013593505050565b600080600080600060a086880312156122c157600080fd5b6122ca86611ca7565b94506122d860208701611ca7565b93506040860135925060608601359150608086013567ffffffffffffffff81111561230257600080fd5b61227288828901611d4e565b6000611e5f368484612042565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261237f57600080fd5b83018035915067ffffffffffffffff82111561239a57600080fd5b602001915036819003821315611ef957600080fd5b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b81835260006020808501808196508560051b810191508460005b878110156124ab57828403895281357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe188360301811261246157600080fd5b8701858101903567ffffffffffffffff81111561247d57600080fd5b80360382131561248c57600080fd5b6124978682846123bf565b9a87019a9550505090840190600101612422565b5091979650505050505050565b87815260806020808301829052908201879052600090889060a08401835b8a81101561250f5773ffffffffffffffffffffffffffffffffffffffff6124fc85611ca7565b16825292820192908201906001016124d6565b5084810360408601528781527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff88111561254857600080fd5b8760051b9250828983830137909101838103820160608501529061256f8183018688612408565b9b9a5050505050505050505050565b60005b83811015612599578181015183820152602001612581565b50506000910152565b600081518084526020808501808196508360051b8101915082860160005b858110156124ab578284038952815180518086526125e38188880189850161257e565b99860199601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169490940185019350908401906001016125c0565b60a0808252865190820181905260009060209060c0840190828a01845b8281101561266f57815173ffffffffffffffffffffffffffffffffffffffff168452928401929084019060010161263d565b5050508381038285015287518082528883019183019060005b818110156126a457835183529284019291840191600101612688565b505084810360408601526126b881896125a2565b93505050508360608301526126e5608083018473ffffffffffffffffffffffffffffffffffffffff169052565b9695505050505050565b60006020828403121561270157600080fd5b81518015158114611e5f57600080fd5b60006020828403121561272357600080fd5b5051919050565b6000825161273c81846020870161257e565b919091019291505056fea2646970667358221220b5823085eccf392f8f8c803a92fa3fa276b8abfa79e1d9412c06cd831a645c8f64736f6c63430008100033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000d310a3041dfcf14def5ccbc508668974b5da7174
-----Decoded View---------------
Arg [0] : _manager (address): 0xd310A3041dFcF14Def5ccBc508668974b5da7174
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000d310a3041dfcf14def5ccbc508668974b5da7174
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.