Overview
ETH Balance
0.1725 ETH
Eth Value
$546.39 (@ $3,167.45/ETH)More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 63 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Mint | 19799601 | 267 days ago | IN | 0.0015 ETH | 0.00154262 | ||||
Set Approval For... | 19497417 | 309 days ago | IN | 0 ETH | 0.00082134 | ||||
Mint | 19231974 | 346 days ago | IN | 0.01 ETH | 0.00760395 | ||||
Set Approval For... | 19076126 | 368 days ago | IN | 0 ETH | 0.00028352 | ||||
Set Approval For... | 18723178 | 418 days ago | IN | 0 ETH | 0.00124673 | ||||
Set Approval For... | 18441327 | 457 days ago | IN | 0 ETH | 0.00067534 | ||||
Set Approval For... | 18298860 | 477 days ago | IN | 0 ETH | 0.0002664 | ||||
Mint | 18290943 | 478 days ago | IN | 0.0015 ETH | 0.00248684 | ||||
Mint | 18288766 | 479 days ago | IN | 0.0015 ETH | 0.00215804 | ||||
Mint | 18288084 | 479 days ago | IN | 0.0015 ETH | 0.00228268 | ||||
Mint | 18273516 | 481 days ago | IN | 0.01 ETH | 0.00300281 | ||||
Set Approval For... | 18270643 | 481 days ago | IN | 0 ETH | 0.00099534 | ||||
Mint | 18245686 | 485 days ago | IN | 0.004 ETH | 0.00251843 | ||||
Set Approval For... | 18227285 | 487 days ago | IN | 0 ETH | 0.00058862 | ||||
Mint | 18227263 | 487 days ago | IN | 0.01 ETH | 0.0054562 | ||||
Safe Transfer Fr... | 18224772 | 487 days ago | IN | 0 ETH | 0.00090306 | ||||
Mint | 18223948 | 488 days ago | IN | 0.01 ETH | 0.00267791 | ||||
Mint | 18218899 | 488 days ago | IN | 0.0015 ETH | 0.00456166 | ||||
Mint | 18209908 | 490 days ago | IN | 0.01 ETH | 0.00237144 | ||||
Set Approval For... | 18201606 | 491 days ago | IN | 0 ETH | 0.00033582 | ||||
Safe Transfer Fr... | 18190012 | 492 days ago | IN | 0 ETH | 0.001138 | ||||
Safe Transfer Fr... | 18190008 | 492 days ago | IN | 0 ETH | 0.00112636 | ||||
Safe Transfer Fr... | 18189994 | 492 days ago | IN | 0 ETH | 0.00111149 | ||||
Mint | 18189970 | 492 days ago | IN | 0.01 ETH | 0.00285533 | ||||
Mint | 18189964 | 492 days ago | IN | 0.004 ETH | 0.00295927 |
Latest 3 internal transactions
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
17789332 | 548 days ago | 0.0003 ETH | ||||
17789268 | 548 days ago | 0.001 ETH | ||||
17767786 | 551 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
WataridoriNFT
Compiler Version
v0.8.18+commit.87f61d96
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import "./WataridoriSBT.sol"; import "./dependencies/IERC4906.sol"; import "./dependencies/IGatewayProxy.sol"; import "./dependencies/IVWBLGateway.sol"; import "./dependencies/VWBLGateway.sol"; import "./interfaces/IWataridoriAccessControlChecker.sol"; import "./interfaces/IWataridoriSBT.sol"; import "./interfaces/IWataridoriTokenURIGetter.sol"; import "./interfaces/IWataridoriVwblToken.sol"; import "hardhat/console.sol"; contract WataridoriNFT is AccessControl, ERC721Enumerable, IERC2981, IERC4906, IWataridoriVwblToken, IWataridoriTokenURIGetter { using Strings for uint256; using Strings for uint8; struct TokenInfo { uint32 tokenMasterId; uint8 generationNum; bytes32 documentId; } struct TokenMaster { uint256 mintPriceWei; uint256 raisePriceWei; string metadataCid; uint16 maxAmount; uint8 maxGenerationNum; uint256 royaltiesPercentage; // if percentage is 3.5, royaltiesPercentage=3.5*10^2 (decimal is 2) bytes32[] documentIds; bool isSelfRaiseable; bool shouldMintSBT; bool isMintable; } struct MetadataStorageInfo { string basePath; string baseFileName; } mapping(uint256 => TokenInfo) public tokenIdToTokenInfo; mapping(uint32 => TokenMaster) public tokenMasterIdToTokenMaster; MetadataStorageInfo public metadataStorageInfo; uint256 public tokenCounter = 0; uint32 public tokenMasterCounter = 0; uint256 public constant INVERSE_BASIS_POINT = 10000; address public gatewayProxy; address public accessControlChecker; address public wataridoriSBT; address public recipient; address public keyRegister; string private signMessage; uint256 public pendingFee; uint256 public vwblFeePool; bytes32 public constant RECIPIENT_ROLE = keccak256("RECIPIENT_ROLE"); bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); event accessControlCheckerChanged(address oldAccessControlChecker, address newAccessControlChecker); event tokenMasterAdded(uint32 indexed tokenMasterId); event raised(address user, uint256 indexed tokenId, uint32 indexed tokenMasterId, uint256 indexed toGenerationNum); // Events for tracing sales event minted(address user, uint256 indexed tokenId, uint32 indexed tokenMasterId); event raisedSelf(address user, uint256 indexed tokenId, uint32 indexed tokenMasterId); event transferred(address user, uint256 indexed tokenId, uint32 indexed tokenMasterId); event payVwblFeeFromPendingFee(bytes32 indexed documentId, address user, uint256 amount); event payVwblFeeFromFeePool(bytes32 indexed documentId, address user, uint256 amount); modifier onlyPermitted(bytes32 role) { require( hasRole(role, msg.sender), "WataridoriNFT: not permitted" ); _; } constructor( address _gatewayProxy, address _accessControlChecker, string memory _signMessage, address _keyRegister, address _recipient, string memory _basePath, string memory _baseFileName ) ERC721("Wataridori Books", "Wataridori Books") { _setupRole(RECIPIENT_ROLE, _recipient); _setRoleAdmin(RECIPIENT_ROLE, RECIPIENT_ROLE); _setupRole(OPERATOR_ROLE, msg.sender); _setRoleAdmin(OPERATOR_ROLE, OPERATOR_ROLE); gatewayProxy = _gatewayProxy; accessControlChecker = _accessControlChecker; keyRegister = _keyRegister; signMessage = _signMessage; recipient = _recipient; metadataStorageInfo = MetadataStorageInfo(_basePath, _baseFileName); WataridoriSBT sbt = new WataridoriSBT(address(this)); wataridoriSBT = address(sbt); } /** * @notice Get VWBL Gateway address */ function getGatewayAddress() public view returns (address) { return IGatewayProxy(gatewayProxy).getGatewayAddress(); } /** * @notice Get VWBL Fee */ function getVWBLFee() public view returns (uint256) { return IVWBLGateway(getGatewayAddress()).feeWei(); } /** * @notice Get Numbers of minted NFTs by tokenMasterId */ function getMintedAmounts() public view returns (uint256[] memory) { uint256[] memory mintedAmounts = new uint256[](tokenMasterCounter); for(uint32 i = 0; i < tokenMasterCounter; i++) { mintedAmounts[i] = getMintedAmount(i + 1); } return mintedAmounts; } /** * @notice Get Number of minted NFTs by tokenMasterId * @param _tokenMasterId Id of tokenMaster */ function getMintedAmount(uint32 _tokenMasterId) public view returns (uint256) { uint256 mintedAmount = 0; for(uint256 i = 1; i <= tokenCounter; i++) { if(tokenIdToTokenInfo[i].tokenMasterId == _tokenMasterId) { mintedAmount += 1; } } return mintedAmount; } /** * @notice Get Number of minted NFTs by tokenMasterId and generationNum * @param _tokenMasterId Id of tokenMaster */ function getGenerationCounts(uint32 _tokenMasterId) public view returns(uint256[] memory) { uint256[] memory generationCounts = new uint256[](tokenMasterIdToTokenMaster[_tokenMasterId].maxGenerationNum); for(uint256 i = 1; i <= tokenCounter; i++) { if(tokenIdToTokenInfo[i].tokenMasterId == _tokenMasterId) { generationCounts[tokenIdToTokenInfo[i].generationNum - 1] += 1; } } return generationCounts; } /** * @notice Get MetadataCid of tokenMaster * @param _tokenMasterId Id of tokenMaster */ function getMetadataCid(uint32 _tokenMasterId) public view returns (string memory) { return tokenMasterIdToTokenMaster[_tokenMasterId].metadataCid; } /** * @notice Get TokenCounter */ function getTokenCounter() public view returns (uint256) { return tokenCounter; } function getAdditionalCheckAddress() public view returns (address) { return wataridoriSBT; } /** * @notice Get keyRegister address(Called from AccessController) */ function getKeyRegister(uint256) public view returns (address) { return keyRegister; } /** * @notice Set address who send key to VWBL Netrowk * @param _keyRegister New keyRegister address */ function setKeyRegister(address _keyRegister) public onlyPermitted(OPERATOR_ROLE) { require(_keyRegister != address(0), "WataridoriNFT: invalid address"); require(_keyRegister != keyRegister, "WataridoriNFT: same address"); keyRegister = _keyRegister; } /** * @notice Get message to sign */ function getSignMessage() public view returns (string memory) { return signMessage; } /** * @notice Set message to sign * @param _signMessage New message to sign */ function setSignMessage(string memory _signMessage) public onlyPermitted(OPERATOR_ROLE) { signMessage = _signMessage; } /** * @notice Set new recipient * @param _recipient New recipient address */ function setRecipient(address _recipient) public onlyPermitted(RECIPIENT_ROLE) { require(_recipient != address(0), "WataridoriNFT: invalid address"); require(_recipient != recipient, "WataridoriNFT: same address"); grantRole(RECIPIENT_ROLE, _recipient); revokeRole(RECIPIENT_ROLE, recipient); recipient = _recipient; } /** * @notice Set new accessControlChecker * @param _accessControlChecker New accessControlChecker contract address */ function setAccessControlChecker(address _accessControlChecker) public onlyPermitted(OPERATOR_ROLE) { require(_accessControlChecker != address(0), "WataridoriNFT: invalid address"); require(_accessControlChecker != accessControlChecker, "WataridoriNFT: same address"); address oldAccessControlChecker = accessControlChecker; accessControlChecker = _accessControlChecker; emit accessControlCheckerChanged(oldAccessControlChecker, _accessControlChecker); } /** * @notice Set New TokenMaster * @param _mintPriceWei price to mint * @param _raisePriceWei price to raise * @param _metadataCid directory cid of metadata url * @param _maxAmount max amount of mint * @param _maxGenerationNum max generation number of metadata * @param _royaltiesPercentage royalties percentage (if percentage is 3.5, _royaltiesPercentage=3.5*10^2 (decimal is 2)) * @param _documentIds Array of document ids for generations */ function setTokenMaster( uint256 _mintPriceWei, uint256 _raisePriceWei, string memory _metadataCid, uint16 _maxAmount, uint8 _maxGenerationNum, uint256 _royaltiesPercentage, bytes32[] memory _documentIds, bool _isSelfRaiseable, bool _shouldMintSBT ) external payable onlyPermitted(OPERATOR_ROLE) returns (uint32){ require(_maxAmount > 0, "WataridoriNFT: invalid maxAmount"); require(_maxGenerationNum > 0, "WataridoriNFT: invalid maxGenerationNum"); require(_documentIds.length == _maxGenerationNum, "WataridoriNFT: invalid length of documentIds"); uint256 vwblFee = getVWBLFee(); require(msg.value == vwblFee * _maxGenerationNum, "WataridoriNFT: invalid value"); uint32 tokenMasterId = ++tokenMasterCounter; tokenMasterIdToTokenMaster[tokenMasterId] = TokenMaster( _mintPriceWei, _raisePriceWei, _metadataCid, _maxAmount, _maxGenerationNum, _royaltiesPercentage, _documentIds, _isSelfRaiseable, _shouldMintSBT, true ); emit tokenMasterAdded(tokenMasterId); for(uint256 i = 0; i < _documentIds.length; i++) { IVWBLGateway(getGatewayAddress()).grantAccessControl{ value: vwblFee }( _documentIds[i], accessControlChecker, keyRegister ); IWataridoriAccessControlChecker(accessControlChecker).registerDocumentId(_documentIds[i], address(this)); } return tokenMasterId; } function getDocumentIds(uint32 _tokenMasterId) public view returns (bytes32[] memory) { return tokenMasterIdToTokenMaster[_tokenMasterId].documentIds; } /** * @notice Set TokenMaster * @param _tokenMasterId tokenMasterId * @param _metadataCid directory cid of metadata url */ function setTokenMasterCid( uint32 _tokenMasterId, string memory _metadataCid ) public onlyPermitted(OPERATOR_ROLE) { require(_tokenMasterId <= tokenMasterCounter, "WataridoriNFT: invalid tokenMasterId"); tokenMasterIdToTokenMaster[_tokenMasterId].metadataCid = _metadataCid; for (uint256 i = 1; i <= tokenCounter; i++) { if (tokenIdToTokenInfo[i].tokenMasterId == _tokenMasterId) { emit MetadataUpdate(i); } } } /** * @notice Set TokenMaster mintable * @param _tokenMasterId tokenMasterId * @param _isMintable mintable or not */ function setTokenMasterMintable(uint32 _tokenMasterId, bool _isMintable) public onlyPermitted(OPERATOR_ROLE) { require(_tokenMasterId <= tokenMasterCounter, "WataridoriNFT: invalid tokenMasterId"); tokenMasterIdToTokenMaster[_tokenMasterId].isMintable = _isMintable; } /** * @notice Set metadataStorageInfo * @param _basePath base path of metadata url * @param _baseFileName base file name of metadata url */ function setMetadataStorageInfo(string memory _basePath, string memory _baseFileName) public onlyPermitted(OPERATOR_ROLE) { metadataStorageInfo = MetadataStorageInfo(_basePath, _baseFileName); } /** * @notice Mint NFT and grant access control * @param _tokenMasterId Id of TokenMaster */ function mint( uint32 _tokenMasterId ) public payable returns (uint256){ TokenMaster memory tokenMaster = tokenMasterIdToTokenMaster[_tokenMasterId]; require(tokenMaster.isMintable, "WataridoriNFT: not mintable"); uint256 mintPrice = tokenMaster.mintPriceWei; require(msg.value == mintPrice, "WataridoriNFT: invalid value"); uint256 mintedAmount = getMintedAmount(_tokenMasterId); require(mintedAmount < tokenMaster.maxAmount, "WataridoriNFT: max amount exceeded"); pendingFee += msg.value; uint256 tokenId = _mint(_tokenMasterId); TokenInfo memory tokenInfo = tokenIdToTokenInfo[tokenId]; emit minted(msg.sender, tokenId, tokenInfo.tokenMasterId); IWataridoriAccessControlChecker(accessControlChecker).registerToken( tokenInfo.documentId, address(this), tokenId ); _payVwblFeeFromPendingFee(tokenInfo.documentId, msg.sender); return tokenId; } function _mint( uint32 _tokenMasterId ) internal returns (uint256) { uint256 tokenId = ++tokenCounter; bytes32 documentId = tokenMasterIdToTokenMaster[_tokenMasterId].documentIds[0]; TokenInfo memory tokenInfo = TokenInfo(_tokenMasterId, 1, documentId); tokenIdToTokenInfo[tokenId] = tokenInfo; super._mint(msg.sender, tokenId); return tokenId; } /** * @notice Raise generation number of NFT * @param tokenId Id of NFT */ function raiseGeneration(uint256 tokenId) public payable { require(msg.sender == ownerOf(tokenId), "WataridoriNFT: not owner"); uint32 tokenMasterId = tokenIdToTokenInfo[tokenId].tokenMasterId; bool isSelfRaiseable = tokenMasterIdToTokenMaster[tokenMasterId].isSelfRaiseable; require(isSelfRaiseable, "WataridoriNFT: not self raiseable"); uint256 generationNum = tokenIdToTokenInfo[tokenId].generationNum; require(generationNum < tokenMasterIdToTokenMaster[tokenMasterId].maxGenerationNum, "WataridoriNFT: max generation exceeded"); uint256 raisePrice = tokenMasterIdToTokenMaster[tokenMasterId].raisePriceWei; require(msg.value == raisePrice, "WataridoriNFT: invalid value"); _raiseGenerationNum(tokenId, ownerOf(tokenId)); pendingFee += raisePrice; emit raisedSelf(msg.sender, tokenId, tokenMasterId); TokenInfo memory tokenInfo = tokenIdToTokenInfo[tokenId]; _payVwblFeeFromPendingFee(tokenInfo.documentId, msg.sender); } function _raiseGenerationNum(uint256 tokenId, address originalOwner) internal { uint8 originalGenerationNum = tokenIdToTokenInfo[tokenId].generationNum; bytes32 originalDocumentId = tokenIdToTokenInfo[tokenId].documentId; TokenMaster memory tokenMaster = tokenMasterIdToTokenMaster[tokenIdToTokenInfo[tokenId].tokenMasterId]; if(originalGenerationNum < tokenMaster.maxGenerationNum) { tokenIdToTokenInfo[tokenId].generationNum = originalGenerationNum + 1; tokenIdToTokenInfo[tokenId].documentId = tokenMaster.documentIds[tokenIdToTokenInfo[tokenId].generationNum - 1]; uint8 generationNum = tokenIdToTokenInfo[tokenId].generationNum; uint32 tokenMasterId = tokenIdToTokenInfo[tokenId].tokenMasterId; emit raised(originalOwner, tokenId, tokenMasterId, generationNum); IWataridoriAccessControlChecker(accessControlChecker).registerToken( tokenIdToTokenInfo[tokenId].documentId, address(this), tokenId ); emit MetadataUpdate(tokenId); if(tokenMaster.shouldMintSBT) { _mintSBT(originalOwner, originalDocumentId, tokenMasterId, originalGenerationNum); } } } function _mintSBT(address to, bytes32 documentId, uint32 tokenMasterId, uint8 generationNum) internal { IWataridoriSBT(wataridoriSBT).mint(to, documentId, tokenMasterId, generationNum); uint256 tokenId = IWataridoriVwblToken(wataridoriSBT).getTokenCounter(); IWataridoriAccessControlChecker(accessControlChecker).registerToken(documentId, wataridoriSBT, tokenId); } function _transferEmit(address user, uint256 tokenId) internal { uint32 tokenMasterId = tokenIdToTokenInfo[tokenId].tokenMasterId; emit transferred(user, tokenId, tokenMasterId); } function transferFrom(address from, address to, uint256 tokenId) public override(ERC721, IERC721) { if(msg.sender != ownerOf(tokenId)) { _raiseGenerationNum(tokenId, ownerOf(tokenId)); _transferEmit(from, tokenId); } super.transferFrom(from, to, tokenId); _payVwblFeeFromVwblFeePool(tokenIdToTokenInfo[tokenId].documentId, to); } function safeTransferFrom( address from, address to, uint256 tokenId ) public override(ERC721, IERC721) { safeTransferFrom(from, to, tokenId, ""); } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public override(ERC721, IERC721) { if(msg.sender != ownerOf(tokenId)) { _raiseGenerationNum(tokenId, ownerOf(tokenId)); _transferEmit(from, tokenId); } super.safeTransferFrom(from, to, tokenId, data); _payVwblFeeFromVwblFeePool(tokenIdToTokenInfo[tokenId].documentId, to); } function isPaidUser( bytes32 documentId, address user ) public view returns (bool) { return VWBLGateway(getGatewayAddress()).paidUsers(documentId, user); } function payVwblFee( bytes32 documentId, address user ) public payable { uint256 vwblFee = getVWBLFee(); require(msg.value <= vwblFee, "WataridoriNFT: Fee is too high"); require(msg.value >= vwblFee, "WataridoriNFT: Fee is insufficient"); require(!isPaidUser(documentId, user), "WataridoriNFT: Already paid"); _payVwblFee(documentId, user, vwblFee); } function _payVwblFeeFromPendingFee( bytes32 documentId, address user ) internal { uint256 vwblFee = getVWBLFee(); if(pendingFee >= vwblFee && !isPaidUser(documentId, user)) { pendingFee -= vwblFee; _payVwblFee(documentId, user, vwblFee); emit payVwblFeeFromPendingFee(documentId, user, vwblFee); } else { _payVwblFeeFromVwblFeePool(documentId, user); } } function _payVwblFeeFromVwblFeePool( bytes32 documentId, address user ) internal { uint256 vwblFee = getVWBLFee(); if(vwblFeePool >= vwblFee && !isPaidUser(documentId, user)) { vwblFeePool -= vwblFee; _payVwblFee(documentId, user, vwblFee); emit payVwblFeeFromFeePool(documentId, user, vwblFee); } } function _payVwblFee( bytes32 documentId, address user, uint256 feeWei ) internal { IVWBLGateway(getGatewayAddress()).payFee{value: feeWei}(documentId, user); } /** * @notice Called with the sale price to determine how much royalty is owned and to whom * @param _tokenId The NFT asset queried for royalty information * @param _salePrice The sale price of the NFT asset specified by _tokenId * @return receiver Address of who should be sent the royalty payment * @return royaltyAmount The royalty payment amount for _salePrice */ function royaltyInfo( uint256 _tokenId, uint256 _salePrice ) external view override returns (address receiver, uint256 royaltyAmount) { uint256 royaltiesPercentage = tokenMasterIdToTokenMaster[tokenIdToTokenInfo[_tokenId].tokenMasterId].royaltiesPercentage; uint256 _royaltyAmount = (_salePrice * royaltiesPercentage) / INVERSE_BASIS_POINT; return (recipient, _royaltyAmount); } function tokenURI(uint256 tokenId) public view override returns (string memory) { require(_exists(tokenId), "WataridoriNFT: invalid token ID"); uint256 generationNum = tokenIdToTokenInfo[tokenId].generationNum; string memory cid = tokenMasterIdToTokenMaster[tokenIdToTokenInfo[tokenId].tokenMasterId].metadataCid; return string(abi.encodePacked(metadataStorageInfo.basePath, "/",cid, "/", metadataStorageInfo.baseFileName, generationNum.toString(), ".json")); } function getTokenURI(uint8 generationNum, uint32 tokenMasterId) public view returns (string memory) { string memory cid = tokenMasterIdToTokenMaster[tokenMasterId].metadataCid; return string(abi.encodePacked(metadataStorageInfo.basePath, "/", cid, "/", metadataStorageInfo.baseFileName, generationNum.toString(), ".json")); } function supportsInterface( bytes4 interfaceId ) public view virtual override(IERC165, AccessControl, ERC721Enumerable) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } function withdraw() public onlyPermitted(RECIPIENT_ROLE) { uint256 amount = pendingFee; require(amount > 0, "WataridoriNFT: no pending fee"); pendingFee = 0; payable(msg.sender).transfer(amount); } function depositVwblFee() public payable { require(msg.value > 0, "WataridoriNFT: deposit amount must be greater than 0"); vwblFeePool += msg.value; } function withdrawVwblFee() public onlyPermitted(OPERATOR_ROLE) { uint256 amount = vwblFeePool; require(amount > 0, "WataridoriNFT: no pending fee"); vwblFeePool = 0; payable(msg.sender).transfer(amount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(account), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.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.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.2) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: address zero is not a valid owner"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _ownerOf(tokenId); require(owner != address(0), "ERC721: invalid token ID"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner or approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _safeTransfer(from, to, tokenId, data); } /** * @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. * * `data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist */ function _ownerOf(uint256 tokenId) internal view virtual returns (address) { return _owners[tokenId]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _ownerOf(tokenId) != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId, 1); // Check that tokenId was not minted by `_beforeTokenTransfer` hook require(!_exists(tokenId), "ERC721: token already minted"); unchecked { // Will not overflow unless all 2**256 token ids are minted to the same owner. // Given that tokens are minted one by one, it is impossible in practice that // this ever happens. Might change if we allow batch minting. // The ERC fails to describe this case. _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId, 1); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * This is an internal function that does not check if the sender is authorized to operate on the token. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId, 1); // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook owner = ERC721.ownerOf(tokenId); // Clear approvals delete _tokenApprovals[tokenId]; unchecked { // Cannot overflow, as that would require more tokens to be burned/transferred // out than the owner initially received through minting and transferring in. _balances[owner] -= 1; } delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId, 1); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId, 1); // Check that tokenId was not transferred by `_beforeTokenTransfer` hook require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); // Clear approvals from the previous owner delete _tokenApprovals[tokenId]; unchecked { // `_balances[from]` cannot overflow for the same reason as described in `_burn`: // `from`'s balance is the number of token held, which is at least one before the current // transfer. // `_balances[to]` could overflow in the conditions described in `_mint`. That would require // all 2**256 token ids to be minted, which in practice is impossible. _balances[from] -= 1; _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`. * - When `from` is zero, the tokens will be minted for `to`. * - When `to` is zero, ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 firstTokenId, uint256 batchSize ) internal virtual {} /** * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`. * - When `from` is zero, the tokens were minted for `to`. * - When `to` is zero, ``from``'s tokens were burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 firstTokenId, uint256 batchSize ) internal virtual {} /** * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override. * * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such * that `ownerOf(tokenId)` is `a`. */ // solhint-disable-next-line func-name-mixedcase function __unsafe_increaseBalance(address account, uint256 amount) internal { _balances[account] += amount; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev See {ERC721-_beforeTokenTransfer}. */ function _beforeTokenTransfer( address from, address to, uint256 firstTokenId, uint256 batchSize ) internal virtual override { super._beforeTokenTransfer(from, to, firstTokenId, batchSize); if (batchSize > 1) { // Will only trigger during construction. Batch transferring (minting) is not available afterwards. revert("ERC721Enumerable: consecutive transfers not supported"); } uint256 tokenId = firstTokenId; if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// 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.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// 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 v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts 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 pragma solidity ^0.8.17; import "./IAccessControlChecker.sol"; abstract contract AbstractControlChecker is IAccessControlChecker { struct Token { address contractAddress; uint256 tokenId; } mapping(bytes32 => Token) public documentIdToToken; }
pragma solidity ^0.8.17; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "./IERC5192.sol"; abstract contract ERC5192 is ERC721, IERC5192 { bool private isLocked; error ErrLocked(); error ErrNotFound(); constructor(string memory _name, string memory _symbol, bool _isLocked) ERC721(_name, _symbol) { isLocked = _isLocked; } modifier checkLock() { if (isLocked) revert ErrLocked(); _; } function locked(uint256 tokenId) external view returns (bool) { if (!_exists(tokenId)) revert ErrNotFound(); return isLocked; } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override checkLock { super.safeTransferFrom(from, to, tokenId, data); } function safeTransferFrom(address from, address to, uint256 tokenId) public override checkLock { super.safeTransferFrom(from, to, tokenId); } function transferFrom(address from, address to, uint256 tokenId) public override checkLock { super.transferFrom(from, to, tokenId); } function approve(address approved, uint256 tokenId) public override checkLock { super.approve(approved, tokenId); } function setApprovalForAll(address operator, bool approved) public override checkLock { super.setApprovalForAll(operator, approved); } function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC5192).interfaceId || super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; interface IAccessControlChecker { /** * @dev Return whether user has access right of digital content * This function is called by VWBLGateway contract * @param user The address of decryption key requester or decryption key sender to VWBL Network * @param documentId The Identifier of digital content and decryption key * @return True if user has access rights of digital content */ function checkAccessControl(address user, bytes32 documentId) external view returns (bool); /** * @dev Return owner address of document id * @param documentId The Identifier of digital content and decryption key * @return owner address */ function getOwnerAddress(bytes32 documentId) external view returns (address); }
pragma solidity ^0.8.17; interface IERC4906 { /// @dev This event emits when the metadata of a token is changed. /// So that the third-party platforms such as NFT market could /// timely update the images and related attributes of the NFT. event MetadataUpdate(uint256 _tokenId); }
pragma solidity ^0.8.17; interface IERC5192 { /// @notice Emitted when the locking status is changed to locked. /// @dev If a token is minted and the status is locked, this event should be emitted. /// @param tokenId The identifier for a token. event Locked(uint256 tokenId); /// @notice Emitted when the locking status is changed to unlocked. /// @dev If a token is minted and the status is unlocked, this event should be emitted. /// @param tokenId The identifier for a token. event Unlocked(uint256 tokenId); /// @notice Returns the locking status of an Soulbound Token /// @dev SBTs assigned to zero address are considered invalid, and queries /// about them do throw. /// @param tokenId The identifier for an SBT. function locked(uint256 tokenId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; interface IGatewayProxy { function getGatewayAddress() external view returns (address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; /** * @dev Interface of the VWBL Gateway as defined in the * https://github.com/VWBL-protocol/contracts/ERC721/gateway/IVWBLGateway.sol */ interface IVWBLGateway { /** * @notice Get array of documentIds */ function getDocumentIds() external view returns (bytes32[] memory); /** * @notice Returns True if user has access rights of digital content or digital content creator * This function is called by VWBL Network (Decryption key management network) * @param user The address of decryption key requester or decryption key sender to VWBL Network * @param documentId The Identifier of digital content and decryption key * @return True if user has access rights of digital content */ function hasAccessControl(address user, bytes32 documentId) external view returns (bool); /** * @notice Grant access control feature and registering access condition of digital content * @param documentId The Identifier of digital content and decryption key * @param conditionContractAddress The contract address of access condition * @param minter The address of digital content creator */ function grantAccessControl(bytes32 documentId, address conditionContractAddress, address minter) external payable; /** * @notice Pay fee to grant access * @param documentId The Identifier of digital content and decryption key * @param user address to grant */ function payFee(bytes32 documentId, address user) external payable; /** * @notice Withdraw vwbl fee by contract owner */ function withdrawFee() external; /** * @notice Set new VWBL fee * @param newFeeWei new VWBL fee */ function setFeeWei(uint256 newFeeWei) external; function feeWei() external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "@openzeppelin/contracts/access/Ownable.sol"; import "./IVWBLGateway.sol"; import "./AbstractControlChecker.sol"; /** * @dev VWBL Gateway Contract which manage who has access right of digital content. */ contract VWBLGateway is IVWBLGateway, Ownable { mapping(bytes32 => address) public documentIdToConditionContract; mapping(bytes32 => address) public documentIdToMinter; mapping(bytes32 => mapping(address => bool)) public paidUsers; bytes32[] public documentIds; uint256 public feeWei = 1000000000000000000; // 1MATIC uint256 public pendingFee; event accessControlAdded(bytes32 documentId, address conditionContract); event feeWeiChanged(uint256 oldPercentage, uint256 newPercentage); event feePaid(bytes32 documentId, address sender, address to); constructor(uint256 _feeWei) { feeWei = _feeWei; } /** * @notice Get array of documentIds */ function getDocumentIds() public view returns (bytes32[] memory) { return documentIds; } /** * @notice Returns True if user has access rights of digital content or digital content creator * This function is called by VWBL Network (Decryption key management network) * @param user The address of decryption key requester or decryption key sender to VWBL Network * @param documentId The Identifier of digital content and decryption key */ function hasAccessControl(address user, bytes32 documentId) public view returns (bool) { address accessConditionContractAddress = documentIdToConditionContract[documentId]; if (accessConditionContractAddress == address(0)) { return false; } AbstractControlChecker checker = AbstractControlChecker(accessConditionContractAddress); bool isPaidUser = paidUsers[documentId][user] || feeWei == 0; bool isOwner = checker.getOwnerAddress(documentId) == user; bool isMinter = documentIdToMinter[documentId] == user; bool hasAccess = checker.checkAccessControl(user, documentId); return isOwner || isMinter || (isPaidUser && hasAccess); } /** * @notice Grant access control feature and registering access condition of digital content * @param documentId The Identifier of digital content and decryption key * @param conditionContractAddress The contract address of access condition * @param minter The address of digital content creator */ function grantAccessControl( bytes32 documentId, address conditionContractAddress, address minter ) public payable { require(msg.value <= feeWei, "Fee is too high"); require(msg.value >= feeWei, "Fee is insufficient"); require(documentIdToConditionContract[documentId] == address(0), "documentId is already used"); pendingFee += msg.value; documentIdToConditionContract[documentId] = conditionContractAddress; documentIds.push(documentId); documentIdToMinter[documentId] = minter; emit accessControlAdded(documentId, conditionContractAddress); } /** * @notice Pay fee to grant access * @param documentId The Identifier of digital content and decryption key * @param user address to grant */ function payFee(bytes32 documentId, address user) public payable { require(msg.value <= feeWei, "Fee is too high"); require(msg.value >= feeWei, "Fee is insufficient"); require(documentIdToConditionContract[documentId] != address(0), "document id is not registered"); pendingFee += msg.value; paidUsers[documentId][user] = true; emit feePaid(documentId, msg.sender, user); } /** * @notice Withdraw vwbl fee by contract owner */ function withdrawFee() public onlyOwner { uint256 amount = pendingFee; require(amount != 0); // Remember to zero the pending refund before // sending to prevent re-entrancy attacks pendingFee = 0; payable(msg.sender).transfer(amount); } /** * @notice Set new VWBL fee * @param newFeeWei new VWBL fee */ function setFeeWei(uint256 newFeeWei) public onlyOwner { require(newFeeWei != feeWei); uint256 oldFeeWei = feeWei; feeWei = newFeeWei; emit feeWeiChanged(oldFeeWei, newFeeWei); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "../dependencies/IAccessControlChecker.sol"; interface IWataridoriAccessControlChecker { function registerDocumentId(bytes32 documentId, address contractAddress) external; function registerToken(bytes32 _documentId, address _contractAddress, uint256 _tokenId) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; interface IWataridoriSBT { function mint(address to, bytes32 documentId, uint32 tokenMasterId, uint8 generationNum) external returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; interface IWataridoriTokenURIGetter { function getTokenURI(uint8 generationNum, uint32 tokenMasterId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; interface IWataridoriVwblToken { function getTokenCounter() external view returns (uint256); function getAdditionalCheckAddress() external view returns (address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "./dependencies/ERC5192.sol"; import "./interfaces/IWataridoriTokenURIGetter.sol"; import "./interfaces/IWataridoriSBT.sol"; import "./interfaces/IWataridoriVwblToken.sol"; contract WataridoriSBT is ERC5192, IWataridoriSBT, IWataridoriVwblToken { using Strings for uint256; address public wataridoriNFT; uint256 public tokenCounter; struct TokenInfo { uint32 tokenMasterId; uint8 generationNum; bytes32 documentId; } mapping(uint256 => TokenInfo) public tokenIdToTokenInfo; modifier onlyWataridoriNFT() { require(msg.sender == wataridoriNFT, "WataridoriSBT: Only WataridoriNFT can call this function"); _; } constructor( address _wataridoriNFT ) ERC5192("Wataridori SBT", "Wataridori SBT", true) { wataridoriNFT = _wataridoriNFT; } function tokenURI(uint256 tokenId) public view override returns (string memory) { require(_exists(tokenId), "WataridoriSBT: invalid token ID"); TokenInfo memory tokenInfo = tokenIdToTokenInfo[tokenId]; return IWataridoriTokenURIGetter(wataridoriNFT).getTokenURI(tokenInfo.generationNum, tokenInfo.tokenMasterId); } function getTokenCounter() external view returns(uint256) { return tokenCounter; } function getAdditionalCheckAddress() external pure override returns(address) { return address(0); } function mint(address to, bytes32 documentId, uint32 tokenMasterId, uint8 generationNum) external onlyWataridoriNFT returns (uint256) { uint256 tokenId = ++tokenCounter; _mint(to, tokenCounter); tokenIdToTokenInfo[tokenCounter] = TokenInfo(tokenMasterId, generationNum, documentId); emit Locked(tokenId); return tokenId; } }
// SPDX-License-Identifier: MIT pragma solidity >= 0.4.22 <0.9.0; library console { address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67); function _sendLogPayload(bytes memory payload) private view { uint256 payloadLength = payload.length; address consoleAddress = CONSOLE_ADDRESS; assembly { let payloadStart := add(payload, 32) let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0) } } function log() internal view { _sendLogPayload(abi.encodeWithSignature("log()")); } function logInt(int256 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(int256)", p0)); } function logUint(uint256 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256)", p0)); } function logString(string memory p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); } function logBool(bool p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); } function logAddress(address p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); } function logBytes(bytes memory p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes)", p0)); } function logBytes1(bytes1 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0)); } function logBytes2(bytes2 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0)); } function logBytes3(bytes3 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0)); } function logBytes4(bytes4 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0)); } function logBytes5(bytes5 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0)); } function logBytes6(bytes6 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0)); } function logBytes7(bytes7 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0)); } function logBytes8(bytes8 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0)); } function logBytes9(bytes9 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0)); } function logBytes10(bytes10 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0)); } function logBytes11(bytes11 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0)); } function logBytes12(bytes12 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0)); } function logBytes13(bytes13 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0)); } function logBytes14(bytes14 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0)); } function logBytes15(bytes15 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0)); } function logBytes16(bytes16 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0)); } function logBytes17(bytes17 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0)); } function logBytes18(bytes18 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0)); } function logBytes19(bytes19 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0)); } function logBytes20(bytes20 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0)); } function logBytes21(bytes21 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0)); } function logBytes22(bytes22 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0)); } function logBytes23(bytes23 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0)); } function logBytes24(bytes24 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0)); } function logBytes25(bytes25 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0)); } function logBytes26(bytes26 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0)); } function logBytes27(bytes27 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0)); } function logBytes28(bytes28 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0)); } function logBytes29(bytes29 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0)); } function logBytes30(bytes30 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0)); } function logBytes31(bytes31 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0)); } function logBytes32(bytes32 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0)); } function log(uint256 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256)", p0)); } function log(string memory p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); } function log(bool p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); } function log(address p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); } function log(uint256 p0, uint256 p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256)", p0, p1)); } function log(uint256 p0, string memory p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string)", p0, p1)); } function log(uint256 p0, bool p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool)", p0, p1)); } function log(uint256 p0, address p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address)", p0, p1)); } function log(string memory p0, uint256 p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256)", p0, p1)); } function log(string memory p0, string memory p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1)); } function log(string memory p0, bool p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1)); } function log(string memory p0, address p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1)); } function log(bool p0, uint256 p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256)", p0, p1)); } function log(bool p0, string memory p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1)); } function log(bool p0, bool p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1)); } function log(bool p0, address p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1)); } function log(address p0, uint256 p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256)", p0, p1)); } function log(address p0, string memory p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1)); } function log(address p0, bool p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1)); } function log(address p0, address p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1)); } function log(uint256 p0, uint256 p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256)", p0, p1, p2)); } function log(uint256 p0, uint256 p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string)", p0, p1, p2)); } function log(uint256 p0, uint256 p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool)", p0, p1, p2)); } function log(uint256 p0, uint256 p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address)", p0, p1, p2)); } function log(uint256 p0, string memory p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256)", p0, p1, p2)); } function log(uint256 p0, string memory p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string)", p0, p1, p2)); } function log(uint256 p0, string memory p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool)", p0, p1, p2)); } function log(uint256 p0, string memory p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address)", p0, p1, p2)); } function log(uint256 p0, bool p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256)", p0, p1, p2)); } function log(uint256 p0, bool p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string)", p0, p1, p2)); } function log(uint256 p0, bool p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool)", p0, p1, p2)); } function log(uint256 p0, bool p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address)", p0, p1, p2)); } function log(uint256 p0, address p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256)", p0, p1, p2)); } function log(uint256 p0, address p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string)", p0, p1, p2)); } function log(uint256 p0, address p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool)", p0, p1, p2)); } function log(uint256 p0, address p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address)", p0, p1, p2)); } function log(string memory p0, uint256 p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256)", p0, p1, p2)); } function log(string memory p0, uint256 p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string)", p0, p1, p2)); } function log(string memory p0, uint256 p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool)", p0, p1, p2)); } function log(string memory p0, uint256 p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address)", p0, p1, p2)); } function log(string memory p0, string memory p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256)", p0, p1, p2)); } function log(string memory p0, string memory p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2)); } function log(string memory p0, string memory p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2)); } function log(string memory p0, string memory p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2)); } function log(string memory p0, bool p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256)", p0, p1, p2)); } function log(string memory p0, bool p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2)); } function log(string memory p0, bool p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2)); } function log(string memory p0, bool p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2)); } function log(string memory p0, address p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256)", p0, p1, p2)); } function log(string memory p0, address p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2)); } function log(string memory p0, address p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2)); } function log(string memory p0, address p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2)); } function log(bool p0, uint256 p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256)", p0, p1, p2)); } function log(bool p0, uint256 p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string)", p0, p1, p2)); } function log(bool p0, uint256 p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool)", p0, p1, p2)); } function log(bool p0, uint256 p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address)", p0, p1, p2)); } function log(bool p0, string memory p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256)", p0, p1, p2)); } function log(bool p0, string memory p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2)); } function log(bool p0, string memory p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2)); } function log(bool p0, string memory p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2)); } function log(bool p0, bool p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256)", p0, p1, p2)); } function log(bool p0, bool p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2)); } function log(bool p0, bool p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2)); } function log(bool p0, bool p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2)); } function log(bool p0, address p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256)", p0, p1, p2)); } function log(bool p0, address p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2)); } function log(bool p0, address p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2)); } function log(bool p0, address p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2)); } function log(address p0, uint256 p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256)", p0, p1, p2)); } function log(address p0, uint256 p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string)", p0, p1, p2)); } function log(address p0, uint256 p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool)", p0, p1, p2)); } function log(address p0, uint256 p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address)", p0, p1, p2)); } function log(address p0, string memory p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256)", p0, p1, p2)); } function log(address p0, string memory p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2)); } function log(address p0, string memory p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2)); } function log(address p0, string memory p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2)); } function log(address p0, bool p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256)", p0, p1, p2)); } function log(address p0, bool p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2)); } function log(address p0, bool p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2)); } function log(address p0, bool p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2)); } function log(address p0, address p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256)", p0, p1, p2)); } function log(address p0, address p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2)); } function log(address p0, address p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2)); } function log(address p0, address p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2)); } function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,string)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,bool)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,address)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,string)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,bool)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,address)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,string)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,bool)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,address)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,string)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,bool)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,address)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,string)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,bool)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, uint256 p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,address)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,string)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,bool)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,address)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,string)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,bool)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,address)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, address p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,string)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,bool)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,address)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,string)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,bool)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, uint256 p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,address)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,string)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,bool)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,address)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, bool p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,string)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,bool)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,address)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, address p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,string)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,bool)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,address)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, uint256 p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,string)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,bool)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, uint256 p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,address)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, string memory p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,string)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,bool)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,address)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, bool p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,string)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,bool)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,address)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, address p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,string)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,bool)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,address)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,uint256)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,string)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, uint256 p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,address)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,uint256)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,string)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,address)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,uint256)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, address p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,uint256)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,string)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,uint256)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint256 p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint256)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint256)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint256)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,uint256)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint256 p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint256 p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint256)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint256)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint256)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint256 p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,uint256)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint256 p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint256 p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint256)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint256)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint256)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,uint256)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,string)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,bool)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, uint256 p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,address)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,uint256)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,string)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,bool)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,address)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, bool p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,uint256)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,string)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,address)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, address p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,uint256)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,string)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,bool)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,uint256)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint256 p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint256 p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint256)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint256)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint256)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint256 p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,uint256)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint256 p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint256 p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint256)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint256)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint256)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint256 p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,uint256)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint256 p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint256 p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint256)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint256)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint256)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,uint256)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, uint256 p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,string)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,bool)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, uint256 p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,address)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, string memory p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,uint256)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,string)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,bool)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,address)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, bool p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,uint256)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,string)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,bool)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,address)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, address p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,uint256)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,string)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,bool)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint256 p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,uint256)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint256 p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint256 p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint256)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint256)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint256)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint256 p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,uint256)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint256 p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint256 p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint256)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint256)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint256)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3)); } function log(address p0, address p1, uint256 p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,uint256)", p0, p1, p2, p3)); } function log(address p0, address p1, uint256 p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,string)", p0, p1, p2, p3)); } function log(address p0, address p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, uint256 p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,address)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint256)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint256)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint256)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3)); } }
{ "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":"_gatewayProxy","type":"address"},{"internalType":"address","name":"_accessControlChecker","type":"address"},{"internalType":"string","name":"_signMessage","type":"string"},{"internalType":"address","name":"_keyRegister","type":"address"},{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"string","name":"_basePath","type":"string"},{"internalType":"string","name":"_baseFileName","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"MetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAccessControlChecker","type":"address"},{"indexed":false,"internalType":"address","name":"newAccessControlChecker","type":"address"}],"name":"accessControlCheckerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"uint32","name":"tokenMasterId","type":"uint32"}],"name":"minted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"documentId","type":"bytes32"},{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"payVwblFeeFromFeePool","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"documentId","type":"bytes32"},{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"payVwblFeeFromPendingFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"uint32","name":"tokenMasterId","type":"uint32"},{"indexed":true,"internalType":"uint256","name":"toGenerationNum","type":"uint256"}],"name":"raised","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"uint32","name":"tokenMasterId","type":"uint32"}],"name":"raisedSelf","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint32","name":"tokenMasterId","type":"uint32"}],"name":"tokenMasterAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"uint32","name":"tokenMasterId","type":"uint32"}],"name":"transferred","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INVERSE_BASIS_POINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RECIPIENT_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accessControlChecker","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"depositVwblFee","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"gatewayProxy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAdditionalCheckAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_tokenMasterId","type":"uint32"}],"name":"getDocumentIds","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getGatewayAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_tokenMasterId","type":"uint32"}],"name":"getGenerationCounts","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getKeyRegister","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_tokenMasterId","type":"uint32"}],"name":"getMetadataCid","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_tokenMasterId","type":"uint32"}],"name":"getMintedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMintedAmounts","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSignMessage","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTokenCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"generationNum","type":"uint8"},{"internalType":"uint32","name":"tokenMasterId","type":"uint32"}],"name":"getTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getVWBLFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"documentId","type":"bytes32"},{"internalType":"address","name":"user","type":"address"}],"name":"isPaidUser","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"keyRegister","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadataStorageInfo","outputs":[{"internalType":"string","name":"basePath","type":"string"},{"internalType":"string","name":"baseFileName","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_tokenMasterId","type":"uint32"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"documentId","type":"bytes32"},{"internalType":"address","name":"user","type":"address"}],"name":"payVwblFee","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"pendingFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"raiseGeneration","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"recipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_accessControlChecker","type":"address"}],"name":"setAccessControlChecker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_keyRegister","type":"address"}],"name":"setKeyRegister","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_basePath","type":"string"},{"internalType":"string","name":"_baseFileName","type":"string"}],"name":"setMetadataStorageInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"}],"name":"setRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_signMessage","type":"string"}],"name":"setSignMessage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintPriceWei","type":"uint256"},{"internalType":"uint256","name":"_raisePriceWei","type":"uint256"},{"internalType":"string","name":"_metadataCid","type":"string"},{"internalType":"uint16","name":"_maxAmount","type":"uint16"},{"internalType":"uint8","name":"_maxGenerationNum","type":"uint8"},{"internalType":"uint256","name":"_royaltiesPercentage","type":"uint256"},{"internalType":"bytes32[]","name":"_documentIds","type":"bytes32[]"},{"internalType":"bool","name":"_isSelfRaiseable","type":"bool"},{"internalType":"bool","name":"_shouldMintSBT","type":"bool"}],"name":"setTokenMaster","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_tokenMasterId","type":"uint32"},{"internalType":"string","name":"_metadataCid","type":"string"}],"name":"setTokenMasterCid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_tokenMasterId","type":"uint32"},{"internalType":"bool","name":"_isMintable","type":"bool"}],"name":"setTokenMasterMintable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenIdToTokenInfo","outputs":[{"internalType":"uint32","name":"tokenMasterId","type":"uint32"},{"internalType":"uint8","name":"generationNum","type":"uint8"},{"internalType":"bytes32","name":"documentId","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenMasterCounter","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"","type":"uint32"}],"name":"tokenMasterIdToTokenMaster","outputs":[{"internalType":"uint256","name":"mintPriceWei","type":"uint256"},{"internalType":"uint256","name":"raisePriceWei","type":"uint256"},{"internalType":"string","name":"metadataCid","type":"string"},{"internalType":"uint16","name":"maxAmount","type":"uint16"},{"internalType":"uint8","name":"maxGenerationNum","type":"uint8"},{"internalType":"uint256","name":"royaltiesPercentage","type":"uint256"},{"internalType":"bool","name":"isSelfRaiseable","type":"bool"},{"internalType":"bool","name":"shouldMintSBT","type":"bool"},{"internalType":"bool","name":"isMintable","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vwblFeePool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wataridoriSBT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawVwblFee","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526000600f556010805463ffffffff191690553480156200002357600080fd5b50604051620071a8380380620071a8833981016040819052620000469162000427565b60408051808201825260108082526f576174617269646f726920426f6f6b7360801b60208084018290528451808601909552918452908301529060016200008e838262000593565b5060026200009d828262000593565b505050620000c160008051602062007168833981519152846200023c60201b60201c565b620000dc60008051602062007168833981519152806200024c565b620000f760008051602062007188833981519152336200023c565b6200011260008051602062007188833981519152806200024c565b601080546001600160a01b03808a1664010000000002600160201b600160c01b031990921691909117909155601180548883166001600160a01b0319918216179091556014805492871692909116919091179055601562000174868262000593565b50601380546001600160a01b0319166001600160a01b0385161790556040805180820190915282815260208101829052600d80620001b3858262000593565b5060208201516001820190620001ca908262000593565b50905050600030604051620001df9062000337565b6001600160a01b039091168152602001604051809103906000f0801580156200020c573d6000803e3d6000fd5b50601280546001600160a01b0319166001600160a01b0392909216919091179055506200065f9650505050505050565b62000248828262000297565b5050565b600082815260208190526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000248576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620002f33390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6118f7806200587183390190565b80516001600160a01b03811681146200035d57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200038a57600080fd5b81516001600160401b0380821115620003a757620003a762000362565b604051601f8301601f19908116603f01168101908282118183101715620003d257620003d262000362565b81604052838152602092508683858801011115620003ef57600080fd5b600091505b83821015620004135785820183015181830184015290820190620003f4565b600093810190920192909252949350505050565b600080600080600080600060e0888a0312156200044357600080fd5b6200044e8862000345565b96506200045e6020890162000345565b60408901519096506001600160401b03808211156200047c57600080fd5b6200048a8b838c0162000378565b96506200049a60608b0162000345565b9550620004aa60808b0162000345565b945060a08a0151915080821115620004c157600080fd5b620004cf8b838c0162000378565b935060c08a0151915080821115620004e657600080fd5b50620004f58a828b0162000378565b91505092959891949750929550565b600181811c908216806200051957607f821691505b6020821081036200053a57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200058e57600081815260208120601f850160051c81016020861015620005695750805b601f850160051c820191505b818110156200058a5782815560010162000575565b5050505b505050565b81516001600160401b03811115620005af57620005af62000362565b620005c781620005c0845462000504565b8462000540565b602080601f831160018114620005ff5760008415620005e65750858301515b600019600386901b1c1916600185901b1785556200058a565b600085815260208120601f198616915b8281101562000630578886015182559484019460019091019084016200060f565b50858210156200064f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b615202806200066f6000396000f3fe6080604052600436106103cd5760003560e01c806370a08231116101fd578063bf040a9011610118578063d4cb7432116100ab578063e9f631e31161007a578063e9f631e314610b9b578063f394928c14610bbb578063f5b541a614610bdb578063f825d2d514610bfd578063fb22c61514610c1d57600080fd5b8063d4cb743214610aff578063d547741f14610b12578063e5ed0ed614610b32578063e985e9c514610b5257600080fd5b8063c87b56dd116100e7578063c87b56dd14610a93578063cae6047f14610ab3578063d082e38114610ac9578063d3bcd67b14610adf57600080fd5b8063bf040a9014610a1b578063c0523a8214610a3e578063c319760014610a53578063c6d84d1a14610a7357600080fd5b80639b2c15f211610190578063a22cb4651161015f578063a22cb465146109a1578063a71bbebe146109c1578063b41bde13146109d4578063b88d4fde146109fb57600080fd5b80639b2c15f21461092c5780639b63a11e1461094c5780639e0cf55b14610961578063a217fddf1461098c57600080fd5b8063910126d9116101cc578063910126d9146108cf57806391d14854146108d757806395d89b41146108f75780639ab5e9751461090c57600080fd5b806370a082311461085a57806373b96da31461087a5780637db551b0146108985780638595f32a146108ad57600080fd5b806336568abe116102ed5780634f6ccce711610280578063643090bc1161024f578063643090bc146107da57806366d003ac146107f05780636ad425b3146108105780636e02007d1461084557600080fd5b80634f6ccce71461070257806357f9535a146107225780635fb8bcd51461074f5780636352211e146107ba57600080fd5b806342842e0e116102bc57806342842e0e1461069c578063429c9bef146106bc57806347b554af146106cf5780634d4aa365146106e257600080fd5b806336568abe146106315780633a2ffa35146106515780633bbed4a0146106675780633ccfd60b1461068757600080fd5b806318160ddd116103655780632e012236116103345780632e012236146105bc5780632f2ff15d146105dc5780632f745c59146105fc578063357113461461061c57600080fd5b806318160ddd1461050e57806323b872dd1461052d578063248a9ca31461054d5780632a55205a1461057d57600080fd5b8063081812fc116103a1578063081812fc14610464578063095ea7b31461049c5780630d496604146104bc57806311e60071146104ee57600080fd5b80620540b1146103d257806301ffc9a71461040857806306fdde031461043857806307a6345c1461044d575b600080fd5b3480156103de57600080fd5b506103f26103ed366004614459565b610c3d565b6040516103ff91906144dc565b60405180910390f35b34801561041457600080fd5b50610428610423366004614505565b610d28565b60405190151581526020016103ff565b34801561044457600080fd5b506103f2610d4d565b34801561045957600080fd5b50610462610ddf565b005b34801561047057600080fd5b5061048461047f366004614522565b610ea4565b6040516001600160a01b0390911681526020016103ff565b3480156104a857600080fd5b506104626104b7366004614550565b610ecb565b3480156104c857600080fd5b506010546104d99063ffffffff1681565b60405163ffffffff90911681526020016103ff565b3480156104fa57600080fd5b50610462610509366004614639565b610fdb565b34801561051a57600080fd5b506009545b6040519081526020016103ff565b34801561053957600080fd5b50610462610548366004614686565b6110d5565b34801561055957600080fd5b5061051f610568366004614522565b60009081526020819052604090206001015490565b34801561058957600080fd5b5061059d6105983660046146c7565b611139565b604080516001600160a01b0390931683526020830191909152016103ff565b3480156105c857600080fd5b506104626105d7366004614702565b611190565b3480156105e857600080fd5b506104626105f7366004614739565b611225565b34801561060857600080fd5b5061051f610617366004614550565b61124a565b34801561062857600080fd5b506104846112e0565b34801561063d57600080fd5b5061046261064c366004614739565b61135e565b34801561065d57600080fd5b5061051f60175481565b34801561067357600080fd5b5061046261068236600461475e565b6113dc565b34801561069357600080fd5b506104626114c5565b3480156106a857600080fd5b506104626106b7366004614686565b61157c565b6104626106ca366004614739565b611597565b6104d96106dd3660046147fa565b6116b0565b3480156106ee57600080fd5b506104626106fd36600461475e565b611b49565b34801561070e57600080fd5b5061051f61071d366004614522565b611c34565b34801561072e57600080fd5b5061074261073d3660046148c9565b611cc7565b6040516103ff91906148e4565b34801561075b57600080fd5b5061079661076a366004614522565b600b602052600090815260409020805460019091015463ffffffff821691600160201b900460ff169083565b6040805163ffffffff909416845260ff9092166020840152908201526060016103ff565b3480156107c657600080fd5b506104846107d5366004614522565b611d33565b3480156107e657600080fd5b5061051f60165481565b3480156107fc57600080fd5b50601354610484906001600160a01b031681565b34801561081c57600080fd5b5061083061082b3660046148c9565b611d93565b6040516103ff99989796959493929190614928565b34801561085157600080fd5b50600f5461051f565b34801561086657600080fd5b5061051f61087536600461475e565b611e72565b34801561088657600080fd5b506012546001600160a01b0316610484565b3480156108a457600080fd5b506103f2611ef8565b3480156108b957600080fd5b5061051f60008051602061518d83398151915281565b610462611f07565b3480156108e357600080fd5b506104286108f2366004614739565b611f8d565b34801561090357600080fd5b506103f2611fb6565b34801561091857600080fd5b50610462610927366004614988565b611fc5565b34801561093857600080fd5b506107426109473660046148c9565b612006565b34801561095857600080fd5b5061051f612106565b34801561096d57600080fd5b5061048461097c366004614522565b506014546001600160a01b031690565b34801561099857600080fd5b5061051f600081565b3480156109ad57600080fd5b506104626109bc3660046149bc565b612171565b61051f6109cf3660046148c9565b61217c565b3480156109e057600080fd5b5060105461048490600160201b90046001600160a01b031681565b348015610a0757600080fd5b50610462610a163660046149da565b61250e565b348015610a2757600080fd5b50610a3061256e565b6040516103ff929190614a59565b348015610a4a57600080fd5b5061074261268e565b348015610a5f57600080fd5b50610428610a6e366004614739565b612740565b348015610a7f57600080fd5b50601154610484906001600160a01b031681565b348015610a9f57600080fd5b506103f2610aae366004614522565b6127c4565b348015610abf57600080fd5b5061051f61271081565b348015610ad557600080fd5b5061051f600f5481565b348015610aeb57600080fd5b50610462610afa36600461475e565b612927565b610462610b0d366004614522565b6129d3565b348015610b1e57600080fd5b50610462610b2d366004614739565b612c42565b348015610b3e57600080fd5b50601254610484906001600160a01b031681565b348015610b5e57600080fd5b50610428610b6d366004614a87565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b348015610ba757600080fd5b506103f2610bb63660046148c9565b612c67565b348015610bc757600080fd5b50601454610484906001600160a01b031681565b348015610be757600080fd5b5061051f6000805160206151ad83398151915281565b348015610c0957600080fd5b50610462610c18366004614ab5565b612d09565b348015610c2957600080fd5b5061051f610c383660046148c9565b612d74565b63ffffffff81166000908152600c6020526040812060020180546060929190610c6590614b0e565b80601f0160208091040260200160405190810160405280929190818152602001828054610c9190614b0e565b8015610cde5780601f10610cb357610100808354040283529160200191610cde565b820191906000526020600020905b815481529060010190602001808311610cc157829003601f168201915b50505050509050600d60000181600d600101610cfc8760ff16612dc1565b604051602001610d0f9493929190614bb5565b6040516020818303038152906040529150505b92915050565b60006001600160e01b0319821663152a902d60e11b1480610d225750610d2282612e53565b606060018054610d5c90614b0e565b80601f0160208091040260200160405190810160405280929190818152602001828054610d8890614b0e565b8015610dd55780601f10610daa57610100808354040283529160200191610dd5565b820191906000526020600020905b815481529060010190602001808311610db857829003601f168201915b5050505050905090565b6000805160206151ad833981519152610df88133611f8d565b610e1d5760405162461bcd60e51b8152600401610e1490614c1e565b60405180910390fd5b60175480610e6d5760405162461bcd60e51b815260206004820152601d60248201527f576174617269646f72694e46543a206e6f2070656e64696e67206665650000006044820152606401610e14565b60006017819055604051339183156108fc02918491818181858888f19350505050158015610e9f573d6000803e3d6000fd5b505050565b6000610eaf82612e78565b506000908152600560205260409020546001600160a01b031690565b6000610ed682611d33565b9050806001600160a01b0316836001600160a01b031603610f435760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610e14565b336001600160a01b0382161480610f5f5750610f5f8133610b6d565b610fd15760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610e14565b610e9f8383612eda565b6000805160206151ad833981519152610ff48133611f8d565b6110105760405162461bcd60e51b8152600401610e1490614c1e565b60105463ffffffff908116908416111561103c5760405162461bcd60e51b8152600401610e1490614c55565b63ffffffff83166000908152600c6020526040902060020161105e8382614cdf565b5060015b600f5481116110cf576000818152600b602052604090205463ffffffff8086169116036110bd576040518181527ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce79060200160405180910390a15b806110c781614db4565b915050611062565b50505050565b6110de81611d33565b6001600160a01b0316336001600160a01b031614611112576111088161110383611d33565b612f48565b61111283826132af565b61111d83838361330e565b6000818152600b6020526040902060010154610e9f908361333f565b6000828152600b602090815260408083205463ffffffff168352600c90915281206004015481908161271061116e8387614dcd565b6111789190614de4565b6013546001600160a01b031697909650945050505050565b6000805160206151ad8339815191526111a98133611f8d565b6111c55760405162461bcd60e51b8152600401610e1490614c1e565b60105463ffffffff90811690841611156111f15760405162461bcd60e51b8152600401610e1490614c55565b5063ffffffff9091166000908152600c602052604090206006018054911515620100000262ff000019909216919091179055565b600082815260208190526040902060010154611240816133d6565b610e9f83836133e0565b600061125583611e72565b82106112b75760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610e14565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b6000601060049054906101000a90046001600160a01b03166001600160a01b031663357113466040518163ffffffff1660e01b8152600401602060405180830381865afa158015611335573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113599190614e06565b905090565b6001600160a01b03811633146113ce5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610e14565b6113d88282613464565b5050565b60008051602061518d8339815191526113f58133611f8d565b6114115760405162461bcd60e51b8152600401610e1490614c1e565b6001600160a01b0382166114375760405162461bcd60e51b8152600401610e1490614e23565b6013546001600160a01b03908116908316036114655760405162461bcd60e51b8152600401610e1490614e5a565b61147d60008051602061518d83398151915283611225565b6013546114a29060008051602061518d833981519152906001600160a01b0316612c42565b50601380546001600160a01b0319166001600160a01b0392909216919091179055565b60008051602061518d8339815191526114de8133611f8d565b6114fa5760405162461bcd60e51b8152600401610e1490614c1e565b6016548061154a5760405162461bcd60e51b815260206004820152601d60248201527f576174617269646f72694e46543a206e6f2070656e64696e67206665650000006044820152606401610e14565b60006016819055604051339183156108fc02918491818181858888f19350505050158015610e9f573d6000803e3d6000fd5b610e9f8383836040518060200160405280600081525061250e565b60006115a1612106565b9050803411156115f35760405162461bcd60e51b815260206004820152601e60248201527f576174617269646f72694e46543a2046656520697320746f6f206869676800006044820152606401610e14565b8034101561164e5760405162461bcd60e51b815260206004820152602260248201527f576174617269646f72694e46543a2046656520697320696e73756666696369656044820152611b9d60f21b6064820152608401610e14565b6116588383612740565b156116a55760405162461bcd60e51b815260206004820152601b60248201527f576174617269646f72694e46543a20416c7265616479207061696400000000006044820152606401610e14565b610e9f8383836134c9565b60006000805160206151ad8339815191526116cb8133611f8d565b6116e75760405162461bcd60e51b8152600401610e1490614c1e565b60008861ffff161161173b5760405162461bcd60e51b815260206004820181905260248201527f576174617269646f72694e46543a20696e76616c6964206d6178416d6f756e746044820152606401610e14565b60008760ff161161179e5760405162461bcd60e51b815260206004820152602760248201527f576174617269646f72694e46543a20696e76616c6964206d617847656e65726160448201526674696f6e4e756d60c81b6064820152608401610e14565b8660ff168551146118065760405162461bcd60e51b815260206004820152602c60248201527f576174617269646f72694e46543a20696e76616c6964206c656e677468206f6660448201526b20646f63756d656e7449647360a01b6064820152608401610e14565b6000611810612106565b905061181f60ff891682614dcd565b341461183d5760405162461bcd60e51b8152600401610e1490614e91565b601080546000919082906118569063ffffffff16614ec8565b91906101000a81548163ffffffff021916908363ffffffff160217905590506040518061014001604052808e81526020018d81526020018c81526020018b61ffff1681526020018a60ff1681526020018981526020018881526020018715158152602001861515815260200160011515815250600c60008363ffffffff1663ffffffff168152602001908152602001600020600082015181600001556020820151816001015560408201518160020190816119119190614cdf565b506060820151600382018054608085015160ff16620100000262ffffff1990911661ffff9093169290921791909117905560a0820151600482015560c082015180516119679160058401916020909101906143cf565b5060e08201516006919091018054610100808501516101209095015161ffff1990921693151561ff001916939093179315159092029290921762ff00001916620100009115159190910217905560405163ffffffff8216907f3467d3ce59f92a8675053984c7fc1f54f65b3438f638e6a088185c59b280ec4090600090a260005b8751811015611b38576119f96112e0565b6001600160a01b031663308cfecc848a8481518110611a1a57611a1a614eeb565b602090810291909101015160115460145460405160e086901b6001600160e01b031916815260048101939093526001600160a01b0391821660248401521660448201526064016000604051808303818588803b158015611a7957600080fd5b505af1158015611a8d573d6000803e3d6000fd5b50506011548b516001600160a01b039091169350632017cb9092508b915084908110611abb57611abb614eeb565b6020026020010151306040518363ffffffff1660e01b8152600401611af39291909182526001600160a01b0316602082015260400190565b600060405180830381600087803b158015611b0d57600080fd5b505af1158015611b21573d6000803e3d6000fd5b505050508080611b3090614db4565b9150506119e8565b509c9b505050505050505050505050565b6000805160206151ad833981519152611b628133611f8d565b611b7e5760405162461bcd60e51b8152600401610e1490614c1e565b6001600160a01b038216611ba45760405162461bcd60e51b8152600401610e1490614e23565b6011546001600160a01b0390811690831603611bd25760405162461bcd60e51b8152600401610e1490614e5a565b601180546001600160a01b038481166001600160a01b031983168117909355604080519190921680825260208201939093527fa407bf4ab15f0e5425ba011171e6aac8b7f2557af36f26b5fd8cf33180ff8cf5910160405180910390a1505050565b6000611c3f60095490565b8210611ca25760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610e14565b60098281548110611cb557611cb5614eeb565b90600052602060002001549050919050565b63ffffffff81166000908152600c6020908152604091829020600501805483518184028101840190945280845260609392830182828015611d2757602002820191906000526020600020905b815481526020019060010190808311611d13575b50505050509050919050565b6000818152600360205260408120546001600160a01b031680610d225760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610e14565b600c6020526000908152604090208054600182015460028301805492939192611dbb90614b0e565b80601f0160208091040260200160405190810160405280929190818152602001828054611de790614b0e565b8015611e345780601f10611e0957610100808354040283529160200191611e34565b820191906000526020600020905b815481529060010190602001808311611e1757829003601f168201915b50505060038401546004850154600690950154939461ffff82169460ff62010000938490048116955091935080821692610100820483169291041689565b60006001600160a01b038216611edc5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610e14565b506001600160a01b031660009081526004602052604090205490565b606060158054610d5c90614b0e565b60003411611f745760405162461bcd60e51b815260206004820152603460248201527f576174617269646f72694e46543a206465706f73697420616d6f756e74206d75604482015273073742062652067726561746572207468616e20360641b6064820152608401610e14565b3460176000828254611f869190614f01565b9091555050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b606060028054610d5c90614b0e565b6000805160206151ad833981519152611fde8133611f8d565b611ffa5760405162461bcd60e51b8152600401610e1490614c1e565b6015610e9f8382614cdf565b63ffffffff81166000908152600c60205260408120600301546060919062010000900460ff166001600160401b038111156120435761204361457c565b60405190808252806020026020018201604052801561206c578160200160208202803683370190505b50905060015b600f5481116120ff576000818152600b602052604090205463ffffffff8086169116036120ed576000818152600b602052604090205460019083906120c2908390600160201b900460ff16614f14565b60ff16815181106120d5576120d5614eeb565b602002602001018181516120e99190614f01565b9052505b806120f781614db4565b915050612072565b5092915050565b60006121106112e0565b6001600160a01b031663428c090b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561214d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113599190614f2d565b6113d833838361353c565b600080600c60008463ffffffff1663ffffffff1681526020019081526020016000206040518061014001604052908160008201548152602001600182015481526020016002820180546121ce90614b0e565b80601f01602080910402602001604051908101604052809291908181526020018280546121fa90614b0e565b80156122475780601f1061221c57610100808354040283529160200191612247565b820191906000526020600020905b81548152906001019060200180831161222a57829003601f168201915b5050509183525050600382015461ffff81166020808401919091526201000090910460ff166040808401919091526004840154606084015260058401805482518185028101850190935280835260809094019391929091908301828280156122ce57602002820191906000526020600020905b8154815260200190600101908083116122ba575b50505091835250506006919091015460ff8082161515602084015261010082048116151560408401526201000090910416151560609091015261012081015190915061235c5760405162461bcd60e51b815260206004820152601b60248201527f576174617269646f72694e46543a206e6f74206d696e7461626c6500000000006044820152606401610e14565b805134811461237d5760405162461bcd60e51b8152600401610e1490614e91565b600061238885612d74565b9050826060015161ffff1681106123ec5760405162461bcd60e51b815260206004820152602260248201527f576174617269646f72694e46543a206d617820616d6f756e7420657863656564604482015261195960f21b6064820152608401610e14565b34601660008282546123fe9190614f01565b909155506000905061240f86613602565b6000818152600b60209081526040918290208251606081018452815463ffffffff8116808352600160201b90910460ff1682850152600190920154818501529251338152939450919284917f98c13b5a9375a72dd05e6e12d158301ada05cc37f2d256864fd8eaa622b0508b910160405180910390a3601154604082810151905163d9abd5cf60e01b81526004810191909152306024820152604481018490526001600160a01b039091169063d9abd5cf90606401600060405180830381600087803b1580156124de57600080fd5b505af11580156124f2573d6000803e3d6000fd5b505050506125048160400151336136c5565b5095945050505050565b61251782611d33565b6001600160a01b0316336001600160a01b0316146125465761253c8261110384611d33565b61254684836132af565b6125528484848461375d565b6000828152600b60205260409020600101546110cf908461333f565b600d8054819061257d90614b0e565b80601f01602080910402602001604051908101604052809291908181526020018280546125a990614b0e565b80156125f65780601f106125cb576101008083540402835291602001916125f6565b820191906000526020600020905b8154815290600101906020018083116125d957829003601f168201915b50505050509080600101805461260b90614b0e565b80601f016020809104026020016040519081016040528092919081815260200182805461263790614b0e565b80156126845780601f1061265957610100808354040283529160200191612684565b820191906000526020600020905b81548152906001019060200180831161266757829003601f168201915b5050505050905082565b60105460609060009063ffffffff166001600160401b038111156126b4576126b461457c565b6040519080825280602002602001820160405280156126dd578160200160208202803683370190505b50905060005b60105463ffffffff908116908216101561273a57612705610c38826001614f46565b828263ffffffff168151811061271d5761271d614eeb565b60209081029190910101528061273281614ec8565b9150506126e3565b50919050565b600061274a6112e0565b6040516372669daf60e11b8152600481018590526001600160a01b038481166024830152919091169063e4cd3b5e90604401602060405180830381865afa158015612799573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127bd9190614f63565b9392505050565b6000818152600360205260409020546060906001600160a01b031661282b5760405162461bcd60e51b815260206004820152601f60248201527f576174617269646f72694e46543a20696e76616c696420746f6b656e204944006044820152606401610e14565b6000828152600b602090815260408083205463ffffffff81168452600c90925282206002018054600160201b90920460ff16929161286890614b0e565b80601f016020809104026020016040519081016040528092919081815260200182805461289490614b0e565b80156128e15780601f106128b6576101008083540402835291602001916128e1565b820191906000526020600020905b8154815290600101906020018083116128c457829003601f168201915b50505050509050600d60000181600d6001016128fc85612dc1565b60405160200161290f9493929190614bb5565b60405160208183030381529060405292505050919050565b6000805160206151ad8339815191526129408133611f8d565b61295c5760405162461bcd60e51b8152600401610e1490614c1e565b6001600160a01b0382166129825760405162461bcd60e51b8152600401610e1490614e23565b6014546001600160a01b03908116908316036129b05760405162461bcd60e51b8152600401610e1490614e5a565b50601480546001600160a01b0319166001600160a01b0392909216919091179055565b6129dc81611d33565b6001600160a01b0316336001600160a01b031614612a3c5760405162461bcd60e51b815260206004820152601860248201527f576174617269646f72694e46543a206e6f74206f776e657200000000000000006044820152606401610e14565b6000818152600b602090815260408083205463ffffffff16808452600c9092529091206006015460ff1680612abd5760405162461bcd60e51b815260206004820152602160248201527f576174617269646f72694e46543a206e6f742073656c6620726169736561626c6044820152606560f81b6064820152608401610e14565b6000838152600b602090815260408083205463ffffffff86168452600c9092529091206003015460ff600160201b90920482169162010000909104168110612b565760405162461bcd60e51b815260206004820152602660248201527f576174617269646f72694e46543a206d61782067656e65726174696f6e20657860448201526518d95959195960d21b6064820152608401610e14565b63ffffffff83166000908152600c6020526040902060010154348114612b8e5760405162461bcd60e51b8152600401610e1490614e91565b612b9b8561110387611d33565b8060166000828254612bad9190614f01565b909155505060405133815263ffffffff85169086907fe4f1f32c6dcc44687cdae2f462c1cc2d3e7f83a1fb49a4624089fd6f86cb58ce9060200160405180910390a36000858152600b60209081526040918290208251606081018452815463ffffffff81168252600160201b900460ff16928101929092526001015491810182905290612c3a90336136c5565b505050505050565b600082815260208190526040902060010154612c5d816133d6565b610e9f8383613464565b63ffffffff81166000908152600c60205260409020600201805460609190612c8e90614b0e565b80601f0160208091040260200160405190810160405280929190818152602001828054612cba90614b0e565b8015611d275780601f10612cdc57610100808354040283529160200191611d27565b820191906000526020600020905b815481529060010190602001808311612cea5750939695505050505050565b6000805160206151ad833981519152612d228133611f8d565b612d3e5760405162461bcd60e51b8152600401610e1490614c1e565b6040805180820190915283815260208101839052600d80612d5f8682614cdf565b5060208201516001820190612c3a9082614cdf565b60008060015b600f5481116120ff576000818152600b602052604090205463ffffffff808616911603612daf57612dac600183614f01565b91505b80612db981614db4565b915050612d7a565b60606000612dce8361378f565b60010190506000816001600160401b03811115612ded57612ded61457c565b6040519080825280601f01601f191660200182016040528015612e17576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084612e2157509392505050565b60006001600160e01b0319821663780e9d6360e01b1480610d225750610d2282613867565b6000818152600360205260409020546001600160a01b0316612ed75760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610e14565b50565b600081815260056020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612f0f82611d33565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000828152600b60209081526040808320805460019182015463ffffffff82168652600c8552838620845161014081018652815481529381015495840195909552600285018054600160201b90930460ff169691959194919291840191612fae90614b0e565b80601f0160208091040260200160405190810160405280929190818152602001828054612fda90614b0e565b80156130275780601f10612ffc57610100808354040283529160200191613027565b820191906000526020600020905b81548152906001019060200180831161300a57829003601f168201915b5050509183525050600382015461ffff81166020808401919091526201000090910460ff166040808401919091526004840154606084015260058401805482518185028101850190935280835260809094019391929091908301828280156130ae57602002820191906000526020600020905b81548152602001906001019080831161309a575b50505091835250506006919091015460ff8082161515602084015261010082048116151560408401526201000090910481161515606090920191909152608082015191925090811690841610156132a85761310a836001614f80565b6000868152600b60205260409020805464ff000000001916600160201b60ff9384168102919091179182905560c08401519261314b92600192900416614f14565b60ff168151811061315e5761315e614eeb565b6020908102919091018101516000878152600b83526040908190206001810192909255905490516001600160a01b0387168152600160201b820460ff169263ffffffff90921691839183918a917f4d9859eaec3803f4ec419e07eae36d4e113fc9f8daa609f53355b66cfe42d82a910160405180910390a46011546000888152600b60205260409081902060010154905163d9abd5cf60e01b81526004810191909152306024820152604481018990526001600160a01b039091169063d9abd5cf90606401600060405180830381600087803b15801561323d57600080fd5b505af1158015613251573d6000803e3d6000fd5b505050507ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce78760405161328691815260200190565b60405180910390a1826101000151156132a5576132a5868583886138a7565b50505b5050505050565b6000818152600b60209081526040918290205491516001600160a01b038516815263ffffffff90921691829184917f0892e3183ed90d013dac58c96cb7afb391d605dd7f1c9656fe6b39a95c9ef34e91015b60405180910390a3505050565b6133183382613a1a565b6133345760405162461bcd60e51b8152600401610e1490614f99565b610e9f838383613a99565b6000613349612106565b9050806017541015801561336457506133628383612740565b155b15610e9f57806017600082825461337b9190614fe6565b9091555061338c90508383836134c9565b604080516001600160a01b03841681526020810183905284917f17414f1e98bb4803e13edc2bdc8d3825527bfaeb9e162fc3c2b052b6b7fb476891015b60405180910390a2505050565b612ed78133613c0a565b6133ea8282611f8d565b6113d8576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556134203390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61346e8282611f8d565b156113d8576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6134d16112e0565b604051633faea84d60e21b8152600481018590526001600160a01b038481166024830152919091169063febaa1349083906044016000604051808303818588803b15801561351e57600080fd5b505af1158015613532573d6000803e3d6000fd5b5050505050505050565b816001600160a01b0316836001600160a01b03160361359d5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610e14565b6001600160a01b03838116600081815260066020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319101613301565b600080600f6000815461361490614db4565b918290555063ffffffff84166000908152600c6020526040812060050180549293509091829061364657613646614eeb565b60009182526020808320909101546040805160608101825263ffffffff808a16825260018286018181528385018681528a8952600b9097529390962082518154945160ff16600160201b0264ffffffffff1990951692169190911792909217825592519301929092559091506136bc3384613c63565b50909392505050565b60006136cf612106565b905080601654101580156136ea57506136e88383612740565b155b156137535780601660008282546137019190614fe6565b9091555061371290508383836134c9565b604080516001600160a01b03841681526020810183905284917f601986edd6b44d238edfff63ac7eb19a62cd59f5edf826b035c8be17eb6a39a091016133c9565b610e9f838361333f565b6137673383613a1a565b6137835760405162461bcd60e51b8152600401610e1490614f99565b6110cf84848484613dfc565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106137ce5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106137fa576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061381857662386f26fc10000830492506010015b6305f5e1008310613830576305f5e100830492506008015b612710831061384457612710830492506004015b60648310613856576064830492506002015b600a8310610d225760010192915050565b60006001600160e01b031982166380ac58cd60e01b148061389857506001600160e01b03198216635b5e139f60e01b145b80610d225750610d2282613e2f565b60125460405163c3c532d760e01b81526001600160a01b0386811660048301526024820186905263ffffffff8516604483015260ff841660648301529091169063c3c532d7906084016020604051808303816000875af115801561390f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139339190614f2d565b5060125460408051636e02007d60e01b815290516000926001600160a01b031691636e02007d9160048083019260209291908290030181865afa15801561397e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139a29190614f2d565b60115460125460405163d9abd5cf60e01b8152600481018890526001600160a01b03918216602482015260448101849052929350169063d9abd5cf90606401600060405180830381600087803b1580156139fb57600080fd5b505af1158015613a0f573d6000803e3d6000fd5b505050505050505050565b600080613a2683611d33565b9050806001600160a01b0316846001600160a01b03161480613a6d57506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b80613a915750836001600160a01b0316613a8684610ea4565b6001600160a01b0316145b949350505050565b826001600160a01b0316613aac82611d33565b6001600160a01b031614613ad25760405162461bcd60e51b8152600401610e1490614ff9565b6001600160a01b038216613b345760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610e14565b613b418383836001613e64565b826001600160a01b0316613b5482611d33565b6001600160a01b031614613b7a5760405162461bcd60e51b8152600401610e1490614ff9565b600081815260056020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260048552838620805460001901905590871680865283862080546001019055868652600390945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b613c148282611f8d565b6113d857613c2181613f91565b613c2c836020613fa3565b604051602001613c3d92919061503e565b60408051601f198184030181529082905262461bcd60e51b8252610e14916004016144dc565b6001600160a01b038216613cb95760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610e14565b6000818152600360205260409020546001600160a01b031615613d1e5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610e14565b613d2c600083836001613e64565b6000818152600360205260409020546001600160a01b031615613d915760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610e14565b6001600160a01b038216600081815260046020908152604080832080546001019055848352600390915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b613e07848484613a99565b613e138484848461413e565b6110cf5760405162461bcd60e51b8152600401610e14906150b3565b60006001600160e01b03198216637965db0b60e01b1480610d2257506301ffc9a760e01b6001600160e01b0319831614610d22565b6001811115613ed35760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b6064820152608401610e14565b816001600160a01b038516613f2f57613f2a81600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b613f52565b836001600160a01b0316856001600160a01b031614613f5257613f52858261423f565b6001600160a01b038416613f6e57613f69816142dc565b6132a8565b846001600160a01b0316846001600160a01b0316146132a8576132a8848261438b565b6060610d226001600160a01b03831660145b60606000613fb2836002614dcd565b613fbd906002614f01565b6001600160401b03811115613fd457613fd461457c565b6040519080825280601f01601f191660200182016040528015613ffe576020820181803683370190505b509050600360fc1b8160008151811061401957614019614eeb565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061404857614048614eeb565b60200101906001600160f81b031916908160001a905350600061406c846002614dcd565b614077906001614f01565b90505b60018111156140ef576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106140ab576140ab614eeb565b1a60f81b8282815181106140c1576140c1614eeb565b60200101906001600160f81b031916908160001a90535060049490941c936140e881615105565b905061407a565b5083156127bd5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610e14565b60006001600160a01b0384163b1561423457604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061418290339089908890889060040161511c565b6020604051808303816000875af19250505080156141bd575060408051601f3d908101601f191682019092526141ba91810190615159565b60015b61421a573d8080156141eb576040519150601f19603f3d011682016040523d82523d6000602084013e6141f0565b606091505b5080516000036142125760405162461bcd60e51b8152600401610e14906150b3565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050613a91565b506001949350505050565b6000600161424c84611e72565b6142569190614fe6565b6000838152600860205260409020549091508082146142a9576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b6009546000906142ee90600190614fe6565b6000838152600a60205260408120546009805493945090928490811061431657614316614eeb565b90600052602060002001549050806009838154811061433757614337614eeb565b6000918252602080832090910192909255828152600a9091526040808220849055858252812055600980548061436f5761436f615176565b6001900381819060005260206000200160009055905550505050565b600061439683611e72565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b82805482825590600052602060002090810192821561440a579160200282015b8281111561440a5782518255916020019190600101906143ef565b5061441692915061441a565b5090565b5b80821115614416576000815560010161441b565b803560ff8116811461444057600080fd5b919050565b803563ffffffff8116811461444057600080fd5b6000806040838503121561446c57600080fd5b6144758361442f565b915061448360208401614445565b90509250929050565b60005b838110156144a757818101518382015260200161448f565b50506000910152565b600081518084526144c881602086016020860161448c565b601f01601f19169290920160200192915050565b6020815260006127bd60208301846144b0565b6001600160e01b031981168114612ed757600080fd5b60006020828403121561451757600080fd5b81356127bd816144ef565b60006020828403121561453457600080fd5b5035919050565b6001600160a01b0381168114612ed757600080fd5b6000806040838503121561456357600080fd5b823561456e8161453b565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156145ba576145ba61457c565b604052919050565b60006001600160401b038311156145db576145db61457c565b6145ee601f8401601f1916602001614592565b905082815283838301111561460257600080fd5b828260208301376000602084830101529392505050565b600082601f83011261462a57600080fd5b6127bd838335602085016145c2565b6000806040838503121561464c57600080fd5b61465583614445565b915060208301356001600160401b0381111561467057600080fd5b61467c85828601614619565b9150509250929050565b60008060006060848603121561469b57600080fd5b83356146a68161453b565b925060208401356146b68161453b565b929592945050506040919091013590565b600080604083850312156146da57600080fd5b50508035926020909101359150565b8015158114612ed757600080fd5b8035614440816146e9565b6000806040838503121561471557600080fd5b61471e83614445565b9150602083013561472e816146e9565b809150509250929050565b6000806040838503121561474c57600080fd5b82359150602083013561472e8161453b565b60006020828403121561477057600080fd5b81356127bd8161453b565b600082601f83011261478c57600080fd5b813560206001600160401b038211156147a7576147a761457c565b8160051b6147b6828201614592565b92835284810182019282810190878511156147d057600080fd5b83870192505b848310156147ef578235825291830191908301906147d6565b979650505050505050565b60008060008060008060008060006101208a8c03121561481957600080fd5b8935985060208a0135975060408a01356001600160401b038082111561483e57600080fd5b61484a8d838e01614619565b985060608c0135915061ffff8216821461486357600080fd5b81975061487260808d0161442f565b965060a08c0135955060c08c013591508082111561488f57600080fd5b5061489c8c828d0161477b565b9350506148ab60e08b016146f7565b91506148ba6101008b016146f7565b90509295985092959850929598565b6000602082840312156148db57600080fd5b6127bd82614445565b6020808252825182820181905260009190848201906040850190845b8181101561491c57835183529284019291840191600101614900565b50909695505050505050565b60006101208b83528a60208401528060408401526149488184018b6144b0565b61ffff999099166060840152505060ff95909516608086015260a085019390935290151560c0840152151560e08301521515610100909101529392505050565b60006020828403121561499a57600080fd5b81356001600160401b038111156149b057600080fd5b613a9184828501614619565b600080604083850312156149cf57600080fd5b823561471e8161453b565b600080600080608085870312156149f057600080fd5b84356149fb8161453b565b93506020850135614a0b8161453b565b92506040850135915060608501356001600160401b03811115614a2d57600080fd5b8501601f81018713614a3e57600080fd5b614a4d878235602084016145c2565b91505092959194509250565b604081526000614a6c60408301856144b0565b8281036020840152614a7e81856144b0565b95945050505050565b60008060408385031215614a9a57600080fd5b8235614aa58161453b565b9150602083013561472e8161453b565b60008060408385031215614ac857600080fd5b82356001600160401b0380821115614adf57600080fd5b614aeb86838701614619565b93506020850135915080821115614b0157600080fd5b5061467c85828601614619565b600181811c90821680614b2257607f821691505b60208210810361273a57634e487b7160e01b600052602260045260246000fd5b60008154614b4f81614b0e565b60018281168015614b675760018114614b7c57614bab565b60ff1984168752821515830287019450614bab565b8560005260208060002060005b85811015614ba25781548a820152908401908201614b89565b50505082870194505b5050505092915050565b6000614bc18287614b42565b602f60f81b8082528651614bdc816001850160208b0161448c565b6001920191820152614bf16002820186614b42565b90508351614c0381836020880161448c565b64173539b7b760d91b91019081526005019695505050505050565b6020808252601c908201527f576174617269646f72694e46543a206e6f74207065726d697474656400000000604082015260600190565b60208082526024908201527f576174617269646f72694e46543a20696e76616c696420746f6b656e4d617374604082015263195c925960e21b606082015260800190565b601f821115610e9f57600081815260208120601f850160051c81016020861015614cc05750805b601f850160051c820191505b81811015612c3a57828155600101614ccc565b81516001600160401b03811115614cf857614cf861457c565b614d0c81614d068454614b0e565b84614c99565b602080601f831160018114614d415760008415614d295750858301515b600019600386901b1c1916600185901b178555612c3a565b600085815260208120601f198616915b82811015614d7057888601518255948401946001909101908401614d51565b5085821015614d8e5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b600060018201614dc657614dc6614d9e565b5060010190565b8082028115828204841417610d2257610d22614d9e565b600082614e0157634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215614e1857600080fd5b81516127bd8161453b565b6020808252601e908201527f576174617269646f72694e46543a20696e76616c696420616464726573730000604082015260600190565b6020808252601b908201527f576174617269646f72694e46543a2073616d6520616464726573730000000000604082015260600190565b6020808252601c908201527f576174617269646f72694e46543a20696e76616c69642076616c756500000000604082015260600190565b600063ffffffff808316818103614ee157614ee1614d9e565b6001019392505050565b634e487b7160e01b600052603260045260246000fd5b80820180821115610d2257610d22614d9e565b60ff8281168282160390811115610d2257610d22614d9e565b600060208284031215614f3f57600080fd5b5051919050565b63ffffffff8181168382160190808211156120ff576120ff614d9e565b600060208284031215614f7557600080fd5b81516127bd816146e9565b60ff8181168382160190811115610d2257610d22614d9e565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b81810381811115610d2257610d22614d9e565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161507681601785016020880161448c565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516150a781602884016020880161448c565b01602801949350505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60008161511457615114614d9e565b506000190190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061514f908301846144b0565b9695505050505050565b60006020828403121561516b57600080fd5b81516127bd816144ef565b634e487b7160e01b600052603160045260246000fdfe8b42d4fd5c2527b7732a4b075ccb928f88ffc087de1e4c401c8fc7ab80ea882e97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929a2646970667358221220e8b631f8c81bf0519e84e37ac55cc89ad34b9f81b1e700d793818f56ded2282b64736f6c6343000812003360806040523480156200001157600080fd5b50604051620018f7380380620018f78339810160408190526200003491620000d2565b604080518082018252600e8082526d15d85d185c9a591bdc9a4814d09560921b6020808401829052845180860190955291845290830152906001828260006200007e8382620001a9565b5060016200008d8282620001a9565b5050600680546001600160a81b031916921515610100600160a81b031916929092176101006001600160a01b0396909616959095029490941790555062000275915050565b600060208284031215620000e557600080fd5b81516001600160a01b0381168114620000fd57600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200012f57607f821691505b6020821081036200015057634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001a457600081815260208120601f850160051c810160208610156200017f5750805b601f850160051c820191505b81811015620001a0578281556001016200018b565b5050505b505050565b81516001600160401b03811115620001c557620001c562000104565b620001dd81620001d684546200011a565b8462000156565b602080601f831160018114620002155760008415620001fc5750858301515b600019600386901b1c1916600185901b178555620001a0565b600085815260208120601f198616915b82811015620002465788860151825594840194600190910190840162000225565b5085821015620002655787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61167280620002856000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c806373b96da3116100ad578063c3c532d711610071578063c3c532d7146102b3578063c87b56dd146102c6578063d082e381146102d9578063d0c0079b146102e2578063e985e9c5146102fa57600080fd5b806373b96da31461026b57806395d89b4114610272578063a22cb4651461027a578063b45a3c0e1461028d578063b88d4fde146102a057600080fd5b806342842e0e116100f457806342842e0e146101c15780635fb8bcd5146101d45780636352211e146102335780636e02007d1461024657806370a082311461025857600080fd5b806301ffc9a71461013157806306fdde0314610159578063081812fc1461016e578063095ea7b31461019957806323b872dd146101ae575b600080fd5b61014461013f366004611107565b610336565b60405190151581526020015b60405180910390f35b610161610361565b6040516101509190611174565b61018161017c366004611187565b6103f3565b6040516001600160a01b039091168152602001610150565b6101ac6101a73660046111bc565b61041a565b005b6101ac6101bc3660046111e6565b61044c565b6101ac6101cf3660046111e6565b610480565b61020f6101e2366004611187565b6008602052600090815260409020805460019091015463ffffffff821691640100000000900460ff169083565b6040805163ffffffff909416845260ff909216602084015290820152606001610150565b610181610241366004611187565b6104af565b6007545b604051908152602001610150565b61024a610266366004611222565b610514565b6000610181565b61016161059a565b6101ac61028836600461123d565b6105a9565b61014461029b366004611187565b6105d7565b6101ac6102ae3660046112e8565b610617565b61024a6102c1366004611393565b61064d565b6101616102d4366004611187565b6107a1565b61024a60075481565b6006546101819061010090046001600160a01b031681565b6101446103083660046113f3565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b60006001600160e01b03198216635a2d1e0760e11b148061035b575061035b826108cc565b92915050565b60606000805461037090611426565b80601f016020809104026020016040519081016040528092919081815260200182805461039c90611426565b80156103e95780601f106103be576101008083540402835291602001916103e9565b820191906000526020600020905b8154815290600101906020018083116103cc57829003601f168201915b5050505050905090565b60006103fe8261091c565b506000908152600460205260409020546001600160a01b031690565b60065460ff161561043e5760405163bd291a9560e01b815260040160405180910390fd5b610448828261097e565b5050565b60065460ff16156104705760405163bd291a9560e01b815260040160405180910390fd5b61047b838383610a8e565b505050565b60065460ff16156104a45760405163bd291a9560e01b815260040160405180910390fd5b61047b838383610abf565b6000818152600260205260408120546001600160a01b03168061035b5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064015b60405180910390fd5b60006001600160a01b03821661057e5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b606482015260840161050b565b506001600160a01b031660009081526003602052604090205490565b60606001805461037090611426565b60065460ff16156105cd5760405163bd291a9560e01b815260040160405180910390fd5b6104488282610ada565b6000818152600260205260408120546001600160a01b031661060c5760405163ae9a63f560e01b815260040160405180910390fd5b505060065460ff1690565b60065460ff161561063b5760405163bd291a9560e01b815260040160405180910390fd5b61064784848484610ae5565b50505050565b60065460009061010090046001600160a01b031633146106d55760405162461bcd60e51b815260206004820152603860248201527f576174617269646f72695342543a204f6e6c7920576174617269646f72694e4660448201527f542063616e2063616c6c20746869732066756e6374696f6e0000000000000000606482015260840161050b565b60006007600081546106e690611460565b91905081905590506106fa86600754610b17565b6040805160608101825263ffffffff808716825260ff80871660208085019182528486018b815260075460009081526008909252908690209451855492519093166401000000000264ffffffffff19909216929093169190911717825551600190910155517f032bc66be43dbccb7487781d168eb7bda224628a3b2c3388bdf69b532a3a16119061078e9083815260200190565b60405180910390a190505b949350505050565b6000818152600260205260409020546060906001600160a01b03166108085760405162461bcd60e51b815260206004820152601f60248201527f576174617269646f72695342543a20696e76616c696420746f6b656e20494400604482015260640161050b565b6000828152600860209081526040918290208251606081018452815463ffffffff811680835264010000000090910460ff16938201849052600190920154818501526006549351620540b160e01b8152600481019390935260248301919091529161010090046001600160a01b031690620540b190604401600060405180830381865afa15801561089d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108c59190810190611487565b9392505050565b60006001600160e01b031982166380ac58cd60e01b14806108fd57506001600160e01b03198216635b5e139f60e01b145b8061035b57506301ffc9a760e01b6001600160e01b031983161461035b565b6000818152600260205260409020546001600160a01b031661097b5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604482015260640161050b565b50565b6000610989826104af565b9050806001600160a01b0316836001600160a01b0316036109f65760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161050b565b336001600160a01b0382161480610a125750610a128133610308565b610a845760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000606482015260840161050b565b61047b8383610ca2565b610a983382610d10565b610ab45760405162461bcd60e51b815260040161050b906114fe565b61047b838383610d8e565b61047b83838360405180602001604052806000815250610617565b610448338383610ef2565b610aef3383610d10565b610b0b5760405162461bcd60e51b815260040161050b906114fe565b61064784848484610fc0565b6001600160a01b038216610b6d5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161050b565b6000818152600260205260409020546001600160a01b031615610bd25760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161050b565b6000818152600260205260409020546001600160a01b031615610c375760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161050b565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190610cd7826104af565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080610d1c836104af565b9050806001600160a01b0316846001600160a01b03161480610d6357506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806107995750836001600160a01b0316610d7c846103f3565b6001600160a01b031614949350505050565b826001600160a01b0316610da1826104af565b6001600160a01b031614610dc75760405162461bcd60e51b815260040161050b9061154b565b6001600160a01b038216610e295760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161050b565b826001600160a01b0316610e3c826104af565b6001600160a01b031614610e625760405162461bcd60e51b815260040161050b9061154b565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b816001600160a01b0316836001600160a01b031603610f535760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161050b565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b610fcb848484610d8e565b610fd784848484610ff3565b6106475760405162461bcd60e51b815260040161050b90611590565b60006001600160a01b0384163b156110e957604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906110379033908990889088906004016115e2565b6020604051808303816000875af1925050508015611072575060408051601f3d908101601f1916820190925261106f9181019061161f565b60015b6110cf573d8080156110a0576040519150601f19603f3d011682016040523d82523d6000602084013e6110a5565b606091505b5080516000036110c75760405162461bcd60e51b815260040161050b90611590565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610799565b506001610799565b6001600160e01b03198116811461097b57600080fd5b60006020828403121561111957600080fd5b81356108c5816110f1565b60005b8381101561113f578181015183820152602001611127565b50506000910152565b60008151808452611160816020860160208601611124565b601f01601f19169290920160200192915050565b6020815260006108c56020830184611148565b60006020828403121561119957600080fd5b5035919050565b80356001600160a01b03811681146111b757600080fd5b919050565b600080604083850312156111cf57600080fd5b6111d8836111a0565b946020939093013593505050565b6000806000606084860312156111fb57600080fd5b611204846111a0565b9250611212602085016111a0565b9150604084013590509250925092565b60006020828403121561123457600080fd5b6108c5826111a0565b6000806040838503121561125057600080fd5b611259836111a0565b91506020830135801515811461126e57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156112b8576112b8611279565b604052919050565b600067ffffffffffffffff8211156112da576112da611279565b50601f01601f191660200190565b600080600080608085870312156112fe57600080fd5b611307856111a0565b9350611315602086016111a0565b925060408501359150606085013567ffffffffffffffff81111561133857600080fd5b8501601f8101871361134957600080fd5b803561135c611357826112c0565b61128f565b81815288602083850101111561137157600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b600080600080608085870312156113a957600080fd5b6113b2856111a0565b935060208501359250604085013563ffffffff811681146113d257600080fd5b9150606085013560ff811681146113e857600080fd5b939692955090935050565b6000806040838503121561140657600080fd5b61140f836111a0565b915061141d602084016111a0565b90509250929050565b600181811c9082168061143a57607f821691505b60208210810361145a57634e487b7160e01b600052602260045260246000fd5b50919050565b60006001820161148057634e487b7160e01b600052601160045260246000fd5b5060010190565b60006020828403121561149957600080fd5b815167ffffffffffffffff8111156114b057600080fd5b8201601f810184136114c157600080fd5b80516114cf611357826112c0565b8181528560208385010111156114e457600080fd5b6114f5826020830160208601611124565b95945050505050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061161590830184611148565b9695505050505050565b60006020828403121561163157600080fd5b81516108c5816110f156fea26469706673582212201057da7ddd3d3273691cf8378954cf6f3ba9cf526aa3126824440e10754de90164736f6c634300081200338b42d4fd5c2527b7732a4b075ccb928f88ffc087de1e4c401c8fc7ab80ea882e97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929000000000000000000000000935f06ab3333d085b9bf5f0c5d1294c6c19bba08000000000000000000000000673d8e60e598e63492b3426dfa1a9ed6cbbdc79d00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000001ec47e37d95228e6234c23ff2bda7eabb09086e700000000000000000000000042649af5de5ff4f90a2bbbc3756c59d1a982bc5b0000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000efe7bdb2e5908de38199e3828be38193e381a8e381a7e38081e3808ee6b8a1e3828ae9b3a5e38396e38383e382afe382b9e3808fe381abe38193e381aee38388e383bce382afe383b3e38292e68980e69c89e38197e381a6e38184e3828be38193e381a8e38292e8a8bce6988ee38197e381bee38199e380820ae38396e383a9e382a6e382b6e381aee382a2e38389e383ace382b9e3818ce6aca1e381a7e5a78be381bee381a3e381a6e38184e3828be38193e381a8e38292e7a2bae8aa8de38197e381a6e3818fe381a0e38195e381843a2068747470733a2f2f776174617269646f72692d626f6f6b732e636f6d2f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c68747470733a2f2f6e667473746f726167652e6c696e6b2f697066730000000000000000000000000000000000000000000000000000000000000000000000086d65746164617461000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106103cd5760003560e01c806370a08231116101fd578063bf040a9011610118578063d4cb7432116100ab578063e9f631e31161007a578063e9f631e314610b9b578063f394928c14610bbb578063f5b541a614610bdb578063f825d2d514610bfd578063fb22c61514610c1d57600080fd5b8063d4cb743214610aff578063d547741f14610b12578063e5ed0ed614610b32578063e985e9c514610b5257600080fd5b8063c87b56dd116100e7578063c87b56dd14610a93578063cae6047f14610ab3578063d082e38114610ac9578063d3bcd67b14610adf57600080fd5b8063bf040a9014610a1b578063c0523a8214610a3e578063c319760014610a53578063c6d84d1a14610a7357600080fd5b80639b2c15f211610190578063a22cb4651161015f578063a22cb465146109a1578063a71bbebe146109c1578063b41bde13146109d4578063b88d4fde146109fb57600080fd5b80639b2c15f21461092c5780639b63a11e1461094c5780639e0cf55b14610961578063a217fddf1461098c57600080fd5b8063910126d9116101cc578063910126d9146108cf57806391d14854146108d757806395d89b41146108f75780639ab5e9751461090c57600080fd5b806370a082311461085a57806373b96da31461087a5780637db551b0146108985780638595f32a146108ad57600080fd5b806336568abe116102ed5780634f6ccce711610280578063643090bc1161024f578063643090bc146107da57806366d003ac146107f05780636ad425b3146108105780636e02007d1461084557600080fd5b80634f6ccce71461070257806357f9535a146107225780635fb8bcd51461074f5780636352211e146107ba57600080fd5b806342842e0e116102bc57806342842e0e1461069c578063429c9bef146106bc57806347b554af146106cf5780634d4aa365146106e257600080fd5b806336568abe146106315780633a2ffa35146106515780633bbed4a0146106675780633ccfd60b1461068757600080fd5b806318160ddd116103655780632e012236116103345780632e012236146105bc5780632f2ff15d146105dc5780632f745c59146105fc578063357113461461061c57600080fd5b806318160ddd1461050e57806323b872dd1461052d578063248a9ca31461054d5780632a55205a1461057d57600080fd5b8063081812fc116103a1578063081812fc14610464578063095ea7b31461049c5780630d496604146104bc57806311e60071146104ee57600080fd5b80620540b1146103d257806301ffc9a71461040857806306fdde031461043857806307a6345c1461044d575b600080fd5b3480156103de57600080fd5b506103f26103ed366004614459565b610c3d565b6040516103ff91906144dc565b60405180910390f35b34801561041457600080fd5b50610428610423366004614505565b610d28565b60405190151581526020016103ff565b34801561044457600080fd5b506103f2610d4d565b34801561045957600080fd5b50610462610ddf565b005b34801561047057600080fd5b5061048461047f366004614522565b610ea4565b6040516001600160a01b0390911681526020016103ff565b3480156104a857600080fd5b506104626104b7366004614550565b610ecb565b3480156104c857600080fd5b506010546104d99063ffffffff1681565b60405163ffffffff90911681526020016103ff565b3480156104fa57600080fd5b50610462610509366004614639565b610fdb565b34801561051a57600080fd5b506009545b6040519081526020016103ff565b34801561053957600080fd5b50610462610548366004614686565b6110d5565b34801561055957600080fd5b5061051f610568366004614522565b60009081526020819052604090206001015490565b34801561058957600080fd5b5061059d6105983660046146c7565b611139565b604080516001600160a01b0390931683526020830191909152016103ff565b3480156105c857600080fd5b506104626105d7366004614702565b611190565b3480156105e857600080fd5b506104626105f7366004614739565b611225565b34801561060857600080fd5b5061051f610617366004614550565b61124a565b34801561062857600080fd5b506104846112e0565b34801561063d57600080fd5b5061046261064c366004614739565b61135e565b34801561065d57600080fd5b5061051f60175481565b34801561067357600080fd5b5061046261068236600461475e565b6113dc565b34801561069357600080fd5b506104626114c5565b3480156106a857600080fd5b506104626106b7366004614686565b61157c565b6104626106ca366004614739565b611597565b6104d96106dd3660046147fa565b6116b0565b3480156106ee57600080fd5b506104626106fd36600461475e565b611b49565b34801561070e57600080fd5b5061051f61071d366004614522565b611c34565b34801561072e57600080fd5b5061074261073d3660046148c9565b611cc7565b6040516103ff91906148e4565b34801561075b57600080fd5b5061079661076a366004614522565b600b602052600090815260409020805460019091015463ffffffff821691600160201b900460ff169083565b6040805163ffffffff909416845260ff9092166020840152908201526060016103ff565b3480156107c657600080fd5b506104846107d5366004614522565b611d33565b3480156107e657600080fd5b5061051f60165481565b3480156107fc57600080fd5b50601354610484906001600160a01b031681565b34801561081c57600080fd5b5061083061082b3660046148c9565b611d93565b6040516103ff99989796959493929190614928565b34801561085157600080fd5b50600f5461051f565b34801561086657600080fd5b5061051f61087536600461475e565b611e72565b34801561088657600080fd5b506012546001600160a01b0316610484565b3480156108a457600080fd5b506103f2611ef8565b3480156108b957600080fd5b5061051f60008051602061518d83398151915281565b610462611f07565b3480156108e357600080fd5b506104286108f2366004614739565b611f8d565b34801561090357600080fd5b506103f2611fb6565b34801561091857600080fd5b50610462610927366004614988565b611fc5565b34801561093857600080fd5b506107426109473660046148c9565b612006565b34801561095857600080fd5b5061051f612106565b34801561096d57600080fd5b5061048461097c366004614522565b506014546001600160a01b031690565b34801561099857600080fd5b5061051f600081565b3480156109ad57600080fd5b506104626109bc3660046149bc565b612171565b61051f6109cf3660046148c9565b61217c565b3480156109e057600080fd5b5060105461048490600160201b90046001600160a01b031681565b348015610a0757600080fd5b50610462610a163660046149da565b61250e565b348015610a2757600080fd5b50610a3061256e565b6040516103ff929190614a59565b348015610a4a57600080fd5b5061074261268e565b348015610a5f57600080fd5b50610428610a6e366004614739565b612740565b348015610a7f57600080fd5b50601154610484906001600160a01b031681565b348015610a9f57600080fd5b506103f2610aae366004614522565b6127c4565b348015610abf57600080fd5b5061051f61271081565b348015610ad557600080fd5b5061051f600f5481565b348015610aeb57600080fd5b50610462610afa36600461475e565b612927565b610462610b0d366004614522565b6129d3565b348015610b1e57600080fd5b50610462610b2d366004614739565b612c42565b348015610b3e57600080fd5b50601254610484906001600160a01b031681565b348015610b5e57600080fd5b50610428610b6d366004614a87565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b348015610ba757600080fd5b506103f2610bb63660046148c9565b612c67565b348015610bc757600080fd5b50601454610484906001600160a01b031681565b348015610be757600080fd5b5061051f6000805160206151ad83398151915281565b348015610c0957600080fd5b50610462610c18366004614ab5565b612d09565b348015610c2957600080fd5b5061051f610c383660046148c9565b612d74565b63ffffffff81166000908152600c6020526040812060020180546060929190610c6590614b0e565b80601f0160208091040260200160405190810160405280929190818152602001828054610c9190614b0e565b8015610cde5780601f10610cb357610100808354040283529160200191610cde565b820191906000526020600020905b815481529060010190602001808311610cc157829003601f168201915b50505050509050600d60000181600d600101610cfc8760ff16612dc1565b604051602001610d0f9493929190614bb5565b6040516020818303038152906040529150505b92915050565b60006001600160e01b0319821663152a902d60e11b1480610d225750610d2282612e53565b606060018054610d5c90614b0e565b80601f0160208091040260200160405190810160405280929190818152602001828054610d8890614b0e565b8015610dd55780601f10610daa57610100808354040283529160200191610dd5565b820191906000526020600020905b815481529060010190602001808311610db857829003601f168201915b5050505050905090565b6000805160206151ad833981519152610df88133611f8d565b610e1d5760405162461bcd60e51b8152600401610e1490614c1e565b60405180910390fd5b60175480610e6d5760405162461bcd60e51b815260206004820152601d60248201527f576174617269646f72694e46543a206e6f2070656e64696e67206665650000006044820152606401610e14565b60006017819055604051339183156108fc02918491818181858888f19350505050158015610e9f573d6000803e3d6000fd5b505050565b6000610eaf82612e78565b506000908152600560205260409020546001600160a01b031690565b6000610ed682611d33565b9050806001600160a01b0316836001600160a01b031603610f435760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610e14565b336001600160a01b0382161480610f5f5750610f5f8133610b6d565b610fd15760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610e14565b610e9f8383612eda565b6000805160206151ad833981519152610ff48133611f8d565b6110105760405162461bcd60e51b8152600401610e1490614c1e565b60105463ffffffff908116908416111561103c5760405162461bcd60e51b8152600401610e1490614c55565b63ffffffff83166000908152600c6020526040902060020161105e8382614cdf565b5060015b600f5481116110cf576000818152600b602052604090205463ffffffff8086169116036110bd576040518181527ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce79060200160405180910390a15b806110c781614db4565b915050611062565b50505050565b6110de81611d33565b6001600160a01b0316336001600160a01b031614611112576111088161110383611d33565b612f48565b61111283826132af565b61111d83838361330e565b6000818152600b6020526040902060010154610e9f908361333f565b6000828152600b602090815260408083205463ffffffff168352600c90915281206004015481908161271061116e8387614dcd565b6111789190614de4565b6013546001600160a01b031697909650945050505050565b6000805160206151ad8339815191526111a98133611f8d565b6111c55760405162461bcd60e51b8152600401610e1490614c1e565b60105463ffffffff90811690841611156111f15760405162461bcd60e51b8152600401610e1490614c55565b5063ffffffff9091166000908152600c602052604090206006018054911515620100000262ff000019909216919091179055565b600082815260208190526040902060010154611240816133d6565b610e9f83836133e0565b600061125583611e72565b82106112b75760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610e14565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b6000601060049054906101000a90046001600160a01b03166001600160a01b031663357113466040518163ffffffff1660e01b8152600401602060405180830381865afa158015611335573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113599190614e06565b905090565b6001600160a01b03811633146113ce5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610e14565b6113d88282613464565b5050565b60008051602061518d8339815191526113f58133611f8d565b6114115760405162461bcd60e51b8152600401610e1490614c1e565b6001600160a01b0382166114375760405162461bcd60e51b8152600401610e1490614e23565b6013546001600160a01b03908116908316036114655760405162461bcd60e51b8152600401610e1490614e5a565b61147d60008051602061518d83398151915283611225565b6013546114a29060008051602061518d833981519152906001600160a01b0316612c42565b50601380546001600160a01b0319166001600160a01b0392909216919091179055565b60008051602061518d8339815191526114de8133611f8d565b6114fa5760405162461bcd60e51b8152600401610e1490614c1e565b6016548061154a5760405162461bcd60e51b815260206004820152601d60248201527f576174617269646f72694e46543a206e6f2070656e64696e67206665650000006044820152606401610e14565b60006016819055604051339183156108fc02918491818181858888f19350505050158015610e9f573d6000803e3d6000fd5b610e9f8383836040518060200160405280600081525061250e565b60006115a1612106565b9050803411156115f35760405162461bcd60e51b815260206004820152601e60248201527f576174617269646f72694e46543a2046656520697320746f6f206869676800006044820152606401610e14565b8034101561164e5760405162461bcd60e51b815260206004820152602260248201527f576174617269646f72694e46543a2046656520697320696e73756666696369656044820152611b9d60f21b6064820152608401610e14565b6116588383612740565b156116a55760405162461bcd60e51b815260206004820152601b60248201527f576174617269646f72694e46543a20416c7265616479207061696400000000006044820152606401610e14565b610e9f8383836134c9565b60006000805160206151ad8339815191526116cb8133611f8d565b6116e75760405162461bcd60e51b8152600401610e1490614c1e565b60008861ffff161161173b5760405162461bcd60e51b815260206004820181905260248201527f576174617269646f72694e46543a20696e76616c6964206d6178416d6f756e746044820152606401610e14565b60008760ff161161179e5760405162461bcd60e51b815260206004820152602760248201527f576174617269646f72694e46543a20696e76616c6964206d617847656e65726160448201526674696f6e4e756d60c81b6064820152608401610e14565b8660ff168551146118065760405162461bcd60e51b815260206004820152602c60248201527f576174617269646f72694e46543a20696e76616c6964206c656e677468206f6660448201526b20646f63756d656e7449647360a01b6064820152608401610e14565b6000611810612106565b905061181f60ff891682614dcd565b341461183d5760405162461bcd60e51b8152600401610e1490614e91565b601080546000919082906118569063ffffffff16614ec8565b91906101000a81548163ffffffff021916908363ffffffff160217905590506040518061014001604052808e81526020018d81526020018c81526020018b61ffff1681526020018a60ff1681526020018981526020018881526020018715158152602001861515815260200160011515815250600c60008363ffffffff1663ffffffff168152602001908152602001600020600082015181600001556020820151816001015560408201518160020190816119119190614cdf565b506060820151600382018054608085015160ff16620100000262ffffff1990911661ffff9093169290921791909117905560a0820151600482015560c082015180516119679160058401916020909101906143cf565b5060e08201516006919091018054610100808501516101209095015161ffff1990921693151561ff001916939093179315159092029290921762ff00001916620100009115159190910217905560405163ffffffff8216907f3467d3ce59f92a8675053984c7fc1f54f65b3438f638e6a088185c59b280ec4090600090a260005b8751811015611b38576119f96112e0565b6001600160a01b031663308cfecc848a8481518110611a1a57611a1a614eeb565b602090810291909101015160115460145460405160e086901b6001600160e01b031916815260048101939093526001600160a01b0391821660248401521660448201526064016000604051808303818588803b158015611a7957600080fd5b505af1158015611a8d573d6000803e3d6000fd5b50506011548b516001600160a01b039091169350632017cb9092508b915084908110611abb57611abb614eeb565b6020026020010151306040518363ffffffff1660e01b8152600401611af39291909182526001600160a01b0316602082015260400190565b600060405180830381600087803b158015611b0d57600080fd5b505af1158015611b21573d6000803e3d6000fd5b505050508080611b3090614db4565b9150506119e8565b509c9b505050505050505050505050565b6000805160206151ad833981519152611b628133611f8d565b611b7e5760405162461bcd60e51b8152600401610e1490614c1e565b6001600160a01b038216611ba45760405162461bcd60e51b8152600401610e1490614e23565b6011546001600160a01b0390811690831603611bd25760405162461bcd60e51b8152600401610e1490614e5a565b601180546001600160a01b038481166001600160a01b031983168117909355604080519190921680825260208201939093527fa407bf4ab15f0e5425ba011171e6aac8b7f2557af36f26b5fd8cf33180ff8cf5910160405180910390a1505050565b6000611c3f60095490565b8210611ca25760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610e14565b60098281548110611cb557611cb5614eeb565b90600052602060002001549050919050565b63ffffffff81166000908152600c6020908152604091829020600501805483518184028101840190945280845260609392830182828015611d2757602002820191906000526020600020905b815481526020019060010190808311611d13575b50505050509050919050565b6000818152600360205260408120546001600160a01b031680610d225760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610e14565b600c6020526000908152604090208054600182015460028301805492939192611dbb90614b0e565b80601f0160208091040260200160405190810160405280929190818152602001828054611de790614b0e565b8015611e345780601f10611e0957610100808354040283529160200191611e34565b820191906000526020600020905b815481529060010190602001808311611e1757829003601f168201915b50505060038401546004850154600690950154939461ffff82169460ff62010000938490048116955091935080821692610100820483169291041689565b60006001600160a01b038216611edc5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610e14565b506001600160a01b031660009081526004602052604090205490565b606060158054610d5c90614b0e565b60003411611f745760405162461bcd60e51b815260206004820152603460248201527f576174617269646f72694e46543a206465706f73697420616d6f756e74206d75604482015273073742062652067726561746572207468616e20360641b6064820152608401610e14565b3460176000828254611f869190614f01565b9091555050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b606060028054610d5c90614b0e565b6000805160206151ad833981519152611fde8133611f8d565b611ffa5760405162461bcd60e51b8152600401610e1490614c1e565b6015610e9f8382614cdf565b63ffffffff81166000908152600c60205260408120600301546060919062010000900460ff166001600160401b038111156120435761204361457c565b60405190808252806020026020018201604052801561206c578160200160208202803683370190505b50905060015b600f5481116120ff576000818152600b602052604090205463ffffffff8086169116036120ed576000818152600b602052604090205460019083906120c2908390600160201b900460ff16614f14565b60ff16815181106120d5576120d5614eeb565b602002602001018181516120e99190614f01565b9052505b806120f781614db4565b915050612072565b5092915050565b60006121106112e0565b6001600160a01b031663428c090b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561214d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113599190614f2d565b6113d833838361353c565b600080600c60008463ffffffff1663ffffffff1681526020019081526020016000206040518061014001604052908160008201548152602001600182015481526020016002820180546121ce90614b0e565b80601f01602080910402602001604051908101604052809291908181526020018280546121fa90614b0e565b80156122475780601f1061221c57610100808354040283529160200191612247565b820191906000526020600020905b81548152906001019060200180831161222a57829003601f168201915b5050509183525050600382015461ffff81166020808401919091526201000090910460ff166040808401919091526004840154606084015260058401805482518185028101850190935280835260809094019391929091908301828280156122ce57602002820191906000526020600020905b8154815260200190600101908083116122ba575b50505091835250506006919091015460ff8082161515602084015261010082048116151560408401526201000090910416151560609091015261012081015190915061235c5760405162461bcd60e51b815260206004820152601b60248201527f576174617269646f72694e46543a206e6f74206d696e7461626c6500000000006044820152606401610e14565b805134811461237d5760405162461bcd60e51b8152600401610e1490614e91565b600061238885612d74565b9050826060015161ffff1681106123ec5760405162461bcd60e51b815260206004820152602260248201527f576174617269646f72694e46543a206d617820616d6f756e7420657863656564604482015261195960f21b6064820152608401610e14565b34601660008282546123fe9190614f01565b909155506000905061240f86613602565b6000818152600b60209081526040918290208251606081018452815463ffffffff8116808352600160201b90910460ff1682850152600190920154818501529251338152939450919284917f98c13b5a9375a72dd05e6e12d158301ada05cc37f2d256864fd8eaa622b0508b910160405180910390a3601154604082810151905163d9abd5cf60e01b81526004810191909152306024820152604481018490526001600160a01b039091169063d9abd5cf90606401600060405180830381600087803b1580156124de57600080fd5b505af11580156124f2573d6000803e3d6000fd5b505050506125048160400151336136c5565b5095945050505050565b61251782611d33565b6001600160a01b0316336001600160a01b0316146125465761253c8261110384611d33565b61254684836132af565b6125528484848461375d565b6000828152600b60205260409020600101546110cf908461333f565b600d8054819061257d90614b0e565b80601f01602080910402602001604051908101604052809291908181526020018280546125a990614b0e565b80156125f65780601f106125cb576101008083540402835291602001916125f6565b820191906000526020600020905b8154815290600101906020018083116125d957829003601f168201915b50505050509080600101805461260b90614b0e565b80601f016020809104026020016040519081016040528092919081815260200182805461263790614b0e565b80156126845780601f1061265957610100808354040283529160200191612684565b820191906000526020600020905b81548152906001019060200180831161266757829003601f168201915b5050505050905082565b60105460609060009063ffffffff166001600160401b038111156126b4576126b461457c565b6040519080825280602002602001820160405280156126dd578160200160208202803683370190505b50905060005b60105463ffffffff908116908216101561273a57612705610c38826001614f46565b828263ffffffff168151811061271d5761271d614eeb565b60209081029190910101528061273281614ec8565b9150506126e3565b50919050565b600061274a6112e0565b6040516372669daf60e11b8152600481018590526001600160a01b038481166024830152919091169063e4cd3b5e90604401602060405180830381865afa158015612799573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127bd9190614f63565b9392505050565b6000818152600360205260409020546060906001600160a01b031661282b5760405162461bcd60e51b815260206004820152601f60248201527f576174617269646f72694e46543a20696e76616c696420746f6b656e204944006044820152606401610e14565b6000828152600b602090815260408083205463ffffffff81168452600c90925282206002018054600160201b90920460ff16929161286890614b0e565b80601f016020809104026020016040519081016040528092919081815260200182805461289490614b0e565b80156128e15780601f106128b6576101008083540402835291602001916128e1565b820191906000526020600020905b8154815290600101906020018083116128c457829003601f168201915b50505050509050600d60000181600d6001016128fc85612dc1565b60405160200161290f9493929190614bb5565b60405160208183030381529060405292505050919050565b6000805160206151ad8339815191526129408133611f8d565b61295c5760405162461bcd60e51b8152600401610e1490614c1e565b6001600160a01b0382166129825760405162461bcd60e51b8152600401610e1490614e23565b6014546001600160a01b03908116908316036129b05760405162461bcd60e51b8152600401610e1490614e5a565b50601480546001600160a01b0319166001600160a01b0392909216919091179055565b6129dc81611d33565b6001600160a01b0316336001600160a01b031614612a3c5760405162461bcd60e51b815260206004820152601860248201527f576174617269646f72694e46543a206e6f74206f776e657200000000000000006044820152606401610e14565b6000818152600b602090815260408083205463ffffffff16808452600c9092529091206006015460ff1680612abd5760405162461bcd60e51b815260206004820152602160248201527f576174617269646f72694e46543a206e6f742073656c6620726169736561626c6044820152606560f81b6064820152608401610e14565b6000838152600b602090815260408083205463ffffffff86168452600c9092529091206003015460ff600160201b90920482169162010000909104168110612b565760405162461bcd60e51b815260206004820152602660248201527f576174617269646f72694e46543a206d61782067656e65726174696f6e20657860448201526518d95959195960d21b6064820152608401610e14565b63ffffffff83166000908152600c6020526040902060010154348114612b8e5760405162461bcd60e51b8152600401610e1490614e91565b612b9b8561110387611d33565b8060166000828254612bad9190614f01565b909155505060405133815263ffffffff85169086907fe4f1f32c6dcc44687cdae2f462c1cc2d3e7f83a1fb49a4624089fd6f86cb58ce9060200160405180910390a36000858152600b60209081526040918290208251606081018452815463ffffffff81168252600160201b900460ff16928101929092526001015491810182905290612c3a90336136c5565b505050505050565b600082815260208190526040902060010154612c5d816133d6565b610e9f8383613464565b63ffffffff81166000908152600c60205260409020600201805460609190612c8e90614b0e565b80601f0160208091040260200160405190810160405280929190818152602001828054612cba90614b0e565b8015611d275780601f10612cdc57610100808354040283529160200191611d27565b820191906000526020600020905b815481529060010190602001808311612cea5750939695505050505050565b6000805160206151ad833981519152612d228133611f8d565b612d3e5760405162461bcd60e51b8152600401610e1490614c1e565b6040805180820190915283815260208101839052600d80612d5f8682614cdf565b5060208201516001820190612c3a9082614cdf565b60008060015b600f5481116120ff576000818152600b602052604090205463ffffffff808616911603612daf57612dac600183614f01565b91505b80612db981614db4565b915050612d7a565b60606000612dce8361378f565b60010190506000816001600160401b03811115612ded57612ded61457c565b6040519080825280601f01601f191660200182016040528015612e17576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084612e2157509392505050565b60006001600160e01b0319821663780e9d6360e01b1480610d225750610d2282613867565b6000818152600360205260409020546001600160a01b0316612ed75760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610e14565b50565b600081815260056020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612f0f82611d33565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000828152600b60209081526040808320805460019182015463ffffffff82168652600c8552838620845161014081018652815481529381015495840195909552600285018054600160201b90930460ff169691959194919291840191612fae90614b0e565b80601f0160208091040260200160405190810160405280929190818152602001828054612fda90614b0e565b80156130275780601f10612ffc57610100808354040283529160200191613027565b820191906000526020600020905b81548152906001019060200180831161300a57829003601f168201915b5050509183525050600382015461ffff81166020808401919091526201000090910460ff166040808401919091526004840154606084015260058401805482518185028101850190935280835260809094019391929091908301828280156130ae57602002820191906000526020600020905b81548152602001906001019080831161309a575b50505091835250506006919091015460ff8082161515602084015261010082048116151560408401526201000090910481161515606090920191909152608082015191925090811690841610156132a85761310a836001614f80565b6000868152600b60205260409020805464ff000000001916600160201b60ff9384168102919091179182905560c08401519261314b92600192900416614f14565b60ff168151811061315e5761315e614eeb565b6020908102919091018101516000878152600b83526040908190206001810192909255905490516001600160a01b0387168152600160201b820460ff169263ffffffff90921691839183918a917f4d9859eaec3803f4ec419e07eae36d4e113fc9f8daa609f53355b66cfe42d82a910160405180910390a46011546000888152600b60205260409081902060010154905163d9abd5cf60e01b81526004810191909152306024820152604481018990526001600160a01b039091169063d9abd5cf90606401600060405180830381600087803b15801561323d57600080fd5b505af1158015613251573d6000803e3d6000fd5b505050507ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce78760405161328691815260200190565b60405180910390a1826101000151156132a5576132a5868583886138a7565b50505b5050505050565b6000818152600b60209081526040918290205491516001600160a01b038516815263ffffffff90921691829184917f0892e3183ed90d013dac58c96cb7afb391d605dd7f1c9656fe6b39a95c9ef34e91015b60405180910390a3505050565b6133183382613a1a565b6133345760405162461bcd60e51b8152600401610e1490614f99565b610e9f838383613a99565b6000613349612106565b9050806017541015801561336457506133628383612740565b155b15610e9f57806017600082825461337b9190614fe6565b9091555061338c90508383836134c9565b604080516001600160a01b03841681526020810183905284917f17414f1e98bb4803e13edc2bdc8d3825527bfaeb9e162fc3c2b052b6b7fb476891015b60405180910390a2505050565b612ed78133613c0a565b6133ea8282611f8d565b6113d8576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556134203390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61346e8282611f8d565b156113d8576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6134d16112e0565b604051633faea84d60e21b8152600481018590526001600160a01b038481166024830152919091169063febaa1349083906044016000604051808303818588803b15801561351e57600080fd5b505af1158015613532573d6000803e3d6000fd5b5050505050505050565b816001600160a01b0316836001600160a01b03160361359d5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610e14565b6001600160a01b03838116600081815260066020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319101613301565b600080600f6000815461361490614db4565b918290555063ffffffff84166000908152600c6020526040812060050180549293509091829061364657613646614eeb565b60009182526020808320909101546040805160608101825263ffffffff808a16825260018286018181528385018681528a8952600b9097529390962082518154945160ff16600160201b0264ffffffffff1990951692169190911792909217825592519301929092559091506136bc3384613c63565b50909392505050565b60006136cf612106565b905080601654101580156136ea57506136e88383612740565b155b156137535780601660008282546137019190614fe6565b9091555061371290508383836134c9565b604080516001600160a01b03841681526020810183905284917f601986edd6b44d238edfff63ac7eb19a62cd59f5edf826b035c8be17eb6a39a091016133c9565b610e9f838361333f565b6137673383613a1a565b6137835760405162461bcd60e51b8152600401610e1490614f99565b6110cf84848484613dfc565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106137ce5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106137fa576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061381857662386f26fc10000830492506010015b6305f5e1008310613830576305f5e100830492506008015b612710831061384457612710830492506004015b60648310613856576064830492506002015b600a8310610d225760010192915050565b60006001600160e01b031982166380ac58cd60e01b148061389857506001600160e01b03198216635b5e139f60e01b145b80610d225750610d2282613e2f565b60125460405163c3c532d760e01b81526001600160a01b0386811660048301526024820186905263ffffffff8516604483015260ff841660648301529091169063c3c532d7906084016020604051808303816000875af115801561390f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139339190614f2d565b5060125460408051636e02007d60e01b815290516000926001600160a01b031691636e02007d9160048083019260209291908290030181865afa15801561397e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139a29190614f2d565b60115460125460405163d9abd5cf60e01b8152600481018890526001600160a01b03918216602482015260448101849052929350169063d9abd5cf90606401600060405180830381600087803b1580156139fb57600080fd5b505af1158015613a0f573d6000803e3d6000fd5b505050505050505050565b600080613a2683611d33565b9050806001600160a01b0316846001600160a01b03161480613a6d57506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b80613a915750836001600160a01b0316613a8684610ea4565b6001600160a01b0316145b949350505050565b826001600160a01b0316613aac82611d33565b6001600160a01b031614613ad25760405162461bcd60e51b8152600401610e1490614ff9565b6001600160a01b038216613b345760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610e14565b613b418383836001613e64565b826001600160a01b0316613b5482611d33565b6001600160a01b031614613b7a5760405162461bcd60e51b8152600401610e1490614ff9565b600081815260056020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260048552838620805460001901905590871680865283862080546001019055868652600390945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b613c148282611f8d565b6113d857613c2181613f91565b613c2c836020613fa3565b604051602001613c3d92919061503e565b60408051601f198184030181529082905262461bcd60e51b8252610e14916004016144dc565b6001600160a01b038216613cb95760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610e14565b6000818152600360205260409020546001600160a01b031615613d1e5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610e14565b613d2c600083836001613e64565b6000818152600360205260409020546001600160a01b031615613d915760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610e14565b6001600160a01b038216600081815260046020908152604080832080546001019055848352600390915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b613e07848484613a99565b613e138484848461413e565b6110cf5760405162461bcd60e51b8152600401610e14906150b3565b60006001600160e01b03198216637965db0b60e01b1480610d2257506301ffc9a760e01b6001600160e01b0319831614610d22565b6001811115613ed35760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b6064820152608401610e14565b816001600160a01b038516613f2f57613f2a81600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b613f52565b836001600160a01b0316856001600160a01b031614613f5257613f52858261423f565b6001600160a01b038416613f6e57613f69816142dc565b6132a8565b846001600160a01b0316846001600160a01b0316146132a8576132a8848261438b565b6060610d226001600160a01b03831660145b60606000613fb2836002614dcd565b613fbd906002614f01565b6001600160401b03811115613fd457613fd461457c565b6040519080825280601f01601f191660200182016040528015613ffe576020820181803683370190505b509050600360fc1b8160008151811061401957614019614eeb565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061404857614048614eeb565b60200101906001600160f81b031916908160001a905350600061406c846002614dcd565b614077906001614f01565b90505b60018111156140ef576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106140ab576140ab614eeb565b1a60f81b8282815181106140c1576140c1614eeb565b60200101906001600160f81b031916908160001a90535060049490941c936140e881615105565b905061407a565b5083156127bd5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610e14565b60006001600160a01b0384163b1561423457604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061418290339089908890889060040161511c565b6020604051808303816000875af19250505080156141bd575060408051601f3d908101601f191682019092526141ba91810190615159565b60015b61421a573d8080156141eb576040519150601f19603f3d011682016040523d82523d6000602084013e6141f0565b606091505b5080516000036142125760405162461bcd60e51b8152600401610e14906150b3565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050613a91565b506001949350505050565b6000600161424c84611e72565b6142569190614fe6565b6000838152600860205260409020549091508082146142a9576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b6009546000906142ee90600190614fe6565b6000838152600a60205260408120546009805493945090928490811061431657614316614eeb565b90600052602060002001549050806009838154811061433757614337614eeb565b6000918252602080832090910192909255828152600a9091526040808220849055858252812055600980548061436f5761436f615176565b6001900381819060005260206000200160009055905550505050565b600061439683611e72565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b82805482825590600052602060002090810192821561440a579160200282015b8281111561440a5782518255916020019190600101906143ef565b5061441692915061441a565b5090565b5b80821115614416576000815560010161441b565b803560ff8116811461444057600080fd5b919050565b803563ffffffff8116811461444057600080fd5b6000806040838503121561446c57600080fd5b6144758361442f565b915061448360208401614445565b90509250929050565b60005b838110156144a757818101518382015260200161448f565b50506000910152565b600081518084526144c881602086016020860161448c565b601f01601f19169290920160200192915050565b6020815260006127bd60208301846144b0565b6001600160e01b031981168114612ed757600080fd5b60006020828403121561451757600080fd5b81356127bd816144ef565b60006020828403121561453457600080fd5b5035919050565b6001600160a01b0381168114612ed757600080fd5b6000806040838503121561456357600080fd5b823561456e8161453b565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156145ba576145ba61457c565b604052919050565b60006001600160401b038311156145db576145db61457c565b6145ee601f8401601f1916602001614592565b905082815283838301111561460257600080fd5b828260208301376000602084830101529392505050565b600082601f83011261462a57600080fd5b6127bd838335602085016145c2565b6000806040838503121561464c57600080fd5b61465583614445565b915060208301356001600160401b0381111561467057600080fd5b61467c85828601614619565b9150509250929050565b60008060006060848603121561469b57600080fd5b83356146a68161453b565b925060208401356146b68161453b565b929592945050506040919091013590565b600080604083850312156146da57600080fd5b50508035926020909101359150565b8015158114612ed757600080fd5b8035614440816146e9565b6000806040838503121561471557600080fd5b61471e83614445565b9150602083013561472e816146e9565b809150509250929050565b6000806040838503121561474c57600080fd5b82359150602083013561472e8161453b565b60006020828403121561477057600080fd5b81356127bd8161453b565b600082601f83011261478c57600080fd5b813560206001600160401b038211156147a7576147a761457c565b8160051b6147b6828201614592565b92835284810182019282810190878511156147d057600080fd5b83870192505b848310156147ef578235825291830191908301906147d6565b979650505050505050565b60008060008060008060008060006101208a8c03121561481957600080fd5b8935985060208a0135975060408a01356001600160401b038082111561483e57600080fd5b61484a8d838e01614619565b985060608c0135915061ffff8216821461486357600080fd5b81975061487260808d0161442f565b965060a08c0135955060c08c013591508082111561488f57600080fd5b5061489c8c828d0161477b565b9350506148ab60e08b016146f7565b91506148ba6101008b016146f7565b90509295985092959850929598565b6000602082840312156148db57600080fd5b6127bd82614445565b6020808252825182820181905260009190848201906040850190845b8181101561491c57835183529284019291840191600101614900565b50909695505050505050565b60006101208b83528a60208401528060408401526149488184018b6144b0565b61ffff999099166060840152505060ff95909516608086015260a085019390935290151560c0840152151560e08301521515610100909101529392505050565b60006020828403121561499a57600080fd5b81356001600160401b038111156149b057600080fd5b613a9184828501614619565b600080604083850312156149cf57600080fd5b823561471e8161453b565b600080600080608085870312156149f057600080fd5b84356149fb8161453b565b93506020850135614a0b8161453b565b92506040850135915060608501356001600160401b03811115614a2d57600080fd5b8501601f81018713614a3e57600080fd5b614a4d878235602084016145c2565b91505092959194509250565b604081526000614a6c60408301856144b0565b8281036020840152614a7e81856144b0565b95945050505050565b60008060408385031215614a9a57600080fd5b8235614aa58161453b565b9150602083013561472e8161453b565b60008060408385031215614ac857600080fd5b82356001600160401b0380821115614adf57600080fd5b614aeb86838701614619565b93506020850135915080821115614b0157600080fd5b5061467c85828601614619565b600181811c90821680614b2257607f821691505b60208210810361273a57634e487b7160e01b600052602260045260246000fd5b60008154614b4f81614b0e565b60018281168015614b675760018114614b7c57614bab565b60ff1984168752821515830287019450614bab565b8560005260208060002060005b85811015614ba25781548a820152908401908201614b89565b50505082870194505b5050505092915050565b6000614bc18287614b42565b602f60f81b8082528651614bdc816001850160208b0161448c565b6001920191820152614bf16002820186614b42565b90508351614c0381836020880161448c565b64173539b7b760d91b91019081526005019695505050505050565b6020808252601c908201527f576174617269646f72694e46543a206e6f74207065726d697474656400000000604082015260600190565b60208082526024908201527f576174617269646f72694e46543a20696e76616c696420746f6b656e4d617374604082015263195c925960e21b606082015260800190565b601f821115610e9f57600081815260208120601f850160051c81016020861015614cc05750805b601f850160051c820191505b81811015612c3a57828155600101614ccc565b81516001600160401b03811115614cf857614cf861457c565b614d0c81614d068454614b0e565b84614c99565b602080601f831160018114614d415760008415614d295750858301515b600019600386901b1c1916600185901b178555612c3a565b600085815260208120601f198616915b82811015614d7057888601518255948401946001909101908401614d51565b5085821015614d8e5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b600060018201614dc657614dc6614d9e565b5060010190565b8082028115828204841417610d2257610d22614d9e565b600082614e0157634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215614e1857600080fd5b81516127bd8161453b565b6020808252601e908201527f576174617269646f72694e46543a20696e76616c696420616464726573730000604082015260600190565b6020808252601b908201527f576174617269646f72694e46543a2073616d6520616464726573730000000000604082015260600190565b6020808252601c908201527f576174617269646f72694e46543a20696e76616c69642076616c756500000000604082015260600190565b600063ffffffff808316818103614ee157614ee1614d9e565b6001019392505050565b634e487b7160e01b600052603260045260246000fd5b80820180821115610d2257610d22614d9e565b60ff8281168282160390811115610d2257610d22614d9e565b600060208284031215614f3f57600080fd5b5051919050565b63ffffffff8181168382160190808211156120ff576120ff614d9e565b600060208284031215614f7557600080fd5b81516127bd816146e9565b60ff8181168382160190811115610d2257610d22614d9e565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b81810381811115610d2257610d22614d9e565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161507681601785016020880161448c565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516150a781602884016020880161448c565b01602801949350505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60008161511457615114614d9e565b506000190190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061514f908301846144b0565b9695505050505050565b60006020828403121561516b57600080fd5b81516127bd816144ef565b634e487b7160e01b600052603160045260246000fdfe8b42d4fd5c2527b7732a4b075ccb928f88ffc087de1e4c401c8fc7ab80ea882e97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929a2646970667358221220e8b631f8c81bf0519e84e37ac55cc89ad34b9f81b1e700d793818f56ded2282b64736f6c63430008120033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000935f06ab3333d085b9bf5f0c5d1294c6c19bba08000000000000000000000000673d8e60e598e63492b3426dfa1a9ed6cbbdc79d00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000001ec47e37d95228e6234c23ff2bda7eabb09086e700000000000000000000000042649af5de5ff4f90a2bbbc3756c59d1a982bc5b0000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000efe7bdb2e5908de38199e3828be38193e381a8e381a7e38081e3808ee6b8a1e3828ae9b3a5e38396e38383e382afe382b9e3808fe381abe38193e381aee38388e383bce382afe383b3e38292e68980e69c89e38197e381a6e38184e3828be38193e381a8e38292e8a8bce6988ee38197e381bee38199e380820ae38396e383a9e382a6e382b6e381aee382a2e38389e383ace382b9e3818ce6aca1e381a7e5a78be381bee381a3e381a6e38184e3828be38193e381a8e38292e7a2bae8aa8de38197e381a6e3818fe381a0e38195e381843a2068747470733a2f2f776174617269646f72692d626f6f6b732e636f6d2f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c68747470733a2f2f6e667473746f726167652e6c696e6b2f697066730000000000000000000000000000000000000000000000000000000000000000000000086d65746164617461000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _gatewayProxy (address): 0x935f06ab3333D085b9BF5F0c5D1294c6C19Bba08
Arg [1] : _accessControlChecker (address): 0x673d8E60E598e63492B3426Dfa1a9eD6cbbDc79d
Arg [2] : _signMessage (string): 署名することで、『渡り鳥ブックス』にこのトークンを所有していることを証明します。 ブラウザのアドレスが次で始まっていることを確認してください: https://wataridori-books.com/
Arg [3] : _keyRegister (address): 0x1Ec47e37d95228e6234c23Ff2BdA7EABb09086e7
Arg [4] : _recipient (address): 0x42649Af5De5ff4f90A2BbbC3756C59D1A982bc5b
Arg [5] : _basePath (string): https://nftstorage.link/ipfs
Arg [6] : _baseFileName (string): metadata
-----Encoded View---------------
20 Constructor Arguments found :
Arg [0] : 000000000000000000000000935f06ab3333d085b9bf5f0c5d1294c6c19bba08
Arg [1] : 000000000000000000000000673d8e60e598e63492b3426dfa1a9ed6cbbdc79d
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [3] : 0000000000000000000000001ec47e37d95228e6234c23ff2bda7eabb09086e7
Arg [4] : 00000000000000000000000042649af5de5ff4f90a2bbbc3756c59d1a982bc5b
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000200
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000240
Arg [7] : 00000000000000000000000000000000000000000000000000000000000000ef
Arg [8] : e7bdb2e5908de38199e3828be38193e381a8e381a7e38081e3808ee6b8a1e382
Arg [9] : 8ae9b3a5e38396e38383e382afe382b9e3808fe381abe38193e381aee38388e3
Arg [10] : 83bce382afe383b3e38292e68980e69c89e38197e381a6e38184e3828be38193
Arg [11] : e381a8e38292e8a8bce6988ee38197e381bee38199e380820ae38396e383a9e3
Arg [12] : 82a6e382b6e381aee382a2e38389e383ace382b9e3818ce6aca1e381a7e5a78b
Arg [13] : e381bee381a3e381a6e38184e3828be38193e381a8e38292e7a2bae8aa8de381
Arg [14] : 97e381a6e3818fe381a0e38195e381843a2068747470733a2f2f776174617269
Arg [15] : 646f72692d626f6f6b732e636f6d2f0000000000000000000000000000000000
Arg [16] : 000000000000000000000000000000000000000000000000000000000000001c
Arg [17] : 68747470733a2f2f6e667473746f726167652e6c696e6b2f6970667300000000
Arg [18] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [19] : 6d65746164617461000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | Ether (ETH) | 100.00% | $3,167.45 | 0.1725 | $546.39 |
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.