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 | 16585896 | 572 days ago | IN | 0 ETH | 0.09315112 |
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"; import { VersionedContract } from "../../VersionedContract.sol"; /// @title Treasury /// @author Rohan Kulkarni /// @notice A DAO's treasury and transaction executor /// @custom:repo github.com/ourzora/nouns-protocol /// 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, VersionedContract, 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; abstract contract VersionedContract { function contractVersion() external pure returns (string memory) { return "1.2.0"; } }
// 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 DAO Version Information information struct struct DAOVersionInfo { string token; string metadata; string auction; string treasury; string governor; } /// @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/=node_modules/ds-test/src/", "forge-std/=node_modules/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":"contractVersion","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","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
60c06040819052306080526200298b3881900390819083398101604081905262000029916200011c565b600054610100900460ff161580158062000047575060005460ff1615155b801562000077575062000065306200011660201b620015e61760201c565b8062000077575060005460ff16600114155b15620000965760405163439a74c960e01b815260040160405180910390fd5b6000805460ff191660011790558015620000ba576000805461ff0019166101001790555b6001600160a01b03821660a05280156200010e576000805461ff0019169055604051600181527fbe9b076dc5b65990cca9dd9d7366682482e7817a6f6bc7f4faf4dc32af497f329060200160405180910390a15b50506200014e565b3b151590565b6000602082840312156200012f57600080fd5b81516001600160a01b03811681146200014757600080fd5b9392505050565b60805160a0516127f462000197600039600081816113d501526116270152600081816107320152818161078c0152818161095e015281816109b80152610aab01526127f46000f3fe6080604052600436106101a55760003560e01c80636db2feb2116100e1578063aedbfe331161008a578063cd6dc68711610064578063cd6dc68714610599578063e30c3978146105b9578063f23a6e61146105e4578063f2fde38b1461062957600080fd5b8063aedbfe3314610514578063bc197c8114610534578063c4d252f51461057957600080fd5b80638da5cb5b116100bb5780638da5cb5b1461044f578063a06db7dc146104a1578063a0a8e460146104c857600080fd5b80636db2feb2146103d257806379ba50971461041a5780637c10dea61461042f57600080fd5b80634f1ef2861161014e57806360e69a7b1161012857806360e69a7b1461034457806364d623531461035757806364f9ad36146103775780636a42b8f81461039757600080fd5b80634f1ef286146102fc57806352d1902d1461030f5780635ab98d5a1461032457600080fd5b80633659cfe61161017f5780633659cfe614610281578063395db2cd146102a15780634d003070146102c157600080fd5b80630dc051f8146101b1578063150b7a02146101f557806323452b9c1461026a57600080fd5b366101ac57005b600080fd5b3480156101bd57600080fd5b506101e06101cc366004611ce5565b600090815260036020526040902054151590565b60405190151581526020015b60405180910390f35b34801561020157600080fd5b50610239610210366004611e33565b7f150b7a0200000000000000000000000000000000000000000000000000000000949350505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101ec565b34801561027657600080fd5b5061027f610649565b005b34801561028d57600080fd5b5061027f61029c366004611e9b565b61071b565b3480156102ad57600080fd5b5061027f6102bc366004611e9b565b610873565b3480156102cd57600080fd5b506102ee6102dc366004611ce5565b60009081526003602052604090205490565b6040519081526020016101ec565b61027f61030a366004611ebd565b610947565b34801561031b57600080fd5b506102ee610a91565b34801561033057600080fd5b5061027f61033f366004611ce5565b610b27565b61027f610352366004611f57565b610bfc565b34801561036357600080fd5b5061027f610372366004611ce5565b610e98565b34801561038357600080fd5b506101e0610392366004611ce5565b610f72565b3480156103a357600080fd5b5060025470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff166102ee565b3480156103de57600080fd5b506101e06103ed366004611ce5565b600254600091825260036020526040909120546fffffffffffffffffffffffffffffffff90911601421190565b34801561042657600080fd5b5061027f610fa3565b34801561043b57600080fd5b506102ee61044a366004611ce5565b6110ad565b34801561045b57600080fd5b5060005462010000900473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101ec565b3480156104ad57600080fd5b506002546fffffffffffffffffffffffffffffffff166102ee565b3480156104d457600080fd5b50604080518082018252600581527f312e322e30000000000000000000000000000000000000000000000000000000602082015290516101ec9190612078565b34801561052057600080fd5b506102ee61052f3660046121ae565b6111c9565b34801561054057600080fd5b5061023961054f3660046122ad565b7fbc197c810000000000000000000000000000000000000000000000000000000095945050505050565b34801561058557600080fd5b5061027f610594366004611ce5565b611205565b3480156105a557600080fd5b5061027f6105b4366004612357565b6112ef565b3480156105c557600080fd5b5060015473ffffffffffffffffffffffffffffffffffffffff1661047c565b3480156105f057600080fd5b506102396105ff366004612381565b7ff23a6e610000000000000000000000000000000000000000000000000000000095945050505050565b34801561063557600080fd5b5061027f610644366004611e9b565b611586565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff1633146106a0576040517fd238ed5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001546000805460405173ffffffffffffffffffffffffffffffffffffffff9384169362010000909204909116917f682679deecef4dcd49674845cc1e3a075fea9073680aa445a8207d5a4bdea3da91a3600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016300361078a576040517f43d22ee900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166107ff7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff161461084c576040517fe74d90a000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610855816115ec565b61087081604051806020016040528060008152506000611782565b50565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff1633146108ca576040517fd238ed5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8381169182179092556000805460405192936201000090910416917f4f2638f5949b9614ef8d5e268cb51348ad7f434a34812bf64b6e95014fbd357e9190a350565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001630036109b6576040517f43d22ee900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16610a2b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614610a78576040517fe74d90a000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a81826115ec565b610a8d82826001611782565b5050565b60003073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610b02576040517f575bc92e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b333014610b60576040517f3d3fc0c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600254604080516fffffffffffffffffffffffffffffffff9092168252602082018390527f55c7a79c45e9a972909cd640f9336a14a84adbaf756211f16267001854110191910160405180910390a1610bb8816118d5565b600280547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff9290921691909117905550565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff163314610c53576040517fd238ed5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610cd089898080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808d0282810182019093528c82529093508c92508b918291850190849080828437600092019190915250610cc992508991508a90506123e6565b86866111c9565b9050610cdb81610f72565b610d19576040517f9b3906d9000000000000000000000000000000000000000000000000000000008152600481018290526024015b60405180910390fd5b600081815260036020526040812081905588905b81811015610e485760008b8b83818110610d4957610d496123f3565b9050602002016020810190610d5e9190611e9b565b73ffffffffffffffffffffffffffffffffffffffff168a8a84818110610d8657610d866123f3565b90506020020135898985818110610d9f57610d9f6123f3565b9050602002810190610db19190612422565b604051610dbf929190612487565b60006040518083038185875af1925050503d8060008114610dfc576040519150601f19603f3d011682016040523d82523d6000602084013e610e01565b606091505b5050905080610e3f576040517f149c28d900000000000000000000000000000000000000000000000000000000815260048101839052602401610d10565b50600101610d2d565b507f7e74d8579043af873f575ed17043a48d6beba2668c6b53325bcd8c9a550e5e9c828b8b8b8b8b8b604051610e84979695949392919061258d565b60405180910390a150505050505050505050565b333014610ed1576040517f3d3fc0c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600254604080517001000000000000000000000000000000009092046fffffffffffffffffffffffffffffffff168252602082018390527fa580b4a9812995ffed1b336481c3f3bfeb3414df9f587a9d73856bab25aa4eee910160405180910390a1610f3c816118d5565b600280546fffffffffffffffffffffffffffffffff92831670010000000000000000000000000000000002921691909117905550565b60008181526003602052604081205415801590610f9d57506000828152600360205260409020544210155b92915050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610ff4576040517f065cd53100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805460405133926201000090920473ffffffffffffffffffffffffffffffffffffffff16917f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7691a360018054600080547fffffffffffffffffffff0000000000000000000000000000000000000000ffff1673ffffffffffffffffffffffffffffffffffffffff831662010000021790557fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6000805462010000900473ffffffffffffffffffffffffffffffffffffffff163314611105576040517fd238ed5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152600360205260409020541561114b576040517f03773f3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506002546000828152600360209081526040918290207001000000000000000000000000000000009093046fffffffffffffffffffffffffffffffff1642019283905581518481529081018390527f7902f8969f6429dd0244329d34db6ea75cec3a150e8ddbb8945511e2f2c639ea910160405180910390a1919050565b600085858585856040516020016111e4959493929190612698565b60405160208183030381529060405280519060200120905095945050505050565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff16331461125c576040517fd238ed5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000818152600360205260409020546112a1576040517ff8b5a47d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526003602052604080822091909155517fdecc068a49633f4a89136211fcf06f0c95bb0756be29aaba7e7eec56da7945c5906112e49083815260200190565b60405180910390a150565b600054610100900460ff161580158061130c575060005460ff1615155b80156113285750303b151580611328575060005460ff16600114155b1561135f576040517f439a74c900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156113bd57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461142c576040517fa2ddd97100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316611479576040517f66e7950900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61148283611925565b61148b826118d5565b6fffffffffffffffffffffffffffffffff16700100000000000000000000000000000000027fffffffffffffffffffffffffffffffff000000000000000000000000000000001662127500176002556040517fa580b4a9812995ffed1b336481c3f3bfeb3414df9f587a9d73856bab25aa4eee90611516906000908590918252602082015260400190565b60405180910390a1801561158157600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527fbe9b076dc5b65990cca9dd9d7366682482e7817a6f6bc7f4faf4dc32af497f329060200160405180910390a15b505050565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff1633146115dd576040517fd238ed5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610870816119de565b3b151590565b333014611625576040517f3d3fc0c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16639bb8dcfd61169f7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff91821660048201529084166024820152604401602060405180830381865afa158015611710573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117349190612767565b610870576040517fc40d973400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610d10565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156117b55761158183611aaa565b8273ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561183a575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261183791810190612789565b60015b611870576040517fc0bb20b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81146118c9576040517f0849b49600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50611581838383611b60565b60006fffffffffffffffffffffffffffffffff821115611921576040517fb0a90f3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5090565b600054610100900460ff16611966576040517f624bb4ce00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffff0000000000000000000000000000000000000000ffff166201000073ffffffffffffffffffffffffffffffffffffffff84169081029190911782556040519091907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d76908290a350565b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516936201000090930416917f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7691a36000805473ffffffffffffffffffffffffffffffffffffffff80841662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff90921691909117909155600154161561087057600180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905550565b803b611afa576040517fc40d973400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610d10565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b611b6983611b8b565b600082511180611b765750805b1561158157611b858383611bda565b50505050565b611b9481611aaa565b60405173ffffffffffffffffffffffffffffffffffffffff821681527fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b906020016112e4565b6060823b611c14576040517f37f2022900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000808473ffffffffffffffffffffffffffffffffffffffff1684604051611c3c91906127a2565b600060405180830381855af49150503d8060008114611c77576040519150601f19603f3d011682016040523d82523d6000602084013e611c7c565b606091505b5091509150611c8b8282611c94565b95945050505050565b60608215611ca3575080610f9d565b815115611cb35781518083602001fd5b6040517f62536b1000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060208284031215611cf757600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611d2257600080fd5b919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715611d9d57611d9d611d27565b604052919050565b600082601f830112611db657600080fd5b813567ffffffffffffffff811115611dd057611dd0611d27565b611e0160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611d56565b818152846020838601011115611e1657600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611e4957600080fd5b611e5285611cfe565b9350611e6060208601611cfe565b925060408501359150606085013567ffffffffffffffff811115611e8357600080fd5b611e8f87828801611da5565b91505092959194509250565b600060208284031215611ead57600080fd5b611eb682611cfe565b9392505050565b60008060408385031215611ed057600080fd5b611ed983611cfe565b9150602083013567ffffffffffffffff811115611ef557600080fd5b611f0185828601611da5565b9150509250929050565b60008083601f840112611f1d57600080fd5b50813567ffffffffffffffff811115611f3557600080fd5b6020830191508360208260051b8501011115611f5057600080fd5b9250929050565b60008060008060008060008060a0898b031215611f7357600080fd5b883567ffffffffffffffff80821115611f8b57600080fd5b611f978c838d01611f0b565b909a50985060208b0135915080821115611fb057600080fd5b611fbc8c838d01611f0b565b909850965060408b0135915080821115611fd557600080fd5b50611fe28b828c01611f0b565b90955093505060608901359150611ffb60808a01611cfe565b90509295985092959890939650565b60005b8381101561202557818101518382015260200161200d565b50506000910152565b6000815180845261204681602086016020860161200a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611eb6602083018461202e565b600067ffffffffffffffff8211156120a5576120a5611d27565b5060051b60200190565b600082601f8301126120c057600080fd5b813560206120d56120d08361208b565b611d56565b82815260059290921b840181019181810190868411156120f457600080fd5b8286015b8481101561210f57803583529183019183016120f8565b509695505050505050565b60006121286120d08461208b565b8381529050602080820190600585901b84018681111561214757600080fd5b845b8181101561218357803567ffffffffffffffff8111156121695760008081fd5b61217589828901611da5565b855250928201928201612149565b505050509392505050565b600082601f83011261219f57600080fd5b611eb68383356020850161211a565b600080600080600060a086880312156121c657600080fd5b853567ffffffffffffffff808211156121de57600080fd5b818801915088601f8301126121f257600080fd5b813560206122026120d08361208b565b82815260059290921b8401810191818101908c84111561222157600080fd5b948201945b838610156122465761223786611cfe565b82529482019490820190612226565b9950508901359250508082111561225c57600080fd5b61226889838a016120af565b9550604088013591508082111561227e57600080fd5b5061228b8882890161218e565b935050606086013591506122a160808701611cfe565b90509295509295909350565b600080600080600060a086880312156122c557600080fd5b6122ce86611cfe565b94506122dc60208701611cfe565b9350604086013567ffffffffffffffff808211156122f957600080fd5b61230589838a016120af565b9450606088013591508082111561231b57600080fd5b61232789838a016120af565b9350608088013591508082111561233d57600080fd5b5061234a88828901611da5565b9150509295509295909350565b6000806040838503121561236a57600080fd5b61237383611cfe565b946020939093013593505050565b600080600080600060a0868803121561239957600080fd5b6123a286611cfe565b94506123b060208701611cfe565b93506040860135925060608601359150608086013567ffffffffffffffff8111156123da57600080fd5b61234a88828901611da5565b6000611eb636848461211a565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261245757600080fd5b83018035915067ffffffffffffffff82111561247257600080fd5b602001915036819003821315611f5057600080fd5b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b818352600060208085019450848460051b86018460005b8781101561258057838303895281357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe188360301811261253657600080fd5b8701858101903567ffffffffffffffff81111561255257600080fd5b80360382131561256157600080fd5b61256c858284612497565b9a87019a94505050908401906001016124f7565b5090979650505050505050565b87815260806020808301829052908201879052600090889060a08401835b8a8110156125e45773ffffffffffffffffffffffffffffffffffffffff6125d185611cfe565b16825292820192908201906001016125ab565b5084810360408601528781527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff88111561261d57600080fd5b8760051b9250828983830137909101838103820160608501529061264481830186886124e0565b9b9a5050505050505050505050565b6000815180845260208085019450848260051b860182860160005b8581101561258057838303895261268683835161202e565b9885019892509084019060010161266e565b60a0808252865190820181905260009060209060c0840190828a01845b828110156126e757815173ffffffffffffffffffffffffffffffffffffffff16845292840192908401906001016126b5565b5050508381038285015287518082528883019183019060005b8181101561271c57835183529284019291840191600101612700565b505084810360408601526127308189612653565b935050505083606083015261275d608083018473ffffffffffffffffffffffffffffffffffffffff169052565b9695505050505050565b60006020828403121561277957600080fd5b81518015158114611eb657600080fd5b60006020828403121561279b57600080fd5b5051919050565b600082516127b481846020870161200a565b919091019291505056fea2646970667358221220ac9c6d4f7197a7ca915992835ab1accfc73f2f6d21bc792b7fb74ad1e543678364736f6c63430008100033000000000000000000000000d310a3041dfcf14def5ccbc508668974b5da7174
Deployed Bytecode
0x6080604052600436106101a55760003560e01c80636db2feb2116100e1578063aedbfe331161008a578063cd6dc68711610064578063cd6dc68714610599578063e30c3978146105b9578063f23a6e61146105e4578063f2fde38b1461062957600080fd5b8063aedbfe3314610514578063bc197c8114610534578063c4d252f51461057957600080fd5b80638da5cb5b116100bb5780638da5cb5b1461044f578063a06db7dc146104a1578063a0a8e460146104c857600080fd5b80636db2feb2146103d257806379ba50971461041a5780637c10dea61461042f57600080fd5b80634f1ef2861161014e57806360e69a7b1161012857806360e69a7b1461034457806364d623531461035757806364f9ad36146103775780636a42b8f81461039757600080fd5b80634f1ef286146102fc57806352d1902d1461030f5780635ab98d5a1461032457600080fd5b80633659cfe61161017f5780633659cfe614610281578063395db2cd146102a15780634d003070146102c157600080fd5b80630dc051f8146101b1578063150b7a02146101f557806323452b9c1461026a57600080fd5b366101ac57005b600080fd5b3480156101bd57600080fd5b506101e06101cc366004611ce5565b600090815260036020526040902054151590565b60405190151581526020015b60405180910390f35b34801561020157600080fd5b50610239610210366004611e33565b7f150b7a0200000000000000000000000000000000000000000000000000000000949350505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101ec565b34801561027657600080fd5b5061027f610649565b005b34801561028d57600080fd5b5061027f61029c366004611e9b565b61071b565b3480156102ad57600080fd5b5061027f6102bc366004611e9b565b610873565b3480156102cd57600080fd5b506102ee6102dc366004611ce5565b60009081526003602052604090205490565b6040519081526020016101ec565b61027f61030a366004611ebd565b610947565b34801561031b57600080fd5b506102ee610a91565b34801561033057600080fd5b5061027f61033f366004611ce5565b610b27565b61027f610352366004611f57565b610bfc565b34801561036357600080fd5b5061027f610372366004611ce5565b610e98565b34801561038357600080fd5b506101e0610392366004611ce5565b610f72565b3480156103a357600080fd5b5060025470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff166102ee565b3480156103de57600080fd5b506101e06103ed366004611ce5565b600254600091825260036020526040909120546fffffffffffffffffffffffffffffffff90911601421190565b34801561042657600080fd5b5061027f610fa3565b34801561043b57600080fd5b506102ee61044a366004611ce5565b6110ad565b34801561045b57600080fd5b5060005462010000900473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101ec565b3480156104ad57600080fd5b506002546fffffffffffffffffffffffffffffffff166102ee565b3480156104d457600080fd5b50604080518082018252600581527f312e322e30000000000000000000000000000000000000000000000000000000602082015290516101ec9190612078565b34801561052057600080fd5b506102ee61052f3660046121ae565b6111c9565b34801561054057600080fd5b5061023961054f3660046122ad565b7fbc197c810000000000000000000000000000000000000000000000000000000095945050505050565b34801561058557600080fd5b5061027f610594366004611ce5565b611205565b3480156105a557600080fd5b5061027f6105b4366004612357565b6112ef565b3480156105c557600080fd5b5060015473ffffffffffffffffffffffffffffffffffffffff1661047c565b3480156105f057600080fd5b506102396105ff366004612381565b7ff23a6e610000000000000000000000000000000000000000000000000000000095945050505050565b34801561063557600080fd5b5061027f610644366004611e9b565b611586565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff1633146106a0576040517fd238ed5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001546000805460405173ffffffffffffffffffffffffffffffffffffffff9384169362010000909204909116917f682679deecef4dcd49674845cc1e3a075fea9073680aa445a8207d5a4bdea3da91a3600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000003bdafe0d299168f6ebb6e1b4e1e9702a30f6364d16300361078a576040517f43d22ee900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f0000000000000000000000003bdafe0d299168f6ebb6e1b4e1e9702a30f6364d73ffffffffffffffffffffffffffffffffffffffff166107ff7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff161461084c576040517fe74d90a000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610855816115ec565b61087081604051806020016040528060008152506000611782565b50565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff1633146108ca576040517fd238ed5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8381169182179092556000805460405192936201000090910416917f4f2638f5949b9614ef8d5e268cb51348ad7f434a34812bf64b6e95014fbd357e9190a350565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000003bdafe0d299168f6ebb6e1b4e1e9702a30f6364d1630036109b6576040517f43d22ee900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f0000000000000000000000003bdafe0d299168f6ebb6e1b4e1e9702a30f6364d73ffffffffffffffffffffffffffffffffffffffff16610a2b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614610a78576040517fe74d90a000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a81826115ec565b610a8d82826001611782565b5050565b60003073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000003bdafe0d299168f6ebb6e1b4e1e9702a30f6364d1614610b02576040517f575bc92e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b333014610b60576040517f3d3fc0c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600254604080516fffffffffffffffffffffffffffffffff9092168252602082018390527f55c7a79c45e9a972909cd640f9336a14a84adbaf756211f16267001854110191910160405180910390a1610bb8816118d5565b600280547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff9290921691909117905550565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff163314610c53576040517fd238ed5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610cd089898080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808d0282810182019093528c82529093508c92508b918291850190849080828437600092019190915250610cc992508991508a90506123e6565b86866111c9565b9050610cdb81610f72565b610d19576040517f9b3906d9000000000000000000000000000000000000000000000000000000008152600481018290526024015b60405180910390fd5b600081815260036020526040812081905588905b81811015610e485760008b8b83818110610d4957610d496123f3565b9050602002016020810190610d5e9190611e9b565b73ffffffffffffffffffffffffffffffffffffffff168a8a84818110610d8657610d866123f3565b90506020020135898985818110610d9f57610d9f6123f3565b9050602002810190610db19190612422565b604051610dbf929190612487565b60006040518083038185875af1925050503d8060008114610dfc576040519150601f19603f3d011682016040523d82523d6000602084013e610e01565b606091505b5050905080610e3f576040517f149c28d900000000000000000000000000000000000000000000000000000000815260048101839052602401610d10565b50600101610d2d565b507f7e74d8579043af873f575ed17043a48d6beba2668c6b53325bcd8c9a550e5e9c828b8b8b8b8b8b604051610e84979695949392919061258d565b60405180910390a150505050505050505050565b333014610ed1576040517f3d3fc0c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600254604080517001000000000000000000000000000000009092046fffffffffffffffffffffffffffffffff168252602082018390527fa580b4a9812995ffed1b336481c3f3bfeb3414df9f587a9d73856bab25aa4eee910160405180910390a1610f3c816118d5565b600280546fffffffffffffffffffffffffffffffff92831670010000000000000000000000000000000002921691909117905550565b60008181526003602052604081205415801590610f9d57506000828152600360205260409020544210155b92915050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610ff4576040517f065cd53100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805460405133926201000090920473ffffffffffffffffffffffffffffffffffffffff16917f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7691a360018054600080547fffffffffffffffffffff0000000000000000000000000000000000000000ffff1673ffffffffffffffffffffffffffffffffffffffff831662010000021790557fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6000805462010000900473ffffffffffffffffffffffffffffffffffffffff163314611105576040517fd238ed5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152600360205260409020541561114b576040517f03773f3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506002546000828152600360209081526040918290207001000000000000000000000000000000009093046fffffffffffffffffffffffffffffffff1642019283905581518481529081018390527f7902f8969f6429dd0244329d34db6ea75cec3a150e8ddbb8945511e2f2c639ea910160405180910390a1919050565b600085858585856040516020016111e4959493929190612698565b60405160208183030381529060405280519060200120905095945050505050565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff16331461125c576040517fd238ed5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000818152600360205260409020546112a1576040517ff8b5a47d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526003602052604080822091909155517fdecc068a49633f4a89136211fcf06f0c95bb0756be29aaba7e7eec56da7945c5906112e49083815260200190565b60405180910390a150565b600054610100900460ff161580158061130c575060005460ff1615155b80156113285750303b151580611328575060005460ff16600114155b1561135f576040517f439a74c900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156113bd57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000d310a3041dfcf14def5ccbc508668974b5da7174161461142c576040517fa2ddd97100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316611479576040517f66e7950900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61148283611925565b61148b826118d5565b6fffffffffffffffffffffffffffffffff16700100000000000000000000000000000000027fffffffffffffffffffffffffffffffff000000000000000000000000000000001662127500176002556040517fa580b4a9812995ffed1b336481c3f3bfeb3414df9f587a9d73856bab25aa4eee90611516906000908590918252602082015260400190565b60405180910390a1801561158157600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527fbe9b076dc5b65990cca9dd9d7366682482e7817a6f6bc7f4faf4dc32af497f329060200160405180910390a15b505050565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff1633146115dd576040517fd238ed5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610870816119de565b3b151590565b333014611625576040517f3d3fc0c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000d310a3041dfcf14def5ccbc508668974b5da717473ffffffffffffffffffffffffffffffffffffffff16639bb8dcfd61169f7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff91821660048201529084166024820152604401602060405180830381865afa158015611710573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117349190612767565b610870576040517fc40d973400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610d10565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156117b55761158183611aaa565b8273ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561183a575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261183791810190612789565b60015b611870576040517fc0bb20b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81146118c9576040517f0849b49600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50611581838383611b60565b60006fffffffffffffffffffffffffffffffff821115611921576040517fb0a90f3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5090565b600054610100900460ff16611966576040517f624bb4ce00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffff0000000000000000000000000000000000000000ffff166201000073ffffffffffffffffffffffffffffffffffffffff84169081029190911782556040519091907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d76908290a350565b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516936201000090930416917f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7691a36000805473ffffffffffffffffffffffffffffffffffffffff80841662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff90921691909117909155600154161561087057600180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905550565b803b611afa576040517fc40d973400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610d10565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b611b6983611b8b565b600082511180611b765750805b1561158157611b858383611bda565b50505050565b611b9481611aaa565b60405173ffffffffffffffffffffffffffffffffffffffff821681527fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b906020016112e4565b6060823b611c14576040517f37f2022900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000808473ffffffffffffffffffffffffffffffffffffffff1684604051611c3c91906127a2565b600060405180830381855af49150503d8060008114611c77576040519150601f19603f3d011682016040523d82523d6000602084013e611c7c565b606091505b5091509150611c8b8282611c94565b95945050505050565b60608215611ca3575080610f9d565b815115611cb35781518083602001fd5b6040517f62536b1000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060208284031215611cf757600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611d2257600080fd5b919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715611d9d57611d9d611d27565b604052919050565b600082601f830112611db657600080fd5b813567ffffffffffffffff811115611dd057611dd0611d27565b611e0160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611d56565b818152846020838601011115611e1657600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611e4957600080fd5b611e5285611cfe565b9350611e6060208601611cfe565b925060408501359150606085013567ffffffffffffffff811115611e8357600080fd5b611e8f87828801611da5565b91505092959194509250565b600060208284031215611ead57600080fd5b611eb682611cfe565b9392505050565b60008060408385031215611ed057600080fd5b611ed983611cfe565b9150602083013567ffffffffffffffff811115611ef557600080fd5b611f0185828601611da5565b9150509250929050565b60008083601f840112611f1d57600080fd5b50813567ffffffffffffffff811115611f3557600080fd5b6020830191508360208260051b8501011115611f5057600080fd5b9250929050565b60008060008060008060008060a0898b031215611f7357600080fd5b883567ffffffffffffffff80821115611f8b57600080fd5b611f978c838d01611f0b565b909a50985060208b0135915080821115611fb057600080fd5b611fbc8c838d01611f0b565b909850965060408b0135915080821115611fd557600080fd5b50611fe28b828c01611f0b565b90955093505060608901359150611ffb60808a01611cfe565b90509295985092959890939650565b60005b8381101561202557818101518382015260200161200d565b50506000910152565b6000815180845261204681602086016020860161200a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611eb6602083018461202e565b600067ffffffffffffffff8211156120a5576120a5611d27565b5060051b60200190565b600082601f8301126120c057600080fd5b813560206120d56120d08361208b565b611d56565b82815260059290921b840181019181810190868411156120f457600080fd5b8286015b8481101561210f57803583529183019183016120f8565b509695505050505050565b60006121286120d08461208b565b8381529050602080820190600585901b84018681111561214757600080fd5b845b8181101561218357803567ffffffffffffffff8111156121695760008081fd5b61217589828901611da5565b855250928201928201612149565b505050509392505050565b600082601f83011261219f57600080fd5b611eb68383356020850161211a565b600080600080600060a086880312156121c657600080fd5b853567ffffffffffffffff808211156121de57600080fd5b818801915088601f8301126121f257600080fd5b813560206122026120d08361208b565b82815260059290921b8401810191818101908c84111561222157600080fd5b948201945b838610156122465761223786611cfe565b82529482019490820190612226565b9950508901359250508082111561225c57600080fd5b61226889838a016120af565b9550604088013591508082111561227e57600080fd5b5061228b8882890161218e565b935050606086013591506122a160808701611cfe565b90509295509295909350565b600080600080600060a086880312156122c557600080fd5b6122ce86611cfe565b94506122dc60208701611cfe565b9350604086013567ffffffffffffffff808211156122f957600080fd5b61230589838a016120af565b9450606088013591508082111561231b57600080fd5b61232789838a016120af565b9350608088013591508082111561233d57600080fd5b5061234a88828901611da5565b9150509295509295909350565b6000806040838503121561236a57600080fd5b61237383611cfe565b946020939093013593505050565b600080600080600060a0868803121561239957600080fd5b6123a286611cfe565b94506123b060208701611cfe565b93506040860135925060608601359150608086013567ffffffffffffffff8111156123da57600080fd5b61234a88828901611da5565b6000611eb636848461211a565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261245757600080fd5b83018035915067ffffffffffffffff82111561247257600080fd5b602001915036819003821315611f5057600080fd5b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b818352600060208085019450848460051b86018460005b8781101561258057838303895281357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe188360301811261253657600080fd5b8701858101903567ffffffffffffffff81111561255257600080fd5b80360382131561256157600080fd5b61256c858284612497565b9a87019a94505050908401906001016124f7565b5090979650505050505050565b87815260806020808301829052908201879052600090889060a08401835b8a8110156125e45773ffffffffffffffffffffffffffffffffffffffff6125d185611cfe565b16825292820192908201906001016125ab565b5084810360408601528781527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff88111561261d57600080fd5b8760051b9250828983830137909101838103820160608501529061264481830186886124e0565b9b9a5050505050505050505050565b6000815180845260208085019450848260051b860182860160005b8581101561258057838303895261268683835161202e565b9885019892509084019060010161266e565b60a0808252865190820181905260009060209060c0840190828a01845b828110156126e757815173ffffffffffffffffffffffffffffffffffffffff16845292840192908401906001016126b5565b5050508381038285015287518082528883019183019060005b8181101561271c57835183529284019291840191600101612700565b505084810360408601526127308189612653565b935050505083606083015261275d608083018473ffffffffffffffffffffffffffffffffffffffff169052565b9695505050505050565b60006020828403121561277957600080fd5b81518015158114611eb657600080fd5b60006020828403121561279b57600080fd5b5051919050565b600082516127b481846020870161200a565b919091019291505056fea2646970667358221220ac9c6d4f7197a7ca915992835ab1accfc73f2f6d21bc792b7fb74ad1e543678364736f6c63430008100033
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.