More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 34 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Transfer | 16539289 | 568 days ago | IN | 0 ETH | 0.00132631 | ||||
Transfer | 16472092 | 577 days ago | IN | 0 ETH | 0.00124551 | ||||
Transfer | 16471213 | 577 days ago | IN | 0 ETH | 0.00207648 | ||||
Transfer | 16470524 | 577 days ago | IN | 0 ETH | 0.00120416 | ||||
Transfer | 16435595 | 582 days ago | IN | 0 ETH | 0.00331609 | ||||
Transfer | 16429487 | 583 days ago | IN | 0 ETH | 0.00212418 | ||||
Transfer | 16406689 | 586 days ago | IN | 0 ETH | 0.00145565 | ||||
Transfer | 16405995 | 586 days ago | IN | 0 ETH | 0.00157681 | ||||
Transfer | 16399976 | 587 days ago | IN | 0 ETH | 0.00212541 | ||||
Transfer | 16393614 | 588 days ago | IN | 0 ETH | 0.00389867 | ||||
Transfer | 16389590 | 589 days ago | IN | 0 ETH | 0.00109387 | ||||
Withdraw Amount | 16386087 | 589 days ago | IN | 0 ETH | 0.00119407 | ||||
Withdraw Amount | 16386079 | 589 days ago | IN | 0 ETH | 0.00119517 | ||||
Withdraw Amount | 16386079 | 589 days ago | IN | 0 ETH | 0.00119485 | ||||
Transfer Ownersh... | 16378884 | 590 days ago | IN | 0 ETH | 0.0052225 | ||||
Transfer | 16370897 | 591 days ago | IN | 0 ETH | 0.00202497 | ||||
Transfer | 16370861 | 591 days ago | IN | 0 ETH | 0.00475386 | ||||
Transfer | 16255630 | 607 days ago | IN | 0 ETH | 0.00065672 | ||||
Transfer | 16243839 | 609 days ago | IN | 0 ETH | 0.00068758 | ||||
Transfer | 16228505 | 611 days ago | IN | 0 ETH | 0.00089227 | ||||
Transfer | 16200251 | 615 days ago | IN | 0 ETH | 0.0021332 | ||||
Transfer | 16182084 | 618 days ago | IN | 0 ETH | 0.00081624 | ||||
Transfer | 16182051 | 618 days ago | IN | 0 ETH | 0.00112811 | ||||
Transfer | 16105257 | 628 days ago | IN | 0 ETH | 0.00083632 | ||||
Transfer | 16054718 | 635 days ago | IN | 0 ETH | 0.00061575 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
Settlement
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.13; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/Address.sol"; contract Settlement is AccessControlEnumerable, ReentrancyGuard, Pausable { using SafeERC20 for IERC20; using Address for address; address private _owner; string public name = "CryptoFundMeSettlement"; event Transfer(address indexed _to, uint256 _value); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); // New role for transfering funds bytes32 public constant TRANSFER_ROLE = keccak256("TRANSFER_ROLE"); // New role for withdrawing funds bytes32 public constant WITHDRAW_ROLE = keccak256("WITHDRAW_ROLE"); constructor() { _owner = msg.sender; _setupRole(DEFAULT_ADMIN_ROLE, _owner); _setupRole(TRANSFER_ROLE, _owner); _setupRole(WITHDRAW_ROLE, _owner); } function _transfer(address stable_type, address _to, uint256 _value) private nonReentrant whenNotPaused returns (bool success) { IERC20(stable_type).safeTransfer(_to, _value); emit Transfer(_to, _value); return true; } // Transfer tokens to a specified address function transfer(address stable_type, address _to, uint256 _value) external onlyRole(TRANSFER_ROLE) returns (bool success) { require(_value > 0, "Value must be greater than 0"); return _transfer(stable_type, _to, _value); } function getStableBalance(address stable_type) public view onlyRole(WITHDRAW_ROLE) returns (uint256 amount){ IERC20 token = IERC20(address(stable_type)); // this contract's address address _contract = address(this); return token.balanceOf(_contract); } // withdraw amount to owner address function withdrawAmount(address stable_type, uint256 amount) public onlyRole(WITHDRAW_ROLE) returns (bool success){ require(amount > 0, "Amount must be greater than 0"); IERC20 token = IERC20(address(stable_type)); token.safeTransfer(_owner, amount); return true; } // withdraw entire balance of a stable coin to owner address function withdrawBalance(address stable_type) public onlyRole(WITHDRAW_ROLE) returns (bool success){ IERC20 token = IERC20(address(stable_type)); uint256 amount = token.balanceOf(address(this)); token.safeTransfer(_owner, amount); return true; } /********** ACCESS CONTROL **********/ // transfer ownership of the contract function transferOwnership(address newOwner) public onlyRole(DEFAULT_ADMIN_ROLE) returns (bool success){ // previous owner address oldOwner = _owner; _owner = newOwner; // set new owner as admin _setupRole(DEFAULT_ADMIN_ROLE, newOwner); // set new owner as transfer role _setupRole(TRANSFER_ROLE, newOwner); // set new owner as withdraw role _setupRole(WITHDRAW_ROLE, newOwner); emit OwnershipTransferred(oldOwner, newOwner); return true; } // get all addresses with a specific role function getRoleMembers(bytes32 role) public view onlyRole(DEFAULT_ADMIN_ROLE) returns (address[] memory){ // get number of members uint256 numMembers = getRoleMemberCount(role); // create array of addresses address[] memory members = new address[](numMembers); // get all members for (uint256 i = 0; i < numMembers; i++) { members[i] = getRoleMember(role, i); } return members; } // add an address to a admin role function addAdmin(address newAdmin) public onlyRole(DEFAULT_ADMIN_ROLE) returns (bool success){ _setupRole(DEFAULT_ADMIN_ROLE, newAdmin); return true; } // remove an address from an admin role function removeAdmin(address admin) public onlyRole(DEFAULT_ADMIN_ROLE) returns (bool success){ revokeRole(DEFAULT_ADMIN_ROLE, admin); return true; } // add an address to a transfer role function addTransferer(address newTransferer) public onlyRole(DEFAULT_ADMIN_ROLE) returns (bool success){ _setupRole(TRANSFER_ROLE, newTransferer); return true; } // remove an address from a transfer role function removeTransferer(address transferer) public onlyRole(DEFAULT_ADMIN_ROLE) returns (bool success){ revokeRole(TRANSFER_ROLE, transferer); return true; } // add an address to a withdraw role function addWithdrawer(address newWithdrawer) public onlyRole(DEFAULT_ADMIN_ROLE) returns (bool success){ _setupRole(WITHDRAW_ROLE, newWithdrawer); return true; } // remove an address from a withdraw role function removeWithdrawer(address withdrawer) public onlyRole(DEFAULT_ADMIN_ROLE) returns (bool success){ revokeRole(WITHDRAW_ROLE, withdrawer); return true; } // get all addresses with admin role function getAdmins() public view onlyRole(DEFAULT_ADMIN_ROLE) returns (address[] memory){ // call getRoleMembers with admin role return getRoleMembers(DEFAULT_ADMIN_ROLE); } // get all addresses with transfer role function getTransferers() public view onlyRole(DEFAULT_ADMIN_ROLE) returns (address[] memory){ // call getRoleMembers with transfer role return getRoleMembers(TRANSFER_ROLE); } // get all addresses with withdraw role function getWithdrawers() public view onlyRole(DEFAULT_ADMIN_ROLE) returns (address[] memory){ // call getRoleMembers with withdraw role return getRoleMembers(WITHDRAW_ROLE); } // pause the contract function pause() public onlyRole(DEFAULT_ADMIN_ROLE) returns (bool success){ _pause(); return true; } // unpause the contract function unpause() public onlyRole(DEFAULT_ADMIN_ROLE) returns (bool success){ _unpause(); return true; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol) 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) { return _values(set._inner); } // 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 on 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 v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_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) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @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] = _HEX_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.7.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 functionCall(target, data, "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"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(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) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(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) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason 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 { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; /** * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. */ interface IAccessControlEnumerable is IAccessControl { /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) external view returns (address); /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @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. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControlEnumerable.sol"; import "./AccessControl.sol"; import "../utils/structs/EnumerableSet.sol"; /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl { using EnumerableSet for EnumerableSet.AddressSet; mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) { return _roleMembers[role].at(index); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) { return _roleMembers[role].length(); } /** * @dev Overload {_grantRole} to track enumerable memberships */ function _grantRole(bytes32 role, address account) internal virtual override { super._grantRole(role, account); _roleMembers[role].add(account); } /** * @dev Overload {_revokeRole} to track enumerable memberships */ function _revokeRole(bytes32 role, address account) internal virtual override { super._revokeRole(role, account); _roleMembers[role].remove(account); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.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. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required 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})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @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 virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @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. * * May emit a {RoleGranted} event. * * [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}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
{ "remappings": [], "optimizer": { "enabled": false, "runs": 200 }, "evmVersion": "london", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRANSFER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WITHDRAW_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"addAdmin","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newTransferer","type":"address"}],"name":"addTransferer","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newWithdrawer","type":"address"}],"name":"addWithdrawer","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAdmins","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMembers","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"stable_type","type":"address"}],"name":"getStableBalance","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTransferers","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWithdrawers","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"removeAdmin","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"transferer","type":"address"}],"name":"removeTransferer","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"withdrawer","type":"address"}],"name":"removeWithdrawer","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"stable_type","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"stable_type","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawAmount","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"stable_type","type":"address"}],"name":"withdrawBalance","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526040518060400160405280601681526020017f43727970746f46756e644d65536574746c656d656e740000000000000000000081525060049080519060200190620000519291906200043f565b503480156200005f57600080fd5b5060016002819055506000600360006101000a81548160ff02191690831515021790555033600360016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620000fb6000801b600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16620001a960201b60201c565b6200014f7f8502233096d909befbda0999bb8ea2f3a6be3c138b9fbf003752a4c8bce86f6c600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16620001a960201b60201c565b620001a37f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16620001a960201b60201c565b62000553565b620001bb8282620001bf60201b60201c565b5050565b620001d682826200020760201b6200110b1760201c565b620002028160016000858152602001908152602001600020620002f860201b620011eb1790919060201c565b505050565b6200021982826200033060201b60201c565b620002f457600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550620002996200039a60201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600062000328836000018373ffffffffffffffffffffffffffffffffffffffff1660001b620003a260201b60201c565b905092915050565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600033905090565b6000620003b683836200041c60201b60201c565b6200041157826000018290806001815401808255809150506001900390600052602060002001600090919091909150558260000180549050836001016000848152602001908152602001600020819055506001905062000416565b600090505b92915050565b600080836001016000848152602001908152602001600020541415905092915050565b8280546200044d906200051e565b90600052602060002090601f016020900481019282620004715760008555620004bd565b82601f106200048c57805160ff1916838001178555620004bd565b82800160010185558215620004bd579182015b82811115620004bc5782518255916020019190600101906200049f565b5b509050620004cc9190620004d0565b5090565b5b80821115620004eb576000816000905550600101620004d1565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200053757607f821691505b6020821081036200054d576200054c620004ef565b5b50919050565b612d5b80620005636000396000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c8063711bd9eb11610104578063a217fddf116100a2578063ce2562ff11610071578063ce2562ff14610607578063d547741f14610625578063e02023a114610641578063f2fde38b1461065f576101da565b8063a217fddf14610559578063a3246ad314610577578063beabacc8146105a7578063ca15c873146105d7576101da565b80638456cb59116100de5780638456cb59146104bd5780638c6aaafe146104db5780639010d07c146104f957806391d1485414610529576101da565b8063711bd9eb1461042d578063736fe5651461045d578063756af45f1461048d576101da565b80632f2ff15d1161017c57806356788a8c1161014b57806356788a8c1461037f5780635c975abb146103af5780635e1be6bc146103cd57806370480275146103fd576101da565b80632f2ff15d1461030b57806331ae450b1461032757806336568abe146103455780633f4ba83a14610361576101da565b80631785f53c116101b85780631785f53c1461025d578063206b60f91461028d578063248a9ca3146102ab5780632be24ac8146102db576101da565b806301ffc9a7146101df57806306fdde031461020f57806313da2a961461022d575b600080fd5b6101f960048036038101906101f49190611f27565b61068f565b6040516102069190611f6f565b60405180910390f35b610217610709565b6040516102249190612023565b60405180910390f35b610247600480360381019061024291906120a3565b610797565b60405161025491906120e9565b60405180910390f35b610277600480360381019061027291906120a3565b610851565b6040516102849190611f6f565b60405180910390f35b610295610877565b6040516102a2919061211d565b60405180910390f35b6102c560048036038101906102c09190612164565b61089b565b6040516102d2919061211d565b60405180910390f35b6102f560048036038101906102f091906120a3565b6108ba565b6040516103029190611f6f565b60405180910390f35b61032560048036038101906103209190612191565b6108fd565b005b61032f61091e565b60405161033c919061228f565b60405180910390f35b61035f600480360381019061035a9190612191565b61093f565b005b6103696109c2565b6040516103769190611f6f565b60405180910390f35b610399600480360381019061039491906120a3565b6109e1565b6040516103a69190611f6f565b60405180910390f35b6103b7610a24565b6040516103c49190611f6f565b60405180910390f35b6103e760048036038101906103e291906120a3565b610a3b565b6040516103f49190611f6f565b60405180910390f35b610417600480360381019061041291906120a3565b610a7e565b6040516104249190611f6f565b60405180910390f35b610447600480360381019061044291906120a3565b610aa4565b6040516104549190611f6f565b60405180910390f35b610477600480360381019061047291906122dd565b610ae7565b6040516104849190611f6f565b60405180910390f35b6104a760048036038101906104a291906120a3565b610bb4565b6040516104b49190611f6f565b60405180910390f35b6104c5610cbc565b6040516104d29190611f6f565b60405180910390f35b6104e3610cdb565b6040516104f0919061228f565b60405180910390f35b610513600480360381019061050e919061231d565b610d19565b604051610520919061236c565b60405180910390f35b610543600480360381019061053e9190612191565b610d48565b6040516105509190611f6f565b60405180910390f35b610561610db2565b60405161056e919061211d565b60405180910390f35b610591600480360381019061058c9190612164565b610db9565b60405161059e919061228f565b60405180910390f35b6105c160048036038101906105bc9190612387565b610ea3565b6040516105ce9190611f6f565b60405180910390f35b6105f160048036038101906105ec9190612164565b610f27565b6040516105fe91906120e9565b60405180910390f35b61060f610f4b565b60405161061c919061228f565b60405180910390f35b61063f600480360381019061063a9190612191565b610f89565b005b610649610faa565b604051610656919061211d565b60405180910390f35b610679600480360381019061067491906120a3565b610fce565b6040516106869190611f6f565b60405180910390f35b60007f5a05180f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061070257506107018261121b565b5b9050919050565b6004805461071690612409565b80601f016020809104026020016040519081016040528092919081815260200182805461074290612409565b801561078f5780601f106107645761010080835404028352916020019161078f565b820191906000526020600020905b81548152906001019060200180831161077257829003601f168201915b505050505081565b60007f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec6107c381611295565b600083905060003090508173ffffffffffffffffffffffffffffffffffffffff166370a08231826040518263ffffffff1660e01b8152600401610806919061236c565b602060405180830381865afa158015610823573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610847919061244f565b9350505050919050565b60008060001b61086081611295565b61086d6000801b84610f89565b6001915050919050565b7f8502233096d909befbda0999bb8ea2f3a6be3c138b9fbf003752a4c8bce86f6c81565b6000806000838152602001908152602001600020600101549050919050565b60008060001b6108c981611295565b6108f37f8502233096d909befbda0999bb8ea2f3a6be3c138b9fbf003752a4c8bce86f6c846112a9565b6001915050919050565b6109068261089b565b61090f81611295565b61091983836112b7565b505050565b60606000801b61092d81611295565b6109396000801b610db9565b91505090565b6109476112eb565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146109b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ab906124ee565b60405180910390fd5b6109be82826112f3565b5050565b60008060001b6109d181611295565b6109d9611327565b600191505090565b60008060001b6109f081611295565b610a1a7f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec846112a9565b6001915050919050565b6000600360009054906101000a900460ff16905090565b60008060001b610a4a81611295565b610a747f8502233096d909befbda0999bb8ea2f3a6be3c138b9fbf003752a4c8bce86f6c84610f89565b6001915050919050565b60008060001b610a8d81611295565b610a9a6000801b846112a9565b6001915050919050565b60008060001b610ab381611295565b610add7f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec84610f89565b6001915050919050565b60007f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec610b1381611295565b60008311610b56576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b4d9061255a565b60405180910390fd5b6000849050610ba8600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858373ffffffffffffffffffffffffffffffffffffffff1661138a9092919063ffffffff16565b60019250505092915050565b60007f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec610be081611295565b600083905060008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610c20919061236c565b602060405180830381865afa158015610c3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c61919061244f565b9050610cb0600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828473ffffffffffffffffffffffffffffffffffffffff1661138a9092919063ffffffff16565b60019350505050919050565b60008060001b610ccb81611295565b610cd3611410565b600191505090565b60606000801b610cea81611295565b610d137f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec610db9565b91505090565b6000610d40826001600086815260200190815260200160002061147390919063ffffffff16565b905092915050565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6000801b81565b60606000801b610dc881611295565b6000610dd384610f27565b905060008167ffffffffffffffff811115610df157610df061257a565b5b604051908082528060200260200182016040528015610e1f5781602001602082028036833780820191505090505b50905060005b82811015610e9757610e378682610d19565b828281518110610e4a57610e496125a9565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508080610e8f90612607565b915050610e25565b50809350505050919050565b60007f8502233096d909befbda0999bb8ea2f3a6be3c138b9fbf003752a4c8bce86f6c610ecf81611295565b60008311610f12576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f099061269b565b60405180910390fd5b610f1d85858561148d565b9150509392505050565b6000610f446001600084815260200190815260200160002061156e565b9050919050565b60606000801b610f5a81611295565b610f837f8502233096d909befbda0999bb8ea2f3a6be3c138b9fbf003752a4c8bce86f6c610db9565b91505090565b610f928261089b565b610f9b81611295565b610fa583836112f3565b505050565b7f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec81565b60008060001b610fdd81611295565b6000600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905083600360016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506110526000801b856112a9565b61107c7f8502233096d909befbda0999bb8ea2f3a6be3c138b9fbf003752a4c8bce86f6c856112a9565b6110a67f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec856112a9565b8373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600192505050919050565b6111158282610d48565b6111e757600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555061118c6112eb565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000611213836000018373ffffffffffffffffffffffffffffffffffffffff1660001b611583565b905092915050565b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061128e575061128d826115f3565b5b9050919050565b6112a6816112a16112eb565b61165d565b50565b6112b382826112b7565b5050565b6112c1828261110b565b6112e681600160008581526020019081526020016000206111eb90919063ffffffff16565b505050565b600033905090565b6112fd82826116fa565b61132281600160008581526020019081526020016000206117db90919063ffffffff16565b505050565b61132f61180b565b6000600360006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6113736112eb565b604051611380919061236c565b60405180910390a1565b61140b8363a9059cbb60e01b84846040516024016113a99291906126bb565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611854565b505050565b61141861191b565b6001600360006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861145c6112eb565b604051611469919061236c565b60405180910390a1565b60006114828360000183611965565b60001c905092915050565b600060028054036114d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ca90612730565b60405180910390fd5b600280819055506114e261191b565b61150d83838673ffffffffffffffffffffffffffffffffffffffff1661138a9092919063ffffffff16565b8273ffffffffffffffffffffffffffffffffffffffff167f69ca02dd4edd7bf0a4abb9ed3b7af3f14778db5d61921c7dc7cd545266326de28360405161155391906120e9565b60405180910390a26001905060016002819055509392505050565b600061157c82600001611990565b9050919050565b600061158f83836119a1565b6115e85782600001829080600181540180825580915050600190039060005260206000200160009091909190915055826000018054905083600101600084815260200190815260200160002081905550600190506115ed565b600090505b92915050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6116678282610d48565b6116f65761168c8173ffffffffffffffffffffffffffffffffffffffff1660146119c4565b61169a8360001c60206119c4565b6040516020016116ab929190612824565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ed9190612023565b60405180910390fd5b5050565b6117048282610d48565b156117d757600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555061177c6112eb565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b6000611803836000018373ffffffffffffffffffffffffffffffffffffffff1660001b611c00565b905092915050565b611813610a24565b611852576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611849906128aa565b60405180910390fd5b565b60006118b6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611d149092919063ffffffff16565b905060008151111561191657808060200190518101906118d691906128f6565b611915576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161190c90612995565b60405180910390fd5b5b505050565b611923610a24565b15611963576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161195a90612a01565b60405180910390fd5b565b600082600001828154811061197d5761197c6125a9565b5b9060005260206000200154905092915050565b600081600001805490509050919050565b600080836001016000848152602001908152602001600020541415905092915050565b6060600060028360026119d79190612a21565b6119e19190612a7b565b67ffffffffffffffff8111156119fa576119f961257a565b5b6040519080825280601f01601f191660200182016040528015611a2c5781602001600182028036833780820191505090505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110611a6457611a636125a9565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611ac857611ac76125a9565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006001846002611b089190612a21565b611b129190612a7b565b90505b6001811115611bb2577f3031323334353637383961626364656600000000000000000000000000000000600f861660108110611b5457611b536125a9565b5b1a60f81b828281518110611b6b57611b6a6125a9565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c945080611bab90612ad1565b9050611b15565b5060008414611bf6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bed90612b46565b60405180910390fd5b8091505092915050565b60008083600101600084815260200190815260200160002054905060008114611d08576000600182611c329190612b66565b9050600060018660000180549050611c4a9190612b66565b9050818114611cb9576000866000018281548110611c6b57611c6a6125a9565b5b9060005260206000200154905080876000018481548110611c8f57611c8e6125a9565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b85600001805480611ccd57611ccc612b9a565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050611d0e565b60009150505b92915050565b6060611d238484600085611d2c565b90509392505050565b606082471015611d71576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d6890612c3b565b60405180910390fd5b611d7a85611e40565b611db9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611db090612ca7565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611de29190612d0e565b60006040518083038185875af1925050503d8060008114611e1f576040519150601f19603f3d011682016040523d82523d6000602084013e611e24565b606091505b5091509150611e34828286611e63565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60608315611e7357829050611ec3565b600083511115611e865782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eba9190612023565b60405180910390fd5b9392505050565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611f0481611ecf565b8114611f0f57600080fd5b50565b600081359050611f2181611efb565b92915050565b600060208284031215611f3d57611f3c611eca565b5b6000611f4b84828501611f12565b91505092915050565b60008115159050919050565b611f6981611f54565b82525050565b6000602082019050611f846000830184611f60565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611fc4578082015181840152602081019050611fa9565b83811115611fd3576000848401525b50505050565b6000601f19601f8301169050919050565b6000611ff582611f8a565b611fff8185611f95565b935061200f818560208601611fa6565b61201881611fd9565b840191505092915050565b6000602082019050818103600083015261203d8184611fea565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061207082612045565b9050919050565b61208081612065565b811461208b57600080fd5b50565b60008135905061209d81612077565b92915050565b6000602082840312156120b9576120b8611eca565b5b60006120c78482850161208e565b91505092915050565b6000819050919050565b6120e3816120d0565b82525050565b60006020820190506120fe60008301846120da565b92915050565b6000819050919050565b61211781612104565b82525050565b6000602082019050612132600083018461210e565b92915050565b61214181612104565b811461214c57600080fd5b50565b60008135905061215e81612138565b92915050565b60006020828403121561217a57612179611eca565b5b60006121888482850161214f565b91505092915050565b600080604083850312156121a8576121a7611eca565b5b60006121b68582860161214f565b92505060206121c78582860161208e565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61220681612065565b82525050565b600061221883836121fd565b60208301905092915050565b6000602082019050919050565b600061223c826121d1565b61224681856121dc565b9350612251836121ed565b8060005b83811015612282578151612269888261220c565b975061227483612224565b925050600181019050612255565b5085935050505092915050565b600060208201905081810360008301526122a98184612231565b905092915050565b6122ba816120d0565b81146122c557600080fd5b50565b6000813590506122d7816122b1565b92915050565b600080604083850312156122f4576122f3611eca565b5b60006123028582860161208e565b9250506020612313858286016122c8565b9150509250929050565b6000806040838503121561233457612333611eca565b5b60006123428582860161214f565b9250506020612353858286016122c8565b9150509250929050565b61236681612065565b82525050565b6000602082019050612381600083018461235d565b92915050565b6000806000606084860312156123a05761239f611eca565b5b60006123ae8682870161208e565b93505060206123bf8682870161208e565b92505060406123d0868287016122c8565b9150509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061242157607f821691505b602082108103612434576124336123da565b5b50919050565b600081519050612449816122b1565b92915050565b60006020828403121561246557612464611eca565b5b60006124738482850161243a565b91505092915050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b60006124d8602f83611f95565b91506124e38261247c565b604082019050919050565b60006020820190508181036000830152612507816124cb565b9050919050565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b6000612544601d83611f95565b915061254f8261250e565b602082019050919050565b6000602082019050818103600083015261257381612537565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612612826120d0565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612644576126436125d8565b5b600182019050919050565b7f56616c7565206d7573742062652067726561746572207468616e203000000000600082015250565b6000612685601c83611f95565b91506126908261264f565b602082019050919050565b600060208201905081810360008301526126b481612678565b9050919050565b60006040820190506126d0600083018561235d565b6126dd60208301846120da565b9392505050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b600061271a601f83611f95565b9150612725826126e4565b602082019050919050565b600060208201905081810360008301526127498161270d565b9050919050565b600081905092915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b6000612791601783612750565b915061279c8261275b565b601782019050919050565b60006127b282611f8a565b6127bc8185612750565b93506127cc818560208601611fa6565b80840191505092915050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b600061280e601183612750565b9150612819826127d8565b601182019050919050565b600061282f82612784565b915061283b82856127a7565b915061284682612801565b915061285282846127a7565b91508190509392505050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b6000612894601483611f95565b915061289f8261285e565b602082019050919050565b600060208201905081810360008301526128c381612887565b9050919050565b6128d381611f54565b81146128de57600080fd5b50565b6000815190506128f0816128ca565b92915050565b60006020828403121561290c5761290b611eca565b5b600061291a848285016128e1565b91505092915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b600061297f602a83611f95565b915061298a82612923565b604082019050919050565b600060208201905081810360008301526129ae81612972565b9050919050565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b60006129eb601083611f95565b91506129f6826129b5565b602082019050919050565b60006020820190508181036000830152612a1a816129de565b9050919050565b6000612a2c826120d0565b9150612a37836120d0565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612a7057612a6f6125d8565b5b828202905092915050565b6000612a86826120d0565b9150612a91836120d0565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612ac657612ac56125d8565b5b828201905092915050565b6000612adc826120d0565b915060008203612aef57612aee6125d8565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b6000612b30602083611f95565b9150612b3b82612afa565b602082019050919050565b60006020820190508181036000830152612b5f81612b23565b9050919050565b6000612b71826120d0565b9150612b7c836120d0565b925082821015612b8f57612b8e6125d8565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b6000612c25602683611f95565b9150612c3082612bc9565b604082019050919050565b60006020820190508181036000830152612c5481612c18565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b6000612c91601d83611f95565b9150612c9c82612c5b565b602082019050919050565b60006020820190508181036000830152612cc081612c84565b9050919050565b600081519050919050565b600081905092915050565b6000612ce882612cc7565b612cf28185612cd2565b9350612d02818560208601611fa6565b80840191505092915050565b6000612d1a8284612cdd565b91508190509291505056fea2646970667358221220be5b1cd7cecd6ba561c786b5897ccd5d43ea280c4348502598830c365a96186364736f6c634300080d0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101da5760003560e01c8063711bd9eb11610104578063a217fddf116100a2578063ce2562ff11610071578063ce2562ff14610607578063d547741f14610625578063e02023a114610641578063f2fde38b1461065f576101da565b8063a217fddf14610559578063a3246ad314610577578063beabacc8146105a7578063ca15c873146105d7576101da565b80638456cb59116100de5780638456cb59146104bd5780638c6aaafe146104db5780639010d07c146104f957806391d1485414610529576101da565b8063711bd9eb1461042d578063736fe5651461045d578063756af45f1461048d576101da565b80632f2ff15d1161017c57806356788a8c1161014b57806356788a8c1461037f5780635c975abb146103af5780635e1be6bc146103cd57806370480275146103fd576101da565b80632f2ff15d1461030b57806331ae450b1461032757806336568abe146103455780633f4ba83a14610361576101da565b80631785f53c116101b85780631785f53c1461025d578063206b60f91461028d578063248a9ca3146102ab5780632be24ac8146102db576101da565b806301ffc9a7146101df57806306fdde031461020f57806313da2a961461022d575b600080fd5b6101f960048036038101906101f49190611f27565b61068f565b6040516102069190611f6f565b60405180910390f35b610217610709565b6040516102249190612023565b60405180910390f35b610247600480360381019061024291906120a3565b610797565b60405161025491906120e9565b60405180910390f35b610277600480360381019061027291906120a3565b610851565b6040516102849190611f6f565b60405180910390f35b610295610877565b6040516102a2919061211d565b60405180910390f35b6102c560048036038101906102c09190612164565b61089b565b6040516102d2919061211d565b60405180910390f35b6102f560048036038101906102f091906120a3565b6108ba565b6040516103029190611f6f565b60405180910390f35b61032560048036038101906103209190612191565b6108fd565b005b61032f61091e565b60405161033c919061228f565b60405180910390f35b61035f600480360381019061035a9190612191565b61093f565b005b6103696109c2565b6040516103769190611f6f565b60405180910390f35b610399600480360381019061039491906120a3565b6109e1565b6040516103a69190611f6f565b60405180910390f35b6103b7610a24565b6040516103c49190611f6f565b60405180910390f35b6103e760048036038101906103e291906120a3565b610a3b565b6040516103f49190611f6f565b60405180910390f35b610417600480360381019061041291906120a3565b610a7e565b6040516104249190611f6f565b60405180910390f35b610447600480360381019061044291906120a3565b610aa4565b6040516104549190611f6f565b60405180910390f35b610477600480360381019061047291906122dd565b610ae7565b6040516104849190611f6f565b60405180910390f35b6104a760048036038101906104a291906120a3565b610bb4565b6040516104b49190611f6f565b60405180910390f35b6104c5610cbc565b6040516104d29190611f6f565b60405180910390f35b6104e3610cdb565b6040516104f0919061228f565b60405180910390f35b610513600480360381019061050e919061231d565b610d19565b604051610520919061236c565b60405180910390f35b610543600480360381019061053e9190612191565b610d48565b6040516105509190611f6f565b60405180910390f35b610561610db2565b60405161056e919061211d565b60405180910390f35b610591600480360381019061058c9190612164565b610db9565b60405161059e919061228f565b60405180910390f35b6105c160048036038101906105bc9190612387565b610ea3565b6040516105ce9190611f6f565b60405180910390f35b6105f160048036038101906105ec9190612164565b610f27565b6040516105fe91906120e9565b60405180910390f35b61060f610f4b565b60405161061c919061228f565b60405180910390f35b61063f600480360381019061063a9190612191565b610f89565b005b610649610faa565b604051610656919061211d565b60405180910390f35b610679600480360381019061067491906120a3565b610fce565b6040516106869190611f6f565b60405180910390f35b60007f5a05180f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061070257506107018261121b565b5b9050919050565b6004805461071690612409565b80601f016020809104026020016040519081016040528092919081815260200182805461074290612409565b801561078f5780601f106107645761010080835404028352916020019161078f565b820191906000526020600020905b81548152906001019060200180831161077257829003601f168201915b505050505081565b60007f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec6107c381611295565b600083905060003090508173ffffffffffffffffffffffffffffffffffffffff166370a08231826040518263ffffffff1660e01b8152600401610806919061236c565b602060405180830381865afa158015610823573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610847919061244f565b9350505050919050565b60008060001b61086081611295565b61086d6000801b84610f89565b6001915050919050565b7f8502233096d909befbda0999bb8ea2f3a6be3c138b9fbf003752a4c8bce86f6c81565b6000806000838152602001908152602001600020600101549050919050565b60008060001b6108c981611295565b6108f37f8502233096d909befbda0999bb8ea2f3a6be3c138b9fbf003752a4c8bce86f6c846112a9565b6001915050919050565b6109068261089b565b61090f81611295565b61091983836112b7565b505050565b60606000801b61092d81611295565b6109396000801b610db9565b91505090565b6109476112eb565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146109b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ab906124ee565b60405180910390fd5b6109be82826112f3565b5050565b60008060001b6109d181611295565b6109d9611327565b600191505090565b60008060001b6109f081611295565b610a1a7f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec846112a9565b6001915050919050565b6000600360009054906101000a900460ff16905090565b60008060001b610a4a81611295565b610a747f8502233096d909befbda0999bb8ea2f3a6be3c138b9fbf003752a4c8bce86f6c84610f89565b6001915050919050565b60008060001b610a8d81611295565b610a9a6000801b846112a9565b6001915050919050565b60008060001b610ab381611295565b610add7f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec84610f89565b6001915050919050565b60007f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec610b1381611295565b60008311610b56576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b4d9061255a565b60405180910390fd5b6000849050610ba8600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858373ffffffffffffffffffffffffffffffffffffffff1661138a9092919063ffffffff16565b60019250505092915050565b60007f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec610be081611295565b600083905060008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610c20919061236c565b602060405180830381865afa158015610c3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c61919061244f565b9050610cb0600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828473ffffffffffffffffffffffffffffffffffffffff1661138a9092919063ffffffff16565b60019350505050919050565b60008060001b610ccb81611295565b610cd3611410565b600191505090565b60606000801b610cea81611295565b610d137f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec610db9565b91505090565b6000610d40826001600086815260200190815260200160002061147390919063ffffffff16565b905092915050565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6000801b81565b60606000801b610dc881611295565b6000610dd384610f27565b905060008167ffffffffffffffff811115610df157610df061257a565b5b604051908082528060200260200182016040528015610e1f5781602001602082028036833780820191505090505b50905060005b82811015610e9757610e378682610d19565b828281518110610e4a57610e496125a9565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508080610e8f90612607565b915050610e25565b50809350505050919050565b60007f8502233096d909befbda0999bb8ea2f3a6be3c138b9fbf003752a4c8bce86f6c610ecf81611295565b60008311610f12576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f099061269b565b60405180910390fd5b610f1d85858561148d565b9150509392505050565b6000610f446001600084815260200190815260200160002061156e565b9050919050565b60606000801b610f5a81611295565b610f837f8502233096d909befbda0999bb8ea2f3a6be3c138b9fbf003752a4c8bce86f6c610db9565b91505090565b610f928261089b565b610f9b81611295565b610fa583836112f3565b505050565b7f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec81565b60008060001b610fdd81611295565b6000600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905083600360016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506110526000801b856112a9565b61107c7f8502233096d909befbda0999bb8ea2f3a6be3c138b9fbf003752a4c8bce86f6c856112a9565b6110a67f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec856112a9565b8373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600192505050919050565b6111158282610d48565b6111e757600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555061118c6112eb565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000611213836000018373ffffffffffffffffffffffffffffffffffffffff1660001b611583565b905092915050565b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061128e575061128d826115f3565b5b9050919050565b6112a6816112a16112eb565b61165d565b50565b6112b382826112b7565b5050565b6112c1828261110b565b6112e681600160008581526020019081526020016000206111eb90919063ffffffff16565b505050565b600033905090565b6112fd82826116fa565b61132281600160008581526020019081526020016000206117db90919063ffffffff16565b505050565b61132f61180b565b6000600360006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6113736112eb565b604051611380919061236c565b60405180910390a1565b61140b8363a9059cbb60e01b84846040516024016113a99291906126bb565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611854565b505050565b61141861191b565b6001600360006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861145c6112eb565b604051611469919061236c565b60405180910390a1565b60006114828360000183611965565b60001c905092915050565b600060028054036114d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ca90612730565b60405180910390fd5b600280819055506114e261191b565b61150d83838673ffffffffffffffffffffffffffffffffffffffff1661138a9092919063ffffffff16565b8273ffffffffffffffffffffffffffffffffffffffff167f69ca02dd4edd7bf0a4abb9ed3b7af3f14778db5d61921c7dc7cd545266326de28360405161155391906120e9565b60405180910390a26001905060016002819055509392505050565b600061157c82600001611990565b9050919050565b600061158f83836119a1565b6115e85782600001829080600181540180825580915050600190039060005260206000200160009091909190915055826000018054905083600101600084815260200190815260200160002081905550600190506115ed565b600090505b92915050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6116678282610d48565b6116f65761168c8173ffffffffffffffffffffffffffffffffffffffff1660146119c4565b61169a8360001c60206119c4565b6040516020016116ab929190612824565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ed9190612023565b60405180910390fd5b5050565b6117048282610d48565b156117d757600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555061177c6112eb565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b6000611803836000018373ffffffffffffffffffffffffffffffffffffffff1660001b611c00565b905092915050565b611813610a24565b611852576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611849906128aa565b60405180910390fd5b565b60006118b6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611d149092919063ffffffff16565b905060008151111561191657808060200190518101906118d691906128f6565b611915576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161190c90612995565b60405180910390fd5b5b505050565b611923610a24565b15611963576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161195a90612a01565b60405180910390fd5b565b600082600001828154811061197d5761197c6125a9565b5b9060005260206000200154905092915050565b600081600001805490509050919050565b600080836001016000848152602001908152602001600020541415905092915050565b6060600060028360026119d79190612a21565b6119e19190612a7b565b67ffffffffffffffff8111156119fa576119f961257a565b5b6040519080825280601f01601f191660200182016040528015611a2c5781602001600182028036833780820191505090505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110611a6457611a636125a9565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611ac857611ac76125a9565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006001846002611b089190612a21565b611b129190612a7b565b90505b6001811115611bb2577f3031323334353637383961626364656600000000000000000000000000000000600f861660108110611b5457611b536125a9565b5b1a60f81b828281518110611b6b57611b6a6125a9565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c945080611bab90612ad1565b9050611b15565b5060008414611bf6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bed90612b46565b60405180910390fd5b8091505092915050565b60008083600101600084815260200190815260200160002054905060008114611d08576000600182611c329190612b66565b9050600060018660000180549050611c4a9190612b66565b9050818114611cb9576000866000018281548110611c6b57611c6a6125a9565b5b9060005260206000200154905080876000018481548110611c8f57611c8e6125a9565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b85600001805480611ccd57611ccc612b9a565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050611d0e565b60009150505b92915050565b6060611d238484600085611d2c565b90509392505050565b606082471015611d71576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d6890612c3b565b60405180910390fd5b611d7a85611e40565b611db9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611db090612ca7565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611de29190612d0e565b60006040518083038185875af1925050503d8060008114611e1f576040519150601f19603f3d011682016040523d82523d6000602084013e611e24565b606091505b5091509150611e34828286611e63565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60608315611e7357829050611ec3565b600083511115611e865782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eba9190612023565b60405180910390fd5b9392505050565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611f0481611ecf565b8114611f0f57600080fd5b50565b600081359050611f2181611efb565b92915050565b600060208284031215611f3d57611f3c611eca565b5b6000611f4b84828501611f12565b91505092915050565b60008115159050919050565b611f6981611f54565b82525050565b6000602082019050611f846000830184611f60565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611fc4578082015181840152602081019050611fa9565b83811115611fd3576000848401525b50505050565b6000601f19601f8301169050919050565b6000611ff582611f8a565b611fff8185611f95565b935061200f818560208601611fa6565b61201881611fd9565b840191505092915050565b6000602082019050818103600083015261203d8184611fea565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061207082612045565b9050919050565b61208081612065565b811461208b57600080fd5b50565b60008135905061209d81612077565b92915050565b6000602082840312156120b9576120b8611eca565b5b60006120c78482850161208e565b91505092915050565b6000819050919050565b6120e3816120d0565b82525050565b60006020820190506120fe60008301846120da565b92915050565b6000819050919050565b61211781612104565b82525050565b6000602082019050612132600083018461210e565b92915050565b61214181612104565b811461214c57600080fd5b50565b60008135905061215e81612138565b92915050565b60006020828403121561217a57612179611eca565b5b60006121888482850161214f565b91505092915050565b600080604083850312156121a8576121a7611eca565b5b60006121b68582860161214f565b92505060206121c78582860161208e565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61220681612065565b82525050565b600061221883836121fd565b60208301905092915050565b6000602082019050919050565b600061223c826121d1565b61224681856121dc565b9350612251836121ed565b8060005b83811015612282578151612269888261220c565b975061227483612224565b925050600181019050612255565b5085935050505092915050565b600060208201905081810360008301526122a98184612231565b905092915050565b6122ba816120d0565b81146122c557600080fd5b50565b6000813590506122d7816122b1565b92915050565b600080604083850312156122f4576122f3611eca565b5b60006123028582860161208e565b9250506020612313858286016122c8565b9150509250929050565b6000806040838503121561233457612333611eca565b5b60006123428582860161214f565b9250506020612353858286016122c8565b9150509250929050565b61236681612065565b82525050565b6000602082019050612381600083018461235d565b92915050565b6000806000606084860312156123a05761239f611eca565b5b60006123ae8682870161208e565b93505060206123bf8682870161208e565b92505060406123d0868287016122c8565b9150509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061242157607f821691505b602082108103612434576124336123da565b5b50919050565b600081519050612449816122b1565b92915050565b60006020828403121561246557612464611eca565b5b60006124738482850161243a565b91505092915050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b60006124d8602f83611f95565b91506124e38261247c565b604082019050919050565b60006020820190508181036000830152612507816124cb565b9050919050565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b6000612544601d83611f95565b915061254f8261250e565b602082019050919050565b6000602082019050818103600083015261257381612537565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612612826120d0565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612644576126436125d8565b5b600182019050919050565b7f56616c7565206d7573742062652067726561746572207468616e203000000000600082015250565b6000612685601c83611f95565b91506126908261264f565b602082019050919050565b600060208201905081810360008301526126b481612678565b9050919050565b60006040820190506126d0600083018561235d565b6126dd60208301846120da565b9392505050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b600061271a601f83611f95565b9150612725826126e4565b602082019050919050565b600060208201905081810360008301526127498161270d565b9050919050565b600081905092915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b6000612791601783612750565b915061279c8261275b565b601782019050919050565b60006127b282611f8a565b6127bc8185612750565b93506127cc818560208601611fa6565b80840191505092915050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b600061280e601183612750565b9150612819826127d8565b601182019050919050565b600061282f82612784565b915061283b82856127a7565b915061284682612801565b915061285282846127a7565b91508190509392505050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b6000612894601483611f95565b915061289f8261285e565b602082019050919050565b600060208201905081810360008301526128c381612887565b9050919050565b6128d381611f54565b81146128de57600080fd5b50565b6000815190506128f0816128ca565b92915050565b60006020828403121561290c5761290b611eca565b5b600061291a848285016128e1565b91505092915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b600061297f602a83611f95565b915061298a82612923565b604082019050919050565b600060208201905081810360008301526129ae81612972565b9050919050565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b60006129eb601083611f95565b91506129f6826129b5565b602082019050919050565b60006020820190508181036000830152612a1a816129de565b9050919050565b6000612a2c826120d0565b9150612a37836120d0565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612a7057612a6f6125d8565b5b828202905092915050565b6000612a86826120d0565b9150612a91836120d0565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612ac657612ac56125d8565b5b828201905092915050565b6000612adc826120d0565b915060008203612aef57612aee6125d8565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b6000612b30602083611f95565b9150612b3b82612afa565b602082019050919050565b60006020820190508181036000830152612b5f81612b23565b9050919050565b6000612b71826120d0565b9150612b7c836120d0565b925082821015612b8f57612b8e6125d8565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b6000612c25602683611f95565b9150612c3082612bc9565b604082019050919050565b60006020820190508181036000830152612c5481612c18565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b6000612c91601d83611f95565b9150612c9c82612c5b565b602082019050919050565b60006020820190508181036000830152612cc081612c84565b9050919050565b600081519050919050565b600081905092915050565b6000612ce882612cc7565b612cf28185612cd2565b9350612d02818560208601611fa6565b80840191505092915050565b6000612d1a8284612cdd565b91508190509291505056fea2646970667358221220be5b1cd7cecd6ba561c786b5897ccd5d43ea280c4348502598830c365a96186364736f6c634300080d0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $0.999911 | 1.9 | $1.9 |
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.