Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
CaptainzReserve
Compiler Version
v0.8.16+commit.07a7930e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts/utils/math/Math.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; // WIP // import "./interfaces/IBlindreserveInfo.sol"; contract CaptainzReserve is Initializable, ReentrancyGuardUpgradeable, OwnableUpgradeable { using EnumerableSet for EnumerableSet.AddressSet; uint256 public RESERVE_PRICE; address public signer; uint256 public reserveTotal; uint256 public reserveState; EnumerableSet.AddressSet reservedUsers; mapping(address => uint256) public itemsUserReserved; mapping(address => bool) public isUserRefunded; uint256 public totalAirdroppedItems; uint256 public withdrawed; event UserReserved( address indexed user, uint256 amount, uint256 newAmt, uint256 max ); event UserRefunded(address indexed user, uint256 wonAmount); function initialize(address _signer) public initializer { ReentrancyGuardUpgradeable.__ReentrancyGuard_init(); OwnableUpgradeable.__Ownable_init(); RESERVE_PRICE = 1.069 ether; signer = _signer; } function checkValidity(bytes calldata signature, string memory action) public view returns (bool) { require( ECDSA.recover( ECDSA.toEthSignedMessageHash( keccak256(abi.encodePacked(msg.sender, action)) ), signature ) == signer, "invalid signature" ); return true; } function reserve( uint256 amount, uint256 max, bytes calldata signature ) external payable nonReentrant { require(reserveState == 1, "Reservation not open"); require(msg.value == amount * RESERVE_PRICE, "Incorrect ETH amount"); require(amount > 0, "Amount must be > 0"); checkValidity( signature, string.concat("captainz-reserve-max-", Strings.toString(max)) ); uint256 newAmt = itemsUserReserved[msg.sender] + amount; require(newAmt <= max, "newAmt exceeds max"); itemsUserReserved[msg.sender] = newAmt; reserveTotal += amount; reservedUsers.add(msg.sender); emit UserReserved(msg.sender, amount, newAmt, max); } function refund(uint256 wonAmount, bytes calldata signature) external nonReentrant { require( reserveState == 2 || reserveState == 3, "Reservation not in concluding or finished state" ); require(itemsUserReserved[msg.sender] > 0, "No reservation record"); require(!isUserRefunded[msg.sender], "Already refunded"); checkValidity( signature, string.concat( "captainz-refund-won_amount-", Strings.toString(wonAmount) ) ); uint256 loseAmount = itemsUserReserved[msg.sender] - wonAmount; uint256 refundAvailable = loseAmount * RESERVE_PRICE; require(refundAvailable > 0, "Nothing to refund"); isUserRefunded[msg.sender] = true; emit UserRefunded(msg.sender, wonAmount); _withdraw(msg.sender, refundAvailable); } // =============== Admin =============== function setSigner(address _signer) external onlyOwner { signer = _signer; } function withdrawSales() public onlyOwner { require( reserveState == 2 || reserveState == 3, "Reservation not in concluding or finished state" ); require(totalAirdroppedItems > 0, "totalAirdroppedItems not set"); // uint256 balance = address(this).balance; uint256 sales = totalAirdroppedItems * RESERVE_PRICE; uint256 available = sales - withdrawed; require(available > 0, "No balance to withdraw"); withdrawed += available; _withdraw(owner(), available); } function _withdraw(address _address, uint256 _amount) private { (bool success, ) = _address.call{value: _amount}(""); require(success, "cant withdraw"); } function changeReservePrice(uint256 price) external onlyOwner { require(reserveState == 0, "Reservation already started"); RESERVE_PRICE = price; } function setReserveState(uint8 state) external onlyOwner { reserveState = state; } function setTotalAirdroppedItems(uint256 tai) external onlyOwner { totalAirdroppedItems = tai; } function getReservedUsersCount() external view returns (uint256) { return reservedUsers.length(); } function getReservedUsers(uint256 fromIdx, uint256 toIdx) external view returns (address[] memory) { toIdx = Math.min(toIdx, reservedUsers.length()); address[] memory part = new address[](toIdx - fromIdx); for (uint256 i = 0; i < toIdx - fromIdx; i++) { part[i] = reservedUsers.at(i + fromIdx); } return part; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @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 / b + (a % b == 0 ? 0 : 1); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.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 } 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"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' 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) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ 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. 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 if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } 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 (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // 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 v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuardUpgradeable is Initializable { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; function __ReentrancyGuard_init() internal onlyInitializing { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal onlyInitializing { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original * initialization step. This is essential to configure modules that are added through upgrades and that require * initialization. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"wonAmount","type":"uint256"}],"name":"UserRefunded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newAmt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"max","type":"uint256"}],"name":"UserReserved","type":"event"},{"inputs":[],"name":"RESERVE_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"name":"changeReservePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"string","name":"action","type":"string"}],"name":"checkValidity","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"fromIdx","type":"uint256"},{"internalType":"uint256","name":"toIdx","type":"uint256"}],"name":"getReservedUsers","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReservedUsersCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isUserRefunded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"itemsUserReserved","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"wonAmount","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"refund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"reserve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"reserveState","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reserveTotal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"state","type":"uint8"}],"name":"setReserveState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tai","type":"uint256"}],"name":"setTotalAirdroppedItems","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAirdroppedItems","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawSales","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50611a46806100206000396000f3fe6080604052600436106101355760003560e01c80638607093f116100ab578063b9f65cfc1161006f578063b9f65cfc1461035d578063bf9649531461037d578063c4d66de814610393578063dd21d604146103b3578063eb29c311146103c9578063f2fde38b146103df57600080fd5b80638607093f146102c95780638da5cb5b146102f65780639a79712814610314578063ad278c1e1461032a578063b8454b811461034a57600080fd5b806337369b22116100fd57806337369b221461021c5780636c19e78314610231578063715018a61461025157806373d6bcd91461026657806379197647146102865780637b5581ed146102b357600080fd5b806318133d151461013a5780632252c0f01461017f57806322ab1334146101a2578063238ac933146101c457806330f89953146101fc575b600080fd5b34801561014657600080fd5b5061016a610155366004611542565b609e6020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b34801561018b57600080fd5b506101946103ff565b604051908152602001610176565b3480156101ae57600080fd5b506101c26101bd3660046115ad565b610410565b005b3480156101d057600080fd5b506098546101e4906001600160a01b031681565b6040516001600160a01b039091168152602001610176565b34801561020857600080fd5b5061016a61021736600461160f565b610651565b34801561022857600080fd5b506101c261076c565b34801561023d57600080fd5b506101c261024c366004611542565b610895565b34801561025d57600080fd5b506101c26108bf565b34801561027257600080fd5b506101c26102813660046116ea565b6108d3565b34801561029257600080fd5b506102a66102a1366004611703565b610930565b6040516101769190611725565b3480156102bf57600080fd5b5061019460995481565b3480156102d557600080fd5b506101946102e4366004611542565b609d6020526000908152604090205481565b34801561030257600080fd5b506065546001600160a01b03166101e4565b34801561032057600080fd5b5061019460a05481565b34801561033657600080fd5b506101c26103453660046116ea565b610a06565b6101c2610358366004611772565b610a13565b34801561036957600080fd5b506101c26103783660046117c5565b610c4f565b34801561038957600080fd5b50610194609a5481565b34801561039f57600080fd5b506101c26103ae366004611542565b610c5f565b3480156103bf57600080fd5b5061019460975481565b3480156103d557600080fd5b50610194609f5481565b3480156103eb57600080fd5b506101c26103fa366004611542565b610d9f565b600061040b609b610e18565b905090565b6002600154036104675760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b60026001819055609a54148061047f5750609a546003145b61049b5760405162461bcd60e51b815260040161045e906117e8565b336000908152609d60205260409020546104ef5760405162461bcd60e51b8152602060048201526015602482015274139bc81c995cd95c9d985d1a5bdb881c9958dbdc99605a1b604482015260640161045e565b336000908152609e602052604090205460ff16156105425760405162461bcd60e51b815260206004820152601060248201526f105b1c9958591e481c99599d5b99195960821b604482015260640161045e565b610574828261055086610e22565b6040516020016105609190611867565b604051602081830303815290604052610651565b50336000908152609d60205260408120546105909085906118af565b90506000609754826105a291906118c2565b9050600081116105e85760405162461bcd60e51b8152602060048201526011602482015270139bdd1a1a5b99c81d1bc81c99599d5b99607a1b604482015260640161045e565b336000818152609e602052604090819020805460ff19166001179055517f7b742095fd862a654f678473e0672300ad790a7c49739100c3c5dbd5222c2e50906106349088815260200190565b60405180910390a26106463382610f2b565b505060018055505050565b6098546040516000916001600160a01b031690610718906106dc9061067c90339087906020016118e1565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b86868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610fc392505050565b6001600160a01b0316146107625760405162461bcd60e51b8152602060048201526011602482015270696e76616c6964207369676e617475726560781b604482015260640161045e565b5060019392505050565b610774610fdf565b609a54600214806107875750609a546003145b6107a35760405162461bcd60e51b815260040161045e906117e8565b6000609f54116107f55760405162461bcd60e51b815260206004820152601c60248201527f746f74616c41697264726f707065644974656d73206e6f742073657400000000604482015260640161045e565b6000609754609f5461080791906118c2565b9050600060a0548261081991906118af565b9050600081116108645760405162461bcd60e51b81526020600482015260166024820152754e6f2062616c616e636520746f20776974686472617760501b604482015260640161045e565b8060a060008282546108769190611905565b9091555050606554610891906001600160a01b031682610f2b565b5050565b61089d610fdf565b609880546001600160a01b0319166001600160a01b0392909216919091179055565b6108c7610fdf565b6108d16000611039565b565b6108db610fdf565b609a541561092b5760405162461bcd60e51b815260206004820152601b60248201527f5265736572766174696f6e20616c726561647920737461727465640000000000604482015260640161045e565b609755565b606061094582610940609b610e18565b61108b565b9150600061095384846118af565b67ffffffffffffffff81111561096b5761096b6115f9565b604051908082528060200260200182016040528015610994578160200160208202803683370190505b50905060005b6109a485856118af565b8110156109fc576109c06109b88683611905565b609b906110a3565b8282815181106109d2576109d2611918565b6001600160a01b0390921660209283029190910190910152806109f48161192e565b91505061099a565b5090505b92915050565b610a0e610fdf565b609f55565b600260015403610a655760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161045e565b60026001908155609a5414610ab35760405162461bcd60e51b81526020600482015260146024820152732932b9b2b93b30ba34b7b7103737ba1037b832b760611b604482015260640161045e565b609754610ac090856118c2565b3414610b055760405162461bcd60e51b8152602060048201526014602482015273125b98dbdc9c9958dd0811551208185b5bdd5b9d60621b604482015260640161045e565b60008411610b4a5760405162461bcd60e51b81526020600482015260126024820152710416d6f756e74206d757374206265203e20360741b604482015260640161045e565b610b688282610b5886610e22565b6040516020016105609190611947565b50336000908152609d6020526040812054610b84908690611905565b905083811115610bcb5760405162461bcd60e51b81526020600482015260126024820152710dccaee82dae840caf0c6cacac8e640dac2f60731b604482015260640161045e565b336000908152609d6020526040812082905560998054879290610bef908490611905565b90915550610c009050609b336110af565b50604080518681526020810183905290810185905233907f901247658ae940ec71643a7dedf06c11cf4c756d8eb72ce9bb65337ce2c1f4a59060600160405180910390a2505060018055505050565b610c57610fdf565b60ff16609a55565b600054610100900460ff1615808015610c7f5750600054600160ff909116105b80610c995750303b158015610c99575060005460ff166001145b610cfc5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161045e565b6000805460ff191660011790558015610d1f576000805461ff0019166101001790555b610d276110c4565b610d2f6110f3565b670ed5d9d610e48000609755609880546001600160a01b0319166001600160a01b0384161790558015610891576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b610da7610fdf565b6001600160a01b038116610e0c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161045e565b610e1581611039565b50565b6000610a00825490565b606081600003610e495750506040805180820190915260018152600360fc1b602082015290565b8160005b8115610e735780610e5d8161192e565b9150610e6c9050600a83611987565b9150610e4d565b60008167ffffffffffffffff811115610e8e57610e8e6115f9565b6040519080825280601f01601f191660200182016040528015610eb8576020820181803683370190505b5090505b8415610f2357610ecd6001836118af565b9150610eda600a8661199b565b610ee5906030611905565b60f81b818381518110610efa57610efa611918565b60200101906001600160f81b031916908160001a905350610f1c600a86611987565b9450610ebc565b949350505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610f78576040519150601f19603f3d011682016040523d82523d6000602084013e610f7d565b606091505b5050905080610fbe5760405162461bcd60e51b815260206004820152600d60248201526c63616e7420776974686472617760981b604482015260640161045e565b505050565b6000806000610fd28585611122565b915091506109fc81611190565b6065546001600160a01b031633146108d15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161045e565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600081831061109a578161109c565b825b9392505050565b600061109c8383611346565b600061109c836001600160a01b038416611370565b600054610100900460ff166110eb5760405162461bcd60e51b815260040161045e906119af565b6108d16113bf565b600054610100900460ff1661111a5760405162461bcd60e51b815260040161045e906119af565b6108d16113ec565b60008082516041036111585760208301516040840151606085015160001a61114c8782858561141c565b94509450505050611189565b82516040036111815760208301516040840151611176868383611509565b935093505050611189565b506000905060025b9250929050565b60008160048111156111a4576111a46119fa565b036111ac5750565b60018160048111156111c0576111c06119fa565b0361120d5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161045e565b6002816004811115611221576112216119fa565b0361126e5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161045e565b6003816004811115611282576112826119fa565b036112da5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161045e565b60048160048111156112ee576112ee6119fa565b03610e155760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161045e565b600082600001828154811061135d5761135d611918565b9060005260206000200154905092915050565b60008181526001830160205260408120546113b757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a00565b506000610a00565b600054610100900460ff166113e65760405162461bcd60e51b815260040161045e906119af565b60018055565b600054610100900460ff166114135760405162461bcd60e51b815260040161045e906119af565b6108d133611039565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156114535750600090506003611500565b8460ff16601b1415801561146b57508460ff16601c14155b1561147c5750600090506004611500565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156114d0573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166114f957600060019250925050611500565b9150600090505b94509492505050565b6000806001600160ff1b0383168161152660ff86901c601b611905565b90506115348782888561141c565b935093505050935093915050565b60006020828403121561155457600080fd5b81356001600160a01b038116811461109c57600080fd5b60008083601f84011261157d57600080fd5b50813567ffffffffffffffff81111561159557600080fd5b60208301915083602082850101111561118957600080fd5b6000806000604084860312156115c257600080fd5b83359250602084013567ffffffffffffffff8111156115e057600080fd5b6115ec8682870161156b565b9497909650939450505050565b634e487b7160e01b600052604160045260246000fd5b60008060006040848603121561162457600080fd5b833567ffffffffffffffff8082111561163c57600080fd5b6116488783880161156b565b9095509350602086013591508082111561166157600080fd5b818601915086601f83011261167557600080fd5b813581811115611687576116876115f9565b604051601f8201601f19908116603f011681019083821181831017156116af576116af6115f9565b816040528281528960208487010111156116c857600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156116fc57600080fd5b5035919050565b6000806040838503121561171657600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b818110156117665783516001600160a01b031683529284019291840191600101611741565b50909695505050505050565b6000806000806060858703121561178857600080fd5b8435935060208501359250604085013567ffffffffffffffff8111156117ad57600080fd5b6117b98782880161156b565b95989497509550505050565b6000602082840312156117d757600080fd5b813560ff8116811461109c57600080fd5b6020808252602f908201527f5265736572766174696f6e206e6f7420696e20636f6e636c7564696e67206f7260408201526e2066696e697368656420737461746560881b606082015260800190565b6000815160005b81811015611858576020818501810151868301520161183e565b50600093019283525090919050565b7f6361707461696e7a2d726566756e642d776f6e5f616d6f756e742d00000000008152600061109c601b830184611837565b634e487b7160e01b600052601160045260246000fd5b81810381811115610a0057610a00611899565b60008160001904831182151516156118dc576118dc611899565b500290565b6bffffffffffffffffffffffff198360601b1681526000610f236014830184611837565b80820180821115610a0057610a00611899565b634e487b7160e01b600052603260045260246000fd5b60006001820161194057611940611899565b5060010190565b746361707461696e7a2d726573657276652d6d61782d60581b8152600061109c6015830184611837565b634e487b7160e01b600052601260045260246000fd5b60008261199657611996611971565b500490565b6000826119aa576119aa611971565b500690565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220837b6e463fc6f2a4bb3d3c9a529b522f1e6f66ef8e4bd1e4047d5639cf88baf564736f6c63430008100033
Deployed Bytecode
0x6080604052600436106101355760003560e01c80638607093f116100ab578063b9f65cfc1161006f578063b9f65cfc1461035d578063bf9649531461037d578063c4d66de814610393578063dd21d604146103b3578063eb29c311146103c9578063f2fde38b146103df57600080fd5b80638607093f146102c95780638da5cb5b146102f65780639a79712814610314578063ad278c1e1461032a578063b8454b811461034a57600080fd5b806337369b22116100fd57806337369b221461021c5780636c19e78314610231578063715018a61461025157806373d6bcd91461026657806379197647146102865780637b5581ed146102b357600080fd5b806318133d151461013a5780632252c0f01461017f57806322ab1334146101a2578063238ac933146101c457806330f89953146101fc575b600080fd5b34801561014657600080fd5b5061016a610155366004611542565b609e6020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b34801561018b57600080fd5b506101946103ff565b604051908152602001610176565b3480156101ae57600080fd5b506101c26101bd3660046115ad565b610410565b005b3480156101d057600080fd5b506098546101e4906001600160a01b031681565b6040516001600160a01b039091168152602001610176565b34801561020857600080fd5b5061016a61021736600461160f565b610651565b34801561022857600080fd5b506101c261076c565b34801561023d57600080fd5b506101c261024c366004611542565b610895565b34801561025d57600080fd5b506101c26108bf565b34801561027257600080fd5b506101c26102813660046116ea565b6108d3565b34801561029257600080fd5b506102a66102a1366004611703565b610930565b6040516101769190611725565b3480156102bf57600080fd5b5061019460995481565b3480156102d557600080fd5b506101946102e4366004611542565b609d6020526000908152604090205481565b34801561030257600080fd5b506065546001600160a01b03166101e4565b34801561032057600080fd5b5061019460a05481565b34801561033657600080fd5b506101c26103453660046116ea565b610a06565b6101c2610358366004611772565b610a13565b34801561036957600080fd5b506101c26103783660046117c5565b610c4f565b34801561038957600080fd5b50610194609a5481565b34801561039f57600080fd5b506101c26103ae366004611542565b610c5f565b3480156103bf57600080fd5b5061019460975481565b3480156103d557600080fd5b50610194609f5481565b3480156103eb57600080fd5b506101c26103fa366004611542565b610d9f565b600061040b609b610e18565b905090565b6002600154036104675760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b60026001819055609a54148061047f5750609a546003145b61049b5760405162461bcd60e51b815260040161045e906117e8565b336000908152609d60205260409020546104ef5760405162461bcd60e51b8152602060048201526015602482015274139bc81c995cd95c9d985d1a5bdb881c9958dbdc99605a1b604482015260640161045e565b336000908152609e602052604090205460ff16156105425760405162461bcd60e51b815260206004820152601060248201526f105b1c9958591e481c99599d5b99195960821b604482015260640161045e565b610574828261055086610e22565b6040516020016105609190611867565b604051602081830303815290604052610651565b50336000908152609d60205260408120546105909085906118af565b90506000609754826105a291906118c2565b9050600081116105e85760405162461bcd60e51b8152602060048201526011602482015270139bdd1a1a5b99c81d1bc81c99599d5b99607a1b604482015260640161045e565b336000818152609e602052604090819020805460ff19166001179055517f7b742095fd862a654f678473e0672300ad790a7c49739100c3c5dbd5222c2e50906106349088815260200190565b60405180910390a26106463382610f2b565b505060018055505050565b6098546040516000916001600160a01b031690610718906106dc9061067c90339087906020016118e1565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b86868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610fc392505050565b6001600160a01b0316146107625760405162461bcd60e51b8152602060048201526011602482015270696e76616c6964207369676e617475726560781b604482015260640161045e565b5060019392505050565b610774610fdf565b609a54600214806107875750609a546003145b6107a35760405162461bcd60e51b815260040161045e906117e8565b6000609f54116107f55760405162461bcd60e51b815260206004820152601c60248201527f746f74616c41697264726f707065644974656d73206e6f742073657400000000604482015260640161045e565b6000609754609f5461080791906118c2565b9050600060a0548261081991906118af565b9050600081116108645760405162461bcd60e51b81526020600482015260166024820152754e6f2062616c616e636520746f20776974686472617760501b604482015260640161045e565b8060a060008282546108769190611905565b9091555050606554610891906001600160a01b031682610f2b565b5050565b61089d610fdf565b609880546001600160a01b0319166001600160a01b0392909216919091179055565b6108c7610fdf565b6108d16000611039565b565b6108db610fdf565b609a541561092b5760405162461bcd60e51b815260206004820152601b60248201527f5265736572766174696f6e20616c726561647920737461727465640000000000604482015260640161045e565b609755565b606061094582610940609b610e18565b61108b565b9150600061095384846118af565b67ffffffffffffffff81111561096b5761096b6115f9565b604051908082528060200260200182016040528015610994578160200160208202803683370190505b50905060005b6109a485856118af565b8110156109fc576109c06109b88683611905565b609b906110a3565b8282815181106109d2576109d2611918565b6001600160a01b0390921660209283029190910190910152806109f48161192e565b91505061099a565b5090505b92915050565b610a0e610fdf565b609f55565b600260015403610a655760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161045e565b60026001908155609a5414610ab35760405162461bcd60e51b81526020600482015260146024820152732932b9b2b93b30ba34b7b7103737ba1037b832b760611b604482015260640161045e565b609754610ac090856118c2565b3414610b055760405162461bcd60e51b8152602060048201526014602482015273125b98dbdc9c9958dd0811551208185b5bdd5b9d60621b604482015260640161045e565b60008411610b4a5760405162461bcd60e51b81526020600482015260126024820152710416d6f756e74206d757374206265203e20360741b604482015260640161045e565b610b688282610b5886610e22565b6040516020016105609190611947565b50336000908152609d6020526040812054610b84908690611905565b905083811115610bcb5760405162461bcd60e51b81526020600482015260126024820152710dccaee82dae840caf0c6cacac8e640dac2f60731b604482015260640161045e565b336000908152609d6020526040812082905560998054879290610bef908490611905565b90915550610c009050609b336110af565b50604080518681526020810183905290810185905233907f901247658ae940ec71643a7dedf06c11cf4c756d8eb72ce9bb65337ce2c1f4a59060600160405180910390a2505060018055505050565b610c57610fdf565b60ff16609a55565b600054610100900460ff1615808015610c7f5750600054600160ff909116105b80610c995750303b158015610c99575060005460ff166001145b610cfc5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161045e565b6000805460ff191660011790558015610d1f576000805461ff0019166101001790555b610d276110c4565b610d2f6110f3565b670ed5d9d610e48000609755609880546001600160a01b0319166001600160a01b0384161790558015610891576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b610da7610fdf565b6001600160a01b038116610e0c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161045e565b610e1581611039565b50565b6000610a00825490565b606081600003610e495750506040805180820190915260018152600360fc1b602082015290565b8160005b8115610e735780610e5d8161192e565b9150610e6c9050600a83611987565b9150610e4d565b60008167ffffffffffffffff811115610e8e57610e8e6115f9565b6040519080825280601f01601f191660200182016040528015610eb8576020820181803683370190505b5090505b8415610f2357610ecd6001836118af565b9150610eda600a8661199b565b610ee5906030611905565b60f81b818381518110610efa57610efa611918565b60200101906001600160f81b031916908160001a905350610f1c600a86611987565b9450610ebc565b949350505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610f78576040519150601f19603f3d011682016040523d82523d6000602084013e610f7d565b606091505b5050905080610fbe5760405162461bcd60e51b815260206004820152600d60248201526c63616e7420776974686472617760981b604482015260640161045e565b505050565b6000806000610fd28585611122565b915091506109fc81611190565b6065546001600160a01b031633146108d15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161045e565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600081831061109a578161109c565b825b9392505050565b600061109c8383611346565b600061109c836001600160a01b038416611370565b600054610100900460ff166110eb5760405162461bcd60e51b815260040161045e906119af565b6108d16113bf565b600054610100900460ff1661111a5760405162461bcd60e51b815260040161045e906119af565b6108d16113ec565b60008082516041036111585760208301516040840151606085015160001a61114c8782858561141c565b94509450505050611189565b82516040036111815760208301516040840151611176868383611509565b935093505050611189565b506000905060025b9250929050565b60008160048111156111a4576111a46119fa565b036111ac5750565b60018160048111156111c0576111c06119fa565b0361120d5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161045e565b6002816004811115611221576112216119fa565b0361126e5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161045e565b6003816004811115611282576112826119fa565b036112da5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161045e565b60048160048111156112ee576112ee6119fa565b03610e155760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161045e565b600082600001828154811061135d5761135d611918565b9060005260206000200154905092915050565b60008181526001830160205260408120546113b757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a00565b506000610a00565b600054610100900460ff166113e65760405162461bcd60e51b815260040161045e906119af565b60018055565b600054610100900460ff166114135760405162461bcd60e51b815260040161045e906119af565b6108d133611039565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156114535750600090506003611500565b8460ff16601b1415801561146b57508460ff16601c14155b1561147c5750600090506004611500565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156114d0573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166114f957600060019250925050611500565b9150600090505b94509492505050565b6000806001600160ff1b0383168161152660ff86901c601b611905565b90506115348782888561141c565b935093505050935093915050565b60006020828403121561155457600080fd5b81356001600160a01b038116811461109c57600080fd5b60008083601f84011261157d57600080fd5b50813567ffffffffffffffff81111561159557600080fd5b60208301915083602082850101111561118957600080fd5b6000806000604084860312156115c257600080fd5b83359250602084013567ffffffffffffffff8111156115e057600080fd5b6115ec8682870161156b565b9497909650939450505050565b634e487b7160e01b600052604160045260246000fd5b60008060006040848603121561162457600080fd5b833567ffffffffffffffff8082111561163c57600080fd5b6116488783880161156b565b9095509350602086013591508082111561166157600080fd5b818601915086601f83011261167557600080fd5b813581811115611687576116876115f9565b604051601f8201601f19908116603f011681019083821181831017156116af576116af6115f9565b816040528281528960208487010111156116c857600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156116fc57600080fd5b5035919050565b6000806040838503121561171657600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b818110156117665783516001600160a01b031683529284019291840191600101611741565b50909695505050505050565b6000806000806060858703121561178857600080fd5b8435935060208501359250604085013567ffffffffffffffff8111156117ad57600080fd5b6117b98782880161156b565b95989497509550505050565b6000602082840312156117d757600080fd5b813560ff8116811461109c57600080fd5b6020808252602f908201527f5265736572766174696f6e206e6f7420696e20636f6e636c7564696e67206f7260408201526e2066696e697368656420737461746560881b606082015260800190565b6000815160005b81811015611858576020818501810151868301520161183e565b50600093019283525090919050565b7f6361707461696e7a2d726566756e642d776f6e5f616d6f756e742d00000000008152600061109c601b830184611837565b634e487b7160e01b600052601160045260246000fd5b81810381811115610a0057610a00611899565b60008160001904831182151516156118dc576118dc611899565b500290565b6bffffffffffffffffffffffff198360601b1681526000610f236014830184611837565b80820180821115610a0057610a00611899565b634e487b7160e01b600052603260045260246000fd5b60006001820161194057611940611899565b5060010190565b746361707461696e7a2d726573657276652d6d61782d60581b8152600061109c6015830184611837565b634e487b7160e01b600052601260045260246000fd5b60008261199657611996611971565b500490565b6000826119aa576119aa611971565b500690565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220837b6e463fc6f2a4bb3d3c9a529b522f1e6f66ef8e4bd1e4047d5639cf88baf564736f6c63430008100033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.