More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 238,283 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Buy | 15751001 | 4 mins ago | IN | 10 CRO | 0.2899306 | ||||
Buy | 15750998 | 4 mins ago | IN | 50 CRO | 0.2899306 | ||||
Buy | 15750883 | 15 mins ago | IN | 10 CRO | 0.2899306 | ||||
Buy | 15750732 | 30 mins ago | IN | 1 CRO | 0.2899306 | ||||
Buy | 15750683 | 34 mins ago | IN | 1 CRO | 0.288524 | ||||
Buy | 15750658 | 36 mins ago | IN | 4 CRO | 0.28720353 | ||||
Buy | 15750623 | 40 mins ago | IN | 3 CRO | 0.28720353 | ||||
Buy | 15750398 | 1 hr ago | IN | 38 CRO | 0.2899306 | ||||
Buy | 15750164 | 1 hr ago | IN | 10 CRO | 0.28921295 | ||||
Buy | 15750156 | 1 hr ago | IN | 10 CRO | 0.2884953 | ||||
Buy | 15749651 | 2 hrs ago | IN | 4 CRO | 0.28987 | ||||
Buy | 15749544 | 2 hrs ago | IN | 159 CRO | 0.28988754 | ||||
Buy | 15748855 | 3 hrs ago | IN | 10 CRO | 0.31892366 | ||||
Buy | 15748851 | 3 hrs ago | IN | 10 CRO | 0.39140631 | ||||
Buy | 15748847 | 3 hrs ago | IN | 10 CRO | 0.44502911 | ||||
Buy | 15748624 | 3 hrs ago | IN | 1 CRO | 0.28720353 | ||||
Buy | 15748489 | 4 hrs ago | IN | 3 CRO | 0.2899306 | ||||
Buy | 15748424 | 4 hrs ago | IN | 21 CRO | 0.32617192 | ||||
Buy | 15748203 | 4 hrs ago | IN | 1 CRO | 0.28720353 | ||||
Buy | 15747864 | 5 hrs ago | IN | 1 CRO | 0.41515045 | ||||
Buy | 15747333 | 5 hrs ago | IN | 249 CRO | 0.2884953 | ||||
Buy | 15747323 | 5 hrs ago | IN | 7,999 CRO | 0.2899306 | ||||
Buy | 15747262 | 5 hrs ago | IN | 105 CRO | 0.2884953 | ||||
Purchase Diamond... | 15746343 | 7 hrs ago | IN | 800 CRO | 0.22026543 | ||||
Buy | 15746232 | 7 hrs ago | IN | 248 CRO | 0.28720353 |
Latest 25 internal transactions (View All)
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
15751001 | 4 mins ago | 1.5 CRO | ||||
15751001 | 4 mins ago | 8.5 CRO | ||||
15750998 | 4 mins ago | 7.5 CRO | ||||
15750998 | 4 mins ago | 42.5 CRO | ||||
15750883 | 15 mins ago | 1.5 CRO | ||||
15750883 | 15 mins ago | 8.5 CRO | ||||
15750732 | 30 mins ago | 0.15 CRO | ||||
15750732 | 30 mins ago | 0.85 CRO | ||||
15750683 | 34 mins ago | 0.15 CRO | ||||
15750683 | 34 mins ago | 0.85 CRO | ||||
15750658 | 36 mins ago | 0.6 CRO | ||||
15750658 | 36 mins ago | 3.4 CRO | ||||
15750623 | 40 mins ago | 0.45 CRO | ||||
15750623 | 40 mins ago | 2.55 CRO | ||||
15750398 | 1 hr ago | 5.7 CRO | ||||
15750398 | 1 hr ago | 32.3 CRO | ||||
15750164 | 1 hr ago | 1.5 CRO | ||||
15750164 | 1 hr ago | 8.5 CRO | ||||
15750156 | 1 hr ago | 1.5 CRO | ||||
15750156 | 1 hr ago | 8.5 CRO | ||||
15749651 | 2 hrs ago | 0.6 CRO | ||||
15749651 | 2 hrs ago | 3.4 CRO | ||||
15749544 | 2 hrs ago | 23.85 CRO | ||||
15749544 | 2 hrs ago | 135.15 CRO | ||||
15748855 | 3 hrs ago | 1.5 CRO |
Loading...
Loading
Contract Name:
Diamond
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /******************************************************************************\ * Author: Nick Mudge <[email protected]> (https://twitter.com/mudgen) * EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535 * * Implementation of a diamond. /******************************************************************************/ import {LibDiamond} from "./libraries/LibDiamond.sol"; import {IDiamondCut} from "./interfaces/IDiamondCut.sol"; import {LibAccessControl} from "../access/libraries/LibAccessControl.sol"; import {Address} from "@openzeppelin/contracts/utils/Address.sol"; import {Context} from "@openzeppelin/contracts/utils/Context.sol"; contract Diamond is Context { using Address for address; bytes32 public constant WITHDRAWER_ROLE = keccak256("WITHDRAWER_ROLE"); constructor(address _diamondCutFacet) payable { LibAccessControl.setupRole(LibAccessControl.DEFAULT_ADMIN_ROLE, _msgSender()); LibAccessControl.setupRole(WITHDRAWER_ROLE, _msgSender()); // Add the diamondCut external function from the diamondCutFacet IDiamondCut.FacetCut[] memory cut = new IDiamondCut.FacetCut[](1); bytes4[] memory functionSelectors = new bytes4[](1); functionSelectors[0] = IDiamondCut.diamondCut.selector; cut[0] = IDiamondCut.FacetCut({ facetAddress: _diamondCutFacet, action: IDiamondCut.FacetCutAction.Add, functionSelectors: functionSelectors }); LibDiamond.diamondCut(cut, address(0), ""); } // Find facet for function that is called and execute the // function if a facet is found and return any value. fallback() external payable { LibDiamond.DiamondStorage storage ds; bytes32 position = LibDiamond.DIAMOND_STORAGE_POSITION; // get diamond storage assembly { ds.slot := position } // get facet from function selector address facet = address(bytes20(ds.facets[msg.sig])); require(facet != address(0), "Diamond: Function does not exist"); // Execute external function from facet using delegatecall and return any value. assembly { // copy function selector and any arguments calldatacopy(0, 0, calldatasize()) // execute function call using the facet let result := delegatecall(gas(), facet, 0, calldatasize(), 0, 0) // get any return value returndatacopy(0, 0, returndatasize()) // return any return value or error back to the caller switch result case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } receive() external payable {} function withdraw() public { LibAccessControl.checkRole(WITHDRAWER_ROLE, _msgSender()); Address.sendValue(payable(_msgSender()), address(this).balance); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /******************************************************************************\ * Author: Nick Mudge <[email protected]> (https://twitter.com/mudgen) * EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535 /******************************************************************************/ import {IDiamondCut} from "../interfaces/IDiamondCut.sol"; // Remember to add the loupe functions from DiamondLoupeFacet to the diamond. // The loupe functions are required by the EIP2535 Diamonds standard library LibDiamond { bytes32 constant DIAMOND_STORAGE_POSITION = keccak256("diamond.standard.diamond.storage"); struct DiamondStorage { // maps function selectors to the facets that execute the functions. // and maps the selectors to their position in the selectorSlots array. // func selector => address facet, selector position mapping(bytes4 => bytes32) facets; // array of slots of function selectors. // each slot holds 8 function selectors. mapping(uint256 => bytes32) selectorSlots; // The number of function selectors in selectorSlots uint16 selectorCount; // Used to query if a contract implements an interface. // Used to implement ERC-165. mapping(bytes4 => bool) supportedInterfaces; } function diamondStorage() internal pure returns (DiamondStorage storage ds) { bytes32 position = DIAMOND_STORAGE_POSITION; assembly { ds.slot := position } } event DiamondCut( IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata ); bytes32 constant CLEAR_ADDRESS_MASK = bytes32(uint256(0xffffffffffffffffffffffff)); bytes32 constant CLEAR_SELECTOR_MASK = bytes32(uint256(0xffffffff << 224)); // Internal function version of diamondCut // This code is almost the same as the external diamondCut, // except it is using 'Facet[] memory _diamondCut' instead of // 'Facet[] calldata _diamondCut'. // The code is duplicated to prevent copying calldata to memory which // causes an error for a two dimensional array. function diamondCut( IDiamondCut.FacetCut[] memory _diamondCut, address _init, bytes memory _calldata ) internal { DiamondStorage storage ds = diamondStorage(); uint256 originalSelectorCount = ds.selectorCount; uint256 selectorCount = originalSelectorCount; bytes32 selectorSlot; // Check if last selector slot is not full // "selectorCount & 7" is a gas efficient modulo by eight "selectorCount % 8" if (selectorCount & 7 > 0) { // get last selectorSlot // "selectorSlot >> 3" is a gas efficient division by 8 "selectorSlot / 8" selectorSlot = ds.selectorSlots[selectorCount >> 3]; } // loop through diamond cut for ( uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++ ) { (selectorCount, selectorSlot) = addReplaceRemoveFacetSelectors( selectorCount, selectorSlot, _diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].action, _diamondCut[facetIndex].functionSelectors ); } if (selectorCount != originalSelectorCount) { ds.selectorCount = uint16(selectorCount); } // If last selector slot is not full // "selectorCount & 7" is a gas efficient modulo by eight "selectorCount % 8" if (selectorCount & 7 > 0) { // "selectorSlot >> 3" is a gas efficient division by 8 "selectorSlot / 8" ds.selectorSlots[selectorCount >> 3] = selectorSlot; } emit DiamondCut(_diamondCut, _init, _calldata); initializeDiamondCut(_init, _calldata); } function addReplaceRemoveFacetSelectors( uint256 _selectorCount, bytes32 _selectorSlot, address _newFacetAddress, IDiamondCut.FacetCutAction _action, bytes4[] memory _selectors ) internal returns (uint256, bytes32) { DiamondStorage storage ds = diamondStorage(); require( _selectors.length > 0, "LibDiamondCut: No selectors in facet to cut" ); if (_action == IDiamondCut.FacetCutAction.Add) { enforceHasContractCode( _newFacetAddress, "LibDiamondCut: Add facet has no code" ); for ( uint256 selectorIndex; selectorIndex < _selectors.length; selectorIndex++ ) { bytes4 selector = _selectors[selectorIndex]; bytes32 oldFacet = ds.facets[selector]; require( address(bytes20(oldFacet)) == address(0), "LibDiamondCut: Can't add function that already exists" ); // add facet for selector ds.facets[selector] = bytes20(_newFacetAddress) | bytes32(_selectorCount); // "_selectorCount & 7" is a gas efficient modulo by eight "_selectorCount % 8" // " << 5 is the same as multiplying by 32 ( * 32) uint256 selectorInSlotPosition = (_selectorCount & 7) << 5; // clear selector position in slot and add selector _selectorSlot = (_selectorSlot & ~(CLEAR_SELECTOR_MASK >> selectorInSlotPosition)) | (bytes32(selector) >> selectorInSlotPosition); // if slot is full then write it to storage if (selectorInSlotPosition == 224) { // "_selectorSlot >> 3" is a gas efficient division by 8 "_selectorSlot / 8" ds.selectorSlots[_selectorCount >> 3] = _selectorSlot; _selectorSlot = 0; } _selectorCount++; } } else if (_action == IDiamondCut.FacetCutAction.Replace) { enforceHasContractCode( _newFacetAddress, "LibDiamondCut: Replace facet has no code" ); for ( uint256 selectorIndex; selectorIndex < _selectors.length; selectorIndex++ ) { bytes4 selector = _selectors[selectorIndex]; bytes32 oldFacet = ds.facets[selector]; address oldFacetAddress = address(bytes20(oldFacet)); // only useful if immutable functions exist require( oldFacetAddress != address(this), "LibDiamondCut: Can't replace immutable function" ); require( oldFacetAddress != _newFacetAddress, "LibDiamondCut: Can't replace function with same function" ); require( oldFacetAddress != address(0), "LibDiamondCut: Can't replace function that doesn't exist" ); // replace old facet address ds.facets[selector] = (oldFacet & CLEAR_ADDRESS_MASK) | bytes20(_newFacetAddress); } } else if (_action == IDiamondCut.FacetCutAction.Remove) { require( _newFacetAddress == address(0), "LibDiamondCut: Remove facet address must be address(0)" ); // "_selectorCount >> 3" is a gas efficient division by 8 "_selectorCount / 8" uint256 selectorSlotCount = _selectorCount >> 3; // "_selectorCount & 7" is a gas efficient modulo by eight "_selectorCount % 8" uint256 selectorInSlotIndex = _selectorCount & 7; for ( uint256 selectorIndex; selectorIndex < _selectors.length; selectorIndex++ ) { if (_selectorSlot == 0) { // get last selectorSlot selectorSlotCount--; _selectorSlot = ds.selectorSlots[selectorSlotCount]; selectorInSlotIndex = 7; } else { selectorInSlotIndex--; } bytes4 lastSelector; uint256 oldSelectorsSlotCount; uint256 oldSelectorInSlotPosition; // adding a block here prevents stack too deep error { bytes4 selector = _selectors[selectorIndex]; bytes32 oldFacet = ds.facets[selector]; require( address(bytes20(oldFacet)) != address(0), "LibDiamondCut: Can't remove function that doesn't exist" ); // only useful if immutable functions exist require( address(bytes20(oldFacet)) != address(this), "LibDiamondCut: Can't remove immutable function" ); // replace selector with last selector in ds.facets // gets the last selector // " << 5 is the same as multiplying by 32 ( * 32) lastSelector = bytes4( _selectorSlot << (selectorInSlotIndex << 5) ); if (lastSelector != selector) { // update last selector slot position info ds.facets[lastSelector] = (oldFacet & CLEAR_ADDRESS_MASK) | bytes20(ds.facets[lastSelector]); } delete ds.facets[selector]; uint256 oldSelectorCount = uint16(uint256(oldFacet)); // "oldSelectorCount >> 3" is a gas efficient division by 8 "oldSelectorCount / 8" oldSelectorsSlotCount = oldSelectorCount >> 3; // "oldSelectorCount & 7" is a gas efficient modulo by eight "oldSelectorCount % 8" // " << 5 is the same as multiplying by 32 ( * 32) oldSelectorInSlotPosition = (oldSelectorCount & 7) << 5; } if (oldSelectorsSlotCount != selectorSlotCount) { bytes32 oldSelectorSlot = ds.selectorSlots[ oldSelectorsSlotCount ]; // clears the selector we are deleting and puts the last selector in its place. oldSelectorSlot = (oldSelectorSlot & ~(CLEAR_SELECTOR_MASK >> oldSelectorInSlotPosition)) | (bytes32(lastSelector) >> oldSelectorInSlotPosition); // update storage with the modified slot ds.selectorSlots[oldSelectorsSlotCount] = oldSelectorSlot; } else { // clears the selector we are deleting and puts the last selector in its place. _selectorSlot = (_selectorSlot & ~(CLEAR_SELECTOR_MASK >> oldSelectorInSlotPosition)) | (bytes32(lastSelector) >> oldSelectorInSlotPosition); } if (selectorInSlotIndex == 0) { delete ds.selectorSlots[selectorSlotCount]; _selectorSlot = 0; } } _selectorCount = selectorSlotCount * 8 + selectorInSlotIndex; } else { revert("LibDiamondCut: Incorrect FacetCutAction"); } return (_selectorCount, _selectorSlot); } function initializeDiamondCut(address _init, bytes memory _calldata) internal { if (_init == address(0)) { require( _calldata.length == 0, "LibDiamondCut: _init is address(0) but_calldata is not empty" ); } else { require( _calldata.length > 0, "LibDiamondCut: _calldata is empty but _init is not address(0)" ); if (_init != address(this)) { enforceHasContractCode( _init, "LibDiamondCut: _init address has no code" ); } (bool success, bytes memory error) = _init.delegatecall(_calldata); if (!success) { if (error.length > 0) { // bubble up the error revert(string(error)); } else { revert("LibDiamondCut: _init function reverted"); } } } } function enforceHasContractCode( address _contract, string memory _errorMessage ) internal view { uint256 contractSize; assembly { contractSize := extcodesize(_contract) } require(contractSize > 0, _errorMessage); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /******************************************************************************\ * Author: Nick Mudge <[email protected]> (https://twitter.com/mudgen) * EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535 /******************************************************************************/ interface IDiamondCut { enum FacetCutAction {Add, Replace, Remove} // Add=0, Replace=1, Remove=2 struct FacetCut { address facetAddress; FacetCutAction action; bytes4[] functionSelectors; } /// @notice Add/replace/remove any number of functions and optionally execute /// a function with delegatecall /// @param _diamondCut Contains the facet addresses and function selectors /// @param _init The address of the contract or facet to execute _calldata /// @param _calldata A function call, including function selector and arguments /// _calldata is executed with delegatecall on _init function diamondCut( FacetCut[] calldata _diamondCut, address _init, bytes calldata _calldata ) external; event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata); }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ library LibAccessControl { using EnumerableSet for EnumerableSet.AddressSet; bytes32 constant ACCESS_CONTROL_STORAGE_POSITION = keccak256("club.access.control.storage"); bytes32 constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `operator` is the account that originated the contract call, an admin role bearer. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed operator); /** * @dev Emitted when `account` is revoked `role`. * * `operator` is the account that originated the contract call. */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed operator); struct RoleData { mapping(address => bool) members; bytes32 adminRole; } struct AccessControlStorage { mapping(bytes32 => RoleData) roles; mapping(bytes32 => EnumerableSet.AddressSet) roleMembers; } function accessControlStorage() internal pure returns (AccessControlStorage storage s) { bytes32 position = ACCESS_CONTROL_STORAGE_POSITION; assembly { s.slot := position } } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) internal view returns (bool) { return accessControlStorage().roles[role].members[account]; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - operator must have ``role``'s admin role. */ function grantRole(bytes32 role, address account, address operator) internal { AccessControlStorage storage s = accessControlStorage(); checkRole(s.roles[role].adminRole, operator); if (!s.roles[role].members[account]) { s.roles[role].members[account] = true; s.roleMembers[role].add(account); emit RoleGranted(role, account, operator); } } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - operator must have ``role``'s admin role or must be ``account`` (revoke role from self). */ function revokeRole(bytes32 role, address account, address operator) internal { AccessControlStorage storage s = accessControlStorage(); if (account != operator) checkRole(s.roles[role].adminRole, operator); if (s.roles[role].members[account]) { s.roles[role].members[account] = false; s.roleMembers[role].remove(account); emit RoleRevoked(role, account, operator); } } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function setRoleAdmin(bytes32 role, bytes32 adminRole, address operator) internal { AccessControlStorage storage s = accessControlStorage(); bytes32 previousAdminRole = s.roles[role].adminRole; checkRole(previousAdminRole, operator); s.roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function checkRole(bytes32 role, address account) internal view { AccessControlStorage storage s = accessControlStorage(); if (!s.roles[role].members[account]) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== */ function setupRole(bytes32 role, address account) internal { AccessControlStorage storage s = accessControlStorage(); if (!s.roles[role].members[account]) { s.roles[role].members[account] = true; s.roleMembers[role].add(account); emit RoleGranted(role, account, account); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
{ "remappings": [], "optimizer": { "enabled": false, "runs": 200 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_diamondCutFacet","type":"address"}],"stateMutability":"payable","type":"constructor"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"WITHDRAWER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040526040516200509a3803806200509a833981810160405281019062000029919062001791565b620000526000801b620000416200030360201b60201c565b6200030b60201b6200021b1760201c565b620000987f10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e4620000876200030360201b60201c565b6200030b60201b6200021b1760201c565b6000600167ffffffffffffffff811115620000dc577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156200011957816020015b620001056200170a565b815260200190600190039081620000fb5790505b5090506000600167ffffffffffffffff81111562000160577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156200018f5781602001602082028036833780820191505090505b509050631f931c1c60e01b81600081518110620001d5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152505060405180606001604052808473ffffffffffffffffffffffffffffffffffffffff1681526020016000600281111562000283577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81526020018281525082600081518110620002c7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010181905250620002fa826000604051806020016040528060008152506200048560201b620003851760201c565b5050506200252c565b600033905090565b60006200031d620006a060201b60201c565b905080600001600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166200048057600181600001600085815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506200042382826001016000868152602001908152602001600020620006cd60201b6200057c1790919060201c565b508173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b505050565b6000620004976200070560201b60201c565b905060008160020160009054906101000a900461ffff1661ffff1690506000819050600080600783161115620004e457836001016000600384901c81526020019081526020016000205490505b60005b8751811015620005f357620005d583838a848151811062000531577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518b858151811062000577577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001518c8681518110620005bd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151604001516200073260201b60201c565b80935081945050508080620005ea906200208a565b915050620004e7565b508282146200061c57818460020160006101000a81548161ffff021916908361ffff1602179055505b6000600783161115620006485780846001016000600385901c8152602001908152602001600020819055505b7f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb6738787876040516200067d9392919062001c18565b60405180910390a1620006978686620013e960201b60201c565b50505050505050565b6000807f6ff996816b4bc2e937dfa88128e419c50057034112f19465110834871a6b311190508091505090565b6000620006fd836000018373ffffffffffffffffffffffffffffffffffffffff1660001b6200161860201b60201c565b905092915050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b6000806000620007476200070560201b60201c565b9050600084511162000790576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620007879062001ccb565b60405180910390fd5b60006002811115620007cb577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b85600281111562000805577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b141562000a8157620008378660405180606001604052806024815260200162005026602491396200169260201b60201c565b60005b845181101562000a7a57600085828151811062000880577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020549050600073ffffffffffffffffffffffffffffffffffffffff168160601c73ffffffffffffffffffffffffffffffffffffffff161462000957576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200094e9062001d75565b60405180910390fd5b8a60001b8960601b6bffffffffffffffffffffffff191617846000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020819055506000600560078d16901b905080837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c817fffffffff0000000000000000000000000000000000000000000000000000000060001b901c198c16179a5060e081141562000a51578a85600101600060038f901c8152602001908152602001600020819055506000801b9a505b8b8062000a5e906200208a565b9c5050505050808062000a71906200208a565b9150506200083a565b50620013d8565b6001600281111562000abc577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b85600281111562000af6577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b141562000dcf5762000b288660405180606001604052806028815260200162005072602891396200169260201b60201c565b60005b845181101562000dc857600085828151811062000b71577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002054905060008160601c90503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141562000c4d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000c449062001ddb565b60405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141562000cbf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000cb69062001d97565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141562000d32576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000d299062001dfd565b60405180910390fd5b8960601b6bffffffffffffffffffffffff19166bffffffffffffffffffffffff60001b831617856000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002081905550505050808062000dbf906200208a565b91505062000b2b565b50620013d7565b60028081111562000e09577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b85600281111562000e43577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156200139957600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161462000ebc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000eb39062001db9565b60405180910390fd5b6000600389901c9050600060078a16905060005b865181101562001372576000801b8a141562000f1857828062000ef3906200205b565b9350508360010160008481526020019081526020016000205499506007915062000f29565b818062000f25906200205b565b9250505b6000806000808a858151811062000f69577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000886000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020549050600073ffffffffffffffffffffffffffffffffffffffff168160601c73ffffffffffffffffffffffffffffffffffffffff16141562001041576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620010389062001ced565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168160601c73ffffffffffffffffffffffffffffffffffffffff161415620010b6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620010ad9062001d53565b60405180910390fd5b600587901b8f901b9450817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614620011d457886000016000867bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020546bffffffffffffffffffffffff19166bffffffffffffffffffffffff60001b821617896000016000877bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020819055505b886000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019081526020016000206000905560008160001c61ffff169050600381901c9450600560078216901b9350505050858214620012de57600087600101600084815260200190815260200160002054905081847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c827fffffffff0000000000000000000000000000000000000000000000000000000060001b901c1982161790508088600101600085815260200190815260200160002081905550506200132f565b80837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c817fffffffff0000000000000000000000000000000000000000000000000000000060001b901c198e16179c505b60008514156200135957866001016000878152602001908152602001600020600090556000801b9c505b505050808062001369906200208a565b91505062000ed0565b508060088362001383919062001f31565b6200138f919062001ed4565b99505050620013d6565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620013cd9062001d0f565b60405180910390fd5b5b5b878792509250509550959350505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156200146c57600081511462001466576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200145d9062001c87565b60405180910390fd5b62001614565b6000815111620014b3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620014aa9062001d31565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614620015135762001512826040518060600160405280602881526020016200504a602891396200169260201b60201c565b5b6000808373ffffffffffffffffffffffffffffffffffffffff16836040516200153d919062001bff565b600060405180830381855af49150503d80600081146200157a576040519150601f19603f3d011682016040523d82523d6000602084013e6200157f565b606091505b5091509150816200161157600081511115620015d457806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620015cb919062001c63565b60405180910390fd5b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620016089062001ca9565b60405180910390fd5b50505b5050565b60006200162c8383620016e760201b60201c565b620016875782600001829080600181540180825580915050600190039060005260206000200160009091909190915055826000018054905083600101600084815260200190815260200160002081905550600190506200168c565b600090505b92915050565b6000823b9050600081118290620016e1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620016d8919062001c63565b60405180910390fd5b50505050565b600080836001016000848152602001908152602001600020541415905092915050565b6040518060600160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600060028111156200176d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8152602001606081525090565b6000815190506200178b8162002512565b92915050565b600060208284031215620017a457600080fd5b6000620017b4848285016200177a565b91505092915050565b6000620017cb8383620018fa565b60208301905092915050565b6000620017e5838362001ba9565b905092915050565b620017f88162001f92565b82525050565b620018098162001f92565b82525050565b60006200181c8262001e3f565b62001828818562001e85565b9350620018358362001e1f565b8060005b838110156200186c578151620018508882620017bd565b97506200185d8362001e6b565b92505060018101905062001839565b5085935050505092915050565b6000620018868262001e4a565b62001892818562001e96565b935083602082028501620018a68562001e2f565b8060005b85811015620018e85784840389528151620018c68582620017d7565b9450620018d38362001e78565b925060208a01995050600181019050620018aa565b50829750879550505050505092915050565b620019058162001fa6565b82525050565b6000620019188262001e55565b62001924818562001ea7565b93506200193681856020860162002025565b620019418162002136565b840191505092915050565b6000620019598262001e55565b62001965818562001eb8565b93506200197781856020860162002025565b80840191505092915050565b6200198e8162002011565b82525050565b6000620019a18262001e60565b620019ad818562001ec3565b9350620019bf81856020860162002025565b620019ca8162002136565b840191505092915050565b6000620019e4603c8362001ec3565b9150620019f18262002147565b604082019050919050565b600062001a0b60268362001ec3565b915062001a188262002196565b604082019050919050565b600062001a32602b8362001ec3565b915062001a3f82620021e5565b604082019050919050565b600062001a5960378362001ec3565b915062001a668262002234565b604082019050919050565b600062001a8060278362001ec3565b915062001a8d8262002283565b604082019050919050565b600062001aa7603d8362001ec3565b915062001ab482620022d2565b604082019050919050565b600062001ace602e8362001ec3565b915062001adb8262002321565b604082019050919050565b600062001af560358362001ec3565b915062001b028262002370565b604082019050919050565b600062001b1c60388362001ec3565b915062001b2982620023bf565b604082019050919050565b600062001b4360368362001ec3565b915062001b50826200240e565b604082019050919050565b600062001b6a602f8362001ec3565b915062001b77826200245d565b604082019050919050565b600062001b9160388362001ec3565b915062001b9e82620024ac565b604082019050919050565b600060608301600083015162001bc36000860182620017ed565b50602083015162001bd8602086018262001983565b506040830151848203604086015262001bf282826200180f565b9150508091505092915050565b600062001c0d82846200194c565b915081905092915050565b6000606082019050818103600083015262001c34818662001879565b905062001c456020830185620017fe565b818103604083015262001c5981846200190b565b9050949350505050565b6000602082019050818103600083015262001c7f818462001994565b905092915050565b6000602082019050818103600083015262001ca281620019d5565b9050919050565b6000602082019050818103600083015262001cc481620019fc565b9050919050565b6000602082019050818103600083015262001ce68162001a23565b9050919050565b6000602082019050818103600083015262001d088162001a4a565b9050919050565b6000602082019050818103600083015262001d2a8162001a71565b9050919050565b6000602082019050818103600083015262001d4c8162001a98565b9050919050565b6000602082019050818103600083015262001d6e8162001abf565b9050919050565b6000602082019050818103600083015262001d908162001ae6565b9050919050565b6000602082019050818103600083015262001db28162001b0d565b9050919050565b6000602082019050818103600083015262001dd48162001b34565b9050919050565b6000602082019050818103600083015262001df68162001b5b565b9050919050565b6000602082019050818103600083015262001e188162001b82565b9050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600062001ee18262002007565b915062001eee8362002007565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111562001f265762001f25620020d8565b5b828201905092915050565b600062001f3e8262002007565b915062001f4b8362002007565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161562001f875762001f86620020d8565b5b828202905092915050565b600062001f9f8262001fe7565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600081905062001fe282620024fb565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006200201e8262001fd2565b9050919050565b60005b838110156200204557808201518184015260208101905062002028565b8381111562002055576000848401525b50505050565b6000620020688262002007565b915060008214156200207f576200207e620020d8565b5b600182039050919050565b6000620020978262002007565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415620020cd57620020cc620020d8565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000601f19601f8301169050919050565b7f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860008201527f3029206275745f63616c6c64617461206973206e6f7420656d70747900000000602082015250565b7f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560008201527f7665727465640000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660008201527f6163657420746f20637574000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360008201527f74696f6e207468617420646f65736e2774206578697374000000000000000000602082015250565b7f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560008201527f74416374696f6e00000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460008201527f7920627574205f696e6974206973206e6f742061646472657373283029000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560008201527f7461626c652066756e6374696f6e000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60008201527f6e207468617420616c7265616479206578697374730000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60008201527f6374696f6e20776974682073616d652066756e6374696f6e0000000000000000602082015250565b7f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260008201527f657373206d757374206265206164647265737328302900000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774207265706c61636520696d6d60008201527f757461626c652066756e6374696f6e0000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60008201527f6374696f6e207468617420646f65736e27742065786973740000000000000000602082015250565b600381106200250f576200250e62002107565b5b50565b6200251d8162001f92565b81146200252957600080fd5b50565b612aea806200253c6000396000f3fe60806040526004361061002d5760003560e01c80633ccfd60b1461017157806385f438c11461018857610034565b3661003457005b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c9050809150600082600001600080357fffffffff00000000000000000000000000000000000000000000000000000000167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019081526020016000205460601c9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561014b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101429061213d565b60405180910390fd5b3660008037600080366000845af43d6000803e806000811461016c573d6000f35b3d6000fd5b34801561017d57600080fd5b506101866101b3565b005b34801561019457600080fd5b5061019d6101f7565b6040516101aa9190612000565b60405180910390f35b6101e47f10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e46101df6105ac565b6105b4565b6101f56101ef6105ac565b476106b7565b565b7f10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e481565b60006102256107ab565b905080600001600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661038057600181600001600085815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506103238282600101600086815260200190815260200160002061057c90919063ffffffff16565b508173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b505050565b600061038f6107d8565b905060008160020160009054906101000a900461ffff1661ffff16905060008190506000806007831611156103db57836001016000600384901c81526020019081526020016000205490505b60005b87518110156104db576104c083838a8481518110610425577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518b858151811061046a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001518c86815181106104af577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160400151610805565b809350819450505080806104d3906124a1565b9150506103de565b5082821461050357818460020160006101000a81548161ffff021916908361ffff1602179055505b600060078316111561052e5780846001016000600385901c8152602001908152602001600020819055505b7f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67387878760405161056193929190611fbb565b60405180910390a1610573868661145c565b50505050505050565b60006105a4836000018373ffffffffffffffffffffffffffffffffffffffff1660001b61166f565b905092915050565b600033905090565b60006105be6107ab565b905080600001600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166106b2576106488273ffffffffffffffffffffffffffffffffffffffff1660146116df565b6106568460001c60206116df565b604051602001610667929190611f81565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106a9919061201b565b60405180910390fd5b505050565b804710156106fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106f19061211d565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff168260405161072090611f6c565b60006040518083038185875af1925050503d806000811461075d576040519150601f19603f3d011682016040523d82523d6000602084013e610762565b606091505b50509050806107a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079d906120fd565b60405180910390fd5b505050565b6000807f6ff996816b4bc2e937dfa88128e419c50057034112f19465110834871a6b311190508091505090565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b60008060006108126107d8565b90506000845111610858576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084f9061209d565b60405180910390fd5b60006002811115610892577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8560028111156108cb577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415610b31576108f386604051806060016040528060248152602001612a41602491396119d9565b60005b8451811015610b2b57600085828151811061093a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020549050600073ffffffffffffffffffffffffffffffffffffffff168160601c73ffffffffffffffffffffffffffffffffffffffff1614610a0e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a059061219d565b60405180910390fd5b8a60001b8960601b6bffffffffffffffffffffffff191617846000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020819055506000600560078d16901b905080837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c817fffffffff0000000000000000000000000000000000000000000000000000000060001b901c198c16179a5060e0811415610b07578a85600101600060038f901c8152602001908152602001600020819055506000801b9a505b8b80610b12906124a1565b9c50505050508080610b23906124a1565b9150506108f6565b5061144b565b60016002811115610b6b577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b856002811115610ba4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415610e6457610bcc86604051806060016040528060288152602001612a8d602891396119d9565b60005b8451811015610e5e576000858281518110610c13577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002054905060008160601c90503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610cec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ce3906121fd565b60405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610d5b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d52906121bd565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610dcb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc29061221d565b60405180910390fd5b8960601b6bffffffffffffffffffffffff19166bffffffffffffffffffffffff60001b831617856000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020819055505050508080610e56906124a1565b915050610bcf565b5061144a565b600280811115610e9d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b856002811115610ed6577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b141561140e57600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614610f4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f42906121dd565b60405180910390fd5b6000600389901c9050600060078a16905060005b86518110156113ec576000801b8a1415610fa2578280610f7e90612477565b93505083600101600084815260200190815260200160002054995060079150610fb1565b8180610fad90612477565b9250505b6000806000808a8581518110610ff0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000886000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020549050600073ffffffffffffffffffffffffffffffffffffffff168160601c73ffffffffffffffffffffffffffffffffffffffff1614156110c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110bc906120bd565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168160601c73ffffffffffffffffffffffffffffffffffffffff161415611137576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161112e9061217d565b60405180910390fd5b600587901b8f901b9450817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161461125457886000016000867bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020546bffffffffffffffffffffffff19166bffffffffffffffffffffffff60001b821617896000016000877bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020819055505b886000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019081526020016000206000905560008160001c61ffff169050600381901c9450600560078216901b935050505085821461135c57600087600101600084815260200190815260200160002054905081847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c827fffffffff0000000000000000000000000000000000000000000000000000000060001b901c1982161790508088600101600085815260200190815260200160002081905550506113ad565b80837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c817fffffffff0000000000000000000000000000000000000000000000000000000060001b901c198e16179c505b60008514156113d657866001016000878152602001908152602001600020600090556000801b9c505b50505080806113e4906124a1565b915050610f5f565b50806008836113fb9190612353565b61140591906122fd565b99505050611449565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611440906120dd565b60405180910390fd5b5b5b878792509250509550959350505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156114da5760008151146114d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114cc9061203d565b60405180910390fd5b61166b565b600081511161151e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115159061215d565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146115745761157382604051806060016040528060288152602001612a65602891396119d9565b5b6000808373ffffffffffffffffffffffffffffffffffffffff168360405161159c9190611f55565b600060405180830381855af49150503d80600081146115d7576040519150601f19603f3d011682016040523d82523d6000602084013e6115dc565b606091505b5091509150816116685760008151111561162d57806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611624919061201b565b60405180910390fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161165f9061207d565b60405180910390fd5b50505b5050565b600061167b8383611a2b565b6116d45782600001829080600181540180825580915050600190039060005260206000200160009091909190915055826000018054905083600101600084815260200190815260200160002081905550600190506116d9565b600090505b92915050565b6060600060028360026116f29190612353565b6116fc91906122fd565b67ffffffffffffffff81111561173b577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561176d5781602001600182028036833780820191505090505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106117cb577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611855577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600060018460026118959190612353565b61189f91906122fd565b90505b600181111561198b577f3031323334353637383961626364656600000000000000000000000000000000600f861660108110611907577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b1a60f81b828281518110611944577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c94508061198490612477565b90506118a2565b50600084146119cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119c69061205d565b60405180910390fd5b8091505092915050565b6000823b9050600081118290611a25576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a1c919061201b565b60405180910390fd5b50505050565b600080836001016000848152602001908152602001600020541415905092915050565b6000611a5a8383611b7a565b60208301905092915050565b6000611a728383611f05565b905092915050565b611a83816123ad565b82525050565b611a92816123ad565b82525050565b6000611aa38261225d565b611aad81856122a3565b9350611ab88361223d565b8060005b83811015611ae9578151611ad08882611a4e565b9750611adb83612289565b925050600181019050611abc565b5085935050505092915050565b6000611b0182612268565b611b0b81856122b4565b935083602082028501611b1d8561224d565b8060005b85811015611b595784840389528151611b3a8582611a66565b9450611b4583612296565b925060208a01995050600181019050611b21565b50829750879550505050505092915050565b611b74816123bf565b82525050565b611b83816123c9565b82525050565b6000611b9482612273565b611b9e81856122c5565b9350611bae818560208601612444565b611bb781612548565b840191505092915050565b6000611bcd82612273565b611bd781856122d6565b9350611be7818560208601612444565b80840191505092915050565b611bfc81612432565b82525050565b6000611c0d8261227e565b611c1781856122e1565b9350611c27818560208601612444565b611c3081612548565b840191505092915050565b6000611c468261227e565b611c5081856122f2565b9350611c60818560208601612444565b80840191505092915050565b6000611c79603c836122e1565b9150611c8482612559565b604082019050919050565b6000611c9c6020836122e1565b9150611ca7826125a8565b602082019050919050565b6000611cbf6026836122e1565b9150611cca826125d1565b604082019050919050565b6000611ce2602b836122e1565b9150611ced82612620565b604082019050919050565b6000611d056037836122e1565b9150611d108261266f565b604082019050919050565b6000611d286027836122e1565b9150611d33826126be565b604082019050919050565b6000611d4b603a836122e1565b9150611d568261270d565b604082019050919050565b6000611d6e601d836122e1565b9150611d798261275c565b602082019050919050565b6000611d916020836122e1565b9150611d9c82612785565b602082019050919050565b6000611db4603d836122e1565b9150611dbf826127ae565b604082019050919050565b6000611dd7602e836122e1565b9150611de2826127fd565b604082019050919050565b6000611dfa6035836122e1565b9150611e058261284c565b604082019050919050565b6000611e1d6038836122e1565b9150611e288261289b565b604082019050919050565b6000611e406036836122e1565b9150611e4b826128ea565b604082019050919050565b6000611e63602f836122e1565b9150611e6e82612939565b604082019050919050565b6000611e866000836122d6565b9150611e9182612988565b600082019050919050565b6000611ea96038836122e1565b9150611eb48261298b565b604082019050919050565b6000611ecc6017836122f2565b9150611ed7826129da565b601782019050919050565b6000611eef6011836122f2565b9150611efa82612a03565b601182019050919050565b6000606083016000830151611f1d6000860182611a7a565b506020830151611f306020860182611bf3565b5060408301518482036040860152611f488282611a98565b9150508091505092915050565b6000611f618284611bc2565b915081905092915050565b6000611f7782611e79565b9150819050919050565b6000611f8c82611ebf565b9150611f988285611c3b565b9150611fa382611ee2565b9150611faf8284611c3b565b91508190509392505050565b60006060820190508181036000830152611fd58186611af6565b9050611fe46020830185611a89565b8181036040830152611ff68184611b89565b9050949350505050565b60006020820190506120156000830184611b6b565b92915050565b600060208201905081810360008301526120358184611c02565b905092915050565b6000602082019050818103600083015261205681611c6c565b9050919050565b6000602082019050818103600083015261207681611c8f565b9050919050565b6000602082019050818103600083015261209681611cb2565b9050919050565b600060208201905081810360008301526120b681611cd5565b9050919050565b600060208201905081810360008301526120d681611cf8565b9050919050565b600060208201905081810360008301526120f681611d1b565b9050919050565b6000602082019050818103600083015261211681611d3e565b9050919050565b6000602082019050818103600083015261213681611d61565b9050919050565b6000602082019050818103600083015261215681611d84565b9050919050565b6000602082019050818103600083015261217681611da7565b9050919050565b6000602082019050818103600083015261219681611dca565b9050919050565b600060208201905081810360008301526121b681611ded565b9050919050565b600060208201905081810360008301526121d681611e10565b9050919050565b600060208201905081810360008301526121f681611e33565b9050919050565b6000602082019050818103600083015261221681611e56565b9050919050565b6000602082019050818103600083015261223681611e9c565b9050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600061230882612428565b915061231383612428565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612348576123476124ea565b5b828201905092915050565b600061235e82612428565b915061236983612428565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156123a2576123a16124ea565b5b828202905092915050565b60006123b882612408565b9050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600081905061240382612a2c565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061243d826123f5565b9050919050565b60005b83811015612462578082015181840152602081019050612447565b83811115612471576000848401525b50505050565b600061248282612428565b91506000821415612496576124956124ea565b5b600182039050919050565b60006124ac82612428565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156124df576124de6124ea565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000601f19601f8301169050919050565b7f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860008201527f3029206275745f63616c6c64617461206973206e6f7420656d70747900000000602082015250565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b7f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560008201527f7665727465640000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660008201527f6163657420746f20637574000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360008201527f74696f6e207468617420646f65736e2774206578697374000000000000000000602082015250565b7f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560008201527f74416374696f6e00000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260008201527f6563697069656e74206d61792068617665207265766572746564000000000000602082015250565b7f416464726573733a20696e73756666696369656e742062616c616e6365000000600082015250565b7f4469616d6f6e643a2046756e6374696f6e20646f6573206e6f74206578697374600082015250565b7f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460008201527f7920627574205f696e6974206973206e6f742061646472657373283029000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560008201527f7461626c652066756e6374696f6e000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60008201527f6e207468617420616c7265616479206578697374730000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60008201527f6374696f6e20776974682073616d652066756e6374696f6e0000000000000000602082015250565b7f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260008201527f657373206d757374206265206164647265737328302900000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774207265706c61636520696d6d60008201527f757461626c652066756e6374696f6e0000000000000000000000000000000000602082015250565b50565b7f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60008201527f6374696f6e207468617420646f65736e27742065786973740000000000000000602082015250565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b60038110612a3d57612a3c612519565b5b5056fe4c69624469616d6f6e644375743a2041646420666163657420686173206e6f20636f64654c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a205265706c61636520666163657420686173206e6f20636f6465a2646970667358221220bdcac78b5a2d2075c52f3a71afc4b677edc0c1e6cd45749934878e87a98629f864736f6c634300080400334c69624469616d6f6e644375743a2041646420666163657420686173206e6f20636f64654c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a205265706c61636520666163657420686173206e6f20636f64650000000000000000000000000ecdd8dc24b3d7a93a29b06f3fb6fcf03a370a77
Deployed Bytecode
0x60806040526004361061002d5760003560e01c80633ccfd60b1461017157806385f438c11461018857610034565b3661003457005b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c9050809150600082600001600080357fffffffff00000000000000000000000000000000000000000000000000000000167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019081526020016000205460601c9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561014b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101429061213d565b60405180910390fd5b3660008037600080366000845af43d6000803e806000811461016c573d6000f35b3d6000fd5b34801561017d57600080fd5b506101866101b3565b005b34801561019457600080fd5b5061019d6101f7565b6040516101aa9190612000565b60405180910390f35b6101e47f10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e46101df6105ac565b6105b4565b6101f56101ef6105ac565b476106b7565b565b7f10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e481565b60006102256107ab565b905080600001600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661038057600181600001600085815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506103238282600101600086815260200190815260200160002061057c90919063ffffffff16565b508173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b505050565b600061038f6107d8565b905060008160020160009054906101000a900461ffff1661ffff16905060008190506000806007831611156103db57836001016000600384901c81526020019081526020016000205490505b60005b87518110156104db576104c083838a8481518110610425577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518b858151811061046a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001518c86815181106104af577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160400151610805565b809350819450505080806104d3906124a1565b9150506103de565b5082821461050357818460020160006101000a81548161ffff021916908361ffff1602179055505b600060078316111561052e5780846001016000600385901c8152602001908152602001600020819055505b7f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67387878760405161056193929190611fbb565b60405180910390a1610573868661145c565b50505050505050565b60006105a4836000018373ffffffffffffffffffffffffffffffffffffffff1660001b61166f565b905092915050565b600033905090565b60006105be6107ab565b905080600001600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166106b2576106488273ffffffffffffffffffffffffffffffffffffffff1660146116df565b6106568460001c60206116df565b604051602001610667929190611f81565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106a9919061201b565b60405180910390fd5b505050565b804710156106fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106f19061211d565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff168260405161072090611f6c565b60006040518083038185875af1925050503d806000811461075d576040519150601f19603f3d011682016040523d82523d6000602084013e610762565b606091505b50509050806107a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079d906120fd565b60405180910390fd5b505050565b6000807f6ff996816b4bc2e937dfa88128e419c50057034112f19465110834871a6b311190508091505090565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b60008060006108126107d8565b90506000845111610858576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084f9061209d565b60405180910390fd5b60006002811115610892577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8560028111156108cb577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415610b31576108f386604051806060016040528060248152602001612a41602491396119d9565b60005b8451811015610b2b57600085828151811061093a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020549050600073ffffffffffffffffffffffffffffffffffffffff168160601c73ffffffffffffffffffffffffffffffffffffffff1614610a0e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a059061219d565b60405180910390fd5b8a60001b8960601b6bffffffffffffffffffffffff191617846000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020819055506000600560078d16901b905080837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c817fffffffff0000000000000000000000000000000000000000000000000000000060001b901c198c16179a5060e0811415610b07578a85600101600060038f901c8152602001908152602001600020819055506000801b9a505b8b80610b12906124a1565b9c50505050508080610b23906124a1565b9150506108f6565b5061144b565b60016002811115610b6b577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b856002811115610ba4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415610e6457610bcc86604051806060016040528060288152602001612a8d602891396119d9565b60005b8451811015610e5e576000858281518110610c13577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002054905060008160601c90503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610cec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ce3906121fd565b60405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610d5b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d52906121bd565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610dcb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc29061221d565b60405180910390fd5b8960601b6bffffffffffffffffffffffff19166bffffffffffffffffffffffff60001b831617856000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020819055505050508080610e56906124a1565b915050610bcf565b5061144a565b600280811115610e9d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b856002811115610ed6577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b141561140e57600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614610f4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f42906121dd565b60405180910390fd5b6000600389901c9050600060078a16905060005b86518110156113ec576000801b8a1415610fa2578280610f7e90612477565b93505083600101600084815260200190815260200160002054995060079150610fb1565b8180610fad90612477565b9250505b6000806000808a8581518110610ff0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000886000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020549050600073ffffffffffffffffffffffffffffffffffffffff168160601c73ffffffffffffffffffffffffffffffffffffffff1614156110c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110bc906120bd565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168160601c73ffffffffffffffffffffffffffffffffffffffff161415611137576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161112e9061217d565b60405180910390fd5b600587901b8f901b9450817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161461125457886000016000867bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020546bffffffffffffffffffffffff19166bffffffffffffffffffffffff60001b821617896000016000877bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020819055505b886000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019081526020016000206000905560008160001c61ffff169050600381901c9450600560078216901b935050505085821461135c57600087600101600084815260200190815260200160002054905081847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c827fffffffff0000000000000000000000000000000000000000000000000000000060001b901c1982161790508088600101600085815260200190815260200160002081905550506113ad565b80837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c817fffffffff0000000000000000000000000000000000000000000000000000000060001b901c198e16179c505b60008514156113d657866001016000878152602001908152602001600020600090556000801b9c505b50505080806113e4906124a1565b915050610f5f565b50806008836113fb9190612353565b61140591906122fd565b99505050611449565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611440906120dd565b60405180910390fd5b5b5b878792509250509550959350505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156114da5760008151146114d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114cc9061203d565b60405180910390fd5b61166b565b600081511161151e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115159061215d565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146115745761157382604051806060016040528060288152602001612a65602891396119d9565b5b6000808373ffffffffffffffffffffffffffffffffffffffff168360405161159c9190611f55565b600060405180830381855af49150503d80600081146115d7576040519150601f19603f3d011682016040523d82523d6000602084013e6115dc565b606091505b5091509150816116685760008151111561162d57806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611624919061201b565b60405180910390fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161165f9061207d565b60405180910390fd5b50505b5050565b600061167b8383611a2b565b6116d45782600001829080600181540180825580915050600190039060005260206000200160009091909190915055826000018054905083600101600084815260200190815260200160002081905550600190506116d9565b600090505b92915050565b6060600060028360026116f29190612353565b6116fc91906122fd565b67ffffffffffffffff81111561173b577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561176d5781602001600182028036833780820191505090505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106117cb577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611855577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600060018460026118959190612353565b61189f91906122fd565b90505b600181111561198b577f3031323334353637383961626364656600000000000000000000000000000000600f861660108110611907577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b1a60f81b828281518110611944577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c94508061198490612477565b90506118a2565b50600084146119cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119c69061205d565b60405180910390fd5b8091505092915050565b6000823b9050600081118290611a25576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a1c919061201b565b60405180910390fd5b50505050565b600080836001016000848152602001908152602001600020541415905092915050565b6000611a5a8383611b7a565b60208301905092915050565b6000611a728383611f05565b905092915050565b611a83816123ad565b82525050565b611a92816123ad565b82525050565b6000611aa38261225d565b611aad81856122a3565b9350611ab88361223d565b8060005b83811015611ae9578151611ad08882611a4e565b9750611adb83612289565b925050600181019050611abc565b5085935050505092915050565b6000611b0182612268565b611b0b81856122b4565b935083602082028501611b1d8561224d565b8060005b85811015611b595784840389528151611b3a8582611a66565b9450611b4583612296565b925060208a01995050600181019050611b21565b50829750879550505050505092915050565b611b74816123bf565b82525050565b611b83816123c9565b82525050565b6000611b9482612273565b611b9e81856122c5565b9350611bae818560208601612444565b611bb781612548565b840191505092915050565b6000611bcd82612273565b611bd781856122d6565b9350611be7818560208601612444565b80840191505092915050565b611bfc81612432565b82525050565b6000611c0d8261227e565b611c1781856122e1565b9350611c27818560208601612444565b611c3081612548565b840191505092915050565b6000611c468261227e565b611c5081856122f2565b9350611c60818560208601612444565b80840191505092915050565b6000611c79603c836122e1565b9150611c8482612559565b604082019050919050565b6000611c9c6020836122e1565b9150611ca7826125a8565b602082019050919050565b6000611cbf6026836122e1565b9150611cca826125d1565b604082019050919050565b6000611ce2602b836122e1565b9150611ced82612620565b604082019050919050565b6000611d056037836122e1565b9150611d108261266f565b604082019050919050565b6000611d286027836122e1565b9150611d33826126be565b604082019050919050565b6000611d4b603a836122e1565b9150611d568261270d565b604082019050919050565b6000611d6e601d836122e1565b9150611d798261275c565b602082019050919050565b6000611d916020836122e1565b9150611d9c82612785565b602082019050919050565b6000611db4603d836122e1565b9150611dbf826127ae565b604082019050919050565b6000611dd7602e836122e1565b9150611de2826127fd565b604082019050919050565b6000611dfa6035836122e1565b9150611e058261284c565b604082019050919050565b6000611e1d6038836122e1565b9150611e288261289b565b604082019050919050565b6000611e406036836122e1565b9150611e4b826128ea565b604082019050919050565b6000611e63602f836122e1565b9150611e6e82612939565b604082019050919050565b6000611e866000836122d6565b9150611e9182612988565b600082019050919050565b6000611ea96038836122e1565b9150611eb48261298b565b604082019050919050565b6000611ecc6017836122f2565b9150611ed7826129da565b601782019050919050565b6000611eef6011836122f2565b9150611efa82612a03565b601182019050919050565b6000606083016000830151611f1d6000860182611a7a565b506020830151611f306020860182611bf3565b5060408301518482036040860152611f488282611a98565b9150508091505092915050565b6000611f618284611bc2565b915081905092915050565b6000611f7782611e79565b9150819050919050565b6000611f8c82611ebf565b9150611f988285611c3b565b9150611fa382611ee2565b9150611faf8284611c3b565b91508190509392505050565b60006060820190508181036000830152611fd58186611af6565b9050611fe46020830185611a89565b8181036040830152611ff68184611b89565b9050949350505050565b60006020820190506120156000830184611b6b565b92915050565b600060208201905081810360008301526120358184611c02565b905092915050565b6000602082019050818103600083015261205681611c6c565b9050919050565b6000602082019050818103600083015261207681611c8f565b9050919050565b6000602082019050818103600083015261209681611cb2565b9050919050565b600060208201905081810360008301526120b681611cd5565b9050919050565b600060208201905081810360008301526120d681611cf8565b9050919050565b600060208201905081810360008301526120f681611d1b565b9050919050565b6000602082019050818103600083015261211681611d3e565b9050919050565b6000602082019050818103600083015261213681611d61565b9050919050565b6000602082019050818103600083015261215681611d84565b9050919050565b6000602082019050818103600083015261217681611da7565b9050919050565b6000602082019050818103600083015261219681611dca565b9050919050565b600060208201905081810360008301526121b681611ded565b9050919050565b600060208201905081810360008301526121d681611e10565b9050919050565b600060208201905081810360008301526121f681611e33565b9050919050565b6000602082019050818103600083015261221681611e56565b9050919050565b6000602082019050818103600083015261223681611e9c565b9050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600061230882612428565b915061231383612428565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612348576123476124ea565b5b828201905092915050565b600061235e82612428565b915061236983612428565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156123a2576123a16124ea565b5b828202905092915050565b60006123b882612408565b9050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600081905061240382612a2c565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061243d826123f5565b9050919050565b60005b83811015612462578082015181840152602081019050612447565b83811115612471576000848401525b50505050565b600061248282612428565b91506000821415612496576124956124ea565b5b600182039050919050565b60006124ac82612428565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156124df576124de6124ea565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000601f19601f8301169050919050565b7f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860008201527f3029206275745f63616c6c64617461206973206e6f7420656d70747900000000602082015250565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b7f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560008201527f7665727465640000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660008201527f6163657420746f20637574000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360008201527f74696f6e207468617420646f65736e2774206578697374000000000000000000602082015250565b7f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560008201527f74416374696f6e00000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260008201527f6563697069656e74206d61792068617665207265766572746564000000000000602082015250565b7f416464726573733a20696e73756666696369656e742062616c616e6365000000600082015250565b7f4469616d6f6e643a2046756e6374696f6e20646f6573206e6f74206578697374600082015250565b7f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460008201527f7920627574205f696e6974206973206e6f742061646472657373283029000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560008201527f7461626c652066756e6374696f6e000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60008201527f6e207468617420616c7265616479206578697374730000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60008201527f6374696f6e20776974682073616d652066756e6374696f6e0000000000000000602082015250565b7f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260008201527f657373206d757374206265206164647265737328302900000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774207265706c61636520696d6d60008201527f757461626c652066756e6374696f6e0000000000000000000000000000000000602082015250565b50565b7f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60008201527f6374696f6e207468617420646f65736e27742065786973740000000000000000602082015250565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b60038110612a3d57612a3c612519565b5b5056fe4c69624469616d6f6e644375743a2041646420666163657420686173206e6f20636f64654c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a205265706c61636520666163657420686173206e6f20636f6465a2646970667358221220bdcac78b5a2d2075c52f3a71afc4b677edc0c1e6cd45749934878e87a98629f864736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000ecdd8dc24b3d7a93a29b06f3fb6fcf03a370a77
-----Decoded View---------------
Arg [0] : _diamondCutFacet (address): 0x0eCDD8dc24b3D7a93A29b06F3fb6FCF03a370a77
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000ecdd8dc24b3d7a93a29b06f3fb6fcf03a370a77
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ 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.