More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 1,050,356 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw NF Ts | 38416661 | 226 days ago | IN | 0 BNB | 0.00008198 | ||||
Register | 38416660 | 226 days ago | IN | 0 BNB | 0.00002019 | ||||
Withdraw NF Ts | 34859999 | 350 days ago | IN | 0 BNB | 0.00009018 | ||||
Withdraw NF Ts | 34859980 | 350 days ago | IN | 0 BNB | 0.00009018 | ||||
Withdraw NF Ts | 34859960 | 350 days ago | IN | 0 BNB | 0.00009018 | ||||
Withdraw NF Ts | 34859952 | 350 days ago | IN | 0 BNB | 0.00009018 | ||||
Withdraw NF Ts | 34859758 | 350 days ago | IN | 0 BNB | 0.00009018 | ||||
Withdraw NF Ts | 34859674 | 350 days ago | IN | 0 BNB | 0.00009018 | ||||
Withdraw NF Ts | 34859216 | 350 days ago | IN | 0 BNB | 0.00009018 | ||||
Withdraw NF Ts | 34336711 | 368 days ago | IN | 0 BNB | 0.00008198 | ||||
Register | 34336711 | 368 days ago | IN | 0 BNB | 0.0000323 | ||||
Withdraw NF Ts | 31615084 | 463 days ago | IN | 0 BNB | 0.00009018 | ||||
Withdraw NF Ts | 31615061 | 463 days ago | IN | 0 BNB | 0.00009018 | ||||
Withdraw NF Ts | 31341348 | 472 days ago | IN | 0 BNB | 0.00035553 | ||||
Withdraw NF Ts | 31334956 | 472 days ago | IN | 0 BNB | 0.00011851 | ||||
Withdraw NF Ts | 31334943 | 472 days ago | IN | 0 BNB | 0.00011851 | ||||
Withdraw NF Ts | 31334937 | 472 days ago | IN | 0 BNB | 0.00011851 | ||||
Withdraw NF Ts | 31334927 | 472 days ago | IN | 0 BNB | 0.00011851 | ||||
Withdraw NF Ts | 31334922 | 472 days ago | IN | 0 BNB | 0.00011851 | ||||
Withdraw NF Ts | 31334916 | 472 days ago | IN | 0 BNB | 0.00011851 | ||||
Withdraw NF Ts | 31334904 | 472 days ago | IN | 0 BNB | 0.00011851 | ||||
Withdraw NF Ts | 31334899 | 472 days ago | IN | 0 BNB | 0.00011851 | ||||
Withdraw NF Ts | 31333640 | 473 days ago | IN | 0 BNB | 0.00011851 | ||||
Withdraw NF Ts | 31333622 | 473 days ago | IN | 0 BNB | 0.00011851 | ||||
Withdraw NF Ts | 31333615 | 473 days ago | IN | 0 BNB | 0.00011851 |
Loading...
Loading
Contract Name:
AnswerFirstV2
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)
/*** * MIT License * =========== * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: __ __ ______ ______ ______ ______ ______ __ __ /\ \ /\ \ /\ ___\ /\ ___\ /\ ___\ /\ __ \ /\ == \ /\ "-./ \ \ \ \____ \ \ \ \ \ __\ \ \ __\ \ \ __\ \ \ \/\ \ \ \ __< \ \ \-./\ \ \ \_____\ \ \_\ \ \_\ \ \_____\ \ \_\ \ \_____\ \ \_\ \_\ \ \_\ \ \_\ \/_____/ \/_/ \/_/ \/_____/ \/_/ \/_____/ \/_/ /_/ \/_/ \/_/ * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE */ // SPDX-License-Identifier: MIT pragma solidity 0.8.16; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "./Interface/IAdorn1155.sol"; import "./Interface/IAvatar721.sol"; contract AnswerFirstV2 is ReentrancyGuard, Pausable, Ownable { enum RegisterType { eCash, eAvatar, ePoints } event eSetIAM( uint256 activityId, address IAM ); event eSetVAULT( uint256 activityId, address VAULT ); event eSetFee( uint256 activityId, uint256 registerFee, uint256 stakeFee ); event eSetAirDropId( uint256 activityId, uint256 dropId ); event eUpdateSigner( uint256 activityId, address signer ); event eNewActivity( uint256 activityId, uint256 startTime, uint256 endTime ); event eSetActivityTime( uint256 activityId, uint256 startTime, uint256 endTime ); event eRegister( uint256 tokenId, address owner, uint256 registerType, uint256 timestamp, uint256 activityId, string affCode ); event eWithdraw( uint256[] ids, address owner, uint256 timestamp, uint256 activityId ); struct RegisterInfo{ uint256 tokenId; uint256 activityId; } struct ActivityInfo{ uint256 registerCount; uint256 allPay; uint256 endTime; uint256 startTime; } struct SrcData { uint256 registerType; uint256 tokenId; bytes32 signCode; bytes wlSignature; } using SafeERC20 for IERC20; using ECDSA for bytes32; using Address for address; using EnumerableSet for EnumerableSet.Bytes32Set; struct EIP712Domain { string name; string version; uint256 chainId; address verifyingContract; } bytes32 public immutable DOMAIN_SEPARATOR; bytes32 public constant EIP712DOMAIN_TYPEHASH = keccak256( "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" ); // //type hash bytes32 public constant TYPE_HASH = keccak256( "SrcData(uint256 registerType,uint256 tokenId,bytes32 signCode,bytes wlSignature)" ); IAdorn1155 public _erc1155; IAvatar721 public _erc721; IERC20 public _erc20; uint256 public _registerFee = 20 ether; uint256 public _stakeFee = 1 ether; uint256 public _deltaTime = 24 hours; uint256 public _stakeDuration = 10 minutes; uint256 public _airDropId; uint256 public _activityId; address public _IAM; address public _VAULT; address public _SIGNER; uint256 public _MAX = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff; // for players mapping(uint256 => mapping( address => RegisterInfo )) public _registerInfo; // activityId=>address=>RegisterInfo // for activity info mapping(uint256 => ActivityInfo) public _activityInfo; modifier onlyIAM() { require(_IAM == msg.sender , "must call by IAM"); _; } constructor(address erc20, address erc721, address erc1155, address VAULT,address SIGNER ) { require(erc1155 != address(0x0), "invalid erc1155 adddress "); require(erc721 != address(0x0), "invalid erc721 adddress "); require(erc20 != address(0x0), "invalid erc20 adddress "); require(VAULT != address(0x0), "invalid VAULT adddress "); require(SIGNER != address(0x0), "invalid SIGNER adddress "); DOMAIN_SEPARATOR = keccak256( abi.encode( EIP712DOMAIN_TYPEHASH, keccak256("AnswerFirstV2"), keccak256("2"), block.chainid, address(this) ) ); _erc20 = IERC20(erc20); _erc721 = IAvatar721(erc721); _erc1155 = IAdorn1155(erc1155); _VAULT = VAULT; _SIGNER = SIGNER; _IAM = msg.sender; } function setErc1155(address erc1155) public onlyOwner{ require(erc1155 != address(0x0), "invalid erc1155 adddress "); _erc1155 = IAdorn1155(erc1155); } function setErc721(address erc721) public onlyOwner{ require(erc721 != address(0x0), "invalid erc721 adddress "); _erc721 = IAvatar721(erc721); } function setErc20(address erc20) public onlyOwner{ require(erc20 != address(0x0), "invalid erc20 adddress "); _erc20 = IERC20(erc20); } function setFee(uint256 registerFee,uint256 stakeFee) public onlyOwner{ _registerFee = registerFee; _stakeFee = stakeFee; emit eSetFee(_activityId, registerFee,stakeFee); } function setActivityTime(uint256 startTime, uint256 deltaTime) public onlyOwner{ _deltaTime = deltaTime; _activityInfo[_activityId].startTime = startTime; _activityInfo[_activityId].endTime = startTime + _deltaTime; emit eSetActivityTime(_activityId,startTime,startTime + _deltaTime); } function set1155Id(uint256 airDropId) public onlyOwner{ _airDropId = airDropId; emit eSetAirDropId(_activityId, airDropId); } function setVault(address VAULT) public onlyOwner{ require(VAULT != address(0x0), "invalid VAULT adddress "); _VAULT = VAULT; emit eSetVAULT(_activityId, VAULT); } function setIAM(address IAM) public onlyOwner { require(IAM != address(0x0), "invalid IAM adddress "); _IAM = IAM; emit eSetIAM(_activityId, IAM); } function updateSigner( address SIGNER) public onlyOwner { require(SIGNER != address(0x0), "SIGNER is zero address!"); _SIGNER = SIGNER; emit eUpdateSigner(_activityId, SIGNER); } function onERC721Received(address /*operator*/ , address /*from*/ , uint256 /*tokenId*/, bytes calldata /*data*/) external pure returns (bytes4) { return this.onERC721Received.selector; } function newActivity(uint256 airDropId, uint256 deltaTime) public onlyIAM { _deltaTime = deltaTime; _activityId++; _activityInfo[_activityId].startTime = block.timestamp; _activityInfo[_activityId].endTime = block.timestamp + _deltaTime; _airDropId = airDropId; emit eNewActivity(_activityId,block.timestamp,block.timestamp + _deltaTime); } function isRegister(uint256 activityId, address owner ) public view returns(bool){ return _registerInfo[activityId][owner].activityId != 0; } function getRegisterInfo(uint256 activityId,address owner) public view returns(RegisterInfo memory ){ return _registerInfo[activityId][owner]; } function getActivityInfo(uint256 activityId) public view returns(ActivityInfo memory ){ return _activityInfo[activityId]; } function getAllRegisterInfo(address owner) public view returns(RegisterInfo[] memory ){ RegisterInfo[] memory records = new RegisterInfo[](_activityId+1); for(uint256 i=0; i<=_activityId; i++){ records[i] = _registerInfo[i][owner]; } return records; } function register(SrcData calldata srcData, bytes memory dataSignature, string calldata affCode) public whenNotPaused nonReentrant { require( !isRegister(_activityId,msg.sender), "already registered!"); require( block.timestamp < _activityInfo[_activityId].endTime, "register time is up!"); _activityInfo[_activityId].registerCount += 1; if(srcData.registerType == (uint256)(RegisterType.eCash)){ _erc20.safeTransferFrom(msg.sender, _VAULT, _registerFee); _activityInfo[_activityId].allPay += _registerFee; //set a invalid token Id _registerInfo[_activityId][msg.sender].tokenId = _MAX; } else if(srcData.registerType == (uint256)(RegisterType.eAvatar)){ require( IERC721(address(_erc721)).ownerOf(srcData.tokenId) == msg.sender, "invalid owner!"); IERC721(address(_erc721)).safeTransferFrom(msg.sender, address(this), srcData.tokenId); _registerInfo[_activityId][msg.sender].tokenId = srcData.tokenId; _erc20.safeTransferFrom(msg.sender, _VAULT, _stakeFee); _activityInfo[_activityId].allPay += _stakeFee; } else if(srcData.registerType == (uint256)(RegisterType.ePoints)){ require(srcData.wlSignature.length>0,"lifeform: invalid wlSignature!"); require(verify(srcData, msg.sender, dataSignature), "lifeform: this sign is not valid"); require(IERC721(address(_erc721)).ownerOf(srcData.tokenId) == msg.sender, "invalid owner!"); IERC721(address(_erc721)).safeTransferFrom(msg.sender, address(this), srcData.tokenId); _registerInfo[_activityId][msg.sender].tokenId = srcData.tokenId; } else{ require(false, "invalid register type!"); } _registerInfo[_activityId][msg.sender].activityId=_activityId; if(_airDropId>0){ _erc1155.mint(msg.sender, _airDropId, 1, ""); } emit eRegister(srcData.tokenId, msg.sender, srcData.registerType, block.timestamp, _activityId, affCode); } function withdrawNFTs() public whenNotPaused nonReentrant { uint256[] memory ids = new uint256[](_activityId); uint32 count=0; uint256 tokenId = 0; for(uint256 k=0; k<_activityId; k++){ tokenId = _registerInfo[k][msg.sender].tokenId; if( _registerInfo[k][msg.sender].activityId >0 && tokenId != _MAX && isRegister(k, msg.sender)){ IERC721(address(_erc721)).safeTransferFrom(address(this), msg.sender, tokenId); _registerInfo[k][msg.sender].activityId=0; ids[count]=tokenId; count = count+1; } } tokenId = _registerInfo[_activityId][msg.sender].tokenId; if( _registerInfo[_activityId][msg.sender].activityId >0 && tokenId != _MAX && block.timestamp >= _activityInfo[_activityId].endTime+_stakeDuration){ IERC721(address(_erc721)).safeTransferFrom(address(this), msg.sender, tokenId); _registerInfo[_activityId][msg.sender].activityId=0; ids[count]=tokenId; count = count+1; } require(count>0, "nothing to be withdrawed! the pledge hasn't expired yet"); emit eWithdraw(ids, msg.sender, block.timestamp, _activityId); } //for finaly reward function reward(address[] calldata whiteList,uint256[] calldata amounts) onlyIAM external { require(whiteList.length == amounts.length, "count not match!"); uint256 cost = 0; for(uint256 i=0; i<amounts.length; i++){ cost = cost + amounts[i]; } require(_erc20.balanceOf(address(this)) >= cost, "invalid cost amount! "); for (uint256 i=0; i<whiteList.length; i++) { require(whiteList[i] != address(0),"Address is not valid"); _erc20.safeTransfer(whiteList[i], amounts[i]); } } function urgencyWithdrawErc721(address erc721, address target, uint256[] calldata ids) external onlyOwner { for (uint256 i = 0; i < ids.length; ++i) { (IERC721)(erc721).safeTransferFrom(address(this), target, ids[i],""); } } //generate the whitelist user hash function hashWhiteList( address user, bytes32 signCode ) public pure returns (bytes32) { bytes32 message = keccak256(abi.encodePacked(user, signCode)); // hash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", message)); return message.toEthSignedMessageHash(); } //generate the SrcData hash function hashCondition(SrcData calldata srcData) public pure returns (bytes32) { // struct SrcData { // uint256 registerType; // uint256 tokenId; // bytes32 signCode; // bytes wlSignature; // } return keccak256( abi.encode( TYPE_HASH, srcData.registerType, srcData.tokenId, srcData.signCode, keccak256(srcData.wlSignature)) ); } function hashDigest(SrcData calldata srcData) public view returns (bytes32) { return keccak256(abi.encodePacked( "\x19\x01", DOMAIN_SEPARATOR, hashCondition(srcData) )); } function verifySignature(bytes32 hash, bytes memory signature) public view returns (bool) { //hash must be a soliditySha3 with accounts.sign return hash.recover(signature) == _SIGNER; } function verifyCondition(SrcData calldata srcData, uint8 v, bytes32 r, bytes32 s) public view returns (bool) { bytes32 digest = hashDigest(srcData); return ecrecover(digest, v, r, s) == _SIGNER; } function verify( SrcData calldata srcData, address user, bytes memory dataSignature ) public view returns (bool) { require(srcData.signCode != "","lifeform: invalid sign code!"); bytes32 digest = hashDigest(srcData); require(verifySignature(digest,dataSignature),"lifeform: invalid dataSignatures! "); bytes32 hash = hashWhiteList(user, srcData.signCode); require( verifySignature(hash, srcData.wlSignature), "lifeform: invalid wlSignature! "); return true; } function pause() public onlyOwner{ if(!paused()){ _pause(); } else{ _unpause(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.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 Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _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); } }
// 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) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// 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 v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/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 v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
/*** * MIT License * =========== * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: __ __ ______ ______ ______ ______ ______ __ __ /\ \ /\ \ /\ ___\ /\ ___\ /\ ___\ /\ __ \ /\ == \ /\ "-./ \ \ \ \____ \ \ \ \ \ __\ \ \ __\ \ \ __\ \ \ \/\ \ \ \ __< \ \ \-./\ \ \ \_____\ \ \_\ \ \_\ \ \_____\ \ \_\ \ \_____\ \ \_\ \_\ \ \_\ \ \_\ \/_____/ \/_/ \/_/ \/_____/ \/_/ \/_____/ \/_/ /_/ \/_/ \/_/ * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE */ // SPDX-License-Identifier: MIT pragma solidity 0.8.16; interface IAdorn1155 { struct NftInfo1155{ uint256 id; uint256 amount; } function mint(address account, uint256 tokenId, uint256 amount, bytes memory data) external; function mintBatch(address to, uint256[] memory tokenIds, uint256[] memory amounts, bytes memory data) external; function burn(address account, uint256 tokenId, uint256 amount) external; function burnBatch(address account, uint256[] memory tokenIds, uint256[] memory amounts) external; function tokensOfOwner(address owner, uint256 offset, uint256 pageMax ) external view returns ( IAdorn1155.NftInfo1155[] memory nftInfos ) ; function totalIds() external view returns ( uint256[] memory ids ); }
/*** * MIT License * =========== * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: __ __ ______ ______ ______ ______ ______ __ __ /\ \ /\ \ /\ ___\ /\ ___\ /\ ___\ /\ __ \ /\ == \ /\ "-./ \ \ \ \____ \ \ \ \ \ __\ \ \ __\ \ \ __\ \ \ \/\ \ \ \ __< \ \ \-./\ \ \ \_____\ \ \_\ \ \_\ \ \_____\ \ \_\ \ \_____\ \ \_\ \_\ \ \_\ \ \_\ \/_____/ \/_/ \/_/ \/_____/ \/_/ \/_____/ \/_/ /_/ \/_/ \/_/ * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE */ // SPDX-License-Identifier: MIT pragma solidity 0.8.16; interface IAvatar721 { event TransferBatch(address indexed from, address indexed to, uint256[] ids); struct ExtraInfo { uint256 id; address mintRule; address erc20; uint256 erc20Amount; address erc721; uint256 [] children721; address erc1155; uint256 [] children1155; uint256 [] amount1155; } function getExtraInfo(uint256 tokenId) external view returns (IAvatar721.ExtraInfo memory); function mint(address to, IAvatar721.ExtraInfo calldata info) external returns (uint256 id) ; function burn(uint256 tokenId) external; function safeBatchTransferFrom(address from, address to, uint256[] memory ids , bytes memory data) external; function mintedNumber(address addr) external view returns(uint256); }
{ "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
[{"inputs":[{"internalType":"address","name":"erc20","type":"address"},{"internalType":"address","name":"erc721","type":"address"},{"internalType":"address","name":"erc1155","type":"address"},{"internalType":"address","name":"VAULT","type":"address"},{"internalType":"address","name":"SIGNER","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"activityId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTime","type":"uint256"}],"name":"eNewActivity","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"registerType","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"activityId","type":"uint256"},{"indexed":false,"internalType":"string","name":"affCode","type":"string"}],"name":"eRegister","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"activityId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTime","type":"uint256"}],"name":"eSetActivityTime","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"activityId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"dropId","type":"uint256"}],"name":"eSetAirDropId","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"activityId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"registerFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"stakeFee","type":"uint256"}],"name":"eSetFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"activityId","type":"uint256"},{"indexed":false,"internalType":"address","name":"IAM","type":"address"}],"name":"eSetIAM","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"activityId","type":"uint256"},{"indexed":false,"internalType":"address","name":"VAULT","type":"address"}],"name":"eSetVAULT","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"activityId","type":"uint256"},{"indexed":false,"internalType":"address","name":"signer","type":"address"}],"name":"eUpdateSigner","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"activityId","type":"uint256"}],"name":"eWithdraw","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EIP712DOMAIN_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TYPE_HASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_IAM","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_MAX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_SIGNER","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_VAULT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_activityId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_activityInfo","outputs":[{"internalType":"uint256","name":"registerCount","type":"uint256"},{"internalType":"uint256","name":"allPay","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_airDropId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_deltaTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_erc1155","outputs":[{"internalType":"contract IAdorn1155","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_erc20","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_erc721","outputs":[{"internalType":"contract IAvatar721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_registerFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"_registerInfo","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"activityId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_stakeDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_stakeFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"activityId","type":"uint256"}],"name":"getActivityInfo","outputs":[{"components":[{"internalType":"uint256","name":"registerCount","type":"uint256"},{"internalType":"uint256","name":"allPay","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"}],"internalType":"struct AnswerFirstV2.ActivityInfo","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"getAllRegisterInfo","outputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"activityId","type":"uint256"}],"internalType":"struct AnswerFirstV2.RegisterInfo[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"activityId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"getRegisterInfo","outputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"activityId","type":"uint256"}],"internalType":"struct AnswerFirstV2.RegisterInfo","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"registerType","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"signCode","type":"bytes32"},{"internalType":"bytes","name":"wlSignature","type":"bytes"}],"internalType":"struct AnswerFirstV2.SrcData","name":"srcData","type":"tuple"}],"name":"hashCondition","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"registerType","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"signCode","type":"bytes32"},{"internalType":"bytes","name":"wlSignature","type":"bytes"}],"internalType":"struct AnswerFirstV2.SrcData","name":"srcData","type":"tuple"}],"name":"hashDigest","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"bytes32","name":"signCode","type":"bytes32"}],"name":"hashWhiteList","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"activityId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"isRegister","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"airDropId","type":"uint256"},{"internalType":"uint256","name":"deltaTime","type":"uint256"}],"name":"newActivity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"registerType","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"signCode","type":"bytes32"},{"internalType":"bytes","name":"wlSignature","type":"bytes"}],"internalType":"struct AnswerFirstV2.SrcData","name":"srcData","type":"tuple"},{"internalType":"bytes","name":"dataSignature","type":"bytes"},{"internalType":"string","name":"affCode","type":"string"}],"name":"register","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"whiteList","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"reward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"airDropId","type":"uint256"}],"name":"set1155Id","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"deltaTime","type":"uint256"}],"name":"setActivityTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"erc1155","type":"address"}],"name":"setErc1155","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"erc20","type":"address"}],"name":"setErc20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"erc721","type":"address"}],"name":"setErc721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"registerFee","type":"uint256"},{"internalType":"uint256","name":"stakeFee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"IAM","type":"address"}],"name":"setIAM","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"VAULT","type":"address"}],"name":"setVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"SIGNER","type":"address"}],"name":"updateSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"erc721","type":"address"},{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"urgencyWithdrawErc721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"registerType","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"signCode","type":"bytes32"},{"internalType":"bytes","name":"wlSignature","type":"bytes"}],"internalType":"struct AnswerFirstV2.SrcData","name":"srcData","type":"tuple"},{"internalType":"address","name":"user","type":"address"},{"internalType":"bytes","name":"dataSignature","type":"bytes"}],"name":"verify","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"registerType","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"signCode","type":"bytes32"},{"internalType":"bytes","name":"wlSignature","type":"bytes"}],"internalType":"struct AnswerFirstV2.SrcData","name":"srcData","type":"tuple"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"verifyCondition","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"hash","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"verifySignature","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawNFTs","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a06040526801158e460913d00000600555670de0b6b3a764000060065562015180600755610258600855600019600e553480156200003d57600080fd5b506040516200341a3803806200341a8339810160408190526200006091620003be565b60016000819055805460ff191690556200007a3362000347565b6001600160a01b038316620000d65760405162461bcd60e51b815260206004820152601960248201527f696e76616c69642065726331313535206164646472657373200000000000000060448201526064015b60405180910390fd5b6001600160a01b0384166200012e5760405162461bcd60e51b815260206004820152601860248201527f696e76616c6964206572633732312061646464726573732000000000000000006044820152606401620000cd565b6001600160a01b038516620001865760405162461bcd60e51b815260206004820152601760248201527f696e76616c6964206572633230206164646472657373200000000000000000006044820152606401620000cd565b6001600160a01b038216620001de5760405162461bcd60e51b815260206004820152601760248201527f696e76616c6964205641554c54206164646472657373200000000000000000006044820152606401620000cd565b6001600160a01b038116620002365760405162461bcd60e51b815260206004820152601860248201527f696e76616c6964205349474e45522061646464726573732000000000000000006044820152606401620000cd565b604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f74432cbed9b59a24853645dad0b8bd5e551696d8e0f7502c5e8201d5f3d4e823918101919091527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a560608201524660808201523060a082015260c00160408051808303601f190181529190528051602090910120608052600480546001600160a01b03199081166001600160a01b03978816179091556003805482169587169590951790945560028054851693861693909317909255600c80548416918516919091179055600d805483169190931617909155600b80543392169190911790556200042e565b600180546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b0381168114620003b957600080fd5b919050565b600080600080600060a08688031215620003d757600080fd5b620003e286620003a1565b9450620003f260208701620003a1565b93506200040260408701620003a1565b92506200041260608701620003a1565b91506200042260808701620003a1565b90509295509295909350565b608051612fc962000451600039600081816103d10152610e6f0152612fc96000f3fe608060405234801561001057600080fd5b50600436106102a05760003560e01c80638ca3abe711610167578063caf11fd8116100ce578063e4cc18fb11610087578063e4cc18fb14610709578063e6f51aab1461071c578063ee9b80a414610725578063f2fde38b14610738578063f709f5381461074b578063f899ccd61461075e57600080fd5b8063caf11fd814610658578063d5bfbf9f14610661578063d7fb5cc114610669578063daca6f781461067c578063de17cb1e1461068f578063df09dbea146106f657600080fd5b8063b07238b211610120578063b07238b2146105dc578063b2e52988146105e5578063b7f03829146105f8578063c106e1291461060b578063c49f91d31461061e578063c569e0601461064557600080fd5b80638ca3abe71461055a5780638da5cb5b1461056d57806392703a1814610583578063a7ecd37e14610596578063ad6de87f146105a9578063ae2c8da3146105c957600080fd5b80635db0a99f1161020b5780636bc054f1116101c45780636bc054f114610512578063715018a614610525578063819c72ae1461052d5780638456cb5914610540578063894547dd146105485780638aa8a2c31461055157600080fd5b80635db0a99f146104965780635eaca353146104a95780635fb45714146104bc578063611be309146104c557806364d4c819146104d85780636817031b146104ff57600080fd5b80633644e5151161025d5780633644e515146103cc5780633af401f6146103f35780634a830d011461040657806352f7c988146104315780635c975abb146104445780635cbd269b1461044f57600080fd5b80630287182f146102a5578063147945b2146102cd578063150b7a021461032257806324a77d4e1461035a5780632b590d5b146103a05780633265f128146103b5575b600080fd5b6102b86102b3366004612853565b610771565b60405190151581526020015b60405180910390f35b6103026102db3660046128ca565b60106020526000908152604090208054600182015460028301546003909301549192909184565b6040805194855260208501939093529183015260608201526080016102c4565b610341610330366004612924565b630a85bd0160e11b95945050505050565b6040516001600160e01b031990911681526020016102c4565b61036d6103683660046128ca565b6108ef565b6040516102c491908151815260208083015190820152604080830151908201526060918201519181019190915260800190565b6103b36103ae3660046129da565b61095f565b005b6103be600a5481565b6040519081526020016102c4565b6103be7f000000000000000000000000000000000000000000000000000000000000000081565b6103b3610401366004612a3e565b610a2a565b600b54610419906001600160a01b031681565b6040516001600160a01b0390911681526020016102c4565b6103b361043f366004612a9d565b610ca8565b60015460ff166102b8565b61048161045d366004612abf565b600f6020908152600092835260408084209091529082529020805460019091015482565b604080519283526020830191909152016102c4565b600c54610419906001600160a01b031681565b6103be6104b7366004612aef565b610d02565b6103be60055481565b600254610419906001600160a01b031681565b6103be7f2125a1d4ed41d48a9924ad6ea42669e091be3196d60ef8438d8ee84e99be334881565b6103b361050d366004612b23565b610d9a565b600d54610419906001600160a01b031681565b6103b3610e57565b6103be61053b366004612aef565b610e6b565b6103b3610eba565b6103be60085481565b6103be60075481565b6103b36105683660046128ca565b610edc565b60015461010090046001600160a01b0316610419565b6102b8610591366004612b47565b610f22565b6103b36105a4366004612b23565b610fb1565b6105bc6105b7366004612b23565b611067565b6040516102c49190612bab565b6103b36105d7366004612a9d565b611155565b6103be60095481565b6103b36105f3366004612b23565b61124e565b600354610419906001600160a01b031681565b6102b8610619366004612abf565b6112fc565b6103be7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81565b6103be610653366004612c02565b61132b565b6103be60065481565b6103b3611377565b6103b3610677366004612b23565b6116de565b6102b861068a366004612c2e565b61175e565b6106e961069d366004612abf565b60408051808201825260008082526020918201819052938452600f81528184206001600160a01b0393909316845291825291829020825180840190935280548352600101549082015290565b6040516102c49190612c74565b6103b3610704366004612c8b565b611788565b6103b3610717366004612a9d565b611dcc565b6103be600e5481565b6103b3610733366004612b23565b611e47565b6103b3610746366004612b23565b611ec7565b600454610419906001600160a01b031681565b6103b361076c366004612b23565b611f40565b600083604001356000036107cc5760405162461bcd60e51b815260206004820152601c60248201527f6c696665666f726d3a20696e76616c6964207369676e20636f6465210000000060448201526064015b60405180910390fd5b60006107d785610e6b565b90506107e3818461175e565b61083a5760405162461bcd60e51b815260206004820152602260248201527f6c696665666f726d3a20696e76616c696420646174615369676e617475726573604482015261010960f51b60648201526084016107c3565b600061084a85876040013561132b565b90506108978161085d6060890189612d09565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061175e92505050565b6108e35760405162461bcd60e51b815260206004820152601f60248201527f6c696665666f726d3a20696e76616c696420776c5369676e617475726521200060448201526064016107c3565b50600195945050505050565b61091a6040518060800160405280600081526020016000815260200160008152602001600081525090565b50600090815260106020908152604091829020825160808101845281548152600182015492810192909252600281015492820192909252600390910154606082015290565b610967611fc0565b60005b81811015610a2357846001600160a01b031663b88d4fde308686868681811061099557610995612d4f565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152608060648201526000608482015260a401600060405180830381600087803b1580156109fa57600080fd5b505af1158015610a0e573d6000803e3d6000fd5b5050505080610a1c90612d7b565b905061096a565b5050505050565b600b546001600160a01b03163314610a775760405162461bcd60e51b815260206004820152601060248201526f6d7573742063616c6c2062792049414d60801b60448201526064016107c3565b828114610ab95760405162461bcd60e51b815260206004820152601060248201526f636f756e74206e6f74206d617463682160801b60448201526064016107c3565b6000805b82811015610afd57838382818110610ad757610ad7612d4f565b9050602002013582610ae99190612d94565b915080610af581612d7b565b915050610abd565b50600480546040516370a0823160e01b8152309281019290925282916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610b4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6f9190612da7565b1015610bb55760405162461bcd60e51b8152602060048201526015602482015274034b73b30b634b21031b7b9ba1030b6b7bab73a109605d1b60448201526064016107c3565b60005b84811015610ca0576000868683818110610bd457610bd4612d4f565b9050602002016020810190610be99190612b23565b6001600160a01b031603610c365760405162461bcd60e51b81526020600482015260146024820152731059191c995cdcc81a5cc81b9bdd081d985b1a5960621b60448201526064016107c3565b610c8e868683818110610c4b57610c4b612d4f565b9050602002016020810190610c609190612b23565b858584818110610c7257610c72612d4f565b6004546001600160a01b03169392602090910201359050612020565b80610c9881612d7b565b915050610bb8565b505050505050565b610cb0611fc0565b60058290556006819055600a54604080519182526020820184905281018290527fa38cc8aaaa58ffe63e1b7f00e27495d6557d17d543c4778623efe92922ab6b0c906060015b60405180910390a15050565b60007f2125a1d4ed41d48a9924ad6ea42669e091be3196d60ef8438d8ee84e99be3348823560208401356040850135610d3e6060870187612d09565b604051610d4c929190612dc0565b6040805191829003822060208301969096528101939093526060830191909152608082015260a081019190915260c0015b604051602081830303815290604052805190602001209050919050565b610da2611fc0565b6001600160a01b038116610df85760405162461bcd60e51b815260206004820152601760248201527f696e76616c6964205641554c542061646464726573732000000000000000000060448201526064016107c3565b600c80546001600160a01b0319166001600160a01b038316908117909155600a546040805191825260208201929092527ff91a8f542cfa733c2cdbdd32c3fda5ccdb99801881227283f1dbf8164de53ad291015b60405180910390a150565b610e5f611fc0565b610e696000612088565b565b60007f0000000000000000000000000000000000000000000000000000000000000000610e9783610d02565b60405161190160f01b602082015260228101929092526042820152606201610d7d565b610ec2611fc0565b60015460ff16610ed457610e696120e2565b610e69612136565b610ee4611fc0565b6009819055600a5460408051918252602082018390527fee5a40918349d4a80cde0750063104607d59ca322e2028cb2e8bc6adb805f8379101610e4c565b600080610f2e86610e6b565b600d5460408051600081526020810180835284905260ff89169181019190915260608101879052608081018690529192506001600160a01b03169060019060a0016020604051602081039080840390855afa158015610f91573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149150505b949350505050565b610fb9611fc0565b6001600160a01b03811661100f5760405162461bcd60e51b815260206004820152601760248201527f5349474e4552206973207a65726f20616464726573732100000000000000000060448201526064016107c3565b600d80546001600160a01b0319166001600160a01b038316908117909155600a546040805191825260208201929092527f8f08eaddbd9ad421fc04b0010e1ac19d07dec1623c02b0be16b23ac74d7ed4d39101610e4c565b60606000600a54600161107a9190612d94565b6001600160401b03811115611091576110916127b1565b6040519080825280602002602001820160405280156110d657816020015b60408051808201909152600080825260208201528152602001906001900390816110af5790505b50905060005b600a54811161114e576000818152600f602090815260408083206001600160a01b03881684528252918290208251808401909352805483526001015490820152825183908390811061113057611130612d4f565b6020026020010181905250808061114690612d7b565b9150506110dc565b5092915050565b600b546001600160a01b031633146111a25760405162461bcd60e51b815260206004820152601060248201526f6d7573742063616c6c2062792049414d60801b60448201526064016107c3565b6007819055600a80549060006111b783612d7b565b9091555050600a5460009081526010602052604090204260039091018190556007546111e291612d94565b600a80546000908152601060205260409020600201919091556009839055546007547fcf9aea49d64273c87e59e58ab736d91de24aa2054985ede30ff65b21526beff1919042906112339082612d94565b60408051938452602084019290925290820152606001610cf6565b611256611fc0565b6001600160a01b0381166112a45760405162461bcd60e51b8152602060048201526015602482015274034b73b30b634b21024a0a69030b232323932b9b99605d1b60448201526064016107c3565b600b80546001600160a01b0319166001600160a01b038316908117909155600a546040805191825260208201929092527f7b71c0b24e3679b56e2d24a2a378eef6a7debb6eac6d7bbe536f21c6ddf82ab69101610e4c565b6000828152600f602090815260408083206001600160a01b038516845290915290206001015415155b92915050565b6040516bffffffffffffffffffffffff19606084901b166020820152603481018290526000908190605401604051602081830303815290604052805190602001209050610fa98161216f565b61137f6121aa565b6113876121f0565b6000600a546001600160401b038111156113a3576113a36127b1565b6040519080825280602002602001820160405280156113cc578160200160208202803683370190505b50905060008060005b600a548110156114f3576000818152600f6020908152604080832033845290915290208054600190910154909250158015906114135750600e548214155b8015611424575061142481336112fc565b156114e157600354604051632142170760e11b81526001600160a01b03909116906342842e0e9061145d90309033908790600401612dd0565b600060405180830381600087803b15801561147757600080fd5b505af115801561148b573d6000803e3d6000fd5b5050506000828152600f602090815260408083203384529091528120600101555083518290859063ffffffff86169081106114c8576114c8612d4f565b60209081029190910101526114de836001612df4565b92505b806114eb81612d7b565b9150506113d5565b5050600a546000908152600f6020908152604080832033845290915290208054600190910154158015906115295750600e548114155b80156115565750600854600a546000908152601060205260409020600201546115529190612d94565b4210155b1561161657600354604051632142170760e11b81526001600160a01b03909116906342842e0e9061158f90309033908690600401612dd0565b600060405180830381600087803b1580156115a957600080fd5b505af11580156115bd573d6000803e3d6000fd5b5050600a546000908152600f60209081526040808320338452909152812060010155505082518190849063ffffffff85169081106115fd576115fd612d4f565b6020908102919091010152611613826001612df4565b91505b60008263ffffffff16116116925760405162461bcd60e51b815260206004820152603760248201527f6e6f7468696e6720746f2062652077697468647261776564212074686520706c60448201527f65646765206861736e277420657870697265642079657400000000000000000060648201526084016107c3565b7f50280586000dd4dda2d43e550a23fe7d6d26b22af985157a6d3703e164283ef3833342600a546040516116c99493929190612e11565b60405180910390a1505050610e696001600055565b6116e6611fc0565b6001600160a01b03811661173c5760405162461bcd60e51b815260206004820152601960248201527f696e76616c69642065726331313535206164646472657373200000000000000060448201526064016107c3565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600d546000906001600160a01b03166117778484612249565b6001600160a01b0316149392505050565b6117906121aa565b6117986121f0565b6117a4600a54336112fc565b156117e75760405162461bcd60e51b8152602060048201526013602482015272616c726561647920726567697374657265642160681b60448201526064016107c3565b600a5460009081526010602052604090206002015442106118415760405162461bcd60e51b815260206004820152601460248201527372656769737465722074696d652069732075702160601b60448201526064016107c3565b600a546000908152601060205260408120805460019290611863908490612d94565b909155505083356118e357600c54600554600454611892926001600160a01b039182169233929091169061226d565b600554600a54600090815260106020526040812060010180549091906118b9908490612d94565b9091555050600e54600a546000908152600f60209081526040808320338452909152902055611ccc565b6001843503611a84576003546040516331a9108f60e11b81526020860135600482015233916001600160a01b031690636352211e90602401602060405180830381865afa158015611938573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061195c9190612e87565b6001600160a01b0316146119a35760405162461bcd60e51b815260206004820152600e60248201526d696e76616c6964206f776e65722160901b60448201526064016107c3565b600354604051632142170760e11b81526001600160a01b03909116906342842e0e906119db903390309060208a013590600401612dd0565b600060405180830381600087803b1580156119f557600080fd5b505af1158015611a09573d6000803e3d6000fd5b5050600a546000908152600f60209081526040808320338085529083529220908801359055600c54600654600454611a5295506001600160a01b0390811694509091169061226d565b600654600a5460009081526010602052604081206001018054909190611a79908490612d94565b90915550611ccc9050565b6002843503611c8b576000611a9c6060860186612d09565b905011611aeb5760405162461bcd60e51b815260206004820152601e60248201527f6c696665666f726d3a20696e76616c696420776c5369676e617475726521000060448201526064016107c3565b611af6843385610771565b611b425760405162461bcd60e51b815260206004820181905260248201527f6c696665666f726d3a2074686973207369676e206973206e6f742076616c696460448201526064016107c3565b6003546040516331a9108f60e11b81526020860135600482015233916001600160a01b031690636352211e90602401602060405180830381865afa158015611b8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bb29190612e87565b6001600160a01b031614611bf95760405162461bcd60e51b815260206004820152600e60248201526d696e76616c6964206f776e65722160901b60448201526064016107c3565b600354604051632142170760e11b81526001600160a01b03909116906342842e0e90611c31903390309060208a013590600401612dd0565b600060405180830381600087803b158015611c4b57600080fd5b505af1158015611c5f573d6000803e3d6000fd5b5050600a546000908152600f60209081526040808320338452825290912090870135905550611ccc9050565b60405162461bcd60e51b8152602060048201526016602482015275696e76616c696420726567697374657220747970652160501b60448201526064016107c3565b600a546000818152600f6020908152604080832033845290915290206001015560095415611d725760025460095460405163731133e960e01b815233600482015260248101919091526001604482015260806064820152600060848201526001600160a01b039091169063731133e99060a401600060405180830381600087803b158015611d5957600080fd5b505af1158015611d6d573d6000803e3d6000fd5b505050505b600a546040517f7f2d1fba2d88c01a1b20788452047ee40031b0bf9a9ca6d4ae1591e8dcd5c27a91611db4916020880135913391893591429189908990612ea4565b60405180910390a1611dc66001600055565b50505050565b611dd4611fc0565b6007818155600a54600090815260106020526040902060030183905554611dfb9083612d94565b600a8054600090815260106020526040902060020191909155546007547f7184662151f5b353be32b22a5a6d5ee7c46116c80b49e0b151dc9234dd6e9b59919084906112339082612d94565b611e4f611fc0565b6001600160a01b038116611ea55760405162461bcd60e51b815260206004820152601760248201527f696e76616c69642065726332302061646464726573732000000000000000000060448201526064016107c3565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b611ecf611fc0565b6001600160a01b038116611f345760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107c3565b611f3d81612088565b50565b611f48611fc0565b6001600160a01b038116611f9e5760405162461bcd60e51b815260206004820152601860248201527f696e76616c69642065726337323120616464647265737320000000000000000060448201526064016107c3565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b03610100909104163314610e695760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107c3565b6040516001600160a01b03831660248201526044810182905261208390849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261228e565b505050565b600180546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6120ea6121aa565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b6040516001600160a01b03909116815260200160405180910390a1565b61213e612360565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33612119565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01610d7d565b60015460ff1615610e695760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016107c3565b6002600054036122425760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016107c3565b6002600055565b600080600061225885856123a9565b91509150612265816123ee565b509392505050565b611dc6846323b872dd60e01b85858560405160240161204c93929190612dd0565b60006122e3826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166125389092919063ffffffff16565b80519091501561208357808060200190518101906123019190612efe565b6120835760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016107c3565b60015460ff16610e695760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016107c3565b60008082516041036123df5760208301516040840151606085015160001a6123d387828585612547565b945094505050506123e7565b506000905060025b9250929050565b600081600481111561240257612402612e71565b0361240a5750565b600181600481111561241e5761241e612e71565b0361246b5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016107c3565b600281600481111561247f5761247f612e71565b036124cc5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016107c3565b60038160048111156124e0576124e0612e71565b03611f3d5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016107c3565b6060610fa9848460008561260b565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561257e5750600090506003612602565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156125d2573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166125fb57600060019250925050612602565b9150600090505b94509492505050565b60608247101561266c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016107c3565b600080866001600160a01b031685876040516126889190612f44565b60006040518083038185875af1925050503d80600081146126c5576040519150601f19603f3d011682016040523d82523d6000602084013e6126ca565b606091505b50915091506126db878383876126e6565b979650505050505050565b6060831561275557825160000361274e576001600160a01b0385163b61274e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016107c3565b5081610fa9565b610fa9838381511561276a5781518083602001fd5b8060405162461bcd60e51b81526004016107c39190612f60565b60006080828403121561279657600080fd5b50919050565b6001600160a01b0381168114611f3d57600080fd5b634e487b7160e01b600052604160045260246000fd5b600082601f8301126127d857600080fd5b81356001600160401b03808211156127f2576127f26127b1565b604051601f8301601f19908116603f0116810190828211818310171561281a5761281a6127b1565b8160405283815286602085880101111561283357600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060006060848603121561286857600080fd5b83356001600160401b038082111561287f57600080fd5b61288b87838801612784565b94506020860135915061289d8261279c565b909250604085013590808211156128b357600080fd5b506128c0868287016127c7565b9150509250925092565b6000602082840312156128dc57600080fd5b5035919050565b60008083601f8401126128f557600080fd5b5081356001600160401b0381111561290c57600080fd5b6020830191508360208285010111156123e757600080fd5b60008060008060006080868803121561293c57600080fd5b85356129478161279c565b945060208601356129578161279c565b93506040860135925060608601356001600160401b0381111561297957600080fd5b612985888289016128e3565b969995985093965092949392505050565b60008083601f8401126129a857600080fd5b5081356001600160401b038111156129bf57600080fd5b6020830191508360208260051b85010111156123e757600080fd5b600080600080606085870312156129f057600080fd5b84356129fb8161279c565b93506020850135612a0b8161279c565b925060408501356001600160401b03811115612a2657600080fd5b612a3287828801612996565b95989497509550505050565b60008060008060408587031215612a5457600080fd5b84356001600160401b0380821115612a6b57600080fd5b612a7788838901612996565b90965094506020870135915080821115612a9057600080fd5b50612a3287828801612996565b60008060408385031215612ab057600080fd5b50508035926020909101359150565b60008060408385031215612ad257600080fd5b823591506020830135612ae48161279c565b809150509250929050565b600060208284031215612b0157600080fd5b81356001600160401b03811115612b1757600080fd5b610fa984828501612784565b600060208284031215612b3557600080fd5b8135612b408161279c565b9392505050565b60008060008060808587031215612b5d57600080fd5b84356001600160401b03811115612b7357600080fd5b612b7f87828801612784565b945050602085013560ff81168114612b9657600080fd5b93969395505050506040820135916060013590565b602080825282518282018190526000919060409081850190868401855b82811015612bf557612be584835180518252602090810151910152565b9284019290850190600101612bc8565b5091979650505050505050565b60008060408385031215612c1557600080fd5b8235612c208161279c565b946020939093013593505050565b60008060408385031215612c4157600080fd5b8235915060208301356001600160401b03811115612c5e57600080fd5b612c6a858286016127c7565b9150509250929050565b815181526020808301519082015260408101611325565b60008060008060608587031215612ca157600080fd5b84356001600160401b0380821115612cb857600080fd5b612cc488838901612784565b95506020870135915080821115612cda57600080fd5b612ce6888389016127c7565b94506040870135915080821115612cfc57600080fd5b50612a32878288016128e3565b6000808335601e19843603018112612d2057600080fd5b8301803591506001600160401b03821115612d3a57600080fd5b6020019150368190038213156123e757600080fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201612d8d57612d8d612d65565b5060010190565b8082018082111561132557611325612d65565b600060208284031215612db957600080fd5b5051919050565b8183823760009101908152919050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b63ffffffff81811683821601908082111561114e5761114e612d65565b6080808252855190820181905260009060209060a0840190828901845b82811015612e4a57815184529284019290840190600101612e2e565b5050506001600160a01b039690961690830152506040810192909252606090910152919050565b634e487b7160e01b600052602160045260246000fd5b600060208284031215612e9957600080fd5b8151612b408161279c565b87815260018060a01b038716602082015285604082015284606082015283608082015260c060a08201528160c0820152818360e0830137600081830160e090810191909152601f909201601f191601019695505050505050565b600060208284031215612f1057600080fd5b81518015158114612b4057600080fd5b60005b83811015612f3b578181015183820152602001612f23565b50506000910152565b60008251612f56818460208701612f20565b9190910192915050565b6020815260008251806020840152612f7f816040850160208701612f20565b601f01601f1916919091016040019291505056fea2646970667358221220138b66cfa6f2dd3e4fca48aee8350d43be2bee0ae492ebe1fd084cdb7f87f09c64736f6c6343000810003300000000000000000000000055d398326f99059ff775485246999027b31979550000000000000000000000006f282fc910cd6ecdccc9e0f06e6ea3e5602a24d50000000000000000000000002dfeb752222cccecb9bc0a934b02c3a86f6339000000000000000000000000005a8dbe8673577528099afa0e002815d44388e86b000000000000000000000000f60690e821c7323d06581fc40ede919222d42db9
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102a05760003560e01c80638ca3abe711610167578063caf11fd8116100ce578063e4cc18fb11610087578063e4cc18fb14610709578063e6f51aab1461071c578063ee9b80a414610725578063f2fde38b14610738578063f709f5381461074b578063f899ccd61461075e57600080fd5b8063caf11fd814610658578063d5bfbf9f14610661578063d7fb5cc114610669578063daca6f781461067c578063de17cb1e1461068f578063df09dbea146106f657600080fd5b8063b07238b211610120578063b07238b2146105dc578063b2e52988146105e5578063b7f03829146105f8578063c106e1291461060b578063c49f91d31461061e578063c569e0601461064557600080fd5b80638ca3abe71461055a5780638da5cb5b1461056d57806392703a1814610583578063a7ecd37e14610596578063ad6de87f146105a9578063ae2c8da3146105c957600080fd5b80635db0a99f1161020b5780636bc054f1116101c45780636bc054f114610512578063715018a614610525578063819c72ae1461052d5780638456cb5914610540578063894547dd146105485780638aa8a2c31461055157600080fd5b80635db0a99f146104965780635eaca353146104a95780635fb45714146104bc578063611be309146104c557806364d4c819146104d85780636817031b146104ff57600080fd5b80633644e5151161025d5780633644e515146103cc5780633af401f6146103f35780634a830d011461040657806352f7c988146104315780635c975abb146104445780635cbd269b1461044f57600080fd5b80630287182f146102a5578063147945b2146102cd578063150b7a021461032257806324a77d4e1461035a5780632b590d5b146103a05780633265f128146103b5575b600080fd5b6102b86102b3366004612853565b610771565b60405190151581526020015b60405180910390f35b6103026102db3660046128ca565b60106020526000908152604090208054600182015460028301546003909301549192909184565b6040805194855260208501939093529183015260608201526080016102c4565b610341610330366004612924565b630a85bd0160e11b95945050505050565b6040516001600160e01b031990911681526020016102c4565b61036d6103683660046128ca565b6108ef565b6040516102c491908151815260208083015190820152604080830151908201526060918201519181019190915260800190565b6103b36103ae3660046129da565b61095f565b005b6103be600a5481565b6040519081526020016102c4565b6103be7f19a9d76359a21bf18433a713e97b1c4ac4bf275ccae09895b3b94f637383a47281565b6103b3610401366004612a3e565b610a2a565b600b54610419906001600160a01b031681565b6040516001600160a01b0390911681526020016102c4565b6103b361043f366004612a9d565b610ca8565b60015460ff166102b8565b61048161045d366004612abf565b600f6020908152600092835260408084209091529082529020805460019091015482565b604080519283526020830191909152016102c4565b600c54610419906001600160a01b031681565b6103be6104b7366004612aef565b610d02565b6103be60055481565b600254610419906001600160a01b031681565b6103be7f2125a1d4ed41d48a9924ad6ea42669e091be3196d60ef8438d8ee84e99be334881565b6103b361050d366004612b23565b610d9a565b600d54610419906001600160a01b031681565b6103b3610e57565b6103be61053b366004612aef565b610e6b565b6103b3610eba565b6103be60085481565b6103be60075481565b6103b36105683660046128ca565b610edc565b60015461010090046001600160a01b0316610419565b6102b8610591366004612b47565b610f22565b6103b36105a4366004612b23565b610fb1565b6105bc6105b7366004612b23565b611067565b6040516102c49190612bab565b6103b36105d7366004612a9d565b611155565b6103be60095481565b6103b36105f3366004612b23565b61124e565b600354610419906001600160a01b031681565b6102b8610619366004612abf565b6112fc565b6103be7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81565b6103be610653366004612c02565b61132b565b6103be60065481565b6103b3611377565b6103b3610677366004612b23565b6116de565b6102b861068a366004612c2e565b61175e565b6106e961069d366004612abf565b60408051808201825260008082526020918201819052938452600f81528184206001600160a01b0393909316845291825291829020825180840190935280548352600101549082015290565b6040516102c49190612c74565b6103b3610704366004612c8b565b611788565b6103b3610717366004612a9d565b611dcc565b6103be600e5481565b6103b3610733366004612b23565b611e47565b6103b3610746366004612b23565b611ec7565b600454610419906001600160a01b031681565b6103b361076c366004612b23565b611f40565b600083604001356000036107cc5760405162461bcd60e51b815260206004820152601c60248201527f6c696665666f726d3a20696e76616c6964207369676e20636f6465210000000060448201526064015b60405180910390fd5b60006107d785610e6b565b90506107e3818461175e565b61083a5760405162461bcd60e51b815260206004820152602260248201527f6c696665666f726d3a20696e76616c696420646174615369676e617475726573604482015261010960f51b60648201526084016107c3565b600061084a85876040013561132b565b90506108978161085d6060890189612d09565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061175e92505050565b6108e35760405162461bcd60e51b815260206004820152601f60248201527f6c696665666f726d3a20696e76616c696420776c5369676e617475726521200060448201526064016107c3565b50600195945050505050565b61091a6040518060800160405280600081526020016000815260200160008152602001600081525090565b50600090815260106020908152604091829020825160808101845281548152600182015492810192909252600281015492820192909252600390910154606082015290565b610967611fc0565b60005b81811015610a2357846001600160a01b031663b88d4fde308686868681811061099557610995612d4f565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152608060648201526000608482015260a401600060405180830381600087803b1580156109fa57600080fd5b505af1158015610a0e573d6000803e3d6000fd5b5050505080610a1c90612d7b565b905061096a565b5050505050565b600b546001600160a01b03163314610a775760405162461bcd60e51b815260206004820152601060248201526f6d7573742063616c6c2062792049414d60801b60448201526064016107c3565b828114610ab95760405162461bcd60e51b815260206004820152601060248201526f636f756e74206e6f74206d617463682160801b60448201526064016107c3565b6000805b82811015610afd57838382818110610ad757610ad7612d4f565b9050602002013582610ae99190612d94565b915080610af581612d7b565b915050610abd565b50600480546040516370a0823160e01b8152309281019290925282916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610b4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6f9190612da7565b1015610bb55760405162461bcd60e51b8152602060048201526015602482015274034b73b30b634b21031b7b9ba1030b6b7bab73a109605d1b60448201526064016107c3565b60005b84811015610ca0576000868683818110610bd457610bd4612d4f565b9050602002016020810190610be99190612b23565b6001600160a01b031603610c365760405162461bcd60e51b81526020600482015260146024820152731059191c995cdcc81a5cc81b9bdd081d985b1a5960621b60448201526064016107c3565b610c8e868683818110610c4b57610c4b612d4f565b9050602002016020810190610c609190612b23565b858584818110610c7257610c72612d4f565b6004546001600160a01b03169392602090910201359050612020565b80610c9881612d7b565b915050610bb8565b505050505050565b610cb0611fc0565b60058290556006819055600a54604080519182526020820184905281018290527fa38cc8aaaa58ffe63e1b7f00e27495d6557d17d543c4778623efe92922ab6b0c906060015b60405180910390a15050565b60007f2125a1d4ed41d48a9924ad6ea42669e091be3196d60ef8438d8ee84e99be3348823560208401356040850135610d3e6060870187612d09565b604051610d4c929190612dc0565b6040805191829003822060208301969096528101939093526060830191909152608082015260a081019190915260c0015b604051602081830303815290604052805190602001209050919050565b610da2611fc0565b6001600160a01b038116610df85760405162461bcd60e51b815260206004820152601760248201527f696e76616c6964205641554c542061646464726573732000000000000000000060448201526064016107c3565b600c80546001600160a01b0319166001600160a01b038316908117909155600a546040805191825260208201929092527ff91a8f542cfa733c2cdbdd32c3fda5ccdb99801881227283f1dbf8164de53ad291015b60405180910390a150565b610e5f611fc0565b610e696000612088565b565b60007f19a9d76359a21bf18433a713e97b1c4ac4bf275ccae09895b3b94f637383a472610e9783610d02565b60405161190160f01b602082015260228101929092526042820152606201610d7d565b610ec2611fc0565b60015460ff16610ed457610e696120e2565b610e69612136565b610ee4611fc0565b6009819055600a5460408051918252602082018390527fee5a40918349d4a80cde0750063104607d59ca322e2028cb2e8bc6adb805f8379101610e4c565b600080610f2e86610e6b565b600d5460408051600081526020810180835284905260ff89169181019190915260608101879052608081018690529192506001600160a01b03169060019060a0016020604051602081039080840390855afa158015610f91573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149150505b949350505050565b610fb9611fc0565b6001600160a01b03811661100f5760405162461bcd60e51b815260206004820152601760248201527f5349474e4552206973207a65726f20616464726573732100000000000000000060448201526064016107c3565b600d80546001600160a01b0319166001600160a01b038316908117909155600a546040805191825260208201929092527f8f08eaddbd9ad421fc04b0010e1ac19d07dec1623c02b0be16b23ac74d7ed4d39101610e4c565b60606000600a54600161107a9190612d94565b6001600160401b03811115611091576110916127b1565b6040519080825280602002602001820160405280156110d657816020015b60408051808201909152600080825260208201528152602001906001900390816110af5790505b50905060005b600a54811161114e576000818152600f602090815260408083206001600160a01b03881684528252918290208251808401909352805483526001015490820152825183908390811061113057611130612d4f565b6020026020010181905250808061114690612d7b565b9150506110dc565b5092915050565b600b546001600160a01b031633146111a25760405162461bcd60e51b815260206004820152601060248201526f6d7573742063616c6c2062792049414d60801b60448201526064016107c3565b6007819055600a80549060006111b783612d7b565b9091555050600a5460009081526010602052604090204260039091018190556007546111e291612d94565b600a80546000908152601060205260409020600201919091556009839055546007547fcf9aea49d64273c87e59e58ab736d91de24aa2054985ede30ff65b21526beff1919042906112339082612d94565b60408051938452602084019290925290820152606001610cf6565b611256611fc0565b6001600160a01b0381166112a45760405162461bcd60e51b8152602060048201526015602482015274034b73b30b634b21024a0a69030b232323932b9b99605d1b60448201526064016107c3565b600b80546001600160a01b0319166001600160a01b038316908117909155600a546040805191825260208201929092527f7b71c0b24e3679b56e2d24a2a378eef6a7debb6eac6d7bbe536f21c6ddf82ab69101610e4c565b6000828152600f602090815260408083206001600160a01b038516845290915290206001015415155b92915050565b6040516bffffffffffffffffffffffff19606084901b166020820152603481018290526000908190605401604051602081830303815290604052805190602001209050610fa98161216f565b61137f6121aa565b6113876121f0565b6000600a546001600160401b038111156113a3576113a36127b1565b6040519080825280602002602001820160405280156113cc578160200160208202803683370190505b50905060008060005b600a548110156114f3576000818152600f6020908152604080832033845290915290208054600190910154909250158015906114135750600e548214155b8015611424575061142481336112fc565b156114e157600354604051632142170760e11b81526001600160a01b03909116906342842e0e9061145d90309033908790600401612dd0565b600060405180830381600087803b15801561147757600080fd5b505af115801561148b573d6000803e3d6000fd5b5050506000828152600f602090815260408083203384529091528120600101555083518290859063ffffffff86169081106114c8576114c8612d4f565b60209081029190910101526114de836001612df4565b92505b806114eb81612d7b565b9150506113d5565b5050600a546000908152600f6020908152604080832033845290915290208054600190910154158015906115295750600e548114155b80156115565750600854600a546000908152601060205260409020600201546115529190612d94565b4210155b1561161657600354604051632142170760e11b81526001600160a01b03909116906342842e0e9061158f90309033908690600401612dd0565b600060405180830381600087803b1580156115a957600080fd5b505af11580156115bd573d6000803e3d6000fd5b5050600a546000908152600f60209081526040808320338452909152812060010155505082518190849063ffffffff85169081106115fd576115fd612d4f565b6020908102919091010152611613826001612df4565b91505b60008263ffffffff16116116925760405162461bcd60e51b815260206004820152603760248201527f6e6f7468696e6720746f2062652077697468647261776564212074686520706c60448201527f65646765206861736e277420657870697265642079657400000000000000000060648201526084016107c3565b7f50280586000dd4dda2d43e550a23fe7d6d26b22af985157a6d3703e164283ef3833342600a546040516116c99493929190612e11565b60405180910390a1505050610e696001600055565b6116e6611fc0565b6001600160a01b03811661173c5760405162461bcd60e51b815260206004820152601960248201527f696e76616c69642065726331313535206164646472657373200000000000000060448201526064016107c3565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600d546000906001600160a01b03166117778484612249565b6001600160a01b0316149392505050565b6117906121aa565b6117986121f0565b6117a4600a54336112fc565b156117e75760405162461bcd60e51b8152602060048201526013602482015272616c726561647920726567697374657265642160681b60448201526064016107c3565b600a5460009081526010602052604090206002015442106118415760405162461bcd60e51b815260206004820152601460248201527372656769737465722074696d652069732075702160601b60448201526064016107c3565b600a546000908152601060205260408120805460019290611863908490612d94565b909155505083356118e357600c54600554600454611892926001600160a01b039182169233929091169061226d565b600554600a54600090815260106020526040812060010180549091906118b9908490612d94565b9091555050600e54600a546000908152600f60209081526040808320338452909152902055611ccc565b6001843503611a84576003546040516331a9108f60e11b81526020860135600482015233916001600160a01b031690636352211e90602401602060405180830381865afa158015611938573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061195c9190612e87565b6001600160a01b0316146119a35760405162461bcd60e51b815260206004820152600e60248201526d696e76616c6964206f776e65722160901b60448201526064016107c3565b600354604051632142170760e11b81526001600160a01b03909116906342842e0e906119db903390309060208a013590600401612dd0565b600060405180830381600087803b1580156119f557600080fd5b505af1158015611a09573d6000803e3d6000fd5b5050600a546000908152600f60209081526040808320338085529083529220908801359055600c54600654600454611a5295506001600160a01b0390811694509091169061226d565b600654600a5460009081526010602052604081206001018054909190611a79908490612d94565b90915550611ccc9050565b6002843503611c8b576000611a9c6060860186612d09565b905011611aeb5760405162461bcd60e51b815260206004820152601e60248201527f6c696665666f726d3a20696e76616c696420776c5369676e617475726521000060448201526064016107c3565b611af6843385610771565b611b425760405162461bcd60e51b815260206004820181905260248201527f6c696665666f726d3a2074686973207369676e206973206e6f742076616c696460448201526064016107c3565b6003546040516331a9108f60e11b81526020860135600482015233916001600160a01b031690636352211e90602401602060405180830381865afa158015611b8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bb29190612e87565b6001600160a01b031614611bf95760405162461bcd60e51b815260206004820152600e60248201526d696e76616c6964206f776e65722160901b60448201526064016107c3565b600354604051632142170760e11b81526001600160a01b03909116906342842e0e90611c31903390309060208a013590600401612dd0565b600060405180830381600087803b158015611c4b57600080fd5b505af1158015611c5f573d6000803e3d6000fd5b5050600a546000908152600f60209081526040808320338452825290912090870135905550611ccc9050565b60405162461bcd60e51b8152602060048201526016602482015275696e76616c696420726567697374657220747970652160501b60448201526064016107c3565b600a546000818152600f6020908152604080832033845290915290206001015560095415611d725760025460095460405163731133e960e01b815233600482015260248101919091526001604482015260806064820152600060848201526001600160a01b039091169063731133e99060a401600060405180830381600087803b158015611d5957600080fd5b505af1158015611d6d573d6000803e3d6000fd5b505050505b600a546040517f7f2d1fba2d88c01a1b20788452047ee40031b0bf9a9ca6d4ae1591e8dcd5c27a91611db4916020880135913391893591429189908990612ea4565b60405180910390a1611dc66001600055565b50505050565b611dd4611fc0565b6007818155600a54600090815260106020526040902060030183905554611dfb9083612d94565b600a8054600090815260106020526040902060020191909155546007547f7184662151f5b353be32b22a5a6d5ee7c46116c80b49e0b151dc9234dd6e9b59919084906112339082612d94565b611e4f611fc0565b6001600160a01b038116611ea55760405162461bcd60e51b815260206004820152601760248201527f696e76616c69642065726332302061646464726573732000000000000000000060448201526064016107c3565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b611ecf611fc0565b6001600160a01b038116611f345760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107c3565b611f3d81612088565b50565b611f48611fc0565b6001600160a01b038116611f9e5760405162461bcd60e51b815260206004820152601860248201527f696e76616c69642065726337323120616464647265737320000000000000000060448201526064016107c3565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b03610100909104163314610e695760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107c3565b6040516001600160a01b03831660248201526044810182905261208390849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261228e565b505050565b600180546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6120ea6121aa565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b6040516001600160a01b03909116815260200160405180910390a1565b61213e612360565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33612119565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01610d7d565b60015460ff1615610e695760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016107c3565b6002600054036122425760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016107c3565b6002600055565b600080600061225885856123a9565b91509150612265816123ee565b509392505050565b611dc6846323b872dd60e01b85858560405160240161204c93929190612dd0565b60006122e3826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166125389092919063ffffffff16565b80519091501561208357808060200190518101906123019190612efe565b6120835760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016107c3565b60015460ff16610e695760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016107c3565b60008082516041036123df5760208301516040840151606085015160001a6123d387828585612547565b945094505050506123e7565b506000905060025b9250929050565b600081600481111561240257612402612e71565b0361240a5750565b600181600481111561241e5761241e612e71565b0361246b5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016107c3565b600281600481111561247f5761247f612e71565b036124cc5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016107c3565b60038160048111156124e0576124e0612e71565b03611f3d5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016107c3565b6060610fa9848460008561260b565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561257e5750600090506003612602565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156125d2573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166125fb57600060019250925050612602565b9150600090505b94509492505050565b60608247101561266c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016107c3565b600080866001600160a01b031685876040516126889190612f44565b60006040518083038185875af1925050503d80600081146126c5576040519150601f19603f3d011682016040523d82523d6000602084013e6126ca565b606091505b50915091506126db878383876126e6565b979650505050505050565b6060831561275557825160000361274e576001600160a01b0385163b61274e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016107c3565b5081610fa9565b610fa9838381511561276a5781518083602001fd5b8060405162461bcd60e51b81526004016107c39190612f60565b60006080828403121561279657600080fd5b50919050565b6001600160a01b0381168114611f3d57600080fd5b634e487b7160e01b600052604160045260246000fd5b600082601f8301126127d857600080fd5b81356001600160401b03808211156127f2576127f26127b1565b604051601f8301601f19908116603f0116810190828211818310171561281a5761281a6127b1565b8160405283815286602085880101111561283357600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060006060848603121561286857600080fd5b83356001600160401b038082111561287f57600080fd5b61288b87838801612784565b94506020860135915061289d8261279c565b909250604085013590808211156128b357600080fd5b506128c0868287016127c7565b9150509250925092565b6000602082840312156128dc57600080fd5b5035919050565b60008083601f8401126128f557600080fd5b5081356001600160401b0381111561290c57600080fd5b6020830191508360208285010111156123e757600080fd5b60008060008060006080868803121561293c57600080fd5b85356129478161279c565b945060208601356129578161279c565b93506040860135925060608601356001600160401b0381111561297957600080fd5b612985888289016128e3565b969995985093965092949392505050565b60008083601f8401126129a857600080fd5b5081356001600160401b038111156129bf57600080fd5b6020830191508360208260051b85010111156123e757600080fd5b600080600080606085870312156129f057600080fd5b84356129fb8161279c565b93506020850135612a0b8161279c565b925060408501356001600160401b03811115612a2657600080fd5b612a3287828801612996565b95989497509550505050565b60008060008060408587031215612a5457600080fd5b84356001600160401b0380821115612a6b57600080fd5b612a7788838901612996565b90965094506020870135915080821115612a9057600080fd5b50612a3287828801612996565b60008060408385031215612ab057600080fd5b50508035926020909101359150565b60008060408385031215612ad257600080fd5b823591506020830135612ae48161279c565b809150509250929050565b600060208284031215612b0157600080fd5b81356001600160401b03811115612b1757600080fd5b610fa984828501612784565b600060208284031215612b3557600080fd5b8135612b408161279c565b9392505050565b60008060008060808587031215612b5d57600080fd5b84356001600160401b03811115612b7357600080fd5b612b7f87828801612784565b945050602085013560ff81168114612b9657600080fd5b93969395505050506040820135916060013590565b602080825282518282018190526000919060409081850190868401855b82811015612bf557612be584835180518252602090810151910152565b9284019290850190600101612bc8565b5091979650505050505050565b60008060408385031215612c1557600080fd5b8235612c208161279c565b946020939093013593505050565b60008060408385031215612c4157600080fd5b8235915060208301356001600160401b03811115612c5e57600080fd5b612c6a858286016127c7565b9150509250929050565b815181526020808301519082015260408101611325565b60008060008060608587031215612ca157600080fd5b84356001600160401b0380821115612cb857600080fd5b612cc488838901612784565b95506020870135915080821115612cda57600080fd5b612ce6888389016127c7565b94506040870135915080821115612cfc57600080fd5b50612a32878288016128e3565b6000808335601e19843603018112612d2057600080fd5b8301803591506001600160401b03821115612d3a57600080fd5b6020019150368190038213156123e757600080fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201612d8d57612d8d612d65565b5060010190565b8082018082111561132557611325612d65565b600060208284031215612db957600080fd5b5051919050565b8183823760009101908152919050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b63ffffffff81811683821601908082111561114e5761114e612d65565b6080808252855190820181905260009060209060a0840190828901845b82811015612e4a57815184529284019290840190600101612e2e565b5050506001600160a01b039690961690830152506040810192909252606090910152919050565b634e487b7160e01b600052602160045260246000fd5b600060208284031215612e9957600080fd5b8151612b408161279c565b87815260018060a01b038716602082015285604082015284606082015283608082015260c060a08201528160c0820152818360e0830137600081830160e090810191909152601f909201601f191601019695505050505050565b600060208284031215612f1057600080fd5b81518015158114612b4057600080fd5b60005b83811015612f3b578181015183820152602001612f23565b50506000910152565b60008251612f56818460208701612f20565b9190910192915050565b6020815260008251806020840152612f7f816040850160208701612f20565b601f01601f1916919091016040019291505056fea2646970667358221220138b66cfa6f2dd3e4fca48aee8350d43be2bee0ae492ebe1fd084cdb7f87f09c64736f6c63430008100033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000055d398326f99059ff775485246999027b31979550000000000000000000000006f282fc910cd6ecdccc9e0f06e6ea3e5602a24d50000000000000000000000002dfeb752222cccecb9bc0a934b02c3a86f6339000000000000000000000000005a8dbe8673577528099afa0e002815d44388e86b000000000000000000000000f60690e821c7323d06581fc40ede919222d42db9
-----Decoded View---------------
Arg [0] : erc20 (address): 0x55d398326f99059fF775485246999027B3197955
Arg [1] : erc721 (address): 0x6f282fc910CD6eCdCcC9E0f06e6EA3e5602A24d5
Arg [2] : erc1155 (address): 0x2DFEb752222ccceCB9BC0a934b02C3A86f633900
Arg [3] : VAULT (address): 0x5a8dbE8673577528099afa0E002815D44388e86b
Arg [4] : SIGNER (address): 0xf60690E821c7323d06581fC40ede919222D42db9
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 00000000000000000000000055d398326f99059ff775485246999027b3197955
Arg [1] : 0000000000000000000000006f282fc910cd6ecdccc9e0f06e6ea3e5602a24d5
Arg [2] : 0000000000000000000000002dfeb752222cccecb9bc0a934b02c3a86f633900
Arg [3] : 0000000000000000000000005a8dbe8673577528099afa0e002815d44388e86b
Arg [4] : 000000000000000000000000f60690e821c7323d06581fc40ede919222d42db9
Loading...
Loading
Loading...
Loading
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.