ERC-20
DeFi
Overview
Max Total Supply
975,000,000 $BTORO
Holders
2,479 (0.00%)
Market
Price
$0.0046 @ 0.000002 ETH (-2.54%)
Onchain Market Cap
$4,507,649.25
Circulating Supply Market Cap
$913,122.00
Other Info
Token Contract (WITH 18 Decimals)
Balance
384 $BTOROValue
$1.78 ( ~0.000662297678668802 ETH) [0.0000%]Loading...
Loading
Loading...
Loading
Loading...
Loading
Contract Name:
ERC20
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 100 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BSL-1.1 // Copyright (c) // All rights reserved. // This software is released under the Business Source License 1.1. // For full license terms, see the LICENSE file. pragma solidity ^0.8.19; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/EIP712.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/utils/Arrays.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Address.sol"; /// @notice Modern and gas efficient ERC20 + EIP-2612 implementation. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol) /// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol) /// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it. contract ERC20 is EIP712, Pausable{ using Address for address; using ECDSA for bytes32; /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event Transfer(address indexed from, address indexed to, uint256 amount); event Approval(address indexed owner, address indexed spender, uint256 amount); /*////////////////////////////////////////////////////////////// METADATA STORAGE //////////////////////////////////////////////////////////////*/ string public name; string public symbol; string public logo; uint8 public immutable decimals; // Contract owner address public _owner; mapping(address => uint256) public nonces; /*////////////////////////////////////////////////////////////// ERC20 STORAGE //////////////////////////////////////////////////////////////*/ uint256 public totalSupply; mapping(address => uint256) public balanceOf; mapping(address => mapping(address => uint256)) public _allowance; /*////////////////////////////////////////////////////////////// EIP-2612 STORAGE //////////////////////////////////////////////////////////////*/ bool public immutable _mintable; bool public immutable _burnable; address public backupOwner; error Error_Invalid_Owner_Address(); error Error_Invalid_Backup_Owner_Address(); error Error_Unauthorized_Signature(); error Error_Unauthorized_Deadline_Expired(); modifier _isMintable { require(_mintable, 'Contract not mintable'); _;} modifier _isBurnable { require(_burnable, 'Contract not burnable'); _;} /*////////////////////////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////*/ constructor(string memory _name, string memory _symbol, string memory _logo, uint8 _decimals, uint256 totalSupplyNew, address __owner, address backup_owner, bool isMinatable, bool isBurnable ) EIP712(_name, "1") { if (__owner==address(0)){ revert Error_Invalid_Owner_Address(); } _owner = __owner; if (backup_owner == address(0)){ revert Error_Invalid_Backup_Owner_Address(); } require(bytes(_name).length > 0, "Token name can not be empty."); require(bytes(_symbol).length > 0, "Token symbol can not be empty."); require(totalSupplyNew > 0, "Token supply has to be bigger than zero."); name = _name; symbol = _symbol; decimals = _decimals; logo = _logo; _mint(_owner, totalSupplyNew); _mintable = isMinatable; _burnable = isBurnable; backupOwner = backup_owner; } /*////////////////////////////////////////////////////////////// EIP712 LOGIC //////////////////////////////////////////////////////////////*/ function processSignatureVerification(bytes memory encodedParams, bytes memory signature, uint256 deadline, address verificationAddr) internal{ if (msg.sender != verificationAddr){ if(block.timestamp > deadline){ revert Error_Unauthorized_Deadline_Expired();} address signer = ECDSA.recover(digest(encodedParams), signature); nonces[verificationAddr]++; if (verificationAddr != signer){ revert Error_Unauthorized_Signature();} } } function digest( bytes memory encodedParams ) public view returns (bytes32){ return _hashTypedDataV4(keccak256(encodedParams)); } bytes32 public constant _UPDATE_LOGO_TYPEHASH = keccak256("UpdateLogo(string url,address _owner,uint256 nonce,uint256 deadline)"); modifier onlyAuthorizedUpdateLogoString(string calldata url,uint256 deadline,bytes32 _typehash,bytes memory signature){ processSignatureVerification(abi.encode( _typehash, keccak256(bytes(url)), _owner, nonces[_owner], deadline), signature, deadline, _owner); _; } bytes32 public constant _PAUSE_TYPEHASH = keccak256("Pause(address _owner,uint256 nonce,uint256 deadline)"); bytes32 public constant _UNPAUSE_TYPEHASH = keccak256("Unpause(address _owner,uint256 nonce,uint256 deadline)"); bytes32 public constant _RENOUNCE_OWNERSHIP_TYPEHASH = keccak256("RenounceOwnership(address _owner,uint256 nonce,uint256 deadline)"); modifier onlyAuthorizedNullary(uint256 deadline,bytes32 _typehash,bytes memory signature){ processSignatureVerification(abi.encode(_typehash,_owner,nonces[_owner], deadline), signature, deadline, _owner); _; } bytes32 public constant _TRANSFER_OWNERSHIP_TYPEHASH = keccak256("TransferOwnership(address _new_owner,address _owner,uint256 nonce,uint256 deadline)"); modifier onlyAuthorizedTransferOwnership(address target,uint256 deadline,bytes32 _typehash,bytes memory signature){ processSignatureVerification(abi.encode(_typehash,target,_owner,nonces[_owner],deadline), signature, deadline, _owner); _; } bytes32 public constant _BURN_TYPEHASH = keccak256("Burn(address target,address _owner,uint256 amount,uint256 nonce,uint256 deadline)"); bytes32 public constant _MINT_TYPEHASH = keccak256("Mint(address target,address _owner,uint256 amount,uint256 nonce,uint256 deadline)"); modifier onlyAuthorized(address target, uint256 amount, uint256 deadline,bytes32 _typehash, bytes memory signature) { processSignatureVerification(abi.encode(_typehash,target,_owner,amount,nonces[_owner],deadline), signature, deadline, _owner); _; } bytes32 public constant _PENDING_OWNER_TYPEHASH = keccak256("ClaimOwnerRole(address pendingOwner,uint256 nonce,uint256 deadline)"); modifier onlyAuthorizedPendingOwner(uint256 deadline,bytes32 _typehash,bytes memory signature){ processSignatureVerification(abi.encode(_typehash,pendingOwner,nonces[pendingOwner], deadline), signature, deadline, pendingOwner); _; } bytes32 public constant _SET_BACKUP_OWNER_TYPEHASH = keccak256("SetBackupOwner(address _new_backup_owner,address _owner,uint256 nonce,uint256 deadline)"); /*////////////////////////////////////////////////////////////// ERC20 LOGIC //////////////////////////////////////////////////////////////*/ function approve(address spender, uint256 amount) public whenNotPaused virtual returns (bool) { _approve(msg.sender, spender, amount); return true; } function allowance(address owner, address spender) public view virtual returns (uint256) { return _allowance[owner][spender]; } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowance[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public whenNotPaused virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public whenNotPaused virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } function transfer(address to, uint256 amount) public whenNotPaused virtual returns (bool) { balanceOf[msg.sender] -= amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(msg.sender, to, amount); return true; } function transferFrom( address from, address to, uint256 amount) public whenNotPaused virtual returns (bool) { uint256 allowed = _allowance[from][msg.sender]; // Saves gas for limited approvals. if (allowed != type(uint256).max) _allowance[from][msg.sender] = allowed - amount; balanceOf[from] -= amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(from, to, amount); return true; } function pause(uint256 deadline, bytes memory signature) public onlyAuthorizedNullary(deadline,_PAUSE_TYPEHASH,signature) { _pause(); } function unpause(uint256 deadline, bytes memory signature) public onlyAuthorizedNullary(deadline,_UNPAUSE_TYPEHASH,signature) { _unpause(); } function updateLogo(string calldata url,uint256 deadline, bytes memory signature) public whenNotPaused onlyAuthorizedUpdateLogoString(url,deadline,_UPDATE_LOGO_TYPEHASH,signature) { logo = url; } /*////////////////////////////////////////////////////////////// EIP-2612 LOGIC //////////////////////////////////////////////////////////////*/ function permit( address owner, address spender, uint256 value, uint256 deadline, bytes memory signature) public whenNotPaused virtual { require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED"); // Unchecked because the only math done is incrementing // the owner's nonce which cannot realistically overflow. unchecked { if (msg.sender!=owner){ address recoveredAddress = ECDSA.recover(_hashTypedDataV4(keccak256(abi.encode(keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"), owner, spender, value, nonces[owner]++, deadline))), signature); require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER");} _allowance[owner][spender] = value; } emit Approval(owner, spender, value); } function mint(address to, uint256 amount,uint256 deadline, bytes memory signature) public _isMintable whenNotPaused onlyAuthorized(to,amount,deadline,_MINT_TYPEHASH,signature) { _mint(to, amount); } function burn(address from, uint256 amount,uint256 deadline, bytes memory signature) public _isBurnable whenNotPaused onlyAuthorized(from,amount,deadline,_BURN_TYPEHASH,signature){ _burn(from, amount); } /*////////////////////////////////////////////////////////////// INTERNAL MINT/BURN LOGIC //////////////////////////////////////////////////////////////*/ function _mint(address to, uint256 amount) internal virtual { totalSupply += amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(address(0), to, amount); } function _burn(address from, uint256 amount) internal virtual { require(from == _owner,'can burn only owner tokens'); balanceOf[from] -= amount; // Cannot underflow because a user's balance // will never be larger than the total supply. unchecked { totalSupply -= amount; } emit Transfer(from, address(0), amount); } /*////////////////////////////////////////////////////////////// OWNABLE LOGIC //////////////////////////////////////////////////////////////*/ // intermediary owner storage address address public pendingOwner; event OwnershipTransferInitiated(address indexed previousOwner, address indexed pendingOwner); event OwnershipTransferCompleted(address indexed previousOwner, address indexed Owner); event BackupOwnerUpdated(address indexed previousBackupOwner, address indexed backupOwner); error Error_Not_PendingOwner(); error Error_Invalid_NewOwner_Address(); /** * NOTE: Renouncing ownership will make the _backup_owner the pendingOwner, * The backup owner will have to call claimOwnerRole() to gain ownership */ function renounceOwnership(uint256 deadline, bytes memory signature) public whenNotPaused onlyAuthorizedNullary(deadline,_RENOUNCE_OWNERSHIP_TYPEHASH,signature) { _transferOwnership(backupOwner); } /** * @dev Transfers new address i/p to pending owner via _transferOwnership (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner,uint256 deadline, bytes memory signature) public whenNotPaused onlyAuthorizedTransferOwnership(newOwner,deadline,_TRANSFER_OWNERSHIP_TYPEHASH,signature) { if(newOwner == address(0)){revert Error_Invalid_NewOwner_Address();} _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to the pending owner (`pendingOwner`). * Can only be called by the pending owner. */ function claimOwnerRole(uint256 deadline, bytes memory signature) public whenNotPaused onlyAuthorizedPendingOwner(deadline,_PENDING_OWNER_TYPEHASH,signature) { emit OwnershipTransferCompleted(_owner, pendingOwner); _owner = pendingOwner; pendingOwner = address(0); } /** * @dev Makes (`newOwner`) the pendingOwner. * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal { pendingOwner = newOwner; emit OwnershipTransferInitiated(_owner, newOwner); } /** * @dev Makes (`newBackupOwner`) the pendingOwner. * Internal function without access restriction. * @param newBackupOwner Address of the new backup owner * @param deadline Deadline for the signature * @param signature Signature according to EIP 712 */ function setBackupOwner(address newBackupOwner,uint256 deadline, bytes memory signature) public whenNotPaused onlyAuthorizedTransferOwnership(newBackupOwner,deadline,_SET_BACKUP_OWNER_TYPEHASH,signature) { address currentBackupOwner = backupOwner; backupOwner = newBackupOwner; emit BackupOwnerUpdated(currentBackupOwner, newBackupOwner); } }
// 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 (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Arrays.sol) pragma solidity ^0.8.0; import "./StorageSlot.sol"; import "./math/Math.sol"; /** * @dev Collection of functions related to array types. */ library Arrays { using StorageSlot for bytes32; /** * @dev Searches a sorted `array` and returns the first index that contains * a value greater or equal to `element`. If no such index exists (i.e. all * values in the array are strictly less than `element`), the array length is * returned. Time complexity O(log n). * * `array` is expected to be sorted in ascending order, and to contain no * repeated elements. */ function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) { if (array.length == 0) { return 0; } uint256 low = 0; uint256 high = array.length; while (low < high) { uint256 mid = Math.average(low, high); // Note that mid will always be strictly less than high (i.e. it will be a valid array index) // because Math.average rounds down (it does integer division with truncation). if (unsafeAccess(array, mid).value > element) { high = mid; } else { low = mid + 1; } } // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound. if (low > 0 && unsafeAccess(array, low - 1).value == element) { return low - 1; } else { return low; } } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeAccess(address[] storage arr, uint256 pos) internal pure returns (StorageSlot.AddressSlot storage) { bytes32 slot; /// @solidity memory-safe-assembly assembly { mstore(0, arr.slot) slot := add(keccak256(0, 0x20), pos) } return slot.getAddressSlot(); } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeAccess(bytes32[] storage arr, uint256 pos) internal pure returns (StorageSlot.Bytes32Slot storage) { bytes32 slot; /// @solidity memory-safe-assembly assembly { mstore(0, arr.slot) slot := add(keccak256(0, 0x20), pos) } return slot.getBytes32Slot(); } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeAccess(uint256[] storage arr, uint256 pos) internal pure returns (StorageSlot.Uint256Slot storage) { bytes32 slot; /// @solidity memory-safe-assembly assembly { mstore(0, arr.slot) slot := add(keccak256(0, 0x20), pos) } return slot.getUint256Slot(); } }
// 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 v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV // Deprecated in v4.8 } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol) pragma solidity ^0.8.0; import "./ECDSA.sol"; /** * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. * * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible, * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding * they need in their contracts using a combination of `abi.encode` and `keccak256`. * * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * * The implementation of the domain separator was designed to be as efficient as possible while still properly updating * the chain id to protect against replay attacks on an eventual fork of the chain. * * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * * _Available since v3.4._ */ abstract contract EIP712 { /* solhint-disable var-name-mixedcase */ // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to // invalidate the cached domain separator if the chain id changes. bytes32 private immutable _CACHED_DOMAIN_SEPARATOR; uint256 private immutable _CACHED_CHAIN_ID; address private immutable _CACHED_THIS; bytes32 private immutable _HASHED_NAME; bytes32 private immutable _HASHED_VERSION; bytes32 private immutable _TYPE_HASH; /* solhint-enable var-name-mixedcase */ /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. * * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart * contract upgrade]. */ constructor(string memory name, string memory version) { bytes32 hashedName = keccak256(bytes(name)); bytes32 hashedVersion = keccak256(bytes(version)); bytes32 typeHash = keccak256( "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" ); _HASHED_NAME = hashedName; _HASHED_VERSION = hashedVersion; _CACHED_CHAIN_ID = block.chainid; _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion); _CACHED_THIS = address(this); _TYPE_HASH = typeHash; } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) { return _CACHED_DOMAIN_SEPARATOR; } else { return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION); } } function _buildDomainSeparator( bytes32 typeHash, bytes32 nameHash, bytes32 versionHash ) private view returns (bytes32) { return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this))); } /** * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this * function returns the hash of the fully encoded EIP712 message for this domain. * * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: * * ```solidity * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( * keccak256("Mail(address to,string contents)"), * mailTo, * keccak256(bytes(mailContents)) * ))); * address signer = ECDSA.recover(digest, signature); * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol) pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ``` * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._ */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
{ "optimizer": { "enabled": true, "runs": 100 }, "viaIR": true, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_logo","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"},{"internalType":"uint256","name":"totalSupplyNew","type":"uint256"},{"internalType":"address","name":"__owner","type":"address"},{"internalType":"address","name":"backup_owner","type":"address"},{"internalType":"bool","name":"isMinatable","type":"bool"},{"internalType":"bool","name":"isBurnable","type":"bool"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"Error_Invalid_Backup_Owner_Address","type":"error"},{"inputs":[],"name":"Error_Invalid_NewOwner_Address","type":"error"},{"inputs":[],"name":"Error_Invalid_Owner_Address","type":"error"},{"inputs":[],"name":"Error_Not_PendingOwner","type":"error"},{"inputs":[],"name":"Error_Unauthorized_Deadline_Expired","type":"error"},{"inputs":[],"name":"Error_Unauthorized_Signature","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousBackupOwner","type":"address"},{"indexed":true,"internalType":"address","name":"backupOwner","type":"address"}],"name":"BackupOwnerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"Owner","type":"address"}],"name":"OwnershipTransferCompleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"OwnershipTransferInitiated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"_BURN_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_MINT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_PAUSE_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_PENDING_OWNER_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_RENOUNCE_OWNERSHIP_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_SET_BACKUP_OWNER_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_TRANSFER_OWNERSHIP_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_UNPAUSE_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_UPDATE_LOGO_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"_allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_burnable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_mintable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"backupOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"claimOwnerRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"encodedParams","type":"bytes"}],"name":"digest","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"logo","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newBackupOwner","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"setBackupOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"url","type":"string"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"updateLogo","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6101a06040818152346200078a576200263e80380380916200002282866200078f565b84398201906101209182848203126200078a5783516001600160401b03908181116200078a578262000056918701620007b3565b92602092838701518381116200078a578162000074918901620007b3565b9082880151908482116200078a576200008f918901620007b3565b9460608801519360ff851685036200078a57608089015191620000b560a08b016200082a565b96620000c460c08c016200082a565b93620000d360e08d016200083f565b98620000e4610100809e016200083f565b9a8851898101968188108189111762000774578f978f8c9182528760019485815201603160f81b8152848a518a8c01209120809b8260e052524660a05282519a898c01917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f948584528d015260608c01524660808c01523060a08c015260a08b5260c08b019a808c10858d111762000774578b8f525190206080523060c052526000805460ff191681556001600160a01b039485169890979089156200076557508460018060a01b03199a60049a8c8c5416178b55169a8b1562000755578151156200071257805115620006cf5786156200067b57815183811162000599578454928584811c9416801562000670575b8a8510146200057b578190601f948581116200061d575b508a90858311600114620005b8578c92620005ac575b5050600019600383901b1c191690851b1784555b80519083821162000599576002548581811c911680156200058e575b8a8210146200057b5790818484931162000527575b508990848311600114620004c1578b92620004b5575b5050600019600383901b1c191690841b176002555b6101409c8d528351918211620004a25760039384548481811c9116801562000497575b8982101462000484578281116200043c575b5087918311600114620003d9579282939183928a94620003cd575b50501b9160001990841b1c19161790555b8454169360065490828201809211620003ba57506006558383526007825286832080548201905586519081527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a361016094855261018095865260095416176009555193611df095866200084e873960805186611899015260a05186611954015260c05186611863015260e051866118e80152518561190e015251846118c5015251836112ca01525182818161059c0152610c680152518181816109cc0152610e9c0152f35b634e487b7160e01b855260119052602484fd5b015192503880620002e1565b848952878920919083601f1981168b5b8b888383106200042457505050106200040b575b505050811b019055620002f2565b015160001983861b60f8161c19169055388080620003fd565b868601518855909601959485019487935001620003e9565b858a52888a208380860160051c8201928b87106200047a575b0160051c019085905b8281106200046e575050620002c6565b8b81550185906200045e565b9250819262000455565b634e487b7160e01b8a5260228b5260248afd5b90607f1690620002b4565b634e487b7160e01b885260418952602488fd5b0151905038806200027c565b60028c528a8c208794509190601f1984168d5b8d828210620005105750508411620004f6575b505050811b0160025562000291565b015160001960f88460031b161c19169055388080620004e7565b8385015186558a97909501949384019301620004d4565b90915060028b52898b208480850160051c8201928c861062000571575b918891869594930160051c01915b8281106200056257505062000266565b8d815585945088910162000552565b9250819262000544565b634e487b7160e01b8b5260228c5260248bfd5b90607f169062000251565b634e487b7160e01b8a5260418b5260248afd5b01519050388062000221565b878d528b8d208894509190601f1984168e8e5b828210620006055750508411620005eb575b505050811b01845562000235565b015160001960f88460031b161c19169055388080620005dd565b8385015186558b979095019493840193018e620005cb565b909150868c528a8c208580850160051c8201928d861062000666575b918991869594930160051c01915b828110620006575750506200020b565b8e815585945089910162000647565b9250819262000639565b93607f1693620001f4565b8c5162461bcd60e51b8152808b01899052602860248201527f546f6b656e20737570706c792068617320746f2062652062696767657220746860448201526730b7103d32b9379760c11b6064820152608490fd5b8c5162461bcd60e51b8152808b01899052601e60248201527f546f6b656e2073796d626f6c2063616e206e6f7420626520656d7074792e00006044820152606490fd5b8c5162461bcd60e51b8152808b01899052601c60248201527f546f6b656e206e616d652063616e206e6f7420626520656d7074792e000000006044820152606490fd5b8c51639b7e92c760e01b81528a90fd5b634878986360e01b8152600490fd5b634e487b7160e01b600052604160045260246000fd5b600080fd5b601f909101601f19168101906001600160401b038211908210176200077457604052565b919080601f840112156200078a578251906001600160401b038211620007745760405191602091620007ef601f8301601f19168401856200078f565b8184528282870101116200078a5760005b8181106200081657508260009394955001015290565b858101830151848201840152820162000800565b51906001600160a01b03821682036200078a57565b519081151582036200078a5756fe608060408181526004918236101561001657600080fd5b600092833560e01c918263033a614c146115875750816306fdde0314611500578163095ea7b3146114ce57816309af5c2c1461149357816318160ddd14611474578163191f20a0146114395781631b27a36f146113f05781631c238d47146113b557816323b872dd146112ee578163313ce567146112b05781633501bf3614611275578163395093511461121d5781633af8e4ab146111f457816343a65a90146111b9578163454b93f614610fc157816352e41a2814610f8657816355446f5114610ec157816359fc63d314610e845781635c975abb14610e62578163631d0c9e14610db357816370a0823114610d7b578163731133e914610c515781637ecebe0014610c1957816380471eb514610b2e5781638a94b05f146109b557816395d89b411461090f5781639fd5a6cf1461072f5781639ffd2f88146106f4578163a457c2d71461063b578163a9059cbb146105c1578163b056427b14610584578163b2bdfa7b1461055c578163b700901a1461049f578163d05bbf99146103fa578163dd336c12146103b1578163dd62ed3e146103b1578163e30c397814610388578163e957f5e31461034d578163f434eebc146102bc575063fb7f21eb146101dd57600080fd5b346102b857816003193601126102b857805190826003546101fd816115c1565b808552906001908181169081156102905750600114610237575b50505061022982610233940383611662565b5191829182611683565b0390f35b60038352602095507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b82841061027d5750505082610233946102299282010194610217565b8054868501880152928601928101610261565b61023397506102299450602092508693915060ff191682840152151560051b82010194610217565b5080fd5b9050346103495761033d610346926102d336611761565b6102db61197a565b60018060a01b038095541692838852600560205280882054848251927f3a8274919cdc1044356795c9d131b67ac039f7167274b85bd268ba00bbfc593560208501528301526060820152826080820152608081526103388161162c565b611af0565b60095416611d4e565b80f35b8280fd5b5050346102b857816003193601126102b857602090517fe437846cacee6c45e2285512469079e6217f514d204750ca6d5a0330c906a9a88152f35b5050346102b857816003193601126102b857600a5490516001600160a01b039091168152602090f35b5050346102b857806003193601126102b857806020926103cf6116cc565b6103d76116e7565b6001600160a01b0391821683526008865283832091168252845220549051908152f35b905034610349576104839161040e366117d7565b61041a9591929561197a565b60018060a01b03928386541691828952600560205285892054948651907fd1af1f3c522adf5b965b8f81d29afa1e562f470867ae685d675198bc310fbdad6020830152891695868883015284606083015260808201528260a082015260a08152610338816115fb565b15610492578361034684611d4e565b51631766363f60e01b8152fd5b905034610349576105206104b2366117d7565b6104ba61197a565b60018060a01b038095541692838852600560205286882054868851927fe437846cacee6c45e2285512469079e6217f514d204750ca6d5a0330c906a9a8602085015216809883015284606083015260808201528260a082015260a08152610338816115fb565b600980546001600160a01b031981168417909155167ffb74acafdf481a94065765818c1cfa5dbffad3d677572b954cd278c306f4c8978380a380f35b9050346103495782600319360112610349575490516001600160a01b03909116815260209150f35b5050346102b857816003193601126102b857602090517f000000000000000000000000000000000000000000000000000000000000000015158152f35b5050346102b857806003193601126102b8576020916105de6116cc565b82602435916105eb61197a565b33845260078652818420610600848254611ae3565b90556001600160a01b031680845260078652922080548201905582519081523390600080516020611d9b833981519152908590a35160018152f35b905082346106f157826003193601126106f1576106566116cc565b91836024359261066461197a565b338152600860209081528282206001600160a01b038716835290522054908282106106a05760208561069985850387336119be565b5160018152f35b608490602086519162461bcd60e51b8352820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152fd5b80fd5b5050346102b857816003193601126102b857602090517f8a3a8ace2e16b74ac4bca041a18a2e0e3a8287334852bca4518ca0859c57dfc28152f35b9050346103495760a03660031901126103495761074a6116cc565b6107526116e7565b9260443591606435936084356001600160401b03811161090b576107799036908301611743565b61078161197a565b4286106108ce576001600160a01b03928316958690888a338490036107e8575b90837f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560208b8b8b858852600884528188209616958688528352818188205551908152a380f35b878461086b948997948884866108739a61086698526005602052209182549260018401905585519460208601967f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c988528601521660608401528c608084015260a083015260c082015260c0815261085e81611647565b519020611819565b611c91565b919091611b7c565b168581151591826108c4575b50501561089057808581888a6107a1565b606490602084519162461bcd60e51b8352820152600e60248201526d24a72b20a624a22fa9a4a3a722a960911b6044820152fd5b149050853861087f565b835162461bcd60e51b8152602081840152601760248201527614115493525517d11150511312539157d1561412549151604a1b6044820152606490fd5b8780fd5b5050346102b857816003193601126102b85780519082600254610931816115c1565b80855290600190818116908115610290575060011461095c5750505061022982610233940383611662565b60028352602095507f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b8284106109a25750505082610233946102299282010194610217565b8054868501880152928601928101610986565b839150346102b8576109c636611790565b939192937f000000000000000000000000000000000000000000000000000000000000000015610af357610a6b906109fc61197a565b60018060a01b0392838554169182895260056020528989205497858b51917f76fea3dcf531db1e6a95b540635312a8645e6a8e6a8fff08a291e0c71d4ddd0560208401521698898c83015284606083015288608083015260a08201528260c082015260c0815261033881611647565b8154168303610ab057506020600080516020611d9b83398151915291849584865260078352808620610a9e838254611ae3565b9055816006540360065551908152a380f35b606490602086519162461bcd60e51b8352820152601a60248201527f63616e206275726e206f6e6c79206f776e657220746f6b656e730000000000006044820152fd5b865162461bcd60e51b81526020818501526015602482015274436f6e7472616374206e6f74206275726e61626c6560581b6044820152606490fd5b90503461034957610b9f610b4136611761565b9060018060a01b03845416918287526005602052858720548651907fbd96828adb1b7af0fab4601ffe78253e4b0d1d5fc3ed4ec1d7435155b481a465602083015284888301526060820152826080820152608081526103388161162c565b82549060ff821615610bdf575060ff19168255513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa90602090a180f35b606490602084519162461bcd60e51b8352820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152fd5b5050346102b85760203660031901126102b85760209181906001600160a01b03610c416116cc565b1681526005845220549051908152f35b9190503461034957610c6236611790565b939291937f000000000000000000000000000000000000000000000000000000000000000015610d405792610d19602093889693600080516020611d9b83398151915296610cae61197a565b60018060a01b03809a541692838a5260058852858a20549a8651917fc4ab84fe05983708178bbbc4d56dddeef7873717745ab2ccffe52bdaba27c3e28a840152169a8b8783015284606083015287608083015260a08201528260c082015260c0815261033881611647565b610d2582600654611ac0565b6006558585526007835280852082815401905551908152a380f35b835162461bcd60e51b81526020818801526015602482015274436f6e7472616374206e6f74206d696e7461626c6560581b6044820152606490fd5b5050346102b85760203660031901126102b85760209181906001600160a01b03610da36116cc565b1681526007845220549051908152f35b905034610349577f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25891610e47602092610deb36611761565b9160018060a01b039054169182885260058652848820548551907ff9dbe2c5ba2cbe9d6c63397b41b07686b531e291a205a71dc84613a2afb26a278883015284878301526060820152826080820152608081526103388161162c565b610e4f61197a565b835460ff1916600117845551338152a180f35b5050346102b857816003193601126102b85760ff602092541690519015158152f35b5050346102b857816003193601126102b857602090517f000000000000000000000000000000000000000000000000000000000000000015158152f35b9190503461034957610f3e610ed536611761565b9290610edf61197a565b60018060a01b039384600a541692838852600560205280882054848251927f8a3a8ace2e16b74ac4bca041a18a2e0e3a8287334852bca4518ca0859c57dfc260208501528301526060820152826080820152608081526103388161162c565b815491600a5491808316809185167fe9a5158ac7353c7c7322ececc080bc8e89334efa5795b6e21e40eb266b0003d68780a36001600160a01b031993841617905516600a5580f35b5050346102b857816003193601126102b857602090517f3a8274919cdc1044356795c9d131b67ac039f7167274b85bd268ba00bbfc59358152f35b839150346102b85760603660031901126102b8578035906001600160401b038083116111b557366023840112156111b55782820135918183116111b157602491368385870101116111ad578235906044359081116111a9579061102b6110aa939236908401611743565b61103361197a565b6110403687878a016116fd565b9889516020809b01209360018060a01b0390541693848a5260058b52818a2054908251927f7007c345b6494b4ad227616100e4fa2fe1afa6f52637597e37031ce646a0e4e08d85015283015284606083015260808201528260a082015260a08152610338816115fb565b6003926110b784546115c1565b601f8111611166575b508495601f84116001146110ff5750948495839495936110f2575b5050508160011b9160001990841b1c191617905580f35b01013590508480806110db565b91601f198416968587528387209387905b89821061114c57505084600196979810611131575b50505050811b01905580f35b60001960f886891b161c199201013516905584808080611125565b806001849786839596890101358155019601920190611110565b848652868620601f850160051c81019188861061119f575b601f0160051c01905b81811061119457506110c0565b868155600101611187565b909150819061117e565b8680fd5b8580fd5b8480fd5b8380fd5b5050346102b857816003193601126102b857602090517fc4ab84fe05983708178bbbc4d56dddeef7873717745ab2ccffe52bdaba27c3e28152f35b5050346102b857816003193601126102b85760095490516001600160a01b039091168152602090f35b5050346102b857806003193601126102b85761069960209261126e6112406116cc565b9161124961197a565b338152600886528481206001600160a01b038416825286528490205460243590611ac0565b90336119be565b5050346102b857816003193601126102b857602090517fd1af1f3c522adf5b965b8f81d29afa1e562f470867ae685d675198bc310fbdad8152f35b5050346102b857816003193601126102b8576020905160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b5050346102b85760603660031901126102b8576113096116cc565b916113126116e7565b600080516020611d9b8339815191526044359161132d61197a565b60018060a01b038096169283855285602097889360088552828820338952855282882054846000198203611392575b505086885260078552828820611373858254611ae3565b9055169586815260078452208181540190558551908152a35160018152f35b61139b91611ae3565b87895260088652838920338a52865283892055388461135c565b5050346102b857816003193601126102b857602090517ff9dbe2c5ba2cbe9d6c63397b41b07686b531e291a205a71dc84613a2afb26a278152f35b8284346106f15760203660031901126106f1578235906001600160401b0382116106f1575061142760209361143292369101611743565b838151910120611819565b9051908152f35b5050346102b857816003193601126102b857602090517f7007c345b6494b4ad227616100e4fa2fe1afa6f52637597e37031ce646a0e4e08152f35b5050346102b857816003193601126102b8576020906006549051908152f35b5050346102b857816003193601126102b857602090517fbd96828adb1b7af0fab4601ffe78253e4b0d1d5fc3ed4ec1d7435155b481a4658152f35b5050346102b857806003193601126102b8576020906106996114ee6116cc565b6114f661197a565b60243590336119be565b5050346102b857816003193601126102b857805190826001805490611524826115c1565b80865291818116908115610290575060011461154c5750505061022982610233940383611662565b80955082526020948583205b8284106115745750505082610233946102299282010194610217565b8054868501880152928601928101611558565b8490346102b857816003193601126102b857807f76fea3dcf531db1e6a95b540635312a8645e6a8e6a8fff08a291e0c71d4ddd0560209252f35b90600182811c921680156115f1575b60208310146115db57565b634e487b7160e01b600052602260045260246000fd5b91607f16916115d0565b60c081019081106001600160401b0382111761161657604052565b634e487b7160e01b600052604160045260246000fd5b60a081019081106001600160401b0382111761161657604052565b60e081019081106001600160401b0382111761161657604052565b90601f801991011681019081106001600160401b0382111761161657604052565b6020808252825181830181905290939260005b8281106116b857505060409293506000838284010152601f8019910116010190565b818101860151848201604001528501611696565b600435906001600160a01b03821682036116e257565b600080fd5b602435906001600160a01b03821682036116e257565b9291926001600160401b0382116116165760405191611726601f8201601f191660200184611662565b8294818452818301116116e2578281602093846000960137010152565b9080601f830112156116e25781602061175e933591016116fd565b90565b9060406003198301126116e25760043591602435906001600160401b0382116116e25761175e91600401611743565b9060806003198301126116e2576004356001600160a01b03811681036116e257916024359160443591606435906001600160401b0382116116e25761175e91600401611743565b60606003198201126116e2576004356001600160a01b03811681036116e2579160243591604435906001600160401b0382116116e25761175e91600401611743565b611821611860565b9060405190602082019261190160f01b84526022830152604282015260428152608081018181106001600160401b038211176116165760405251902090565b307f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161480611951575b156118bb577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f000000000000000000000000000000000000000000000000000000000000000082527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a0815261194b816115fb565b51902090565b507f00000000000000000000000000000000000000000000000000000000000000004614611892565b60ff6000541661198657565b60405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606490fd5b6001600160a01b03908116918215611a6f5716918215611a1f5760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260088252604060002085600052825280604060002055604051908152a3565b60405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608490fd5b60405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b91908201809211611acd57565b634e487b7160e01b600052601160045260246000fd5b91908203918211611acd57565b6001600160a01b03938416939233859003611b0d575b5050505050565b4211611b6a57611b2a9161086682602061086b9451910120611819565b826000526005602052604060002080546000198114611acd5760010190551603611b58573880808080611b06565b604051630a70806760e01b8152600490fd5b604051636ff685a160e11b8152600490fd5b6005811015611c7b5780611b8d5750565b60018103611bd55760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606490fd5b60028103611c225760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606490fd5b600314611c2b57565b60405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608490fd5b634e487b7160e01b600052602160045260246000fd5b906041815114600014611cbf57611cbb916020820151906060604084015193015160001a90611cc9565b9091565b5050600090600290565b9291906fa2a8918ca85bafe22016d0b997e4df60600160ff1b038311611d425791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa15611d355781516001600160a01b03811615611d2f579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b600a80546001600160a01b0319166001600160a01b039283169081179091556004549091167fb150023a879fd806e3599b6ca8ee3b60f0e360ab3846d128d67ebce1a391639a600080a356feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220843f902260da0ef00ccf2c1e0d4b6d9930b7e342d5555fac58d101911258975364736f6c634300081300330000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000033b2e3c9fd0803ce800000000000000000000000000000016a0f7956ccdf3240f59701730ee0a47933cfb2700000000000000000000000038a9197f40ac09913c8bb10d24d107d1d4d974cc0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000064269746f726f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000062442544f524f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a68747470733a2f2f616464332d7465726d696e616c2d696d616765732e73332e65752d776573742d312e616d617a6f6e6177732e636f6d2f70726f64756374696f6e2f746f6b656e4c6f676f2f3138352f33363130646432322d613332642d343832312d396563652d3562376266643834363564342d626c6f62000000000000
Deployed Bytecode
0x608060408181526004918236101561001657600080fd5b600092833560e01c918263033a614c146115875750816306fdde0314611500578163095ea7b3146114ce57816309af5c2c1461149357816318160ddd14611474578163191f20a0146114395781631b27a36f146113f05781631c238d47146113b557816323b872dd146112ee578163313ce567146112b05781633501bf3614611275578163395093511461121d5781633af8e4ab146111f457816343a65a90146111b9578163454b93f614610fc157816352e41a2814610f8657816355446f5114610ec157816359fc63d314610e845781635c975abb14610e62578163631d0c9e14610db357816370a0823114610d7b578163731133e914610c515781637ecebe0014610c1957816380471eb514610b2e5781638a94b05f146109b557816395d89b411461090f5781639fd5a6cf1461072f5781639ffd2f88146106f4578163a457c2d71461063b578163a9059cbb146105c1578163b056427b14610584578163b2bdfa7b1461055c578163b700901a1461049f578163d05bbf99146103fa578163dd336c12146103b1578163dd62ed3e146103b1578163e30c397814610388578163e957f5e31461034d578163f434eebc146102bc575063fb7f21eb146101dd57600080fd5b346102b857816003193601126102b857805190826003546101fd816115c1565b808552906001908181169081156102905750600114610237575b50505061022982610233940383611662565b5191829182611683565b0390f35b60038352602095507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b82841061027d5750505082610233946102299282010194610217565b8054868501880152928601928101610261565b61023397506102299450602092508693915060ff191682840152151560051b82010194610217565b5080fd5b9050346103495761033d610346926102d336611761565b6102db61197a565b60018060a01b038095541692838852600560205280882054848251927f3a8274919cdc1044356795c9d131b67ac039f7167274b85bd268ba00bbfc593560208501528301526060820152826080820152608081526103388161162c565b611af0565b60095416611d4e565b80f35b8280fd5b5050346102b857816003193601126102b857602090517fe437846cacee6c45e2285512469079e6217f514d204750ca6d5a0330c906a9a88152f35b5050346102b857816003193601126102b857600a5490516001600160a01b039091168152602090f35b5050346102b857806003193601126102b857806020926103cf6116cc565b6103d76116e7565b6001600160a01b0391821683526008865283832091168252845220549051908152f35b905034610349576104839161040e366117d7565b61041a9591929561197a565b60018060a01b03928386541691828952600560205285892054948651907fd1af1f3c522adf5b965b8f81d29afa1e562f470867ae685d675198bc310fbdad6020830152891695868883015284606083015260808201528260a082015260a08152610338816115fb565b15610492578361034684611d4e565b51631766363f60e01b8152fd5b905034610349576105206104b2366117d7565b6104ba61197a565b60018060a01b038095541692838852600560205286882054868851927fe437846cacee6c45e2285512469079e6217f514d204750ca6d5a0330c906a9a8602085015216809883015284606083015260808201528260a082015260a08152610338816115fb565b600980546001600160a01b031981168417909155167ffb74acafdf481a94065765818c1cfa5dbffad3d677572b954cd278c306f4c8978380a380f35b9050346103495782600319360112610349575490516001600160a01b03909116815260209150f35b5050346102b857816003193601126102b857602090517f000000000000000000000000000000000000000000000000000000000000000015158152f35b5050346102b857806003193601126102b8576020916105de6116cc565b82602435916105eb61197a565b33845260078652818420610600848254611ae3565b90556001600160a01b031680845260078652922080548201905582519081523390600080516020611d9b833981519152908590a35160018152f35b905082346106f157826003193601126106f1576106566116cc565b91836024359261066461197a565b338152600860209081528282206001600160a01b038716835290522054908282106106a05760208561069985850387336119be565b5160018152f35b608490602086519162461bcd60e51b8352820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152fd5b80fd5b5050346102b857816003193601126102b857602090517f8a3a8ace2e16b74ac4bca041a18a2e0e3a8287334852bca4518ca0859c57dfc28152f35b9050346103495760a03660031901126103495761074a6116cc565b6107526116e7565b9260443591606435936084356001600160401b03811161090b576107799036908301611743565b61078161197a565b4286106108ce576001600160a01b03928316958690888a338490036107e8575b90837f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560208b8b8b858852600884528188209616958688528352818188205551908152a380f35b878461086b948997948884866108739a61086698526005602052209182549260018401905585519460208601967f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c988528601521660608401528c608084015260a083015260c082015260c0815261085e81611647565b519020611819565b611c91565b919091611b7c565b168581151591826108c4575b50501561089057808581888a6107a1565b606490602084519162461bcd60e51b8352820152600e60248201526d24a72b20a624a22fa9a4a3a722a960911b6044820152fd5b149050853861087f565b835162461bcd60e51b8152602081840152601760248201527614115493525517d11150511312539157d1561412549151604a1b6044820152606490fd5b8780fd5b5050346102b857816003193601126102b85780519082600254610931816115c1565b80855290600190818116908115610290575060011461095c5750505061022982610233940383611662565b60028352602095507f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b8284106109a25750505082610233946102299282010194610217565b8054868501880152928601928101610986565b839150346102b8576109c636611790565b939192937f000000000000000000000000000000000000000000000000000000000000000115610af357610a6b906109fc61197a565b60018060a01b0392838554169182895260056020528989205497858b51917f76fea3dcf531db1e6a95b540635312a8645e6a8e6a8fff08a291e0c71d4ddd0560208401521698898c83015284606083015288608083015260a08201528260c082015260c0815261033881611647565b8154168303610ab057506020600080516020611d9b83398151915291849584865260078352808620610a9e838254611ae3565b9055816006540360065551908152a380f35b606490602086519162461bcd60e51b8352820152601a60248201527f63616e206275726e206f6e6c79206f776e657220746f6b656e730000000000006044820152fd5b865162461bcd60e51b81526020818501526015602482015274436f6e7472616374206e6f74206275726e61626c6560581b6044820152606490fd5b90503461034957610b9f610b4136611761565b9060018060a01b03845416918287526005602052858720548651907fbd96828adb1b7af0fab4601ffe78253e4b0d1d5fc3ed4ec1d7435155b481a465602083015284888301526060820152826080820152608081526103388161162c565b82549060ff821615610bdf575060ff19168255513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa90602090a180f35b606490602084519162461bcd60e51b8352820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152fd5b5050346102b85760203660031901126102b85760209181906001600160a01b03610c416116cc565b1681526005845220549051908152f35b9190503461034957610c6236611790565b939291937f000000000000000000000000000000000000000000000000000000000000000015610d405792610d19602093889693600080516020611d9b83398151915296610cae61197a565b60018060a01b03809a541692838a5260058852858a20549a8651917fc4ab84fe05983708178bbbc4d56dddeef7873717745ab2ccffe52bdaba27c3e28a840152169a8b8783015284606083015287608083015260a08201528260c082015260c0815261033881611647565b610d2582600654611ac0565b6006558585526007835280852082815401905551908152a380f35b835162461bcd60e51b81526020818801526015602482015274436f6e7472616374206e6f74206d696e7461626c6560581b6044820152606490fd5b5050346102b85760203660031901126102b85760209181906001600160a01b03610da36116cc565b1681526007845220549051908152f35b905034610349577f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25891610e47602092610deb36611761565b9160018060a01b039054169182885260058652848820548551907ff9dbe2c5ba2cbe9d6c63397b41b07686b531e291a205a71dc84613a2afb26a278883015284878301526060820152826080820152608081526103388161162c565b610e4f61197a565b835460ff1916600117845551338152a180f35b5050346102b857816003193601126102b85760ff602092541690519015158152f35b5050346102b857816003193601126102b857602090517f000000000000000000000000000000000000000000000000000000000000000115158152f35b9190503461034957610f3e610ed536611761565b9290610edf61197a565b60018060a01b039384600a541692838852600560205280882054848251927f8a3a8ace2e16b74ac4bca041a18a2e0e3a8287334852bca4518ca0859c57dfc260208501528301526060820152826080820152608081526103388161162c565b815491600a5491808316809185167fe9a5158ac7353c7c7322ececc080bc8e89334efa5795b6e21e40eb266b0003d68780a36001600160a01b031993841617905516600a5580f35b5050346102b857816003193601126102b857602090517f3a8274919cdc1044356795c9d131b67ac039f7167274b85bd268ba00bbfc59358152f35b839150346102b85760603660031901126102b8578035906001600160401b038083116111b557366023840112156111b55782820135918183116111b157602491368385870101116111ad578235906044359081116111a9579061102b6110aa939236908401611743565b61103361197a565b6110403687878a016116fd565b9889516020809b01209360018060a01b0390541693848a5260058b52818a2054908251927f7007c345b6494b4ad227616100e4fa2fe1afa6f52637597e37031ce646a0e4e08d85015283015284606083015260808201528260a082015260a08152610338816115fb565b6003926110b784546115c1565b601f8111611166575b508495601f84116001146110ff5750948495839495936110f2575b5050508160011b9160001990841b1c191617905580f35b01013590508480806110db565b91601f198416968587528387209387905b89821061114c57505084600196979810611131575b50505050811b01905580f35b60001960f886891b161c199201013516905584808080611125565b806001849786839596890101358155019601920190611110565b848652868620601f850160051c81019188861061119f575b601f0160051c01905b81811061119457506110c0565b868155600101611187565b909150819061117e565b8680fd5b8580fd5b8480fd5b8380fd5b5050346102b857816003193601126102b857602090517fc4ab84fe05983708178bbbc4d56dddeef7873717745ab2ccffe52bdaba27c3e28152f35b5050346102b857816003193601126102b85760095490516001600160a01b039091168152602090f35b5050346102b857806003193601126102b85761069960209261126e6112406116cc565b9161124961197a565b338152600886528481206001600160a01b038416825286528490205460243590611ac0565b90336119be565b5050346102b857816003193601126102b857602090517fd1af1f3c522adf5b965b8f81d29afa1e562f470867ae685d675198bc310fbdad8152f35b5050346102b857816003193601126102b8576020905160ff7f0000000000000000000000000000000000000000000000000000000000000012168152f35b5050346102b85760603660031901126102b8576113096116cc565b916113126116e7565b600080516020611d9b8339815191526044359161132d61197a565b60018060a01b038096169283855285602097889360088552828820338952855282882054846000198203611392575b505086885260078552828820611373858254611ae3565b9055169586815260078452208181540190558551908152a35160018152f35b61139b91611ae3565b87895260088652838920338a52865283892055388461135c565b5050346102b857816003193601126102b857602090517ff9dbe2c5ba2cbe9d6c63397b41b07686b531e291a205a71dc84613a2afb26a278152f35b8284346106f15760203660031901126106f1578235906001600160401b0382116106f1575061142760209361143292369101611743565b838151910120611819565b9051908152f35b5050346102b857816003193601126102b857602090517f7007c345b6494b4ad227616100e4fa2fe1afa6f52637597e37031ce646a0e4e08152f35b5050346102b857816003193601126102b8576020906006549051908152f35b5050346102b857816003193601126102b857602090517fbd96828adb1b7af0fab4601ffe78253e4b0d1d5fc3ed4ec1d7435155b481a4658152f35b5050346102b857806003193601126102b8576020906106996114ee6116cc565b6114f661197a565b60243590336119be565b5050346102b857816003193601126102b857805190826001805490611524826115c1565b80865291818116908115610290575060011461154c5750505061022982610233940383611662565b80955082526020948583205b8284106115745750505082610233946102299282010194610217565b8054868501880152928601928101611558565b8490346102b857816003193601126102b857807f76fea3dcf531db1e6a95b540635312a8645e6a8e6a8fff08a291e0c71d4ddd0560209252f35b90600182811c921680156115f1575b60208310146115db57565b634e487b7160e01b600052602260045260246000fd5b91607f16916115d0565b60c081019081106001600160401b0382111761161657604052565b634e487b7160e01b600052604160045260246000fd5b60a081019081106001600160401b0382111761161657604052565b60e081019081106001600160401b0382111761161657604052565b90601f801991011681019081106001600160401b0382111761161657604052565b6020808252825181830181905290939260005b8281106116b857505060409293506000838284010152601f8019910116010190565b818101860151848201604001528501611696565b600435906001600160a01b03821682036116e257565b600080fd5b602435906001600160a01b03821682036116e257565b9291926001600160401b0382116116165760405191611726601f8201601f191660200184611662565b8294818452818301116116e2578281602093846000960137010152565b9080601f830112156116e25781602061175e933591016116fd565b90565b9060406003198301126116e25760043591602435906001600160401b0382116116e25761175e91600401611743565b9060806003198301126116e2576004356001600160a01b03811681036116e257916024359160443591606435906001600160401b0382116116e25761175e91600401611743565b60606003198201126116e2576004356001600160a01b03811681036116e2579160243591604435906001600160401b0382116116e25761175e91600401611743565b611821611860565b9060405190602082019261190160f01b84526022830152604282015260428152608081018181106001600160401b038211176116165760405251902090565b307f000000000000000000000000b6212b633c941e9be168c4b9c2d9e785f1cd42fb6001600160a01b03161480611951575b156118bb577ff3fcd32a63a31eae83cca4808f573631224c0e0ce2fae8c7db0d90222c66d0a890565b60405160208101907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f82527f7322726b0e6c8a73c57ffc50a4d4d3784773374617c14ed27b74e44439db2b3560408201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260a0815261194b816115fb565b51902090565b507f000000000000000000000000000000000000000000000000000000000000a4b14614611892565b60ff6000541661198657565b60405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606490fd5b6001600160a01b03908116918215611a6f5716918215611a1f5760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260088252604060002085600052825280604060002055604051908152a3565b60405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608490fd5b60405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b91908201809211611acd57565b634e487b7160e01b600052601160045260246000fd5b91908203918211611acd57565b6001600160a01b03938416939233859003611b0d575b5050505050565b4211611b6a57611b2a9161086682602061086b9451910120611819565b826000526005602052604060002080546000198114611acd5760010190551603611b58573880808080611b06565b604051630a70806760e01b8152600490fd5b604051636ff685a160e11b8152600490fd5b6005811015611c7b5780611b8d5750565b60018103611bd55760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606490fd5b60028103611c225760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606490fd5b600314611c2b57565b60405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608490fd5b634e487b7160e01b600052602160045260246000fd5b906041815114600014611cbf57611cbb916020820151906060604084015193015160001a90611cc9565b9091565b5050600090600290565b9291906fa2a8918ca85bafe22016d0b997e4df60600160ff1b038311611d425791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa15611d355781516001600160a01b03811615611d2f579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b600a80546001600160a01b0319166001600160a01b039283169081179091556004549091167fb150023a879fd806e3599b6ca8ee3b60f0e360ab3846d128d67ebce1a391639a600080a356feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220843f902260da0ef00ccf2c1e0d4b6d9930b7e342d5555fac58d101911258975364736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000033b2e3c9fd0803ce800000000000000000000000000000016a0f7956ccdf3240f59701730ee0a47933cfb2700000000000000000000000038a9197f40ac09913c8bb10d24d107d1d4d974cc0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000064269746f726f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000062442544f524f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a68747470733a2f2f616464332d7465726d696e616c2d696d616765732e73332e65752d776573742d312e616d617a6f6e6177732e636f6d2f70726f64756374696f6e2f746f6b656e4c6f676f2f3138352f33363130646432322d613332642d343832312d396563652d3562376266643834363564342d626c6f62000000000000
-----Decoded View---------------
Arg [0] : _name (string): Bitoro
Arg [1] : _symbol (string): $BTORO
Arg [2] : _logo (string): https://add3-terminal-images.s3.eu-west-1.amazonaws.com/production/tokenLogo/185/3610dd22-a32d-4821-9ece-5b7bfd8465d4-blob
Arg [3] : _decimals (uint8): 18
Arg [4] : totalSupplyNew (uint256): 1000000000000000000000000000
Arg [5] : __owner (address): 0x16a0f7956CCdF3240F59701730EE0A47933CFb27
Arg [6] : backup_owner (address): 0x38a9197f40aC09913c8Bb10d24D107d1d4d974CC
Arg [7] : isMinatable (bool): False
Arg [8] : isBurnable (bool): True
-----Encoded View---------------
18 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [2] : 00000000000000000000000000000000000000000000000000000000000001a0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000012
Arg [4] : 0000000000000000000000000000000000000000033b2e3c9fd0803ce8000000
Arg [5] : 00000000000000000000000016a0f7956ccdf3240f59701730ee0a47933cfb27
Arg [6] : 00000000000000000000000038a9197f40ac09913c8bb10d24d107d1d4d974cc
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [10] : 4269746f726f0000000000000000000000000000000000000000000000000000
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [12] : 2442544f524f0000000000000000000000000000000000000000000000000000
Arg [13] : 000000000000000000000000000000000000000000000000000000000000007a
Arg [14] : 68747470733a2f2f616464332d7465726d696e616c2d696d616765732e73332e
Arg [15] : 65752d776573742d312e616d617a6f6e6177732e636f6d2f70726f6475637469
Arg [16] : 6f6e2f746f6b656e4c6f676f2f3138352f33363130646432322d613332642d34
Arg [17] : 3832312d396563652d3562376266643834363564342d626c6f62000000000000
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.