From d03053311892977b81fa4241c4c91a7edd01668e Mon Sep 17 00:00:00 2001 From: Tu Do <18521578@gm.uit.edu.vn> Date: Thu, 12 Oct 2023 15:31:03 +0700 Subject: [PATCH 01/27] feat: implement Auction contract for RNS (#18) feat: add RNSAuction --- src/RNSAuction.sol | 334 ++++++++++++++++++ src/interfaces/INSAuction.sol | 200 +++++++++++ src/libraries/LibEventRange.sol | 37 ++ src/libraries/LibRNSDomain.sol | 24 ++ src/libraries/transfers/RONTransferHelper.sol | 31 ++ 5 files changed, 626 insertions(+) create mode 100644 src/RNSAuction.sol create mode 100644 src/interfaces/INSAuction.sol create mode 100644 src/libraries/LibEventRange.sol create mode 100644 src/libraries/LibRNSDomain.sol create mode 100644 src/libraries/transfers/RONTransferHelper.sol diff --git a/src/RNSAuction.sol b/src/RNSAuction.sol new file mode 100644 index 00000000..f95b7a65 --- /dev/null +++ b/src/RNSAuction.sol @@ -0,0 +1,334 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; +import { AccessControlEnumerable } from "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; +import { Math } from "@openzeppelin/contracts/utils/math/Math.sol"; +import { INSUnified, INSAuction } from "./interfaces/INSAuction.sol"; +import { LibSafeRange } from "./libraries/math/LibSafeRange.sol"; +import { LibRNSDomain } from "./libraries/LibRNSDomain.sol"; +import { LibEventRange, EventRange } from "./libraries/LibEventRange.sol"; +import { RONTransferHelper } from "./libraries/transfers/RONTransferHelper.sol"; + +contract RNSAuction is Initializable, AccessControlEnumerable, INSAuction { + using LibSafeRange for uint256; + using LibEventRange for EventRange; + + /// @inheritdoc INSAuction + uint64 public constant MAX_EXPIRY = type(uint64).max; + /// @inheritdoc INSAuction + uint256 public constant MAX_PERCENTAGE = 100_00; + /// @inheritdoc INSAuction + uint64 public constant DOMAIN_EXPIRY_DURATION = 365 days; + /// @inheritdoc INSAuction + bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); + + /// @dev Gap for upgradeability. + uint256[50] private ____gap; + + /// @dev The RNSUnified contract. + INSUnified internal _rnsUnified; + /// @dev Mapping from auction Id => event range + mapping(bytes32 auctionId => EventRange) internal _auctionRange; + /// @dev Mapping from id of domain names => auction detail. + mapping(uint256 id => DomainAuction) internal _domainAuction; + + /// @dev The treasury. + address payable internal _treasury; + /// @dev The gap ratio between 2 bids with the starting price. + uint256 internal _bidGapRatio; + + modifier whenNotStarted(bytes32 auctionId) { + _requireNotStarted(auctionId); + _; + } + + modifier onlyValidEventRange(EventRange calldata range) { + _requireValidEventRange(range); + _; + } + + constructor() payable { + _disableInitializers(); + } + + function initialize( + address admin, + address[] calldata operators, + INSUnified rnsUnified, + address payable treasury, + uint256 bidGapRatio + ) external initializer { + _setTreasury(treasury); + _setBidGapRatio(bidGapRatio); + _setupRole(DEFAULT_ADMIN_ROLE, admin); + + uint256 length = operators.length; + bytes32 operatorRole = OPERATOR_ROLE; + + for (uint256 i; i < length;) { + _setupRole(operatorRole, operators[i]); + + unchecked { + ++i; + } + } + + _rnsUnified = rnsUnified; + } + + /** + * @inheritdoc INSAuction + */ + function bulkRegister(string[] calldata labels) external onlyRole(OPERATOR_ROLE) returns (uint256[] memory ids) { + uint256 length = labels.length; + if (length == 0) revert InvalidArrayLength(); + ids = new uint256[](length); + INSUnified rnsUnified = _rnsUnified; + uint256 parentId = LibRNSDomain.RON_ID; + uint64 domainExpiryDuration = DOMAIN_EXPIRY_DURATION; + + for (uint256 i; i < length;) { + (, ids[i]) = rnsUnified.mint(parentId, labels[i], address(0x0), address(this), domainExpiryDuration); + + unchecked { + ++i; + } + } + } + + /** + * @inheritdoc INSAuction + */ + function reserved(uint256 id) public view returns (bool) { + return _rnsUnified.ownerOf(id) == address(this); + } + + /** + * @inheritdoc INSAuction + */ + function createAuctionEvent(EventRange calldata range) + external + onlyRole(DEFAULT_ADMIN_ROLE) + onlyValidEventRange(range) + returns (bytes32 auctionId) + { + auctionId = keccak256(abi.encode(_msgSender(), range)); + _auctionRange[auctionId] = range; + emit AuctionEventSet(auctionId, range); + } + + /** + * @inheritdoc INSAuction + */ + function setAuctionEvent(bytes32 auctionId, EventRange calldata range) + external + onlyRole(DEFAULT_ADMIN_ROLE) + onlyValidEventRange(range) + whenNotStarted(auctionId) + { + _auctionRange[auctionId] = range; + emit AuctionEventSet(auctionId, range); + } + + /** + * @inheritdoc INSAuction + */ + function getAuctionEvent(bytes32 auctionId) public view returns (EventRange memory) { + return _auctionRange[auctionId]; + } + + /** + * @inheritdoc INSAuction + */ + function listNamesForAuction(bytes32 auctionId, uint256[] calldata ids, uint256[] calldata startingPrices) + external + onlyRole(OPERATOR_ROLE) + whenNotStarted(auctionId) + { + uint256 length = ids.length; + if (length == 0 || length != startingPrices.length) revert InvalidArrayLength(); + uint256 id; + bytes32 mAuctionId; + DomainAuction storage sAuction; + + for (uint256 i; i < length;) { + id = ids[i]; + if (!reserved(id)) revert NameNotReserved(); + + sAuction = _domainAuction[id]; + mAuctionId = sAuction.auctionId; + if (!(mAuctionId == 0 || mAuctionId == auctionId || sAuction.bid.timestamp == 0)) { + revert AlreadyBidding(); + } + + sAuction.auctionId = auctionId; + sAuction.startingPrice = startingPrices[i]; + + unchecked { + ++i; + } + } + + emit LabelsListed(auctionId, ids, startingPrices); + } + + /** + * @inheritdoc INSAuction + */ + function placeBid(uint256 id) external payable { + DomainAuction memory auction = _domainAuction[id]; + EventRange memory range = _auctionRange[auction.auctionId]; + uint256 beatPrice = _getBeatPrice(auction, range); + + if (!range.isInPeriod()) revert QueryIsNotInPeriod(); + if (msg.value < beatPrice) revert InsufficientAmount(); + address payable bidder = payable(_msgSender()); + // check whether the bidder can receive RON + if (!RONTransferHelper.send(bidder, 0)) revert BidderCannotReceiveRON(); + address payable prvBidder = auction.bid.bidder; + uint256 prvPrice = auction.bid.price; + + Bid storage sBid = _domainAuction[id].bid; + sBid.price = msg.value; + sBid.bidder = bidder; + sBid.timestamp = block.timestamp; + emit BidPlaced(auction.auctionId, id, msg.value, bidder, prvPrice, prvBidder); + + // refund for previous bidder + if (prvPrice != 0) RONTransferHelper.safeTransfer(prvBidder, prvPrice); + } + + /** + * @inheritdoc INSAuction + */ + function bulkClaimBidNames(uint256[] calldata ids) external returns (bool[] memory claimeds) { + uint256 id; + uint256 accumulatedRON; + EventRange memory range; + DomainAuction memory auction; + uint256 length = ids.length; + claimeds = new bool[](length); + INSUnified rnsUnified = _rnsUnified; + uint64 expiry = uint64(block.timestamp.addWithUpperbound(DOMAIN_EXPIRY_DURATION, MAX_EXPIRY)); + + for (uint256 i; i < length;) { + id = ids[i]; + auction = _domainAuction[id]; + range = _auctionRange[auction.auctionId]; + + if (!auction.bid.claimed) { + if (!range.isEnded()) revert NotYetEnded(); + if (auction.bid.timestamp == 0) revert NoOneBidded(); + + accumulatedRON += auction.bid.price; + rnsUnified.setExpiry(id, expiry); + rnsUnified.transferFrom(address(this), auction.bid.bidder, id); + + _domainAuction[id].bid.claimed = claimeds[i] = true; + } + + unchecked { + ++i; + } + } + + RONTransferHelper.safeTransfer(_treasury, accumulatedRON); + } + + /** + * @inheritdoc INSAuction + */ + function getRNSUnified() external view returns (INSUnified) { + return _rnsUnified; + } + + /** + * @inheritdoc INSAuction + */ + function getTreasury() external view returns (address) { + return _treasury; + } + + /** + * @inheritdoc INSAuction + */ + function getBidGapRatio() external view returns (uint256) { + return _bidGapRatio; + } + + /** + * @inheritdoc INSAuction + */ + function setTreasury(address payable addr) external onlyRole(DEFAULT_ADMIN_ROLE) { + _setTreasury(addr); + } + + /** + * @inheritdoc INSAuction + */ + + function setBidGapRatio(uint256 ratio) external onlyRole(DEFAULT_ADMIN_ROLE) { + _setBidGapRatio(ratio); + } + + /** + * @inheritdoc INSAuction + */ + function getAuction(uint256 id) public view returns (DomainAuction memory auction, uint256 beatPrice) { + auction = _domainAuction[id]; + EventRange memory range = getAuctionEvent(auction.auctionId); + beatPrice = _getBeatPrice(auction, range); + } + + /** + * @dev Helper method to set treasury. + * + * Emits an event {TreasuryUpdated}. + */ + function _setTreasury(address payable addr) internal { + if (addr == address(0)) revert NullAssignment(); + _treasury = addr; + emit TreasuryUpdated(addr); + } + + /** + * @dev Helper method to set bid gap ratio. + * + * Emits an event {BidGapRatioUpdated}. + */ + function _setBidGapRatio(uint256 ratio) internal { + if (ratio > MAX_PERCENTAGE) revert RatioIsTooLarge(); + _bidGapRatio = ratio; + emit BidGapRatioUpdated(ratio); + } + + /** + * @dev Helper method to get beat price. + */ + function _getBeatPrice(DomainAuction memory auction, EventRange memory range) + internal + view + returns (uint256 beatPrice) + { + beatPrice = Math.max(auction.startingPrice, auction.bid.price); + // Beats price increases if domain is already bided and the event is not yet ended. + if (auction.bid.price != 0 && !range.isEnded()) { + beatPrice += Math.mulDiv(auction.startingPrice, _bidGapRatio, MAX_PERCENTAGE); + } + } + + /** + * @dev Helper method to ensure event range is valid. + */ + function _requireValidEventRange(EventRange calldata range) internal view { + if (!(range.valid() && range.isNotYetStarted())) revert InvalidEventRange(); + } + + /** + * @dev Helper method to ensure the auction is not yet started or not created. + */ + function _requireNotStarted(bytes32 auctionId) internal view { + if (!_auctionRange[auctionId].isNotYetStarted()) revert EventIsNotCreatedOrAlreadyStarted(); + } +} diff --git a/src/interfaces/INSAuction.sol b/src/interfaces/INSAuction.sol new file mode 100644 index 00000000..878b914b --- /dev/null +++ b/src/interfaces/INSAuction.sol @@ -0,0 +1,200 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { INSUnified } from "./INSUnified.sol"; +import { EventRange } from "../libraries/LibEventRange.sol"; + +interface INSAuction { + error NotYetEnded(); + error NoOneBidded(); + error NullAssignment(); + error AlreadyBidding(); + error RatioIsTooLarge(); + error NameNotReserved(); + error InvalidEventRange(); + error QueryIsNotInPeriod(); + error InsufficientAmount(); + error InvalidArrayLength(); + error BidderCannotReceiveRON(); + error EventIsNotCreatedOrAlreadyStarted(); + + struct Bid { + address payable bidder; + uint256 price; + uint256 timestamp; + bool claimed; + } + + struct DomainAuction { + bytes32 auctionId; + uint256 startingPrice; + Bid bid; + } + + /// @dev Emitted when an auction is set. + event AuctionEventSet(bytes32 indexed auctionId, EventRange range); + /// @dev Emitted when the labels are listed for auction. + event LabelsListed(bytes32 indexed auctionId, uint256[] ids, uint256[] startingPrices); + /// @dev Emitted when a bid is placed for a name. + event BidPlaced( + bytes32 indexed auctionId, + uint256 indexed id, + uint256 price, + address payable bidder, + uint256 previousPrice, + address previousBidder + ); + /// @dev Emitted when the treasury is updated. + event TreasuryUpdated(address indexed addr); + /// @dev Emitted when bid gap ratio is updated. + event BidGapRatioUpdated(uint256 ratio); + + /** + * @dev The maximum expiry duration + */ + function MAX_EXPIRY() external pure returns (uint64); + + /** + * @dev Returns the operator role. + */ + function OPERATOR_ROLE() external pure returns (bytes32); + + /** + * @dev Max percentage 100%. Values [0; 100_00] reflexes [0; 100%] + */ + function MAX_PERCENTAGE() external pure returns (uint256); + + /** + * @dev The expiry duration of a domain after transferring to bidder. + */ + function DOMAIN_EXPIRY_DURATION() external pure returns (uint64); + + /** + * @dev Claims domain names for auction. + * + * Requirements: + * - The method caller must be contract operator. + * + * @param labels The domain names. Eg, ['foo'] for 'foo.ron' + * @return ids The id corresponding for namehash of domain names. + */ + function bulkRegister(string[] calldata labels) external returns (uint256[] memory ids); + + /** + * @dev Checks whether a domain name is currently reserved for auction or not. + * @param id The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron' + */ + function reserved(uint256 id) external view returns (bool); + + /** + * @dev Creates a new auction to sale with a specific time period. + * + * Requirements: + * - The method caller must be admin. + * + * Emits an event {AuctionEventSet}. + * + * @return auctionId The auction id + * @notice Please use the method `setAuctionNames` to list all the reserved names. + */ + function createAuctionEvent(EventRange calldata range) external returns (bytes32 auctionId); + + /** + * @dev Updates the auction details. + * + * Requirements: + * - The method caller must be admin. + * + * Emits an event {AuctionEventSet}. + */ + function setAuctionEvent(bytes32 auctionId, EventRange calldata range) external; + + /** + * @dev Returns the event range of an auction. + */ + function getAuctionEvent(bytes32 auctionId) external view returns (EventRange memory); + + /** + * @dev Lists reserved names to sale in a specified auction. + * + * Requirements: + * - The method caller must be contract operator. + * - Array length are matched and larger than 0. + * - Only allow to set when the domain is: + * + Not in any auction. + * + Or, in the current auction. + * + Or, this name is not bided. + * + * Emits an event {LabelsListed}. + * + * Note: If the name is already listed, this method replaces with a new input value. + * + * @param ids The namehashes id of domain names. Eg, namehash('foo.ron') for 'foo.ron' + */ + function listNamesForAuction(bytes32 auctionId, uint256[] calldata ids, uint256[] calldata startingPrices) external; + + /** + * @dev Places a bid for a domain name. + * + * Requirements: + * - The name is listed, or the auction is happening. + * - The msg.value is larger than the current bid price or the auction starting price. + * + * Emits an event {BidPlaced}. + * + * @param id The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron' + */ + function placeBid(uint256 id) external payable; + + /** + * @dev Returns the highest bid and address of the bidder. + * @param id The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron' + */ + function getAuction(uint256 id) external view returns (DomainAuction memory, uint256 beatPrice); + + /** + * @dev Bulk claims the bid name. + * + * Requirements: + * - Must be called after ended time. + * - The method caller can be anyone. + * + * @param ids The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron' + */ + function bulkClaimBidNames(uint256[] calldata ids) external returns (bool[] memory claimeds); + + /** + * @dev Returns the treasury. + */ + function getTreasury() external view returns (address); + + /** + * @dev Returns the gap ratio between 2 bids with the starting price. Value in range [0;100_00] is 0%-100%. + */ + function getBidGapRatio() external view returns (uint256); + + /** + * @dev Sets the treasury. + * + * Requirements: + * - The method caller must be admin + * + * Emits an event {TreasuryUpdated}. + */ + function setTreasury(address payable) external; + + /** + * @dev Sets commission ratio. Value in range [0;100_00] is 0%-100%. + * + * Requirements: + * - The method caller must be admin + * + * Emits an event {BidGapRatioUpdated}. + */ + function setBidGapRatio(uint256) external; + + /** + * @dev Returns RNSUnified contract. + */ + function getRNSUnified() external view returns (INSUnified); +} diff --git a/src/libraries/LibEventRange.sol b/src/libraries/LibEventRange.sol new file mode 100644 index 00000000..00586d73 --- /dev/null +++ b/src/libraries/LibEventRange.sol @@ -0,0 +1,37 @@ +//SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +struct EventRange { + uint256 startedAt; + uint256 endedAt; +} + +library LibEventRange { + /** + * @dev Checks whether the event range is valid. + */ + function valid(EventRange calldata range) internal pure returns (bool) { + return range.startedAt <= range.endedAt; + } + + /** + * @dev Returns whether the current range is not yet started. + */ + function isNotYetStarted(EventRange memory range) internal view returns (bool) { + return block.timestamp < range.startedAt; + } + + /** + * @dev Returns whether the current range is ended or not. + */ + function isEnded(EventRange memory range) internal view returns (bool) { + return range.endedAt <= block.timestamp; + } + + /** + * @dev Returns whether the current block is in period. + */ + function isInPeriod(EventRange memory range) internal view returns (bool) { + return range.startedAt <= block.timestamp && block.timestamp < range.endedAt; + } +} diff --git a/src/libraries/LibRNSDomain.sol b/src/libraries/LibRNSDomain.sol new file mode 100644 index 00000000..9baf281b --- /dev/null +++ b/src/libraries/LibRNSDomain.sol @@ -0,0 +1,24 @@ +//SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +library LibRNSDomain { + /// @dev Value equals to namehash('ron') + uint256 internal constant RON_ID = 0xba69923fa107dbf5a25a073a10b7c9216ae39fbadc95dc891d460d9ae315d688; + + /** + * @dev Calculate the corresponding id given parentId and label. + */ + function toId(uint256 parentId, string memory label) internal pure returns (uint256 id) { + assembly ("memory-safe") { + mstore(0x0, parentId) + mstore(0x20, keccak256(add(label, 32), mload(label))) + id := keccak256(0x0, 64) + } + } + + function hashLabel(string memory label) internal pure returns (bytes32 hashed) { + assembly ("memory-safe") { + hashed := keccak256(add(label, 32), mload(label)) + } + } +} diff --git a/src/libraries/transfers/RONTransferHelper.sol b/src/libraries/transfers/RONTransferHelper.sol new file mode 100644 index 00000000..2aa9bade --- /dev/null +++ b/src/libraries/transfers/RONTransferHelper.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; + +/** + * @title RONTransferHelper + */ +library RONTransferHelper { + using Strings for *; + + /** + * @dev Transfers RON and wraps result for the method caller to a recipient. + */ + function safeTransfer(address payable _to, uint256 _value) internal { + bool _success = send(_to, _value); + if (!_success) { + revert( + string.concat("TransferHelper: could not transfer RON to ", _to.toHexString(), " value ", _value.toHexString()) + ); + } + } + + /** + * @dev Returns whether the call was success. + * Note: this function should use with the `ReentrancyGuard`. + */ + function send(address payable _to, uint256 _value) internal returns (bool _success) { + (_success,) = _to.call{ value: _value }(new bytes(0)); + } +} From e80c25136e7085bf7e6894915e608de383713309 Mon Sep 17 00:00:00 2001 From: Tu Do <18521578@gm.uit.edu.vn> Date: Thu, 12 Oct 2023 15:44:46 +0700 Subject: [PATCH 02/27] feat: add`RNSDomainPrice` contract (#19) * feat: add RNSDomainPrice * forge install: pyth-sdk-solidity v2.2.0 --- .gitmodules | 3 + lib/pyth-sdk-solidity | 1 + remappings.txt | 3 +- src/RNSDomainPrice.sol | 396 ++++++++++++++++++++++ src/interfaces/INSAuction.sol | 200 +++++++++++ src/interfaces/INSDomainPrice.sol | 205 +++++++++++ src/libraries/LibEventRange.sol | 37 ++ src/libraries/LibRNSDomain.sol | 55 +++ src/libraries/TimestampWrapperUtils.sol | 7 + src/libraries/math/PeriodScalingUtils.sol | 42 +++ src/libraries/math/PowMath.sol | 130 +++++++ src/libraries/pyth/PythConverter.sol | 38 +++ 12 files changed, 1116 insertions(+), 1 deletion(-) create mode 160000 lib/pyth-sdk-solidity create mode 100644 src/RNSDomainPrice.sol create mode 100644 src/interfaces/INSAuction.sol create mode 100644 src/interfaces/INSDomainPrice.sol create mode 100644 src/libraries/LibEventRange.sol create mode 100644 src/libraries/LibRNSDomain.sol create mode 100644 src/libraries/TimestampWrapperUtils.sol create mode 100644 src/libraries/math/PeriodScalingUtils.sol create mode 100644 src/libraries/math/PowMath.sol create mode 100644 src/libraries/pyth/PythConverter.sol diff --git a/.gitmodules b/.gitmodules index 544667fe..15220f8c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "lib/contract-template"] path = lib/contract-template url = https://github.com/axieinfinity/contract-template +[submodule "lib/pyth-sdk-solidity"] + path = lib/pyth-sdk-solidity + url = https://github.com/pyth-network/pyth-sdk-solidity diff --git a/lib/pyth-sdk-solidity b/lib/pyth-sdk-solidity new file mode 160000 index 00000000..11d6bcfc --- /dev/null +++ b/lib/pyth-sdk-solidity @@ -0,0 +1 @@ +Subproject commit 11d6bcfc2e56885535a9a8e3c8417847cb20be14 diff --git a/remappings.txt b/remappings.txt index e2c6633c..20df439b 100644 --- a/remappings.txt +++ b/remappings.txt @@ -2,4 +2,5 @@ ds-test/=lib/forge-std/lib/ds-test/src/ forge-std/=lib/forge-std/src/ @openzeppelin/=lib/openzeppelin-contracts/ -contract-template/=lib/contract-template/src/ \ No newline at end of file +contract-template/=lib/contract-template/src/ +@pythnetwork/=lib/pyth-sdk-solidity/ \ No newline at end of file diff --git a/src/RNSDomainPrice.sol b/src/RNSDomainPrice.sol new file mode 100644 index 00000000..382d14c3 --- /dev/null +++ b/src/RNSDomainPrice.sol @@ -0,0 +1,396 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; +import { AccessControlEnumerable } from "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; +import { Math } from "@openzeppelin/contracts/utils/math/Math.sol"; +import { IPyth, PythStructs } from "@pythnetwork/IPyth.sol"; +import { INSAuction } from "./interfaces/INSAuction.sol"; +import { INSDomainPrice } from "./interfaces/INSDomainPrice.sol"; +import { PeriodScaler, LibPeriodScaler, Math } from "src/libraries/math/PeriodScalingUtils.sol"; +import { TimestampWrapper } from "./libraries/TimestampWrapperUtils.sol"; +import { LibRNSDomain } from "./libraries/LibRNSDomain.sol"; +import { PythConverter } from "./libraries/pyth/PythConverter.sol"; + +contract RNSDomainPrice is Initializable, AccessControlEnumerable, INSDomainPrice { + using LibRNSDomain for string; + using LibPeriodScaler for PeriodScaler; + using PythConverter for PythStructs.Price; + + /// @inheritdoc INSDomainPrice + uint8 public constant USD_DECIMALS = 18; + /// @inheritdoc INSDomainPrice + uint64 public constant MAX_PERCENTAGE = 100_00; + /// @inheritdoc INSDomainPrice + bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); + + /// @dev Gap for upgradeability. + uint256[50] private ____gap; + + /// @dev Pyth oracle contract + IPyth internal _pyth; + /// @dev RNSAuction contract + INSAuction internal _auction; + /// @dev Extra fee for renewals based on the current domain price. + uint256 internal _taxRatio; + /// @dev Max length of the renewal fee + uint256 internal _rnfMaxLength; + /// @dev Max acceptable age of the price oracle request + uint256 internal _maxAcceptableAge; + /// @dev Price feed ID on Pyth for RON/USD + bytes32 internal _pythIdForRONUSD; + /// @dev The percentage scale from domain price each period + PeriodScaler internal _dpDownScaler; + + /// @dev Mapping from domain length => renewal fee in USD + mapping(uint256 length => uint256 usdPrice) internal _rnFee; + /// @dev Mapping from name => domain price in USD + mapping(bytes32 lbHash => TimestampWrapper usdPrice) internal _dp; + /// @dev Mapping from name => inverse bitwise of renewal fee overriding. + mapping(bytes32 lbHash => uint256 usdPrice) internal _rnFeeOverriding; + + constructor() payable { + _disableInitializers(); + } + + function initialize( + address admin, + address[] calldata operators, + RenewalFee[] calldata renewalFees, + uint256 taxRatio, + PeriodScaler calldata domainPriceScaleRule, + IPyth pyth, + INSAuction auction, + uint256 maxAcceptableAge, + bytes32 pythIdForRONUSD + ) external initializer { + uint256 length = operators.length; + bytes32 operatorRole; + + for (uint256 i; i < length;) { + _setupRole(operatorRole, operators[i]); + + unchecked { + ++i; + } + } + _auction = auction; + _setupRole(DEFAULT_ADMIN_ROLE, admin); + _setRenewalFeeByLengths(renewalFees); + _setTaxRatio(taxRatio); + _setDomainPriceScaleRule(domainPriceScaleRule); + _setPythOracleConfig(pyth, maxAcceptableAge, pythIdForRONUSD); + } + + /** + * @inheritdoc INSDomainPrice + */ + function getPythOracleConfig() external view returns (IPyth pyth, uint256 maxAcceptableAge, bytes32 pythIdForRONUSD) { + return (_pyth, _maxAcceptableAge, _pythIdForRONUSD); + } + + /** + * @inheritdoc INSDomainPrice + */ + function setPythOracleConfig(IPyth pyth, uint256 maxAcceptableAge, bytes32 pythIdForRONUSD) + external + onlyRole(DEFAULT_ADMIN_ROLE) + { + _setPythOracleConfig(pyth, maxAcceptableAge, pythIdForRONUSD); + } + + /** + * @inheritdoc INSDomainPrice + */ + function getRenewalFeeByLengths() external view returns (RenewalFee[] memory renewalFees) { + uint256 rnfMaxLength = _rnfMaxLength; + renewalFees = new RenewalFee[](rnfMaxLength); + uint256 len; + + for (uint256 i; i < rnfMaxLength;) { + unchecked { + len = i + 1; + renewalFees[i].labelLength = len; + renewalFees[i].fee = _rnFee[len]; + ++i; + } + } + } + + /** + * @inheritdoc INSDomainPrice + */ + function setRenewalFeeByLengths(RenewalFee[] calldata renewalFees) external onlyRole(DEFAULT_ADMIN_ROLE) { + _setRenewalFeeByLengths(renewalFees); + } + + /** + * @inheritdoc INSDomainPrice + */ + function getTaxRatio() external view returns (uint256 ratio) { + return _taxRatio; + } + + /** + * @inheritdoc INSDomainPrice + */ + function setTaxRatio(uint256 ratio) external onlyRole(DEFAULT_ADMIN_ROLE) { + _setTaxRatio(ratio); + } + + /** + * @inheritdoc INSDomainPrice + */ + function getScaleDownRuleForDomainPrice() external view returns (PeriodScaler memory scaleRule) { + return _dpDownScaler; + } + + /** + * @inheritdoc INSDomainPrice + */ + function setScaleDownRuleForDomainPrice(PeriodScaler calldata scaleRule) external onlyRole(DEFAULT_ADMIN_ROLE) { + _setDomainPriceScaleRule(scaleRule); + } + + /** + * @inheritdoc INSDomainPrice + */ + function getOverriddenRenewalFee(string calldata label) external view returns (uint256 usdFee) { + usdFee = _rnFeeOverriding[label.hashLabel()]; + if (usdFee == 0) revert RenewalFeeIsNotOverriden(); + return ~usdFee; + } + + /** + * @inheritdoc INSDomainPrice + */ + function bulkOverrideRenewalFees(bytes32[] calldata lbHashes, uint256[] calldata usdPrices) + external + onlyRole(OPERATOR_ROLE) + { + uint256 length = lbHashes.length; + if (length == 0 || length != usdPrices.length) revert InvalidArrayLength(); + uint256 inverseBitwise; + address operator = _msgSender(); + + for (uint256 i; i < length;) { + inverseBitwise = ~usdPrices[i]; + _rnFeeOverriding[lbHashes[i]] = inverseBitwise; + emit RenewalFeeOverridingUpdated(operator, lbHashes[i], inverseBitwise); + + unchecked { + ++i; + } + } + } + + /** + * @inheritdoc INSDomainPrice + */ + function bulkTrySetDomainPrice( + bytes32[] calldata lbHashes, + uint256[] calldata ronPrices, + bytes32[] calldata proofHashes, + uint256[] calldata setTypes + ) external onlyRole(OPERATOR_ROLE) returns (bool[] memory updated) { + uint256 length = _requireBulkSetDomainPriceArgumentsValid(lbHashes, ronPrices, proofHashes, setTypes); + address operator = _msgSender(); + updated = new bool[](length); + + for (uint256 i; i < length;) { + updated[i] = _setDomainPrice(operator, lbHashes[i], ronPrices[i], proofHashes[i], setTypes[i], false); + + unchecked { + ++i; + } + } + } + + /** + * @inheritdoc INSDomainPrice + */ + function bulkSetDomainPrice( + bytes32[] calldata lbHashes, + uint256[] calldata ronPrices, + bytes32[] calldata proofHashes, + uint256[] calldata setTypes + ) external onlyRole(OPERATOR_ROLE) { + uint256 length = _requireBulkSetDomainPriceArgumentsValid(lbHashes, ronPrices, proofHashes, setTypes); + address operator = _msgSender(); + + for (uint256 i; i < length;) { + _setDomainPrice(operator, lbHashes[i], ronPrices[i], proofHashes[i], setTypes[i], true); + unchecked { + ++i; + } + } + } + + /** + * @inheritdoc INSDomainPrice + */ + function getDomainPrice(string memory label) public view returns (uint256 usdPrice, uint256 ronPrice) { + usdPrice = _getDomainPrice(label.hashLabel()); + ronPrice = convertUSDToRON(usdPrice); + } + + /** + * @inheritdoc INSDomainPrice + */ + function getRenewalFee(string memory label, uint256 duration) + public + view + returns (uint256 usdPrice, uint256 ronPrice) + { + uint256 nameLen = label.strlen(); + bytes32 lbHash = label.hashLabel(); + uint256 overriddenRenewalFee = _rnFeeOverriding[lbHash]; + + if (overriddenRenewalFee != 0) { + usdPrice = duration * ~overriddenRenewalFee; + } else { + uint256 renewalFeeByLength = _rnFee[Math.min(nameLen, _rnfMaxLength)]; + usdPrice = duration * renewalFeeByLength; + // tax is added of name is reserved for auction + if (_auction.reserved(LibRNSDomain.toId(LibRNSDomain.RON_ID, label))) { + usdPrice += Math.mulDiv(_taxRatio, _getDomainPrice(lbHash), MAX_PERCENTAGE); + } + } + + ronPrice = convertUSDToRON(usdPrice); + } + + /** + * @inheritdoc INSDomainPrice + */ + function convertUSDToRON(uint256 usdWei) public view returns (uint256 ronWei) { + return _pyth.getPriceNoOlderThan(_pythIdForRONUSD, _maxAcceptableAge).inverse({ expo: -18 }).mul({ + inpWei: usdWei, + inpDecimals: int32(uint32(USD_DECIMALS)), + outDecimals: 18 + }); + } + + /** + * @inheritdoc INSDomainPrice + */ + function convertRONToUSD(uint256 ronWei) public view returns (uint256 usdWei) { + return _pyth.getPriceNoOlderThan(_pythIdForRONUSD, _maxAcceptableAge).mul({ + inpWei: ronWei, + inpDecimals: 18, + outDecimals: int32(uint32(USD_DECIMALS)) + }); + } + + /** + * @dev Reverts if the arguments of the method {bulkSetDomainPrice} is invalid. + */ + function _requireBulkSetDomainPriceArgumentsValid( + bytes32[] calldata lbHashes, + uint256[] calldata ronPrices, + bytes32[] calldata proofHashes, + uint256[] calldata setTypes + ) internal pure returns (uint256 length) { + length = lbHashes.length; + if (length == 0 || ronPrices.length != length || proofHashes.length != length || setTypes.length != length) { + revert InvalidArrayLength(); + } + } + + /** + * @dev Helper method to set domain price. + * + * Emits an event {DomainPriceUpdated} optionally. + */ + function _setDomainPrice( + address operator, + bytes32 lbHash, + uint256 ronPrice, + bytes32 proofHash, + uint256 setType, + bool forced + ) internal returns (bool updated) { + uint256 usdPrice = convertRONToUSD(ronPrice); + TimestampWrapper storage dp = _dp[lbHash]; + updated = forced || dp.value < usdPrice; + + if (updated) { + dp.value = usdPrice; + dp.timestamp = block.timestamp; + emit DomainPriceUpdated(operator, lbHash, usdPrice, proofHash, setType); + } + } + + /** + * @dev Sets renewal reservation ratio. + * + * Emits an event {TaxRatioUpdated}. + */ + function _setTaxRatio(uint256 ratio) internal { + _taxRatio = ratio; + emit TaxRatioUpdated(_msgSender(), ratio); + } + + /** + * @dev Sets domain price scale rule. + * + * Emits events {DomainPriceScaleRuleUpdated}. + */ + function _setDomainPriceScaleRule(PeriodScaler calldata domainPriceScaleRule) internal { + _dpDownScaler = domainPriceScaleRule; + emit DomainPriceScaleRuleUpdated(_msgSender(), domainPriceScaleRule.ratio, domainPriceScaleRule.period); + } + + /** + * @dev Sets renewal fee. + * + * Emits events {RenewalFeeByLengthUpdated}. + * Emits an event {MaxRenewalFeeLengthUpdated} optionally. + */ + function _setRenewalFeeByLengths(RenewalFee[] calldata renewalFees) internal { + address operator = _msgSender(); + RenewalFee memory renewalFee; + uint256 length = renewalFees.length; + uint256 maxRenewalFeeLength = _rnfMaxLength; + + for (uint256 i; i < length;) { + renewalFee = renewalFees[i]; + maxRenewalFeeLength = Math.max(maxRenewalFeeLength, renewalFee.labelLength); + _rnFee[renewalFee.labelLength] = renewalFee.fee; + emit RenewalFeeByLengthUpdated(operator, renewalFee.labelLength, renewalFee.fee); + + unchecked { + ++i; + } + } + + if (maxRenewalFeeLength != _rnfMaxLength) { + _rnfMaxLength = maxRenewalFeeLength; + emit MaxRenewalFeeLengthUpdated(operator, maxRenewalFeeLength); + } + } + + /** + * @dev Sets Pyth Oracle config. + * + * Emits events {PythOracleConfigUpdated}. + */ + function _setPythOracleConfig(IPyth pyth, uint256 maxAcceptableAge, bytes32 pythIdForRONUSD) internal { + _pyth = pyth; + _maxAcceptableAge = maxAcceptableAge; + _pythIdForRONUSD = pythIdForRONUSD; + emit PythOracleConfigUpdated(_msgSender(), pyth, maxAcceptableAge, pythIdForRONUSD); + } + + /** + * @dev Returns the current domain price applied the business rule: deduced x% each y seconds. + */ + function _getDomainPrice(bytes32 lbHash) internal view returns (uint256) { + TimestampWrapper storage dp = _dp[lbHash]; + uint256 lastSyncedAt = dp.timestamp; + if (lastSyncedAt == 0) return 0; + + uint256 passedDuration = block.timestamp - lastSyncedAt; + return _dpDownScaler.scaleDown({ v: dp.value, maxR: MAX_PERCENTAGE, dur: passedDuration }); + } +} diff --git a/src/interfaces/INSAuction.sol b/src/interfaces/INSAuction.sol new file mode 100644 index 00000000..878b914b --- /dev/null +++ b/src/interfaces/INSAuction.sol @@ -0,0 +1,200 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { INSUnified } from "./INSUnified.sol"; +import { EventRange } from "../libraries/LibEventRange.sol"; + +interface INSAuction { + error NotYetEnded(); + error NoOneBidded(); + error NullAssignment(); + error AlreadyBidding(); + error RatioIsTooLarge(); + error NameNotReserved(); + error InvalidEventRange(); + error QueryIsNotInPeriod(); + error InsufficientAmount(); + error InvalidArrayLength(); + error BidderCannotReceiveRON(); + error EventIsNotCreatedOrAlreadyStarted(); + + struct Bid { + address payable bidder; + uint256 price; + uint256 timestamp; + bool claimed; + } + + struct DomainAuction { + bytes32 auctionId; + uint256 startingPrice; + Bid bid; + } + + /// @dev Emitted when an auction is set. + event AuctionEventSet(bytes32 indexed auctionId, EventRange range); + /// @dev Emitted when the labels are listed for auction. + event LabelsListed(bytes32 indexed auctionId, uint256[] ids, uint256[] startingPrices); + /// @dev Emitted when a bid is placed for a name. + event BidPlaced( + bytes32 indexed auctionId, + uint256 indexed id, + uint256 price, + address payable bidder, + uint256 previousPrice, + address previousBidder + ); + /// @dev Emitted when the treasury is updated. + event TreasuryUpdated(address indexed addr); + /// @dev Emitted when bid gap ratio is updated. + event BidGapRatioUpdated(uint256 ratio); + + /** + * @dev The maximum expiry duration + */ + function MAX_EXPIRY() external pure returns (uint64); + + /** + * @dev Returns the operator role. + */ + function OPERATOR_ROLE() external pure returns (bytes32); + + /** + * @dev Max percentage 100%. Values [0; 100_00] reflexes [0; 100%] + */ + function MAX_PERCENTAGE() external pure returns (uint256); + + /** + * @dev The expiry duration of a domain after transferring to bidder. + */ + function DOMAIN_EXPIRY_DURATION() external pure returns (uint64); + + /** + * @dev Claims domain names for auction. + * + * Requirements: + * - The method caller must be contract operator. + * + * @param labels The domain names. Eg, ['foo'] for 'foo.ron' + * @return ids The id corresponding for namehash of domain names. + */ + function bulkRegister(string[] calldata labels) external returns (uint256[] memory ids); + + /** + * @dev Checks whether a domain name is currently reserved for auction or not. + * @param id The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron' + */ + function reserved(uint256 id) external view returns (bool); + + /** + * @dev Creates a new auction to sale with a specific time period. + * + * Requirements: + * - The method caller must be admin. + * + * Emits an event {AuctionEventSet}. + * + * @return auctionId The auction id + * @notice Please use the method `setAuctionNames` to list all the reserved names. + */ + function createAuctionEvent(EventRange calldata range) external returns (bytes32 auctionId); + + /** + * @dev Updates the auction details. + * + * Requirements: + * - The method caller must be admin. + * + * Emits an event {AuctionEventSet}. + */ + function setAuctionEvent(bytes32 auctionId, EventRange calldata range) external; + + /** + * @dev Returns the event range of an auction. + */ + function getAuctionEvent(bytes32 auctionId) external view returns (EventRange memory); + + /** + * @dev Lists reserved names to sale in a specified auction. + * + * Requirements: + * - The method caller must be contract operator. + * - Array length are matched and larger than 0. + * - Only allow to set when the domain is: + * + Not in any auction. + * + Or, in the current auction. + * + Or, this name is not bided. + * + * Emits an event {LabelsListed}. + * + * Note: If the name is already listed, this method replaces with a new input value. + * + * @param ids The namehashes id of domain names. Eg, namehash('foo.ron') for 'foo.ron' + */ + function listNamesForAuction(bytes32 auctionId, uint256[] calldata ids, uint256[] calldata startingPrices) external; + + /** + * @dev Places a bid for a domain name. + * + * Requirements: + * - The name is listed, or the auction is happening. + * - The msg.value is larger than the current bid price or the auction starting price. + * + * Emits an event {BidPlaced}. + * + * @param id The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron' + */ + function placeBid(uint256 id) external payable; + + /** + * @dev Returns the highest bid and address of the bidder. + * @param id The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron' + */ + function getAuction(uint256 id) external view returns (DomainAuction memory, uint256 beatPrice); + + /** + * @dev Bulk claims the bid name. + * + * Requirements: + * - Must be called after ended time. + * - The method caller can be anyone. + * + * @param ids The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron' + */ + function bulkClaimBidNames(uint256[] calldata ids) external returns (bool[] memory claimeds); + + /** + * @dev Returns the treasury. + */ + function getTreasury() external view returns (address); + + /** + * @dev Returns the gap ratio between 2 bids with the starting price. Value in range [0;100_00] is 0%-100%. + */ + function getBidGapRatio() external view returns (uint256); + + /** + * @dev Sets the treasury. + * + * Requirements: + * - The method caller must be admin + * + * Emits an event {TreasuryUpdated}. + */ + function setTreasury(address payable) external; + + /** + * @dev Sets commission ratio. Value in range [0;100_00] is 0%-100%. + * + * Requirements: + * - The method caller must be admin + * + * Emits an event {BidGapRatioUpdated}. + */ + function setBidGapRatio(uint256) external; + + /** + * @dev Returns RNSUnified contract. + */ + function getRNSUnified() external view returns (INSUnified); +} diff --git a/src/interfaces/INSDomainPrice.sol b/src/interfaces/INSDomainPrice.sol new file mode 100644 index 00000000..b543c1d1 --- /dev/null +++ b/src/interfaces/INSDomainPrice.sol @@ -0,0 +1,205 @@ +//SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import { PeriodScaler } from "../libraries/math/PeriodScalingUtils.sol"; +import { IPyth } from "@pythnetwork/IPyth.sol"; + +interface INSDomainPrice { + error InvalidArrayLength(); + error RenewalFeeIsNotOverriden(); + + struct RenewalFee { + uint256 labelLength; + uint256 fee; + } + + /// @dev Emitted when the renewal reservation ratio is updated. + event TaxRatioUpdated(address indexed operator, uint256 indexed ratio); + /// @dev Emitted when the maximum length of renewal fee is updated. + event MaxRenewalFeeLengthUpdated(address indexed operator, uint256 indexed maxLength); + /// @dev Emitted when the renew fee is updated. + event RenewalFeeByLengthUpdated(address indexed operator, uint256 indexed labelLength, uint256 renewalFee); + /// @dev Emitted when the renew fee of a domain is overridden. Value of `inverseRenewalFee` is 0 when not overridden. + event RenewalFeeOverridingUpdated(address indexed operator, bytes32 indexed labelHash, uint256 inverseRenewalFee); + + /// @dev Emitted when the domain price is updated. + event DomainPriceUpdated( + address indexed operator, bytes32 indexed labelHash, uint256 price, bytes32 indexed proofHash, uint256 setType + ); + /// @dev Emitted when the rule to rescale domain price is updated. + event DomainPriceScaleRuleUpdated(address indexed operator, uint192 ratio, uint64 period); + + /// @dev Emitted when the Pyth Oracle config is updated. + event PythOracleConfigUpdated( + address indexed operator, IPyth indexed pyth, uint256 maxAcceptableAge, bytes32 indexed pythIdForRONUSD + ); + + /** + * @dev Returns the Pyth oracle config. + */ + function getPythOracleConfig() external view returns (IPyth pyth, uint256 maxAcceptableAge, bytes32 pythIdForRONUSD); + + /** + * @dev Sets the Pyth oracle config. + * + * Requirements: + * - The method caller is admin. + * + * Emits events {PythOracleConfigUpdated}. + */ + function setPythOracleConfig(IPyth pyth, uint256 maxAcceptableAge, bytes32 pythIdForRONUSD) external; + + /** + * @dev Returns the percentage to scale from domain price each period. + */ + function getScaleDownRuleForDomainPrice() external view returns (PeriodScaler memory dpScaleRule); + + /** + * @dev Sets the percentage to scale from domain price each period. + * + * Requirements: + * - The method caller is admin. + * + * Emits events {DomainPriceScaleRuleUpdated}. + * + * @notice Applies for the business rule: -x% each y seconds. + */ + function setScaleDownRuleForDomainPrice(PeriodScaler calldata scaleRule) external; + + /** + * @dev Returns the renewal fee by lengths. + */ + function getRenewalFeeByLengths() external view returns (RenewalFee[] memory renewalFees); + + /** + * @dev Sets the renewal fee by lengths + * + * Requirements: + * - The method caller is admin. + * + * Emits events {RenewalFeeByLengthUpdated}. + * Emits an event {MaxRenewalFeeLengthUpdated} optionally. + */ + function setRenewalFeeByLengths(RenewalFee[] calldata renewalFees) external; + + /** + * @dev Returns tax ratio. + */ + function getTaxRatio() external view returns (uint256 taxRatio); + + /** + * @dev Sets renewal reservation ratio. + * + * Requirements: + * - The method caller is admin. + * + * Emits an event {TaxRatioUpdated}. + */ + function setTaxRatio(uint256 ratio) external; + + /** + * @dev Return the domain price. + * @param label The domain label to register (Eg, 'foo' for 'foo.ron'). + */ + function getDomainPrice(string memory label) external view returns (uint256 usdPrice, uint256 ronPrice); + + /** + * @dev Returns the renewal fee in USD and RON. + * @param label The domain label to register (Eg, 'foo' for 'foo.ron'). + * @param duration Amount of second(s). + */ + function getRenewalFee(string calldata label, uint256 duration) + external + view + returns (uint256 usdPrice, uint256 ronPrice); + + /** + * @dev Returns the renewal fee of a label. Reverts if not overridden. + * @notice This method is to help developers check the domain renewal fee overriding. Consider using method + * {getRenewalFee} instead for full handling of renewal fees. + */ + function getOverriddenRenewalFee(string memory label) external view returns (uint256 usdFee); + + /** + * @dev Bulk override renewal fees. + * + * Requirements: + * - The method caller is operator. + * - The input array lengths must be larger than 0 and the same. + * + * Emits events {RenewalFeeOverridingUpdated}. + * + * @param lbHashes Array of label hashes. (Eg, ['foo'].map(keccak256) for 'foo.ron') + * @param usdPrices Array of prices in USD. Leave 2^256 - 1 to remove overriding. + */ + function bulkOverrideRenewalFees(bytes32[] calldata lbHashes, uint256[] calldata usdPrices) external; + + /** + * @dev Bulk try to set domain prices. Returns a boolean array indicating whether domain prices at the corresponding + * indexes if set or not. + * + * Requirements: + * - The method caller is operator. + * - The input array lengths must be larger than 0 and the same. + * - The price should be larger than current domain price or it will not be updated. + * + * Emits events {DomainPriceUpdated} optionally. + * + * @param lbHashes Array of label hashes. (Eg, ['foo'].map(keccak256) for 'foo.ron') + * @param ronPrices Array of prices in (W)RON token. + * @param proofHashes Array of proof hashes. + * @param setTypes Array of update types from the operator service. + */ + function bulkTrySetDomainPrice( + bytes32[] calldata lbHashes, + uint256[] calldata ronPrices, + bytes32[] calldata proofHashes, + uint256[] calldata setTypes + ) external returns (bool[] memory updated); + + /** + * @dev Bulk override domain prices. + * + * Requirements: + * - The method caller is operator. + * - The input array lengths must be larger than 0 and the same. + * + * Emits events {DomainPriceUpdated}. + * + * @param lbHashes Array of label hashes. (Eg, ['foo'].map(keccak256) for 'foo.ron') + * @param ronPrices Array of prices in (W)RON token. + * @param proofHashes Array of proof hashes. + * @param setTypes Array of update types from the operator service. + */ + function bulkSetDomainPrice( + bytes32[] calldata lbHashes, + uint256[] calldata ronPrices, + bytes32[] calldata proofHashes, + uint256[] calldata setTypes + ) external; + + /** + * @dev Returns the converted amount from USD to RON. + */ + function convertUSDToRON(uint256 usdAmount) external view returns (uint256 ronAmount); + + /** + * @dev Returns the converted amount from RON to USD. + */ + function convertRONToUSD(uint256 ronAmount) external view returns (uint256 usdAmount); + + /** + * @dev Value equals to keccak256("OPERATOR_ROLE"). + */ + function OPERATOR_ROLE() external pure returns (bytes32); + + /** + * @dev Max percentage 100%. Values [0; 100_00] reflexes [0; 100%] + */ + function MAX_PERCENTAGE() external pure returns (uint64); + + /** + * @dev Decimal for USD. + */ + function USD_DECIMALS() external pure returns (uint8); +} diff --git a/src/libraries/LibEventRange.sol b/src/libraries/LibEventRange.sol new file mode 100644 index 00000000..00586d73 --- /dev/null +++ b/src/libraries/LibEventRange.sol @@ -0,0 +1,37 @@ +//SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +struct EventRange { + uint256 startedAt; + uint256 endedAt; +} + +library LibEventRange { + /** + * @dev Checks whether the event range is valid. + */ + function valid(EventRange calldata range) internal pure returns (bool) { + return range.startedAt <= range.endedAt; + } + + /** + * @dev Returns whether the current range is not yet started. + */ + function isNotYetStarted(EventRange memory range) internal view returns (bool) { + return block.timestamp < range.startedAt; + } + + /** + * @dev Returns whether the current range is ended or not. + */ + function isEnded(EventRange memory range) internal view returns (bool) { + return range.endedAt <= block.timestamp; + } + + /** + * @dev Returns whether the current block is in period. + */ + function isInPeriod(EventRange memory range) internal view returns (bool) { + return range.startedAt <= block.timestamp && block.timestamp < range.endedAt; + } +} diff --git a/src/libraries/LibRNSDomain.sol b/src/libraries/LibRNSDomain.sol new file mode 100644 index 00000000..5ced21a7 --- /dev/null +++ b/src/libraries/LibRNSDomain.sol @@ -0,0 +1,55 @@ +//SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +library LibRNSDomain { + /// @dev Value equals to namehash('ron') + uint256 internal constant RON_ID = 0xba69923fa107dbf5a25a073a10b7c9216ae39fbadc95dc891d460d9ae315d688; + + /** + * @dev Calculate the corresponding id given parentId and label. + */ + function toId(uint256 parentId, string memory label) internal pure returns (uint256 id) { + assembly ("memory-safe") { + mstore(0x0, parentId) + mstore(0x20, keccak256(add(label, 32), mload(label))) + id := keccak256(0x0, 64) + } + } + + function hashLabel(string memory label) internal pure returns (bytes32 hashed) { + assembly ("memory-safe") { + hashed := keccak256(add(label, 32), mload(label)) + } + } + + /** + * @dev Returns the length of a given string + * + * @param s The string to measure the length of + * @return The length of the input string + */ + function strlen(string memory s) internal pure returns (uint256) { + unchecked { + uint256 i; + uint256 len; + uint256 bytelength = bytes(s).length; + for (len; i < bytelength; len++) { + bytes1 b = bytes(s)[i]; + if (b < 0x80) { + i += 1; + } else if (b < 0xE0) { + i += 2; + } else if (b < 0xF0) { + i += 3; + } else if (b < 0xF8) { + i += 4; + } else if (b < 0xFC) { + i += 5; + } else { + i += 6; + } + } + return len; + } + } +} diff --git a/src/libraries/TimestampWrapperUtils.sol b/src/libraries/TimestampWrapperUtils.sol new file mode 100644 index 00000000..d2228eca --- /dev/null +++ b/src/libraries/TimestampWrapperUtils.sol @@ -0,0 +1,7 @@ +//SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +struct TimestampWrapper { + uint256 value; + uint256 timestamp; +} diff --git a/src/libraries/math/PeriodScalingUtils.sol b/src/libraries/math/PeriodScalingUtils.sol new file mode 100644 index 00000000..b2dcf81c --- /dev/null +++ b/src/libraries/math/PeriodScalingUtils.sol @@ -0,0 +1,42 @@ +//SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import { Math } from "@openzeppelin/contracts/utils/math/Math.sol"; +import { PowMath } from "./PowMath.sol"; + +struct PeriodScaler { + uint192 ratio; + uint64 period; +} + +library LibPeriodScaler { + using PowMath for uint256; + + error PeriodNumOverflowedUint16(uint256 n); + + /// @dev The precision number of calculation is 2 + uint256 public constant MAX_PERCENTAGE = 100_00; + + /** + * @dev Scales down the input value `v` for a percentage of `self.ratio` each period `self.period`. + * Reverts if the passed period is larger than 2^16 - 1. + * + * @param self The period scaler with specific period and ratio + * @param v The original value to scale based on the rule `self` + * @param maxR The maximum value of 100%. Eg, if the `self.ratio` in range of [0;100_00] reflexes 0-100%, this param + * must be 100_00 + * @param dur The passed duration in the same uint with `self.period` + */ + function scaleDown(PeriodScaler memory self, uint256 v, uint64 maxR, uint256 dur) internal pure returns (uint256 rs) { + uint256 n = dur / uint256(self.period); + if (n == 0 || self.ratio == 0) return v; + if (maxR == self.ratio) return 0; + if (n > type(uint16).max) revert PeriodNumOverflowedUint16(n); + + unchecked { + // Normalizes the input ratios to be in range of [0;MAX_PERCENTAGE] + uint256 p = Math.mulDiv(maxR - self.ratio, MAX_PERCENTAGE, maxR); + return v.mulDiv({ y: p, d: MAX_PERCENTAGE, n: uint16(n) }); + } + } +} diff --git a/src/libraries/math/PowMath.sol b/src/libraries/math/PowMath.sol new file mode 100644 index 00000000..a156278c --- /dev/null +++ b/src/libraries/math/PowMath.sol @@ -0,0 +1,130 @@ +//SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import { SafeMath } from "@openzeppelin/contracts/utils/math/SafeMath.sol"; +import { Math } from "@openzeppelin/contracts/utils/math/Math.sol"; + +library PowMath { + using Math for uint256; + using SafeMath for uint256; + + /** + * @dev Negative exponent n for x*10^n. + */ + function exp10(uint256 x, int32 n) internal pure returns (uint256) { + if (n < 0) { + return x / 10 ** uint32(-n); + } else if (n > 0) { + return x * 10 ** uint32(n); + } else { + return x; + } + } + + /** + * @dev Calculates floor(x * (y / d)**n) with full precision. + */ + function mulDiv(uint256 x, uint256 y, uint256 d, uint16 n) internal pure returns (uint256 r) { + unchecked { + if (y == d || n == 0) return x; + r = x; + + bool ok; + uint256 r_; + uint16 nd_; + + { + uint16 ye = uint16(Math.min(n, findMaxExponent(y))); + while (ye > 0) { + (ok, r_) = r.tryMul(y ** ye); + if (ok) { + r = r_; + n -= ye; + nd_ += ye; + } + ye = uint16(Math.min(ye / 2, n)); + } + } + + while (n > 0) { + (ok, r_) = r.tryMul(y); + if (ok) { + r = r_; + n--; + nd_++; + } else if (nd_ > 0) { + r /= d; + nd_--; + } else { + r = r.mulDiv(y, d); + n--; + } + } + + uint16 de = findMaxExponent(d); + while (nd_ > 0) { + uint16 e = uint16(Math.min(de, nd_)); + r /= d ** e; + nd_ -= e; + } + } + } + + /** + * @dev Calculates floor(x * (y / d)**n) with low precision. + */ + function mulDivLowPrecision(uint256 x, uint256 y, uint256 d, uint16 n) internal pure returns (uint256) { + return uncheckedMulDiv(x, y, d, n, findMaxExponent(Math.max(y, d))); + } + + /** + * @dev Aggregated calculate multiplications. + * ``` + * r = x*(y/d)^k + * = \prod(x*(y/d)^{k_i}) \ where \ sum(k_i) = k + * ``` + */ + function uncheckedMulDiv(uint256 x, uint256 y, uint256 d, uint16 n, uint16 maxE) internal pure returns (uint256 r) { + unchecked { + r = x; + uint16 e; + while (n > 0) { + e = uint16(Math.min(n, maxE)); + r = r.mulDiv(y ** e, d ** e); + n -= e; + } + } + } + + /** + * @dev Returns the largest exponent `k` where, x^k <= 2^256-1 + * Note: n = Surd[2^256-1,k] + * = 10^( log2(2^256-1) / k * log10(2) ) + */ + function findMaxExponent(uint256 x) internal pure returns (uint16 k) { + if (x < 3) k = 255; + else if (x < 4) k = 128; + else if (x < 16) k = 64; + else if (x < 256) k = 32; + else if (x < 7132) k = 20; + else if (x < 11376) k = 19; + else if (x < 19113) k = 18; + else if (x < 34132) k = 17; + else if (x < 65536) k = 16; + else if (x < 137271) k = 15; + else if (x < 319558) k = 14; + else if (x < 847180) k = 13; + else if (x < 2642246) k = 12; + else if (x < 10134189) k = 11; + else if (x < 50859009) k = 10; + else if (x < 365284285) k = 9; + else if (x < 4294967296) k = 8; + else if (x < 102116749983) k = 7; + else if (x < 6981463658332) k = 6; + else if (x < 2586638741762875) k = 5; + else if (x < 18446744073709551616) k = 4; + else if (x < 48740834812604276470692695) k = 3; + else if (x < 340282366920938463463374607431768211456) k = 2; + else k = 1; + } +} diff --git a/src/libraries/pyth/PythConverter.sol b/src/libraries/pyth/PythConverter.sol new file mode 100644 index 00000000..efc176a1 --- /dev/null +++ b/src/libraries/pyth/PythConverter.sol @@ -0,0 +1,38 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import { Math } from "@openzeppelin/contracts/utils/math/Math.sol"; +import { PythStructs } from "@pythnetwork/PythStructs.sol"; +import { PowMath } from "../math/PowMath.sol"; + +library PythConverter { + error ErrExponentTooLarge(int32 expo); + error ErrComputedPriceTooLarge(int32 expo1, int32 expo2, int64 price1); + + /** + * @dev Multiples and converts the price into token wei with decimals `outDecimals`. + */ + function mul(PythStructs.Price memory self, uint256 inpWei, int32 inpDecimals, int32 outDecimals) + internal + pure + returns (uint256 outWei) + { + return Math.mulDiv( + inpWei, PowMath.exp10(uint256(int256(self.price)), outDecimals + self.expo), PowMath.exp10(1, inpDecimals) + ); + } + + /** + * @dev Inverses token price of tokenA/tokenB to tokenB/tokenA. + */ + function inverse(PythStructs.Price memory self, int32 expo) internal pure returns (PythStructs.Price memory outPrice) { + uint256 exp10p1 = PowMath.exp10(1, -self.expo); + if (exp10p1 > uint256(type(int256).max)) revert ErrExponentTooLarge(self.expo); + uint256 exp10p2 = PowMath.exp10(1, -expo); + if (exp10p2 > uint256(type(int256).max)) revert ErrExponentTooLarge(expo); + int256 price = (int256(exp10p1) * int256(exp10p2)) / self.price; + if (price > type(int64).max) revert ErrComputedPriceTooLarge(self.expo, expo, self.price); + + return PythStructs.Price({ price: int64(price), conf: self.conf, expo: expo, publishTime: self.publishTime }); + } +} From 4492422adaf6979892bc56872dd27781325e10c8 Mon Sep 17 00:00:00 2001 From: Tu Do <18521578@gm.uit.edu.vn> Date: Thu, 12 Oct 2023 16:10:39 +0700 Subject: [PATCH 03/27] Resolve merge conflict/auction (#25) * feat: add Public Resolvers into testnet v0.2.0 (#17) * forge install: ens-contracts v0.1 * forge install: buffer 688aa09e9ad241a94609e6af539e65f229912b16 * chore: migrate from private repo * feat: add PublicResolver & dependency * fix: outdated name and address in Public Resolver (#5) fix: outdated name and address in Public Resolver * fix: resolve merge conflicts * fix: resolve merge conflicts --------- Co-authored-by: Duc Tho Tran * feat: add RNSAuction --------- Co-authored-by: Duc Tho Tran --- .gitmodules | 6 + lib/buffer | 1 + lib/ens-contracts | 1 + remappings.txt | 4 +- src/RNSUnified.sol | 5 + src/extensions/Multicallable.sol | 52 +++++ src/interfaces/IMulticallable.sol | 37 ++++ src/interfaces/INSUnified.sol | 5 + src/interfaces/IReverseRegistrar.sol | 2 +- src/interfaces/resolvers/IABIResolver.sol | 38 ++++ src/interfaces/resolvers/IAddressResolver.sol | 28 +++ .../resolvers/IContentHashResolver.sol | 28 +++ .../resolvers/IDNSRecordResolver.sol | 41 ++++ src/interfaces/resolvers/IDNSZoneResolver.sol | 28 +++ .../resolvers/IInterfaceResolver.sol | 34 ++++ .../resolvers/IPublicKeyResolver.sol | 37 ++++ src/interfaces/resolvers/IPublicResolver.sol | 60 ++++++ src/interfaces/resolvers/ITextResolver.sol | 30 +++ src/interfaces/resolvers/IVersionResolver.sol | 25 +++ src/libraries/ErrorHandler.sol | 22 ++ src/resolvers/ABIResolvable.sol | 45 +++++ src/resolvers/AddressResolvable.sol | 36 ++++ src/resolvers/BaseVersion.sol | 36 ++++ src/resolvers/ContentHashResolvable.sol | 36 ++++ src/resolvers/DNSResolvable.sol | 141 +++++++++++++ src/resolvers/InterfaceResolvable.sol | 68 +++++++ src/resolvers/NameResolvable.sol | 35 ++++ src/resolvers/PublicKeyResolvable.sol | 36 ++++ src/resolvers/PublicResolver.sol | 190 ++++++++++++++++++ src/resolvers/TextResolvable.sol | 34 ++++ 30 files changed, 1139 insertions(+), 2 deletions(-) create mode 160000 lib/buffer create mode 160000 lib/ens-contracts create mode 100644 src/extensions/Multicallable.sol create mode 100644 src/interfaces/IMulticallable.sol create mode 100644 src/interfaces/resolvers/IABIResolver.sol create mode 100644 src/interfaces/resolvers/IAddressResolver.sol create mode 100644 src/interfaces/resolvers/IContentHashResolver.sol create mode 100644 src/interfaces/resolvers/IDNSRecordResolver.sol create mode 100644 src/interfaces/resolvers/IDNSZoneResolver.sol create mode 100644 src/interfaces/resolvers/IInterfaceResolver.sol create mode 100644 src/interfaces/resolvers/IPublicKeyResolver.sol create mode 100644 src/interfaces/resolvers/IPublicResolver.sol create mode 100644 src/interfaces/resolvers/ITextResolver.sol create mode 100644 src/interfaces/resolvers/IVersionResolver.sol create mode 100644 src/libraries/ErrorHandler.sol create mode 100644 src/resolvers/ABIResolvable.sol create mode 100644 src/resolvers/AddressResolvable.sol create mode 100644 src/resolvers/BaseVersion.sol create mode 100644 src/resolvers/ContentHashResolvable.sol create mode 100644 src/resolvers/DNSResolvable.sol create mode 100644 src/resolvers/InterfaceResolvable.sol create mode 100644 src/resolvers/NameResolvable.sol create mode 100644 src/resolvers/PublicKeyResolvable.sol create mode 100644 src/resolvers/PublicResolver.sol create mode 100644 src/resolvers/TextResolvable.sol diff --git a/.gitmodules b/.gitmodules index 544667fe..8fa5be48 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,9 @@ [submodule "lib/contract-template"] path = lib/contract-template url = https://github.com/axieinfinity/contract-template +[submodule "lib/ens-contracts"] + path = lib/ens-contracts + url = https://github.com/ensdomains/ens-contracts +[submodule "lib/buffer"] + path = lib/buffer + url = https://github.com/ensdomains/buffer diff --git a/lib/buffer b/lib/buffer new file mode 160000 index 00000000..688aa09e --- /dev/null +++ b/lib/buffer @@ -0,0 +1 @@ +Subproject commit 688aa09e9ad241a94609e6af539e65f229912b16 diff --git a/lib/ens-contracts b/lib/ens-contracts new file mode 160000 index 00000000..0c75ba23 --- /dev/null +++ b/lib/ens-contracts @@ -0,0 +1 @@ +Subproject commit 0c75ba23fae76165d51c9c80d76d22261e06179d diff --git a/remappings.txt b/remappings.txt index e2c6633c..41209dd1 100644 --- a/remappings.txt +++ b/remappings.txt @@ -2,4 +2,6 @@ ds-test/=lib/forge-std/lib/ds-test/src/ forge-std/=lib/forge-std/src/ @openzeppelin/=lib/openzeppelin-contracts/ -contract-template/=lib/contract-template/src/ \ No newline at end of file +contract-template/=lib/contract-template/src/ +@ensdomains/ens-contracts/=lib/ens-contracts/contracts/ +@ensdomains/buffer/=lib/buffer/ \ No newline at end of file diff --git a/src/RNSUnified.sol b/src/RNSUnified.sol index 134c1cba..65b60bd9 100644 --- a/src/RNSUnified.sol +++ b/src/RNSUnified.sol @@ -58,6 +58,11 @@ contract RNSUnified is Initializable, RNSToken { emit RecordUpdated(0x0, ModifyingField.Expiry.indicator(), record); } + /// @inheritdoc INSUnified + function namehash(string memory) external pure returns (bytes32 node) { + revert("TODO"); + } + /// @inheritdoc INSUnified function available(uint256 id) public view returns (bool) { return block.timestamp > LibSafeRange.add(_expiry(id), _gracePeriod); diff --git a/src/extensions/Multicallable.sol b/src/extensions/Multicallable.sol new file mode 100644 index 00000000..fc6f52b6 --- /dev/null +++ b/src/extensions/Multicallable.sol @@ -0,0 +1,52 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import { ERC165 } from "@openzeppelin/contracts/utils/introspection/ERC165.sol"; +import { IMulticallable } from "@rns-contracts/interfaces/IMulticallable.sol"; +import { ErrorHandler } from "@rns-contracts/libraries/ErrorHandler.sol"; + +abstract contract Multicallable is ERC165, IMulticallable { + using ErrorHandler for bool; + + /** + * @dev Override {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceID) public view virtual override returns (bool) { + return interfaceID == type(IMulticallable).interfaceId || super.supportsInterface(interfaceID); + } + + /** + * @inheritdoc IMulticallable + */ + function multicall(bytes[] calldata data) public override returns (bytes[] memory results) { + return _tryMulticall(true, data); + } + + /** + * @inheritdoc IMulticallable + */ + function tryMulticall(bool requireSuccess, bytes[] calldata data) public override returns (bytes[] memory results) { + return _tryMulticall(requireSuccess, data); + } + + /** + * @dev See {IMulticallable-tryMulticall}. + */ + function _tryMulticall(bool requireSuccess, bytes[] calldata data) internal returns (bytes[] memory results) { + uint256 length = data.length; + results = new bytes[](length); + + bool success; + bytes memory result; + + for (uint256 i; i < length;) { + (success, result) = address(this).delegatecall(data[i]); + if (requireSuccess) success.handleRevert(result); + results[i] = result; + + unchecked { + ++i; + } + } + } +} diff --git a/src/interfaces/IMulticallable.sol b/src/interfaces/IMulticallable.sol new file mode 100644 index 00000000..5e536433 --- /dev/null +++ b/src/interfaces/IMulticallable.sol @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.0; + +/** + * @notice To multi-call to a specified contract which has multicall interface: + * + * ```solidity + * interface IMock is IMulticallable { + * function foo() external; + * function bar() external; + * } + * + * bytes[] memory calldatas = new bytes[](2); + * calldatas[0] = abi.encodeCall(IMock.foo,()); + * calldatas[1] = abi.encodeCall(IMock.bar,()); + * IMock(target).multicall(calldatas); + * ``` + */ +interface IMulticallable { + /** + * @dev Executes bulk action to the original contract. + * Reverts if there is a single call failed. + * + * @param data The calldata to original contract. + * + */ + function multicall(bytes[] calldata data) external returns (bytes[] memory results); + + /** + * @dev Executes bulk action to the original contract. + * + * @param requireSuccess Flag to indicating whether the contract reverts if there is a single call failed. + * @param data The calldata to original contract. + * + */ + function tryMulticall(bool requireSuccess, bytes[] calldata data) external returns (bytes[] memory results); +} diff --git a/src/interfaces/INSUnified.sol b/src/interfaces/INSUnified.sol index 0863335f..9742ebab 100644 --- a/src/interfaces/INSUnified.sol +++ b/src/interfaces/INSUnified.sol @@ -104,6 +104,11 @@ interface INSUnified is IAccessControlEnumerable, IERC721Metadata { */ function MAX_EXPIRY() external pure returns (uint64); + /** + * @dev Returns the name hash output of a domain. + */ + function namehash(string memory domain) external pure returns (bytes32 node); + /** * @dev Returns true if the specified name is available for registration. * Note: Only available after passing the grace period. diff --git a/src/interfaces/IReverseRegistrar.sol b/src/interfaces/IReverseRegistrar.sol index f3fe2d1e..c40e25b3 100644 --- a/src/interfaces/IReverseRegistrar.sol +++ b/src/interfaces/IReverseRegistrar.sol @@ -1,4 +1,4 @@ -// SPDX-LicINSe-Identifier: UNLICINSED +// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; import { IERC165 } from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; diff --git a/src/interfaces/resolvers/IABIResolver.sol b/src/interfaces/resolvers/IABIResolver.sol new file mode 100644 index 00000000..678ef5f1 --- /dev/null +++ b/src/interfaces/resolvers/IABIResolver.sol @@ -0,0 +1,38 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +interface IABIResolver { + /// Thrown when the input content type is invalid. + error InvalidContentType(); + + /// @dev Emitted when the ABI is changed. + event ABIChanged(bytes32 indexed node, uint256 indexed contentType); + + /** + * @dev Sets the ABI associated with an INS node. Nodes may have one ABI of each content type. To remove an ABI, set it + * to the empty string. + * + * Requirements: + * - The method caller must be authorized to change user fields of RNS Token `node`. See indicator + * {ModifyingIndicator.USER_FIELDS_INDICATOR}. + * - The content type must be powers of 2. + * + * Emitted an event {ABIChanged}. + * + * @param node The node to update. + * @param contentType The content type of the ABI + * @param data The ABI data. + */ + function setABI(bytes32 node, uint256 contentType, bytes calldata data) external; + + /** + * @dev Returns the ABI associated with an INS node. + * Defined in EIP-205, see more at https://eips.ethereum.org/EIPS/eip-205 + * + * @param node The INS node to query + * @param contentTypes A bitwise OR of the ABI formats accepted by the caller. + * @return contentType The content type of the return value + * @return data The ABI data + */ + function ABI(bytes32 node, uint256 contentTypes) external view returns (uint256 contentType, bytes memory data); +} diff --git a/src/interfaces/resolvers/IAddressResolver.sol b/src/interfaces/resolvers/IAddressResolver.sol new file mode 100644 index 00000000..84c986fa --- /dev/null +++ b/src/interfaces/resolvers/IAddressResolver.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +interface IAddressResolver { + /// @dev Emitted when an address of a node is changed. + event AddrChanged(bytes32 indexed node, address addr); + + /** + * @dev Sets the address associated with an INS node. + * + * Requirement: + * - The method caller must be authorized to change user fields of RNS Token `node`. See indicator + * {ModifyingIndicator.USER_FIELDS_INDICATOR}. + * + * Emits an event {AddrChanged}. + * + * @param node The node to update. + * @param addr The address to set. + */ + function setAddr(bytes32 node, address addr) external; + + /** + * @dev Returns the address associated with an INS node. + * @param node The INS node to query. + * @return The associated address. + */ + function addr(bytes32 node) external view returns (address payable); +} diff --git a/src/interfaces/resolvers/IContentHashResolver.sol b/src/interfaces/resolvers/IContentHashResolver.sol new file mode 100644 index 00000000..7db60259 --- /dev/null +++ b/src/interfaces/resolvers/IContentHashResolver.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +interface IContentHashResolver { + /// @dev Emitted when the content hash of a node is changed. + event ContentHashChanged(bytes32 indexed node, bytes hash); + + /** + * @dev Sets the content hash associated with an INS node. + * + * Requirements: + * - The method caller must be authorized to change user fields of RNS Token `node`. See indicator + * {ModifyingIndicator.USER_FIELDS_INDICATOR}. + * + * Emits an event {ContentHashChanged}. + * + * @param node The node to update. + * @param hash The content hash to set + */ + function setContentHash(bytes32 node, bytes calldata hash) external; + + /** + * @dev Returns the content hash associated with an INS node. + * @param node The INS node to query. + * @return The associated content hash. + */ + function contentHash(bytes32 node) external view returns (bytes memory); +} diff --git a/src/interfaces/resolvers/IDNSRecordResolver.sol b/src/interfaces/resolvers/IDNSRecordResolver.sol new file mode 100644 index 00000000..97e5434e --- /dev/null +++ b/src/interfaces/resolvers/IDNSRecordResolver.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.4; + +interface IDNSRecordResolver { + /// @dev Emitted whenever a given node/name/resource's RRSET is updated. + event DNSRecordChanged(bytes32 indexed node, bytes name, uint16 resource, bytes record); + /// @dev Emitted whenever a given node/name/resource's RRSET is deleted. + event DNSRecordDeleted(bytes32 indexed node, bytes name, uint16 resource); + + /** + * @dev Set one or more DNS records. Records are supplied in wire-format. Records with the same node/name/resource + * must be supplied one after the other to ensure the data is updated correctly. For example, if the data was + * supplied: + * a.example.com IN A 1.2.3.4 + * a.example.com IN A 5.6.7.8 + * www.example.com IN CNAME a.example.com. + * then this would store the two A records for a.example.com correctly as a single RRSET, however if the data was + * supplied: + * a.example.com IN A 1.2.3.4 + * www.example.com IN CNAME a.example.com. + * a.example.com IN A 5.6.7.8 + * then this would store the first A record, the CNAME, then the second A record which would overwrite the first. + * + * Requirements: + * - The method caller must be authorized to change user fields of RNS Token `node`. See indicator + * {ModifyingIndicator.USER_FIELDS_INDICATOR}. + * + * @param node the namehash of the node for which to set the records + * @param data the DNS wire format records to set + */ + function setDNSRecords(bytes32 node, bytes calldata data) external; + + /** + * @dev Obtain a DNS record. + * @param node the namehash of the node for which to fetch the record + * @param name the keccak-256 hash of the fully-qualified name for which to fetch the record + * @param resource the ID of the resource as per https://en.wikipedia.org/wiki/List_of_DNS_record_types + * @return the DNS record in wire format if present, otherwise empty + */ + function dnsRecord(bytes32 node, bytes32 name, uint16 resource) external view returns (bytes memory); +} diff --git a/src/interfaces/resolvers/IDNSZoneResolver.sol b/src/interfaces/resolvers/IDNSZoneResolver.sol new file mode 100644 index 00000000..ea74e062 --- /dev/null +++ b/src/interfaces/resolvers/IDNSZoneResolver.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.4; + +interface IDNSZoneResolver { + /// @dev Emitted whenever a given node's zone hash is updated. + event DNSZonehashChanged(bytes32 indexed node, bytes lastzonehash, bytes zonehash); + + /** + * @dev Sets the hash for the zone. + * + * Requirements: + * - The method caller must be authorized to change user fields of RNS Token `node`. See indicator + * {ModifyingIndicator.USER_FIELDS_INDICATOR}. + * + * Emits an event {DNSZonehashChanged}. + * + * @param node The node to update. + * @param hash The zonehash to set + */ + function setZonehash(bytes32 node, bytes calldata hash) external; + + /** + * @dev Obtains the hash for the zone. + * @param node The INS node to query. + * @return The associated contenthash. + */ + function zonehash(bytes32 node) external view returns (bytes memory); +} diff --git a/src/interfaces/resolvers/IInterfaceResolver.sol b/src/interfaces/resolvers/IInterfaceResolver.sol new file mode 100644 index 00000000..e6f6018a --- /dev/null +++ b/src/interfaces/resolvers/IInterfaceResolver.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +interface IInterfaceResolver { + /// @dev Emitted when the interface of node is changed. + event InterfaceChanged(bytes32 indexed node, bytes4 indexed interfaceID, address implementer); + + /** + * @dev Sets an interface associated with a name. + * Setting the address to 0 restores the default behaviour of querying the contract at `addr()` for interface support. + * + * Requirements: + * - The method caller must be authorized to change user fields of RNS Token `node`. See indicator + * {ModifyingIndicator.USER_FIELDS_INDICATOR}. + * + * @param node The node to update. + * @param interfaceID The EIP 165 interface ID. + * @param implementer The address of a contract that implements this interface for this node. + */ + function setInterface(bytes32 node, bytes4 interfaceID, address implementer) external; + + /** + * @dev Returns the address of a contract that implements the specified interface for this name. + * + * If an implementer has not been set for this interfaceID and name, the resolver will query the contract at `addr()`. + * If `addr()` is set, a contract exists at that address, and that contract implements EIP165 and returns `true` for + * the specified interfaceID, its address will be returned. + * + * @param node The INS node to query. + * @param interfaceID The EIP 165 interface ID to check for. + * @return The address that implements this interface, or 0 if the interface is unsupported. + */ + function interfaceImplementer(bytes32 node, bytes4 interfaceID) external view returns (address); +} diff --git a/src/interfaces/resolvers/IPublicKeyResolver.sol b/src/interfaces/resolvers/IPublicKeyResolver.sol new file mode 100644 index 00000000..760aa454 --- /dev/null +++ b/src/interfaces/resolvers/IPublicKeyResolver.sol @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +interface IPublicKeyResolver { + struct PublicKey { + bytes32 x; + bytes32 y; + } + + /// @dev Emitted when a node public key is changed. + event PubkeyChanged(bytes32 indexed node, bytes32 x, bytes32 y); + + /** + * @dev Sets the SECP256k1 public key associated with an INS node. + * + * Requirements: + * - The method caller must be authorized to change user fields of RNS Token `node`. See indicator + * {ModifyingIndicator.USER_FIELDS_INDICATOR}. + * + * Emits an event {PubkeyChanged}. + * + * @param node The INS node to query + * @param x the X coordinate of the curve point for the public key. + * @param y the Y coordinate of the curve point for the public key. + */ + function setPubkey(bytes32 node, bytes32 x, bytes32 y) external; + + /** + * @dev Returns the SECP256k1 public key associated with an INS node. + * Defined in EIP 619. + * + * @param node The INS node to query + * @return x The X coordinate of the curve point for the public key. + * @return y The Y coordinate of the curve point for the public key. + */ + function pubkey(bytes32 node) external view returns (bytes32 x, bytes32 y); +} diff --git a/src/interfaces/resolvers/IPublicResolver.sol b/src/interfaces/resolvers/IPublicResolver.sol new file mode 100644 index 00000000..a2e0d67f --- /dev/null +++ b/src/interfaces/resolvers/IPublicResolver.sol @@ -0,0 +1,60 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { INSUnified } from "@rns-contracts/interfaces/INSUnified.sol"; +import { IReverseRegistrar } from "@rns-contracts/interfaces/IReverseRegistrar.sol"; +import { IABIResolver } from "./IABIResolver.sol"; +import { IAddressResolver } from "./IAddressResolver.sol"; +import { IContentHashResolver } from "./IContentHashResolver.sol"; +import { IDNSRecordResolver } from "./IDNSRecordResolver.sol"; +import { IDNSZoneResolver } from "./IDNSZoneResolver.sol"; +import { IInterfaceResolver } from "./IInterfaceResolver.sol"; +import { INameResolver } from "./INameResolver.sol"; +import { IPublicKeyResolver } from "./IPublicKeyResolver.sol"; +import { ITextResolver } from "./ITextResolver.sol"; +import { IMulticallable } from "../IMulticallable.sol"; + +interface IPublicResolver is + IABIResolver, + IAddressResolver, + IContentHashResolver, + IDNSRecordResolver, + IDNSZoneResolver, + IInterfaceResolver, + INameResolver, + IPublicKeyResolver, + ITextResolver, + IMulticallable +{ + /// @dev See {IERC1155-ApprovalForAll}. Logged when an operator is added or removed. + event ApprovalForAll(address indexed owner, address indexed operator, bool approved); + + /// @dev Logged when a delegate is approved or an approval is revoked. + event Approved(address owner, bytes32 indexed node, address indexed delegate, bool indexed approved); + + /** + * @dev Checks if an account is authorized to manage the resolution of a specific RNS node. + * @param node The RNS node. + * @param account The account address being checked for authorization. + * @return A boolean indicating whether the account is authorized. + */ + function isAuthorized(bytes32 node, address account) external view returns (bool); + + /** + * @dev Retrieves the RNSUnified associated with this resolver. + */ + function getRNSUnified() external view returns (INSUnified); + + /** + * @dev Retrieves the reverse registrar associated with this resolver. + */ + function getReverseRegistrar() external view returns (IReverseRegistrar); + + /** + * @dev This function provides an extra security check when called from privileged contracts (such as + * RONRegistrarController) that can set records on behalf of the node owners. + * + * Reverts if the node is not null but calldata is mismatched. + */ + function multicallWithNodeCheck(bytes32 node, bytes[] calldata data) external returns (bytes[] memory results); +} diff --git a/src/interfaces/resolvers/ITextResolver.sol b/src/interfaces/resolvers/ITextResolver.sol new file mode 100644 index 00000000..1408b4e4 --- /dev/null +++ b/src/interfaces/resolvers/ITextResolver.sol @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +interface ITextResolver { + /// @dev Emitted when a node text is changed. + event TextChanged(bytes32 indexed node, string indexed indexedKey, string key, string value); + + /** + * @dev Sets the text data associated with an INS node and key. + * + * Requirements: + * - The method caller must be authorized to change user fields of RNS Token `node`. See indicator + * {ModifyingIndicator.USER_FIELDS_INDICATOR}. + * + * Emits an event {TextChanged}. + * + * @param node The node to update. + * @param key The key to set. + * @param value The text data value to set. + */ + function setText(bytes32 node, string calldata key, string calldata value) external; + + /** + * Returns the text data associated with an INS node and key. + * @param node The INS node to query. + * @param key The text data key to query. + * @return The associated text data. + */ + function text(bytes32 node, string calldata key) external view returns (string memory); +} diff --git a/src/interfaces/resolvers/IVersionResolver.sol b/src/interfaces/resolvers/IVersionResolver.sol new file mode 100644 index 00000000..b88a3ebb --- /dev/null +++ b/src/interfaces/resolvers/IVersionResolver.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +interface IVersionResolver { + /// @dev Emitted when the version of a node is changed. + event VersionChanged(bytes32 indexed node, uint64 newVersion); + + /** + * @dev Increments the record version associated with an INS node. + * + * Requirements: + * - The method caller must be authorized to change user fields of RNS Token `node`. See indicator + * {ModifyingIndicator.USER_FIELDS_INDICATOR}. + * + * Emits an event {VersionChanged}. + * + * @param node The node to update. + */ + function clearRecords(bytes32 node) external; + + /** + * @dev Returns the latest version of a node. + */ + function recordVersions(bytes32 node) external view returns (uint64); +} diff --git a/src/libraries/ErrorHandler.sol b/src/libraries/ErrorHandler.sol new file mode 100644 index 00000000..5ea118d6 --- /dev/null +++ b/src/libraries/ErrorHandler.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +library ErrorHandler { + error ExternalCallFailed(); + + function handleRevert(bool status, bytes memory returnOrRevertData) internal pure { + assembly { + if iszero(status) { + let revertLength := mload(returnOrRevertData) + if iszero(iszero(revertLength)) { + // Start of revert data bytes. The 0x20 offset is always the same. + revert(add(returnOrRevertData, 0x20), revertLength) + } + + // revert ExternalCallFailed() + mstore(0x00, 0x350c20f1) + revert(0x1c, 0x04) + } + } + } +} diff --git a/src/resolvers/ABIResolvable.sol b/src/resolvers/ABIResolvable.sol new file mode 100644 index 00000000..5d9c6e05 --- /dev/null +++ b/src/resolvers/ABIResolvable.sol @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; +import "@rns-contracts/interfaces/resolvers/IABIResolver.sol"; +import "./BaseVersion.sol"; + +abstract contract ABIResolvable is IABIResolver, ERC165, BaseVersion { + /// @dev Gap for upgradeability. + uint256[50] private ____gap; + + /// @dev Mapping from version => node => content type => abi + mapping(uint64 version => mapping(bytes32 node => mapping(uint256 contentType => bytes abi))) internal _versionalAbi; + + /** + * @dev Override {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceID) public view virtual override(BaseVersion, ERC165) returns (bool) { + return interfaceID == type(IABIResolver).interfaceId || super.supportsInterface(interfaceID); + } + + /** + * @inheritdoc IABIResolver + */ + function ABI(bytes32 node, uint256 contentTypes) external view virtual override returns (uint256, bytes memory) { + mapping(uint256 contentType => bytes abi) storage abiSet = _versionalAbi[_recordVersion[node]][node]; + + for (uint256 contentType = 1; contentType <= contentTypes; contentType <<= 1) { + if ((contentType & contentTypes) != 0 && abiSet[contentType].length > 0) { + return (contentType, abiSet[contentType]); + } + } + + return (0, ""); + } + + /** + * @dev See {IABIResolver-setABI}. + */ + function _setABI(bytes32 node, uint256 contentType, bytes calldata data) internal { + if (((contentType - 1) & contentType) != 0) revert InvalidContentType(); + _versionalAbi[_recordVersion[node]][node][contentType] = data; + emit ABIChanged(node, contentType); + } +} diff --git a/src/resolvers/AddressResolvable.sol b/src/resolvers/AddressResolvable.sol new file mode 100644 index 00000000..65a46513 --- /dev/null +++ b/src/resolvers/AddressResolvable.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; +import "@rns-contracts/interfaces/resolvers/IAddressResolver.sol"; +import "./BaseVersion.sol"; + +abstract contract AddressResolvable is IAddressResolver, ERC165, BaseVersion { + /// @dev Gap for upgradeability. + uint256[50] private ____gap; + + /// @dev Mapping from version => node => address + mapping(uint64 version => mapping(bytes32 node => address addr)) internal _versionAddress; + + /** + * @dev Override {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceID) public view virtual override(BaseVersion, ERC165) returns (bool) { + return interfaceID == type(IAddressResolver).interfaceId || super.supportsInterface(interfaceID); + } + + /** + * @inheritdoc IAddressResolver + */ + function addr(bytes32 node) public view virtual override returns (address payable) { + return payable(_versionAddress[_recordVersion[node]][node]); + } + + /** + * @dev See {IAddressResolver-setAddr}. + */ + function _setAddr(bytes32 node, address addr_) internal { + emit AddrChanged(node, addr_); + _versionAddress[_recordVersion[node]][node] = addr_; + } +} diff --git a/src/resolvers/BaseVersion.sol b/src/resolvers/BaseVersion.sol new file mode 100644 index 00000000..4d8ba90e --- /dev/null +++ b/src/resolvers/BaseVersion.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; +import "@rns-contracts/interfaces/resolvers/IVersionResolver.sol"; + +abstract contract BaseVersion is IVersionResolver, ERC165 { + /// @dev Gap for upgradeability. + uint256[50] private ____gap; + + /// @dev Mapping from node => version + mapping(bytes32 node => uint64 version) internal _recordVersion; + + /** + * @dev Override {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceID) public view virtual override returns (bool) { + return interfaceID == type(IVersionResolver).interfaceId || super.supportsInterface(interfaceID); + } + + /** + * @inheritdoc IVersionResolver + */ + function recordVersions(bytes32 node) external view returns (uint64) { + return _recordVersion[node]; + } + + /** + * @dev See {IVersionResolver-clearRecords}. + */ + function _clearRecords(bytes32 node) internal { + unchecked { + emit VersionChanged(node, ++_recordVersion[node]); + } + } +} diff --git a/src/resolvers/ContentHashResolvable.sol b/src/resolvers/ContentHashResolvable.sol new file mode 100644 index 00000000..28a6f9be --- /dev/null +++ b/src/resolvers/ContentHashResolvable.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; +import "@rns-contracts/interfaces/resolvers/IContentHashResolver.sol"; +import "./BaseVersion.sol"; + +abstract contract ContentHashResolvable is IContentHashResolver, ERC165, BaseVersion { + /// @dev Gap for upgradeability. + uint256[50] private ____gap; + + /// @dev Mapping from version => node => content hash + mapping(uint64 version => mapping(bytes32 node => bytes contentHash)) internal _versionContentHash; + + /** + * @dev Override {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceID) public view virtual override(BaseVersion, ERC165) returns (bool) { + return interfaceID == type(IContentHashResolver).interfaceId || super.supportsInterface(interfaceID); + } + + /** + * @inheritdoc IContentHashResolver + */ + function contentHash(bytes32 node) external view virtual override returns (bytes memory) { + return _versionContentHash[_recordVersion[node]][node]; + } + + /** + * @dev See {IContentHashResolver-setContentHash}. + */ + function _setContentHash(bytes32 node, bytes calldata hash) internal { + _versionContentHash[_recordVersion[node]][node] = hash; + emit ContentHashChanged(node, hash); + } +} diff --git a/src/resolvers/DNSResolvable.sol b/src/resolvers/DNSResolvable.sol new file mode 100644 index 00000000..a8d59ca1 --- /dev/null +++ b/src/resolvers/DNSResolvable.sol @@ -0,0 +1,141 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; +import "@ensdomains/ens-contracts/dnssec-oracle/RRUtils.sol"; +import "@rns-contracts/interfaces/resolvers/IDNSRecordResolver.sol"; +import "@rns-contracts/interfaces/resolvers/IDNSZoneResolver.sol"; +import "./BaseVersion.sol"; + +abstract contract DNSResolvable is IDNSRecordResolver, IDNSZoneResolver, ERC165, BaseVersion { + using RRUtils for *; + using BytesUtils for bytes; + + /// @dev Gap for upgradeability. + uint256[50] private ____gap; + + /// @dev The records themselves. Stored as binary RRSETs. + mapping( + uint64 version => mapping(bytes32 node => mapping(bytes32 nameHash => mapping(uint16 resource => bytes data))) + ) private _versionRecord; + + /// @dev Count of number of entries for a given name. Required for DNS resolvers when resolving wildcards. + mapping(uint64 version => mapping(bytes32 node => mapping(bytes32 nameHash => uint16 count))) private + _versionNameEntriesCount; + + /** + * @dev Zone hashes for the domains. A zone hash is an EIP-1577 content hash in binary format that should point to a + * resource containing a single zonefile. + */ + mapping(uint64 version => mapping(bytes32 node => bytes data)) private _versionZonehash; + + /** + * @dev Override {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceID) public view virtual override(BaseVersion, ERC165) returns (bool) { + return interfaceID == type(IDNSRecordResolver).interfaceId || interfaceID == type(IDNSZoneResolver).interfaceId + || super.supportsInterface(interfaceID); + } + + /** + * @dev Checks whether a given node has records. + * @param node the namehash of the node for which to check the records + * @param name the namehash of the node for which to check the records + */ + function hasDNSRecords(bytes32 node, bytes32 name) public view virtual returns (bool) { + return (_versionNameEntriesCount[_recordVersion[node]][node][name] != 0); + } + + /** + * @inheritdoc IDNSRecordResolver + */ + function dnsRecord(bytes32 node, bytes32 name, uint16 resource) public view virtual override returns (bytes memory) { + return _versionRecord[_recordVersion[node]][node][name][resource]; + } + + /** + * @inheritdoc IDNSZoneResolver + */ + function zonehash(bytes32 node) external view virtual override returns (bytes memory) { + return _versionZonehash[_recordVersion[node]][node]; + } + + /** + * @dev See {IDNSRecordResolver-setDNSRecords}. + */ + function _setDNSRecords(bytes32 node, bytes calldata data) internal { + uint16 resource = 0; + uint256 offset = 0; + bytes memory name; + bytes memory value; + bytes32 nameHash; + uint64 version = _recordVersion[node]; + // Iterate over the data to add the resource records + for (RRUtils.RRIterator memory iter = data.iterateRRs(0); !iter.done(); iter.next()) { + if (resource == 0) { + resource = iter.dnstype; + name = iter.name(); + nameHash = keccak256(abi.encodePacked(name)); + value = bytes(iter.rdata()); + } else { + bytes memory newName = iter.name(); + if (resource != iter.dnstype || !name.equals(newName)) { + _setDNSRRSet(node, name, resource, data, offset, iter.offset - offset, value.length == 0, version); + resource = iter.dnstype; + offset = iter.offset; + name = newName; + nameHash = keccak256(name); + value = bytes(iter.rdata()); + } + } + } + + if (name.length > 0) { + _setDNSRRSet(node, name, resource, data, offset, data.length - offset, value.length == 0, version); + } + } + + /** + * @dev See {IDNSZoneResolver-setZonehash}. + */ + function _setZonehash(bytes32 node, bytes calldata hash) internal { + uint64 currentRecordVersion = _recordVersion[node]; + bytes memory oldhash = _versionZonehash[currentRecordVersion][node]; + _versionZonehash[currentRecordVersion][node] = hash; + emit DNSZonehashChanged(node, oldhash, hash); + } + + /** + * @dev Helper method to set DNS config. + * + * May emit an event {DNSRecordDeleted}. + * May emit an event {DNSRecordChanged}. + * + */ + function _setDNSRRSet( + bytes32 node, + bytes memory name, + uint16 resource, + bytes memory data, + uint256 offset, + uint256 size, + bool deleteRecord, + uint64 version + ) private { + bytes32 nameHash = keccak256(name); + bytes memory rrData = data.substring(offset, size); + if (deleteRecord) { + if (_versionRecord[version][node][nameHash][resource].length != 0) { + _versionNameEntriesCount[version][node][nameHash]--; + } + delete (_versionRecord[version][node][nameHash][resource]); + emit DNSRecordDeleted(node, name, resource); + } else { + if (_versionRecord[version][node][nameHash][resource].length == 0) { + _versionNameEntriesCount[version][node][nameHash]++; + } + _versionRecord[version][node][nameHash][resource] = rrData; + emit DNSRecordChanged(node, name, resource, rrData); + } + } +} diff --git a/src/resolvers/InterfaceResolvable.sol b/src/resolvers/InterfaceResolvable.sol new file mode 100644 index 00000000..84671603 --- /dev/null +++ b/src/resolvers/InterfaceResolvable.sol @@ -0,0 +1,68 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; +import { BaseVersion } from "./BaseVersion.sol"; +import { IInterfaceResolver } from "@rns-contracts/interfaces/resolvers/IInterfaceResolver.sol"; + +abstract contract InterfaceResolvable is IInterfaceResolver, ERC165, BaseVersion { + /// @dev Gap for upgradeability. + uint256[50] private ____gap; + + /// @dev Mapping from version => node => interfaceID => address + mapping(uint64 version => mapping(bytes32 node => mapping(bytes4 interfaceID => address addr))) internal + _versionInterface; + + /** + * @dev Override {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceID) public view virtual override(BaseVersion, ERC165) returns (bool) { + return interfaceID == type(IInterfaceResolver).interfaceId || super.supportsInterface(interfaceID); + } + + /** + * @inheritdoc IInterfaceResolver + */ + function interfaceImplementer(bytes32 node, bytes4 interfaceID) external view virtual override returns (address) { + address implementer = _versionInterface[_recordVersion[node]][node][interfaceID]; + if (implementer != address(0)) return implementer; + + address addrOfNode = addr(node); + if (addrOfNode == address(0)) return address(0); + + bool success; + bytes memory returnData; + + (success, returnData) = + addrOfNode.staticcall(abi.encodeCall(IERC165.supportsInterface, (type(IERC165).interfaceId))); + + // EIP 165 not supported by target + if (!_isValidReturnData(success, returnData)) return address(0); + + (success, returnData) = addrOfNode.staticcall(abi.encodeCall(IERC165.supportsInterface, (interfaceID))); + // Specified interface not supported by target + if (!_isValidReturnData(success, returnData)) return address(0); + + return addrOfNode; + } + + /** + * @dev See {IAddressResolver-addr}. + */ + function addr(bytes32 node) public view virtual returns (address payable); + + /** + * @dev Checks whether the return data is valid. + */ + function _isValidReturnData(bool success, bytes memory returnData) internal pure returns (bool) { + return success || returnData.length < 32 || returnData[31] == 0; + } + + /** + * @dev See {InterfaceResolver-setInterface}. + */ + function _setInterface(bytes32 node, bytes4 interfaceID, address implementer) internal virtual { + _versionInterface[_recordVersion[node]][node][interfaceID] = implementer; + emit InterfaceChanged(node, interfaceID, implementer); + } +} diff --git a/src/resolvers/NameResolvable.sol b/src/resolvers/NameResolvable.sol new file mode 100644 index 00000000..11b50824 --- /dev/null +++ b/src/resolvers/NameResolvable.sol @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { BaseVersion } from "./BaseVersion.sol"; +import { INameResolver } from "@rns-contracts/interfaces/resolvers/INameResolver.sol"; + +abstract contract NameResolvable is INameResolver, BaseVersion { + /// @dev Gap for upgradeability. + uint256[50] private ____gap; + + /// @dev mapping from version => node => name + mapping(uint64 version => mapping(bytes32 node => string name)) internal _versionName; + + /** + * @dev Override {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceID) public view virtual override returns (bool) { + return interfaceID == type(INameResolver).interfaceId || super.supportsInterface(interfaceID); + } + + /** + * @inheritdoc INameResolver + */ + function name(bytes32 node) public view virtual override returns (string memory) { + return _versionName[_recordVersion[node]][node]; + } + + /** + * @dev See {INameResolver-setName}. + */ + function _setName(bytes32 node, string memory newName) internal virtual { + _versionName[_recordVersion[node]][node] = newName; + emit NameChanged(node, newName); + } +} diff --git a/src/resolvers/PublicKeyResolvable.sol b/src/resolvers/PublicKeyResolvable.sol new file mode 100644 index 00000000..e2e26b64 --- /dev/null +++ b/src/resolvers/PublicKeyResolvable.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { BaseVersion } from "./BaseVersion.sol"; +import { IPublicKeyResolver } from "@rns-contracts/interfaces/resolvers/IPublicKeyResolver.sol"; + +abstract contract PublicKeyResolvable is BaseVersion, IPublicKeyResolver { + /// @dev Gap for upgradeability. + uint256[50] private ____gap; + + /// @dev Mapping from version => node => public key + mapping(uint64 version => mapping(bytes32 node => PublicKey publicKey)) internal _versionPublicKey; + + /** + * @dev Override {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceID) public view virtual override returns (bool) { + return interfaceID == type(IPublicKeyResolver).interfaceId || super.supportsInterface(interfaceID); + } + + /** + * @dev See {IPublicKeyResolver-pubkey}. + */ + function pubkey(bytes32 node) external view virtual override returns (bytes32 x, bytes32 y) { + uint64 currentRecordVersion = _recordVersion[node]; + return (_versionPublicKey[currentRecordVersion][node].x, _versionPublicKey[currentRecordVersion][node].y); + } + + /** + * @dev See {IPublicKeyResolver-setPubkey}. + */ + function _setPubkey(bytes32 node, bytes32 x, bytes32 y) internal virtual { + _versionPublicKey[_recordVersion[node]][node] = PublicKey(x, y); + emit PubkeyChanged(node, x, y); + } +} diff --git a/src/resolvers/PublicResolver.sol b/src/resolvers/PublicResolver.sol new file mode 100644 index 00000000..6f653816 --- /dev/null +++ b/src/resolvers/PublicResolver.sol @@ -0,0 +1,190 @@ +//SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; +import { IVersionResolver } from "@rns-contracts/interfaces/resolvers/IVersionResolver.sol"; +import { Multicallable } from "@rns-contracts/extensions/Multicallable.sol"; +import { USER_FIELDS_INDICATOR } from "../types/ModifyingIndicator.sol"; +import { ABIResolvable } from "./ABIResolvable.sol"; +import { AddressResolvable } from "./AddressResolvable.sol"; +import { ContentHashResolvable } from "./ContentHashResolvable.sol"; +import { DNSResolvable } from "./DNSResolvable.sol"; +import { InterfaceResolvable } from "./InterfaceResolvable.sol"; +import { NameResolvable } from "./NameResolvable.sol"; +import { PublicKeyResolvable } from "./PublicKeyResolvable.sol"; +import { TextResolvable } from "./TextResolvable.sol"; +import "@rns-contracts/interfaces/resolvers/IPublicResolver.sol"; + +/** + * @title Public Resolver + * @notice Customized version of PublicResolver: https://github.com/ensdomains/ens-contracts/blob/0c75ba23fae76165d51c9c80d76d22261e06179d/contracts/resolvers/PublicResolver.sol + * @dev A simple resolver anyone can use, only allows the owner of a node to set its address. + */ +contract PublicResolver is + IPublicResolver, + ABIResolvable, + AddressResolvable, + ContentHashResolvable, + DNSResolvable, + InterfaceResolvable, + NameResolvable, + PublicKeyResolvable, + TextResolvable, + Multicallable, + Initializable +{ + /// @dev Gap for upgradeability. + uint256[50] private ____gap; + + /// @dev The RNS Unified contract + INSUnified internal _rnsUnified; + + /// @dev The reverse registrar contract + IReverseRegistrar internal _reverseRegistrar; + + modifier onlyAuthorized(bytes32 node) { + _requireAuthorized(node, msg.sender); + _; + } + + constructor() payable { + _disableInitializers(); + } + + function initialize(INSUnified rnsUnified, IReverseRegistrar reverseRegistrar) external initializer { + _rnsUnified = rnsUnified; + _reverseRegistrar = reverseRegistrar; + } + + /** + * @dev Override {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceID) + public + view + override( + ABIResolvable, + AddressResolvable, + ContentHashResolvable, + DNSResolvable, + InterfaceResolvable, + NameResolvable, + PublicKeyResolvable, + TextResolvable, + Multicallable + ) + returns (bool) + { + return super.supportsInterface(interfaceID); + } + + /// @inheritdoc IPublicResolver + function getRNSUnified() external view returns (INSUnified) { + return _rnsUnified; + } + + /// @inheritdoc IPublicResolver + function getReverseRegistrar() external view returns (IReverseRegistrar) { + return _reverseRegistrar; + } + + /// @inheritdoc IPublicResolver + function multicallWithNodeCheck(bytes32 node, bytes[] calldata data) + external + override + returns (bytes[] memory results) + { + if (node != 0) { + for (uint256 i; i < data.length;) { + require(node == bytes32(data[i][4:36]), "PublicResolver: All records must have a matching namehash"); + unchecked { + ++i; + } + } + } + + return _tryMulticall(true, data); + } + + /// @inheritdoc IVersionResolver + function clearRecords(bytes32 node) external onlyAuthorized(node) { + _clearRecords(node); + } + + /// @inheritdoc IABIResolver + function setABI(bytes32 node, uint256 contentType, bytes calldata data) external onlyAuthorized(node) { + _setABI(node, contentType, data); + } + + /// @inheritdoc IAddressResolver + function setAddr(bytes32 node, address addr_) external onlyAuthorized(node) { + revert("PublicResolver: Cannot set address"); + _setAddr(node, addr_); + } + + /// @inheritdoc IContentHashResolver + function setContentHash(bytes32 node, bytes calldata hash) external onlyAuthorized(node) { + _setContentHash(node, hash); + } + + /// @inheritdoc IDNSRecordResolver + function setDNSRecords(bytes32 node, bytes calldata data) external onlyAuthorized(node) { + _setDNSRecords(node, data); + } + + /// @inheritdoc IDNSZoneResolver + function setZonehash(bytes32 node, bytes calldata hash) external onlyAuthorized(node) { + _setZonehash(node, hash); + } + + /// @inheritdoc IInterfaceResolver + function setInterface(bytes32 node, bytes4 interfaceID, address implementer) external onlyAuthorized(node) { + _setInterface(node, interfaceID, implementer); + } + + /// @inheritdoc INameResolver + function setName(bytes32 node, string calldata newName) external onlyAuthorized(node) { + _setName(node, newName); + } + + /// @inheritdoc IPublicKeyResolver + function setPubkey(bytes32 node, bytes32 x, bytes32 y) external onlyAuthorized(node) { + _setPubkey(node, x, y); + } + + /// @inheritdoc ITextResolver + function setText(bytes32 node, string calldata key, string calldata value) external onlyAuthorized(node) { + _setText(node, key, value); + } + + /// @inheritdoc IPublicResolver + function isAuthorized(bytes32 node, address account) public view returns (bool authorized) { + (authorized,) = _rnsUnified.canSetRecord(account, uint256(node), USER_FIELDS_INDICATOR); + } + + /// @dev Override {IAddressResolvable-addr}. + function addr(bytes32 node) + public + view + virtual + override(AddressResolvable, IAddressResolver, InterfaceResolvable) + returns (address payable) + { + return payable(_rnsUnified.ownerOf(uint256(node))); + } + + /// @dev Override {INameResolver-name}. + function name(bytes32 node) public view virtual override(INameResolver, NameResolvable) returns (string memory) { + address reversedAddress = _reverseRegistrar.getAddress(node); + string memory domainName = super.name(node); + uint256 tokenId = uint256(_rnsUnified.namehash(domainName)); + return _rnsUnified.ownerOf(tokenId) == reversedAddress ? domainName : ""; + } + + /** + * @dev Reverts if the msg sender is not authorized. + */ + function _requireAuthorized(bytes32 node, address account) internal view { + require(isAuthorized(node, account), "PublicResolver: unauthorized caller"); + } +} diff --git a/src/resolvers/TextResolvable.sol b/src/resolvers/TextResolvable.sol new file mode 100644 index 00000000..92b0290c --- /dev/null +++ b/src/resolvers/TextResolvable.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { BaseVersion } from "./BaseVersion.sol"; +import { ITextResolver } from "@rns-contracts/interfaces/resolvers/ITextResolver.sol"; + +abstract contract TextResolvable is BaseVersion, ITextResolver { + /// @dev Gap for upgradeability. + uint256[50] private ____gap; + /// @dev Mapping from version => node => key => text + mapping(uint64 version => mapping(bytes32 node => mapping(string key => string text))) internal _versionText; + + /** + * @dev Override {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceID) public view virtual override returns (bool) { + return interfaceID == type(ITextResolver).interfaceId || super.supportsInterface(interfaceID); + } + + /** + * @inheritdoc ITextResolver + */ + function text(bytes32 node, string calldata key) external view virtual override returns (string memory) { + return _versionText[_recordVersion[node]][node][key]; + } + + /** + * @dev See {ITextResolver-setText}. + */ + function _setText(bytes32 node, string calldata key, string calldata value) internal virtual { + _versionText[_recordVersion[node]][node][key] = value; + emit TextChanged(node, key, key, value); + } +} From 113a81e7a4048e1f78096b6ef85c413866ee2cc8 Mon Sep 17 00:00:00 2001 From: Tu Do <18521578@gm.uit.edu.vn> Date: Thu, 12 Oct 2023 17:15:38 +0700 Subject: [PATCH 04/27] chore: resolve merge conflict 'feature/domain-price' into release-testnet/v0.2.0 (#27) * feat: implement Auction contract for RNS (#18) feat: add RNSAuction * fix: resolve conflict * forge install: pyth-sdk-solidity v2.2.0 * fix: add remapping for @pythnetwork --- .gitmodules | 6 + lib/buffer | 1 + lib/ens-contracts | 1 + remappings.txt | 2 + src/RNSAuction.sol | 334 ++++++++++++++++++ src/RNSUnified.sol | 5 + src/extensions/Multicallable.sol | 52 +++ src/interfaces/IMulticallable.sol | 37 ++ src/interfaces/INSUnified.sol | 5 + src/interfaces/IReverseRegistrar.sol | 2 +- src/interfaces/resolvers/IABIResolver.sol | 38 ++ src/interfaces/resolvers/IAddressResolver.sol | 28 ++ .../resolvers/IContentHashResolver.sol | 28 ++ .../resolvers/IDNSRecordResolver.sol | 41 +++ src/interfaces/resolvers/IDNSZoneResolver.sol | 28 ++ .../resolvers/IInterfaceResolver.sol | 34 ++ .../resolvers/IPublicKeyResolver.sol | 37 ++ src/interfaces/resolvers/IPublicResolver.sol | 60 ++++ src/interfaces/resolvers/ITextResolver.sol | 30 ++ src/interfaces/resolvers/IVersionResolver.sol | 25 ++ src/libraries/ErrorHandler.sol | 22 ++ src/libraries/transfers/RONTransferHelper.sol | 31 ++ src/resolvers/ABIResolvable.sol | 45 +++ src/resolvers/AddressResolvable.sol | 36 ++ src/resolvers/BaseVersion.sol | 36 ++ src/resolvers/ContentHashResolvable.sol | 36 ++ src/resolvers/DNSResolvable.sol | 141 ++++++++ src/resolvers/InterfaceResolvable.sol | 68 ++++ src/resolvers/NameResolvable.sol | 35 ++ src/resolvers/PublicKeyResolvable.sol | 36 ++ src/resolvers/PublicResolver.sol | 190 ++++++++++ src/resolvers/TextResolvable.sol | 34 ++ 32 files changed, 1503 insertions(+), 1 deletion(-) create mode 160000 lib/buffer create mode 160000 lib/ens-contracts create mode 100644 src/RNSAuction.sol create mode 100644 src/extensions/Multicallable.sol create mode 100644 src/interfaces/IMulticallable.sol create mode 100644 src/interfaces/resolvers/IABIResolver.sol create mode 100644 src/interfaces/resolvers/IAddressResolver.sol create mode 100644 src/interfaces/resolvers/IContentHashResolver.sol create mode 100644 src/interfaces/resolvers/IDNSRecordResolver.sol create mode 100644 src/interfaces/resolvers/IDNSZoneResolver.sol create mode 100644 src/interfaces/resolvers/IInterfaceResolver.sol create mode 100644 src/interfaces/resolvers/IPublicKeyResolver.sol create mode 100644 src/interfaces/resolvers/IPublicResolver.sol create mode 100644 src/interfaces/resolvers/ITextResolver.sol create mode 100644 src/interfaces/resolvers/IVersionResolver.sol create mode 100644 src/libraries/ErrorHandler.sol create mode 100644 src/libraries/transfers/RONTransferHelper.sol create mode 100644 src/resolvers/ABIResolvable.sol create mode 100644 src/resolvers/AddressResolvable.sol create mode 100644 src/resolvers/BaseVersion.sol create mode 100644 src/resolvers/ContentHashResolvable.sol create mode 100644 src/resolvers/DNSResolvable.sol create mode 100644 src/resolvers/InterfaceResolvable.sol create mode 100644 src/resolvers/NameResolvable.sol create mode 100644 src/resolvers/PublicKeyResolvable.sol create mode 100644 src/resolvers/PublicResolver.sol create mode 100644 src/resolvers/TextResolvable.sol diff --git a/.gitmodules b/.gitmodules index 15220f8c..853782e5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,6 +7,12 @@ [submodule "lib/contract-template"] path = lib/contract-template url = https://github.com/axieinfinity/contract-template +[submodule "lib/ens-contracts"] + path = lib/ens-contracts + url = https://github.com/ensdomains/ens-contracts +[submodule "lib/buffer"] + path = lib/buffer + url = https://github.com/ensdomains/buffer [submodule "lib/pyth-sdk-solidity"] path = lib/pyth-sdk-solidity url = https://github.com/pyth-network/pyth-sdk-solidity diff --git a/lib/buffer b/lib/buffer new file mode 160000 index 00000000..688aa09e --- /dev/null +++ b/lib/buffer @@ -0,0 +1 @@ +Subproject commit 688aa09e9ad241a94609e6af539e65f229912b16 diff --git a/lib/ens-contracts b/lib/ens-contracts new file mode 160000 index 00000000..0c75ba23 --- /dev/null +++ b/lib/ens-contracts @@ -0,0 +1 @@ +Subproject commit 0c75ba23fae76165d51c9c80d76d22261e06179d diff --git a/remappings.txt b/remappings.txt index 20df439b..5c3ceb13 100644 --- a/remappings.txt +++ b/remappings.txt @@ -3,4 +3,6 @@ ds-test/=lib/forge-std/lib/ds-test/src/ forge-std/=lib/forge-std/src/ @openzeppelin/=lib/openzeppelin-contracts/ contract-template/=lib/contract-template/src/ +@ensdomains/ens-contracts/=lib/ens-contracts/contracts/ +@ensdomains/buffer/=lib/buffer/ @pythnetwork/=lib/pyth-sdk-solidity/ \ No newline at end of file diff --git a/src/RNSAuction.sol b/src/RNSAuction.sol new file mode 100644 index 00000000..f95b7a65 --- /dev/null +++ b/src/RNSAuction.sol @@ -0,0 +1,334 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; +import { AccessControlEnumerable } from "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; +import { Math } from "@openzeppelin/contracts/utils/math/Math.sol"; +import { INSUnified, INSAuction } from "./interfaces/INSAuction.sol"; +import { LibSafeRange } from "./libraries/math/LibSafeRange.sol"; +import { LibRNSDomain } from "./libraries/LibRNSDomain.sol"; +import { LibEventRange, EventRange } from "./libraries/LibEventRange.sol"; +import { RONTransferHelper } from "./libraries/transfers/RONTransferHelper.sol"; + +contract RNSAuction is Initializable, AccessControlEnumerable, INSAuction { + using LibSafeRange for uint256; + using LibEventRange for EventRange; + + /// @inheritdoc INSAuction + uint64 public constant MAX_EXPIRY = type(uint64).max; + /// @inheritdoc INSAuction + uint256 public constant MAX_PERCENTAGE = 100_00; + /// @inheritdoc INSAuction + uint64 public constant DOMAIN_EXPIRY_DURATION = 365 days; + /// @inheritdoc INSAuction + bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); + + /// @dev Gap for upgradeability. + uint256[50] private ____gap; + + /// @dev The RNSUnified contract. + INSUnified internal _rnsUnified; + /// @dev Mapping from auction Id => event range + mapping(bytes32 auctionId => EventRange) internal _auctionRange; + /// @dev Mapping from id of domain names => auction detail. + mapping(uint256 id => DomainAuction) internal _domainAuction; + + /// @dev The treasury. + address payable internal _treasury; + /// @dev The gap ratio between 2 bids with the starting price. + uint256 internal _bidGapRatio; + + modifier whenNotStarted(bytes32 auctionId) { + _requireNotStarted(auctionId); + _; + } + + modifier onlyValidEventRange(EventRange calldata range) { + _requireValidEventRange(range); + _; + } + + constructor() payable { + _disableInitializers(); + } + + function initialize( + address admin, + address[] calldata operators, + INSUnified rnsUnified, + address payable treasury, + uint256 bidGapRatio + ) external initializer { + _setTreasury(treasury); + _setBidGapRatio(bidGapRatio); + _setupRole(DEFAULT_ADMIN_ROLE, admin); + + uint256 length = operators.length; + bytes32 operatorRole = OPERATOR_ROLE; + + for (uint256 i; i < length;) { + _setupRole(operatorRole, operators[i]); + + unchecked { + ++i; + } + } + + _rnsUnified = rnsUnified; + } + + /** + * @inheritdoc INSAuction + */ + function bulkRegister(string[] calldata labels) external onlyRole(OPERATOR_ROLE) returns (uint256[] memory ids) { + uint256 length = labels.length; + if (length == 0) revert InvalidArrayLength(); + ids = new uint256[](length); + INSUnified rnsUnified = _rnsUnified; + uint256 parentId = LibRNSDomain.RON_ID; + uint64 domainExpiryDuration = DOMAIN_EXPIRY_DURATION; + + for (uint256 i; i < length;) { + (, ids[i]) = rnsUnified.mint(parentId, labels[i], address(0x0), address(this), domainExpiryDuration); + + unchecked { + ++i; + } + } + } + + /** + * @inheritdoc INSAuction + */ + function reserved(uint256 id) public view returns (bool) { + return _rnsUnified.ownerOf(id) == address(this); + } + + /** + * @inheritdoc INSAuction + */ + function createAuctionEvent(EventRange calldata range) + external + onlyRole(DEFAULT_ADMIN_ROLE) + onlyValidEventRange(range) + returns (bytes32 auctionId) + { + auctionId = keccak256(abi.encode(_msgSender(), range)); + _auctionRange[auctionId] = range; + emit AuctionEventSet(auctionId, range); + } + + /** + * @inheritdoc INSAuction + */ + function setAuctionEvent(bytes32 auctionId, EventRange calldata range) + external + onlyRole(DEFAULT_ADMIN_ROLE) + onlyValidEventRange(range) + whenNotStarted(auctionId) + { + _auctionRange[auctionId] = range; + emit AuctionEventSet(auctionId, range); + } + + /** + * @inheritdoc INSAuction + */ + function getAuctionEvent(bytes32 auctionId) public view returns (EventRange memory) { + return _auctionRange[auctionId]; + } + + /** + * @inheritdoc INSAuction + */ + function listNamesForAuction(bytes32 auctionId, uint256[] calldata ids, uint256[] calldata startingPrices) + external + onlyRole(OPERATOR_ROLE) + whenNotStarted(auctionId) + { + uint256 length = ids.length; + if (length == 0 || length != startingPrices.length) revert InvalidArrayLength(); + uint256 id; + bytes32 mAuctionId; + DomainAuction storage sAuction; + + for (uint256 i; i < length;) { + id = ids[i]; + if (!reserved(id)) revert NameNotReserved(); + + sAuction = _domainAuction[id]; + mAuctionId = sAuction.auctionId; + if (!(mAuctionId == 0 || mAuctionId == auctionId || sAuction.bid.timestamp == 0)) { + revert AlreadyBidding(); + } + + sAuction.auctionId = auctionId; + sAuction.startingPrice = startingPrices[i]; + + unchecked { + ++i; + } + } + + emit LabelsListed(auctionId, ids, startingPrices); + } + + /** + * @inheritdoc INSAuction + */ + function placeBid(uint256 id) external payable { + DomainAuction memory auction = _domainAuction[id]; + EventRange memory range = _auctionRange[auction.auctionId]; + uint256 beatPrice = _getBeatPrice(auction, range); + + if (!range.isInPeriod()) revert QueryIsNotInPeriod(); + if (msg.value < beatPrice) revert InsufficientAmount(); + address payable bidder = payable(_msgSender()); + // check whether the bidder can receive RON + if (!RONTransferHelper.send(bidder, 0)) revert BidderCannotReceiveRON(); + address payable prvBidder = auction.bid.bidder; + uint256 prvPrice = auction.bid.price; + + Bid storage sBid = _domainAuction[id].bid; + sBid.price = msg.value; + sBid.bidder = bidder; + sBid.timestamp = block.timestamp; + emit BidPlaced(auction.auctionId, id, msg.value, bidder, prvPrice, prvBidder); + + // refund for previous bidder + if (prvPrice != 0) RONTransferHelper.safeTransfer(prvBidder, prvPrice); + } + + /** + * @inheritdoc INSAuction + */ + function bulkClaimBidNames(uint256[] calldata ids) external returns (bool[] memory claimeds) { + uint256 id; + uint256 accumulatedRON; + EventRange memory range; + DomainAuction memory auction; + uint256 length = ids.length; + claimeds = new bool[](length); + INSUnified rnsUnified = _rnsUnified; + uint64 expiry = uint64(block.timestamp.addWithUpperbound(DOMAIN_EXPIRY_DURATION, MAX_EXPIRY)); + + for (uint256 i; i < length;) { + id = ids[i]; + auction = _domainAuction[id]; + range = _auctionRange[auction.auctionId]; + + if (!auction.bid.claimed) { + if (!range.isEnded()) revert NotYetEnded(); + if (auction.bid.timestamp == 0) revert NoOneBidded(); + + accumulatedRON += auction.bid.price; + rnsUnified.setExpiry(id, expiry); + rnsUnified.transferFrom(address(this), auction.bid.bidder, id); + + _domainAuction[id].bid.claimed = claimeds[i] = true; + } + + unchecked { + ++i; + } + } + + RONTransferHelper.safeTransfer(_treasury, accumulatedRON); + } + + /** + * @inheritdoc INSAuction + */ + function getRNSUnified() external view returns (INSUnified) { + return _rnsUnified; + } + + /** + * @inheritdoc INSAuction + */ + function getTreasury() external view returns (address) { + return _treasury; + } + + /** + * @inheritdoc INSAuction + */ + function getBidGapRatio() external view returns (uint256) { + return _bidGapRatio; + } + + /** + * @inheritdoc INSAuction + */ + function setTreasury(address payable addr) external onlyRole(DEFAULT_ADMIN_ROLE) { + _setTreasury(addr); + } + + /** + * @inheritdoc INSAuction + */ + + function setBidGapRatio(uint256 ratio) external onlyRole(DEFAULT_ADMIN_ROLE) { + _setBidGapRatio(ratio); + } + + /** + * @inheritdoc INSAuction + */ + function getAuction(uint256 id) public view returns (DomainAuction memory auction, uint256 beatPrice) { + auction = _domainAuction[id]; + EventRange memory range = getAuctionEvent(auction.auctionId); + beatPrice = _getBeatPrice(auction, range); + } + + /** + * @dev Helper method to set treasury. + * + * Emits an event {TreasuryUpdated}. + */ + function _setTreasury(address payable addr) internal { + if (addr == address(0)) revert NullAssignment(); + _treasury = addr; + emit TreasuryUpdated(addr); + } + + /** + * @dev Helper method to set bid gap ratio. + * + * Emits an event {BidGapRatioUpdated}. + */ + function _setBidGapRatio(uint256 ratio) internal { + if (ratio > MAX_PERCENTAGE) revert RatioIsTooLarge(); + _bidGapRatio = ratio; + emit BidGapRatioUpdated(ratio); + } + + /** + * @dev Helper method to get beat price. + */ + function _getBeatPrice(DomainAuction memory auction, EventRange memory range) + internal + view + returns (uint256 beatPrice) + { + beatPrice = Math.max(auction.startingPrice, auction.bid.price); + // Beats price increases if domain is already bided and the event is not yet ended. + if (auction.bid.price != 0 && !range.isEnded()) { + beatPrice += Math.mulDiv(auction.startingPrice, _bidGapRatio, MAX_PERCENTAGE); + } + } + + /** + * @dev Helper method to ensure event range is valid. + */ + function _requireValidEventRange(EventRange calldata range) internal view { + if (!(range.valid() && range.isNotYetStarted())) revert InvalidEventRange(); + } + + /** + * @dev Helper method to ensure the auction is not yet started or not created. + */ + function _requireNotStarted(bytes32 auctionId) internal view { + if (!_auctionRange[auctionId].isNotYetStarted()) revert EventIsNotCreatedOrAlreadyStarted(); + } +} diff --git a/src/RNSUnified.sol b/src/RNSUnified.sol index 134c1cba..65b60bd9 100644 --- a/src/RNSUnified.sol +++ b/src/RNSUnified.sol @@ -58,6 +58,11 @@ contract RNSUnified is Initializable, RNSToken { emit RecordUpdated(0x0, ModifyingField.Expiry.indicator(), record); } + /// @inheritdoc INSUnified + function namehash(string memory) external pure returns (bytes32 node) { + revert("TODO"); + } + /// @inheritdoc INSUnified function available(uint256 id) public view returns (bool) { return block.timestamp > LibSafeRange.add(_expiry(id), _gracePeriod); diff --git a/src/extensions/Multicallable.sol b/src/extensions/Multicallable.sol new file mode 100644 index 00000000..fc6f52b6 --- /dev/null +++ b/src/extensions/Multicallable.sol @@ -0,0 +1,52 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import { ERC165 } from "@openzeppelin/contracts/utils/introspection/ERC165.sol"; +import { IMulticallable } from "@rns-contracts/interfaces/IMulticallable.sol"; +import { ErrorHandler } from "@rns-contracts/libraries/ErrorHandler.sol"; + +abstract contract Multicallable is ERC165, IMulticallable { + using ErrorHandler for bool; + + /** + * @dev Override {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceID) public view virtual override returns (bool) { + return interfaceID == type(IMulticallable).interfaceId || super.supportsInterface(interfaceID); + } + + /** + * @inheritdoc IMulticallable + */ + function multicall(bytes[] calldata data) public override returns (bytes[] memory results) { + return _tryMulticall(true, data); + } + + /** + * @inheritdoc IMulticallable + */ + function tryMulticall(bool requireSuccess, bytes[] calldata data) public override returns (bytes[] memory results) { + return _tryMulticall(requireSuccess, data); + } + + /** + * @dev See {IMulticallable-tryMulticall}. + */ + function _tryMulticall(bool requireSuccess, bytes[] calldata data) internal returns (bytes[] memory results) { + uint256 length = data.length; + results = new bytes[](length); + + bool success; + bytes memory result; + + for (uint256 i; i < length;) { + (success, result) = address(this).delegatecall(data[i]); + if (requireSuccess) success.handleRevert(result); + results[i] = result; + + unchecked { + ++i; + } + } + } +} diff --git a/src/interfaces/IMulticallable.sol b/src/interfaces/IMulticallable.sol new file mode 100644 index 00000000..5e536433 --- /dev/null +++ b/src/interfaces/IMulticallable.sol @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.0; + +/** + * @notice To multi-call to a specified contract which has multicall interface: + * + * ```solidity + * interface IMock is IMulticallable { + * function foo() external; + * function bar() external; + * } + * + * bytes[] memory calldatas = new bytes[](2); + * calldatas[0] = abi.encodeCall(IMock.foo,()); + * calldatas[1] = abi.encodeCall(IMock.bar,()); + * IMock(target).multicall(calldatas); + * ``` + */ +interface IMulticallable { + /** + * @dev Executes bulk action to the original contract. + * Reverts if there is a single call failed. + * + * @param data The calldata to original contract. + * + */ + function multicall(bytes[] calldata data) external returns (bytes[] memory results); + + /** + * @dev Executes bulk action to the original contract. + * + * @param requireSuccess Flag to indicating whether the contract reverts if there is a single call failed. + * @param data The calldata to original contract. + * + */ + function tryMulticall(bool requireSuccess, bytes[] calldata data) external returns (bytes[] memory results); +} diff --git a/src/interfaces/INSUnified.sol b/src/interfaces/INSUnified.sol index 0863335f..9742ebab 100644 --- a/src/interfaces/INSUnified.sol +++ b/src/interfaces/INSUnified.sol @@ -104,6 +104,11 @@ interface INSUnified is IAccessControlEnumerable, IERC721Metadata { */ function MAX_EXPIRY() external pure returns (uint64); + /** + * @dev Returns the name hash output of a domain. + */ + function namehash(string memory domain) external pure returns (bytes32 node); + /** * @dev Returns true if the specified name is available for registration. * Note: Only available after passing the grace period. diff --git a/src/interfaces/IReverseRegistrar.sol b/src/interfaces/IReverseRegistrar.sol index f3fe2d1e..c40e25b3 100644 --- a/src/interfaces/IReverseRegistrar.sol +++ b/src/interfaces/IReverseRegistrar.sol @@ -1,4 +1,4 @@ -// SPDX-LicINSe-Identifier: UNLICINSED +// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; import { IERC165 } from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; diff --git a/src/interfaces/resolvers/IABIResolver.sol b/src/interfaces/resolvers/IABIResolver.sol new file mode 100644 index 00000000..678ef5f1 --- /dev/null +++ b/src/interfaces/resolvers/IABIResolver.sol @@ -0,0 +1,38 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +interface IABIResolver { + /// Thrown when the input content type is invalid. + error InvalidContentType(); + + /// @dev Emitted when the ABI is changed. + event ABIChanged(bytes32 indexed node, uint256 indexed contentType); + + /** + * @dev Sets the ABI associated with an INS node. Nodes may have one ABI of each content type. To remove an ABI, set it + * to the empty string. + * + * Requirements: + * - The method caller must be authorized to change user fields of RNS Token `node`. See indicator + * {ModifyingIndicator.USER_FIELDS_INDICATOR}. + * - The content type must be powers of 2. + * + * Emitted an event {ABIChanged}. + * + * @param node The node to update. + * @param contentType The content type of the ABI + * @param data The ABI data. + */ + function setABI(bytes32 node, uint256 contentType, bytes calldata data) external; + + /** + * @dev Returns the ABI associated with an INS node. + * Defined in EIP-205, see more at https://eips.ethereum.org/EIPS/eip-205 + * + * @param node The INS node to query + * @param contentTypes A bitwise OR of the ABI formats accepted by the caller. + * @return contentType The content type of the return value + * @return data The ABI data + */ + function ABI(bytes32 node, uint256 contentTypes) external view returns (uint256 contentType, bytes memory data); +} diff --git a/src/interfaces/resolvers/IAddressResolver.sol b/src/interfaces/resolvers/IAddressResolver.sol new file mode 100644 index 00000000..84c986fa --- /dev/null +++ b/src/interfaces/resolvers/IAddressResolver.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +interface IAddressResolver { + /// @dev Emitted when an address of a node is changed. + event AddrChanged(bytes32 indexed node, address addr); + + /** + * @dev Sets the address associated with an INS node. + * + * Requirement: + * - The method caller must be authorized to change user fields of RNS Token `node`. See indicator + * {ModifyingIndicator.USER_FIELDS_INDICATOR}. + * + * Emits an event {AddrChanged}. + * + * @param node The node to update. + * @param addr The address to set. + */ + function setAddr(bytes32 node, address addr) external; + + /** + * @dev Returns the address associated with an INS node. + * @param node The INS node to query. + * @return The associated address. + */ + function addr(bytes32 node) external view returns (address payable); +} diff --git a/src/interfaces/resolvers/IContentHashResolver.sol b/src/interfaces/resolvers/IContentHashResolver.sol new file mode 100644 index 00000000..7db60259 --- /dev/null +++ b/src/interfaces/resolvers/IContentHashResolver.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +interface IContentHashResolver { + /// @dev Emitted when the content hash of a node is changed. + event ContentHashChanged(bytes32 indexed node, bytes hash); + + /** + * @dev Sets the content hash associated with an INS node. + * + * Requirements: + * - The method caller must be authorized to change user fields of RNS Token `node`. See indicator + * {ModifyingIndicator.USER_FIELDS_INDICATOR}. + * + * Emits an event {ContentHashChanged}. + * + * @param node The node to update. + * @param hash The content hash to set + */ + function setContentHash(bytes32 node, bytes calldata hash) external; + + /** + * @dev Returns the content hash associated with an INS node. + * @param node The INS node to query. + * @return The associated content hash. + */ + function contentHash(bytes32 node) external view returns (bytes memory); +} diff --git a/src/interfaces/resolvers/IDNSRecordResolver.sol b/src/interfaces/resolvers/IDNSRecordResolver.sol new file mode 100644 index 00000000..97e5434e --- /dev/null +++ b/src/interfaces/resolvers/IDNSRecordResolver.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.4; + +interface IDNSRecordResolver { + /// @dev Emitted whenever a given node/name/resource's RRSET is updated. + event DNSRecordChanged(bytes32 indexed node, bytes name, uint16 resource, bytes record); + /// @dev Emitted whenever a given node/name/resource's RRSET is deleted. + event DNSRecordDeleted(bytes32 indexed node, bytes name, uint16 resource); + + /** + * @dev Set one or more DNS records. Records are supplied in wire-format. Records with the same node/name/resource + * must be supplied one after the other to ensure the data is updated correctly. For example, if the data was + * supplied: + * a.example.com IN A 1.2.3.4 + * a.example.com IN A 5.6.7.8 + * www.example.com IN CNAME a.example.com. + * then this would store the two A records for a.example.com correctly as a single RRSET, however if the data was + * supplied: + * a.example.com IN A 1.2.3.4 + * www.example.com IN CNAME a.example.com. + * a.example.com IN A 5.6.7.8 + * then this would store the first A record, the CNAME, then the second A record which would overwrite the first. + * + * Requirements: + * - The method caller must be authorized to change user fields of RNS Token `node`. See indicator + * {ModifyingIndicator.USER_FIELDS_INDICATOR}. + * + * @param node the namehash of the node for which to set the records + * @param data the DNS wire format records to set + */ + function setDNSRecords(bytes32 node, bytes calldata data) external; + + /** + * @dev Obtain a DNS record. + * @param node the namehash of the node for which to fetch the record + * @param name the keccak-256 hash of the fully-qualified name for which to fetch the record + * @param resource the ID of the resource as per https://en.wikipedia.org/wiki/List_of_DNS_record_types + * @return the DNS record in wire format if present, otherwise empty + */ + function dnsRecord(bytes32 node, bytes32 name, uint16 resource) external view returns (bytes memory); +} diff --git a/src/interfaces/resolvers/IDNSZoneResolver.sol b/src/interfaces/resolvers/IDNSZoneResolver.sol new file mode 100644 index 00000000..ea74e062 --- /dev/null +++ b/src/interfaces/resolvers/IDNSZoneResolver.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.4; + +interface IDNSZoneResolver { + /// @dev Emitted whenever a given node's zone hash is updated. + event DNSZonehashChanged(bytes32 indexed node, bytes lastzonehash, bytes zonehash); + + /** + * @dev Sets the hash for the zone. + * + * Requirements: + * - The method caller must be authorized to change user fields of RNS Token `node`. See indicator + * {ModifyingIndicator.USER_FIELDS_INDICATOR}. + * + * Emits an event {DNSZonehashChanged}. + * + * @param node The node to update. + * @param hash The zonehash to set + */ + function setZonehash(bytes32 node, bytes calldata hash) external; + + /** + * @dev Obtains the hash for the zone. + * @param node The INS node to query. + * @return The associated contenthash. + */ + function zonehash(bytes32 node) external view returns (bytes memory); +} diff --git a/src/interfaces/resolvers/IInterfaceResolver.sol b/src/interfaces/resolvers/IInterfaceResolver.sol new file mode 100644 index 00000000..e6f6018a --- /dev/null +++ b/src/interfaces/resolvers/IInterfaceResolver.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +interface IInterfaceResolver { + /// @dev Emitted when the interface of node is changed. + event InterfaceChanged(bytes32 indexed node, bytes4 indexed interfaceID, address implementer); + + /** + * @dev Sets an interface associated with a name. + * Setting the address to 0 restores the default behaviour of querying the contract at `addr()` for interface support. + * + * Requirements: + * - The method caller must be authorized to change user fields of RNS Token `node`. See indicator + * {ModifyingIndicator.USER_FIELDS_INDICATOR}. + * + * @param node The node to update. + * @param interfaceID The EIP 165 interface ID. + * @param implementer The address of a contract that implements this interface for this node. + */ + function setInterface(bytes32 node, bytes4 interfaceID, address implementer) external; + + /** + * @dev Returns the address of a contract that implements the specified interface for this name. + * + * If an implementer has not been set for this interfaceID and name, the resolver will query the contract at `addr()`. + * If `addr()` is set, a contract exists at that address, and that contract implements EIP165 and returns `true` for + * the specified interfaceID, its address will be returned. + * + * @param node The INS node to query. + * @param interfaceID The EIP 165 interface ID to check for. + * @return The address that implements this interface, or 0 if the interface is unsupported. + */ + function interfaceImplementer(bytes32 node, bytes4 interfaceID) external view returns (address); +} diff --git a/src/interfaces/resolvers/IPublicKeyResolver.sol b/src/interfaces/resolvers/IPublicKeyResolver.sol new file mode 100644 index 00000000..760aa454 --- /dev/null +++ b/src/interfaces/resolvers/IPublicKeyResolver.sol @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +interface IPublicKeyResolver { + struct PublicKey { + bytes32 x; + bytes32 y; + } + + /// @dev Emitted when a node public key is changed. + event PubkeyChanged(bytes32 indexed node, bytes32 x, bytes32 y); + + /** + * @dev Sets the SECP256k1 public key associated with an INS node. + * + * Requirements: + * - The method caller must be authorized to change user fields of RNS Token `node`. See indicator + * {ModifyingIndicator.USER_FIELDS_INDICATOR}. + * + * Emits an event {PubkeyChanged}. + * + * @param node The INS node to query + * @param x the X coordinate of the curve point for the public key. + * @param y the Y coordinate of the curve point for the public key. + */ + function setPubkey(bytes32 node, bytes32 x, bytes32 y) external; + + /** + * @dev Returns the SECP256k1 public key associated with an INS node. + * Defined in EIP 619. + * + * @param node The INS node to query + * @return x The X coordinate of the curve point for the public key. + * @return y The Y coordinate of the curve point for the public key. + */ + function pubkey(bytes32 node) external view returns (bytes32 x, bytes32 y); +} diff --git a/src/interfaces/resolvers/IPublicResolver.sol b/src/interfaces/resolvers/IPublicResolver.sol new file mode 100644 index 00000000..a2e0d67f --- /dev/null +++ b/src/interfaces/resolvers/IPublicResolver.sol @@ -0,0 +1,60 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { INSUnified } from "@rns-contracts/interfaces/INSUnified.sol"; +import { IReverseRegistrar } from "@rns-contracts/interfaces/IReverseRegistrar.sol"; +import { IABIResolver } from "./IABIResolver.sol"; +import { IAddressResolver } from "./IAddressResolver.sol"; +import { IContentHashResolver } from "./IContentHashResolver.sol"; +import { IDNSRecordResolver } from "./IDNSRecordResolver.sol"; +import { IDNSZoneResolver } from "./IDNSZoneResolver.sol"; +import { IInterfaceResolver } from "./IInterfaceResolver.sol"; +import { INameResolver } from "./INameResolver.sol"; +import { IPublicKeyResolver } from "./IPublicKeyResolver.sol"; +import { ITextResolver } from "./ITextResolver.sol"; +import { IMulticallable } from "../IMulticallable.sol"; + +interface IPublicResolver is + IABIResolver, + IAddressResolver, + IContentHashResolver, + IDNSRecordResolver, + IDNSZoneResolver, + IInterfaceResolver, + INameResolver, + IPublicKeyResolver, + ITextResolver, + IMulticallable +{ + /// @dev See {IERC1155-ApprovalForAll}. Logged when an operator is added or removed. + event ApprovalForAll(address indexed owner, address indexed operator, bool approved); + + /// @dev Logged when a delegate is approved or an approval is revoked. + event Approved(address owner, bytes32 indexed node, address indexed delegate, bool indexed approved); + + /** + * @dev Checks if an account is authorized to manage the resolution of a specific RNS node. + * @param node The RNS node. + * @param account The account address being checked for authorization. + * @return A boolean indicating whether the account is authorized. + */ + function isAuthorized(bytes32 node, address account) external view returns (bool); + + /** + * @dev Retrieves the RNSUnified associated with this resolver. + */ + function getRNSUnified() external view returns (INSUnified); + + /** + * @dev Retrieves the reverse registrar associated with this resolver. + */ + function getReverseRegistrar() external view returns (IReverseRegistrar); + + /** + * @dev This function provides an extra security check when called from privileged contracts (such as + * RONRegistrarController) that can set records on behalf of the node owners. + * + * Reverts if the node is not null but calldata is mismatched. + */ + function multicallWithNodeCheck(bytes32 node, bytes[] calldata data) external returns (bytes[] memory results); +} diff --git a/src/interfaces/resolvers/ITextResolver.sol b/src/interfaces/resolvers/ITextResolver.sol new file mode 100644 index 00000000..1408b4e4 --- /dev/null +++ b/src/interfaces/resolvers/ITextResolver.sol @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +interface ITextResolver { + /// @dev Emitted when a node text is changed. + event TextChanged(bytes32 indexed node, string indexed indexedKey, string key, string value); + + /** + * @dev Sets the text data associated with an INS node and key. + * + * Requirements: + * - The method caller must be authorized to change user fields of RNS Token `node`. See indicator + * {ModifyingIndicator.USER_FIELDS_INDICATOR}. + * + * Emits an event {TextChanged}. + * + * @param node The node to update. + * @param key The key to set. + * @param value The text data value to set. + */ + function setText(bytes32 node, string calldata key, string calldata value) external; + + /** + * Returns the text data associated with an INS node and key. + * @param node The INS node to query. + * @param key The text data key to query. + * @return The associated text data. + */ + function text(bytes32 node, string calldata key) external view returns (string memory); +} diff --git a/src/interfaces/resolvers/IVersionResolver.sol b/src/interfaces/resolvers/IVersionResolver.sol new file mode 100644 index 00000000..b88a3ebb --- /dev/null +++ b/src/interfaces/resolvers/IVersionResolver.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +interface IVersionResolver { + /// @dev Emitted when the version of a node is changed. + event VersionChanged(bytes32 indexed node, uint64 newVersion); + + /** + * @dev Increments the record version associated with an INS node. + * + * Requirements: + * - The method caller must be authorized to change user fields of RNS Token `node`. See indicator + * {ModifyingIndicator.USER_FIELDS_INDICATOR}. + * + * Emits an event {VersionChanged}. + * + * @param node The node to update. + */ + function clearRecords(bytes32 node) external; + + /** + * @dev Returns the latest version of a node. + */ + function recordVersions(bytes32 node) external view returns (uint64); +} diff --git a/src/libraries/ErrorHandler.sol b/src/libraries/ErrorHandler.sol new file mode 100644 index 00000000..5ea118d6 --- /dev/null +++ b/src/libraries/ErrorHandler.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +library ErrorHandler { + error ExternalCallFailed(); + + function handleRevert(bool status, bytes memory returnOrRevertData) internal pure { + assembly { + if iszero(status) { + let revertLength := mload(returnOrRevertData) + if iszero(iszero(revertLength)) { + // Start of revert data bytes. The 0x20 offset is always the same. + revert(add(returnOrRevertData, 0x20), revertLength) + } + + // revert ExternalCallFailed() + mstore(0x00, 0x350c20f1) + revert(0x1c, 0x04) + } + } + } +} diff --git a/src/libraries/transfers/RONTransferHelper.sol b/src/libraries/transfers/RONTransferHelper.sol new file mode 100644 index 00000000..2aa9bade --- /dev/null +++ b/src/libraries/transfers/RONTransferHelper.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; + +/** + * @title RONTransferHelper + */ +library RONTransferHelper { + using Strings for *; + + /** + * @dev Transfers RON and wraps result for the method caller to a recipient. + */ + function safeTransfer(address payable _to, uint256 _value) internal { + bool _success = send(_to, _value); + if (!_success) { + revert( + string.concat("TransferHelper: could not transfer RON to ", _to.toHexString(), " value ", _value.toHexString()) + ); + } + } + + /** + * @dev Returns whether the call was success. + * Note: this function should use with the `ReentrancyGuard`. + */ + function send(address payable _to, uint256 _value) internal returns (bool _success) { + (_success,) = _to.call{ value: _value }(new bytes(0)); + } +} diff --git a/src/resolvers/ABIResolvable.sol b/src/resolvers/ABIResolvable.sol new file mode 100644 index 00000000..5d9c6e05 --- /dev/null +++ b/src/resolvers/ABIResolvable.sol @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; +import "@rns-contracts/interfaces/resolvers/IABIResolver.sol"; +import "./BaseVersion.sol"; + +abstract contract ABIResolvable is IABIResolver, ERC165, BaseVersion { + /// @dev Gap for upgradeability. + uint256[50] private ____gap; + + /// @dev Mapping from version => node => content type => abi + mapping(uint64 version => mapping(bytes32 node => mapping(uint256 contentType => bytes abi))) internal _versionalAbi; + + /** + * @dev Override {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceID) public view virtual override(BaseVersion, ERC165) returns (bool) { + return interfaceID == type(IABIResolver).interfaceId || super.supportsInterface(interfaceID); + } + + /** + * @inheritdoc IABIResolver + */ + function ABI(bytes32 node, uint256 contentTypes) external view virtual override returns (uint256, bytes memory) { + mapping(uint256 contentType => bytes abi) storage abiSet = _versionalAbi[_recordVersion[node]][node]; + + for (uint256 contentType = 1; contentType <= contentTypes; contentType <<= 1) { + if ((contentType & contentTypes) != 0 && abiSet[contentType].length > 0) { + return (contentType, abiSet[contentType]); + } + } + + return (0, ""); + } + + /** + * @dev See {IABIResolver-setABI}. + */ + function _setABI(bytes32 node, uint256 contentType, bytes calldata data) internal { + if (((contentType - 1) & contentType) != 0) revert InvalidContentType(); + _versionalAbi[_recordVersion[node]][node][contentType] = data; + emit ABIChanged(node, contentType); + } +} diff --git a/src/resolvers/AddressResolvable.sol b/src/resolvers/AddressResolvable.sol new file mode 100644 index 00000000..65a46513 --- /dev/null +++ b/src/resolvers/AddressResolvable.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; +import "@rns-contracts/interfaces/resolvers/IAddressResolver.sol"; +import "./BaseVersion.sol"; + +abstract contract AddressResolvable is IAddressResolver, ERC165, BaseVersion { + /// @dev Gap for upgradeability. + uint256[50] private ____gap; + + /// @dev Mapping from version => node => address + mapping(uint64 version => mapping(bytes32 node => address addr)) internal _versionAddress; + + /** + * @dev Override {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceID) public view virtual override(BaseVersion, ERC165) returns (bool) { + return interfaceID == type(IAddressResolver).interfaceId || super.supportsInterface(interfaceID); + } + + /** + * @inheritdoc IAddressResolver + */ + function addr(bytes32 node) public view virtual override returns (address payable) { + return payable(_versionAddress[_recordVersion[node]][node]); + } + + /** + * @dev See {IAddressResolver-setAddr}. + */ + function _setAddr(bytes32 node, address addr_) internal { + emit AddrChanged(node, addr_); + _versionAddress[_recordVersion[node]][node] = addr_; + } +} diff --git a/src/resolvers/BaseVersion.sol b/src/resolvers/BaseVersion.sol new file mode 100644 index 00000000..4d8ba90e --- /dev/null +++ b/src/resolvers/BaseVersion.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; +import "@rns-contracts/interfaces/resolvers/IVersionResolver.sol"; + +abstract contract BaseVersion is IVersionResolver, ERC165 { + /// @dev Gap for upgradeability. + uint256[50] private ____gap; + + /// @dev Mapping from node => version + mapping(bytes32 node => uint64 version) internal _recordVersion; + + /** + * @dev Override {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceID) public view virtual override returns (bool) { + return interfaceID == type(IVersionResolver).interfaceId || super.supportsInterface(interfaceID); + } + + /** + * @inheritdoc IVersionResolver + */ + function recordVersions(bytes32 node) external view returns (uint64) { + return _recordVersion[node]; + } + + /** + * @dev See {IVersionResolver-clearRecords}. + */ + function _clearRecords(bytes32 node) internal { + unchecked { + emit VersionChanged(node, ++_recordVersion[node]); + } + } +} diff --git a/src/resolvers/ContentHashResolvable.sol b/src/resolvers/ContentHashResolvable.sol new file mode 100644 index 00000000..28a6f9be --- /dev/null +++ b/src/resolvers/ContentHashResolvable.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; +import "@rns-contracts/interfaces/resolvers/IContentHashResolver.sol"; +import "./BaseVersion.sol"; + +abstract contract ContentHashResolvable is IContentHashResolver, ERC165, BaseVersion { + /// @dev Gap for upgradeability. + uint256[50] private ____gap; + + /// @dev Mapping from version => node => content hash + mapping(uint64 version => mapping(bytes32 node => bytes contentHash)) internal _versionContentHash; + + /** + * @dev Override {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceID) public view virtual override(BaseVersion, ERC165) returns (bool) { + return interfaceID == type(IContentHashResolver).interfaceId || super.supportsInterface(interfaceID); + } + + /** + * @inheritdoc IContentHashResolver + */ + function contentHash(bytes32 node) external view virtual override returns (bytes memory) { + return _versionContentHash[_recordVersion[node]][node]; + } + + /** + * @dev See {IContentHashResolver-setContentHash}. + */ + function _setContentHash(bytes32 node, bytes calldata hash) internal { + _versionContentHash[_recordVersion[node]][node] = hash; + emit ContentHashChanged(node, hash); + } +} diff --git a/src/resolvers/DNSResolvable.sol b/src/resolvers/DNSResolvable.sol new file mode 100644 index 00000000..a8d59ca1 --- /dev/null +++ b/src/resolvers/DNSResolvable.sol @@ -0,0 +1,141 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; +import "@ensdomains/ens-contracts/dnssec-oracle/RRUtils.sol"; +import "@rns-contracts/interfaces/resolvers/IDNSRecordResolver.sol"; +import "@rns-contracts/interfaces/resolvers/IDNSZoneResolver.sol"; +import "./BaseVersion.sol"; + +abstract contract DNSResolvable is IDNSRecordResolver, IDNSZoneResolver, ERC165, BaseVersion { + using RRUtils for *; + using BytesUtils for bytes; + + /// @dev Gap for upgradeability. + uint256[50] private ____gap; + + /// @dev The records themselves. Stored as binary RRSETs. + mapping( + uint64 version => mapping(bytes32 node => mapping(bytes32 nameHash => mapping(uint16 resource => bytes data))) + ) private _versionRecord; + + /// @dev Count of number of entries for a given name. Required for DNS resolvers when resolving wildcards. + mapping(uint64 version => mapping(bytes32 node => mapping(bytes32 nameHash => uint16 count))) private + _versionNameEntriesCount; + + /** + * @dev Zone hashes for the domains. A zone hash is an EIP-1577 content hash in binary format that should point to a + * resource containing a single zonefile. + */ + mapping(uint64 version => mapping(bytes32 node => bytes data)) private _versionZonehash; + + /** + * @dev Override {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceID) public view virtual override(BaseVersion, ERC165) returns (bool) { + return interfaceID == type(IDNSRecordResolver).interfaceId || interfaceID == type(IDNSZoneResolver).interfaceId + || super.supportsInterface(interfaceID); + } + + /** + * @dev Checks whether a given node has records. + * @param node the namehash of the node for which to check the records + * @param name the namehash of the node for which to check the records + */ + function hasDNSRecords(bytes32 node, bytes32 name) public view virtual returns (bool) { + return (_versionNameEntriesCount[_recordVersion[node]][node][name] != 0); + } + + /** + * @inheritdoc IDNSRecordResolver + */ + function dnsRecord(bytes32 node, bytes32 name, uint16 resource) public view virtual override returns (bytes memory) { + return _versionRecord[_recordVersion[node]][node][name][resource]; + } + + /** + * @inheritdoc IDNSZoneResolver + */ + function zonehash(bytes32 node) external view virtual override returns (bytes memory) { + return _versionZonehash[_recordVersion[node]][node]; + } + + /** + * @dev See {IDNSRecordResolver-setDNSRecords}. + */ + function _setDNSRecords(bytes32 node, bytes calldata data) internal { + uint16 resource = 0; + uint256 offset = 0; + bytes memory name; + bytes memory value; + bytes32 nameHash; + uint64 version = _recordVersion[node]; + // Iterate over the data to add the resource records + for (RRUtils.RRIterator memory iter = data.iterateRRs(0); !iter.done(); iter.next()) { + if (resource == 0) { + resource = iter.dnstype; + name = iter.name(); + nameHash = keccak256(abi.encodePacked(name)); + value = bytes(iter.rdata()); + } else { + bytes memory newName = iter.name(); + if (resource != iter.dnstype || !name.equals(newName)) { + _setDNSRRSet(node, name, resource, data, offset, iter.offset - offset, value.length == 0, version); + resource = iter.dnstype; + offset = iter.offset; + name = newName; + nameHash = keccak256(name); + value = bytes(iter.rdata()); + } + } + } + + if (name.length > 0) { + _setDNSRRSet(node, name, resource, data, offset, data.length - offset, value.length == 0, version); + } + } + + /** + * @dev See {IDNSZoneResolver-setZonehash}. + */ + function _setZonehash(bytes32 node, bytes calldata hash) internal { + uint64 currentRecordVersion = _recordVersion[node]; + bytes memory oldhash = _versionZonehash[currentRecordVersion][node]; + _versionZonehash[currentRecordVersion][node] = hash; + emit DNSZonehashChanged(node, oldhash, hash); + } + + /** + * @dev Helper method to set DNS config. + * + * May emit an event {DNSRecordDeleted}. + * May emit an event {DNSRecordChanged}. + * + */ + function _setDNSRRSet( + bytes32 node, + bytes memory name, + uint16 resource, + bytes memory data, + uint256 offset, + uint256 size, + bool deleteRecord, + uint64 version + ) private { + bytes32 nameHash = keccak256(name); + bytes memory rrData = data.substring(offset, size); + if (deleteRecord) { + if (_versionRecord[version][node][nameHash][resource].length != 0) { + _versionNameEntriesCount[version][node][nameHash]--; + } + delete (_versionRecord[version][node][nameHash][resource]); + emit DNSRecordDeleted(node, name, resource); + } else { + if (_versionRecord[version][node][nameHash][resource].length == 0) { + _versionNameEntriesCount[version][node][nameHash]++; + } + _versionRecord[version][node][nameHash][resource] = rrData; + emit DNSRecordChanged(node, name, resource, rrData); + } + } +} diff --git a/src/resolvers/InterfaceResolvable.sol b/src/resolvers/InterfaceResolvable.sol new file mode 100644 index 00000000..84671603 --- /dev/null +++ b/src/resolvers/InterfaceResolvable.sol @@ -0,0 +1,68 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; +import { BaseVersion } from "./BaseVersion.sol"; +import { IInterfaceResolver } from "@rns-contracts/interfaces/resolvers/IInterfaceResolver.sol"; + +abstract contract InterfaceResolvable is IInterfaceResolver, ERC165, BaseVersion { + /// @dev Gap for upgradeability. + uint256[50] private ____gap; + + /// @dev Mapping from version => node => interfaceID => address + mapping(uint64 version => mapping(bytes32 node => mapping(bytes4 interfaceID => address addr))) internal + _versionInterface; + + /** + * @dev Override {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceID) public view virtual override(BaseVersion, ERC165) returns (bool) { + return interfaceID == type(IInterfaceResolver).interfaceId || super.supportsInterface(interfaceID); + } + + /** + * @inheritdoc IInterfaceResolver + */ + function interfaceImplementer(bytes32 node, bytes4 interfaceID) external view virtual override returns (address) { + address implementer = _versionInterface[_recordVersion[node]][node][interfaceID]; + if (implementer != address(0)) return implementer; + + address addrOfNode = addr(node); + if (addrOfNode == address(0)) return address(0); + + bool success; + bytes memory returnData; + + (success, returnData) = + addrOfNode.staticcall(abi.encodeCall(IERC165.supportsInterface, (type(IERC165).interfaceId))); + + // EIP 165 not supported by target + if (!_isValidReturnData(success, returnData)) return address(0); + + (success, returnData) = addrOfNode.staticcall(abi.encodeCall(IERC165.supportsInterface, (interfaceID))); + // Specified interface not supported by target + if (!_isValidReturnData(success, returnData)) return address(0); + + return addrOfNode; + } + + /** + * @dev See {IAddressResolver-addr}. + */ + function addr(bytes32 node) public view virtual returns (address payable); + + /** + * @dev Checks whether the return data is valid. + */ + function _isValidReturnData(bool success, bytes memory returnData) internal pure returns (bool) { + return success || returnData.length < 32 || returnData[31] == 0; + } + + /** + * @dev See {InterfaceResolver-setInterface}. + */ + function _setInterface(bytes32 node, bytes4 interfaceID, address implementer) internal virtual { + _versionInterface[_recordVersion[node]][node][interfaceID] = implementer; + emit InterfaceChanged(node, interfaceID, implementer); + } +} diff --git a/src/resolvers/NameResolvable.sol b/src/resolvers/NameResolvable.sol new file mode 100644 index 00000000..11b50824 --- /dev/null +++ b/src/resolvers/NameResolvable.sol @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { BaseVersion } from "./BaseVersion.sol"; +import { INameResolver } from "@rns-contracts/interfaces/resolvers/INameResolver.sol"; + +abstract contract NameResolvable is INameResolver, BaseVersion { + /// @dev Gap for upgradeability. + uint256[50] private ____gap; + + /// @dev mapping from version => node => name + mapping(uint64 version => mapping(bytes32 node => string name)) internal _versionName; + + /** + * @dev Override {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceID) public view virtual override returns (bool) { + return interfaceID == type(INameResolver).interfaceId || super.supportsInterface(interfaceID); + } + + /** + * @inheritdoc INameResolver + */ + function name(bytes32 node) public view virtual override returns (string memory) { + return _versionName[_recordVersion[node]][node]; + } + + /** + * @dev See {INameResolver-setName}. + */ + function _setName(bytes32 node, string memory newName) internal virtual { + _versionName[_recordVersion[node]][node] = newName; + emit NameChanged(node, newName); + } +} diff --git a/src/resolvers/PublicKeyResolvable.sol b/src/resolvers/PublicKeyResolvable.sol new file mode 100644 index 00000000..e2e26b64 --- /dev/null +++ b/src/resolvers/PublicKeyResolvable.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { BaseVersion } from "./BaseVersion.sol"; +import { IPublicKeyResolver } from "@rns-contracts/interfaces/resolvers/IPublicKeyResolver.sol"; + +abstract contract PublicKeyResolvable is BaseVersion, IPublicKeyResolver { + /// @dev Gap for upgradeability. + uint256[50] private ____gap; + + /// @dev Mapping from version => node => public key + mapping(uint64 version => mapping(bytes32 node => PublicKey publicKey)) internal _versionPublicKey; + + /** + * @dev Override {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceID) public view virtual override returns (bool) { + return interfaceID == type(IPublicKeyResolver).interfaceId || super.supportsInterface(interfaceID); + } + + /** + * @dev See {IPublicKeyResolver-pubkey}. + */ + function pubkey(bytes32 node) external view virtual override returns (bytes32 x, bytes32 y) { + uint64 currentRecordVersion = _recordVersion[node]; + return (_versionPublicKey[currentRecordVersion][node].x, _versionPublicKey[currentRecordVersion][node].y); + } + + /** + * @dev See {IPublicKeyResolver-setPubkey}. + */ + function _setPubkey(bytes32 node, bytes32 x, bytes32 y) internal virtual { + _versionPublicKey[_recordVersion[node]][node] = PublicKey(x, y); + emit PubkeyChanged(node, x, y); + } +} diff --git a/src/resolvers/PublicResolver.sol b/src/resolvers/PublicResolver.sol new file mode 100644 index 00000000..6f653816 --- /dev/null +++ b/src/resolvers/PublicResolver.sol @@ -0,0 +1,190 @@ +//SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; +import { IVersionResolver } from "@rns-contracts/interfaces/resolvers/IVersionResolver.sol"; +import { Multicallable } from "@rns-contracts/extensions/Multicallable.sol"; +import { USER_FIELDS_INDICATOR } from "../types/ModifyingIndicator.sol"; +import { ABIResolvable } from "./ABIResolvable.sol"; +import { AddressResolvable } from "./AddressResolvable.sol"; +import { ContentHashResolvable } from "./ContentHashResolvable.sol"; +import { DNSResolvable } from "./DNSResolvable.sol"; +import { InterfaceResolvable } from "./InterfaceResolvable.sol"; +import { NameResolvable } from "./NameResolvable.sol"; +import { PublicKeyResolvable } from "./PublicKeyResolvable.sol"; +import { TextResolvable } from "./TextResolvable.sol"; +import "@rns-contracts/interfaces/resolvers/IPublicResolver.sol"; + +/** + * @title Public Resolver + * @notice Customized version of PublicResolver: https://github.com/ensdomains/ens-contracts/blob/0c75ba23fae76165d51c9c80d76d22261e06179d/contracts/resolvers/PublicResolver.sol + * @dev A simple resolver anyone can use, only allows the owner of a node to set its address. + */ +contract PublicResolver is + IPublicResolver, + ABIResolvable, + AddressResolvable, + ContentHashResolvable, + DNSResolvable, + InterfaceResolvable, + NameResolvable, + PublicKeyResolvable, + TextResolvable, + Multicallable, + Initializable +{ + /// @dev Gap for upgradeability. + uint256[50] private ____gap; + + /// @dev The RNS Unified contract + INSUnified internal _rnsUnified; + + /// @dev The reverse registrar contract + IReverseRegistrar internal _reverseRegistrar; + + modifier onlyAuthorized(bytes32 node) { + _requireAuthorized(node, msg.sender); + _; + } + + constructor() payable { + _disableInitializers(); + } + + function initialize(INSUnified rnsUnified, IReverseRegistrar reverseRegistrar) external initializer { + _rnsUnified = rnsUnified; + _reverseRegistrar = reverseRegistrar; + } + + /** + * @dev Override {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceID) + public + view + override( + ABIResolvable, + AddressResolvable, + ContentHashResolvable, + DNSResolvable, + InterfaceResolvable, + NameResolvable, + PublicKeyResolvable, + TextResolvable, + Multicallable + ) + returns (bool) + { + return super.supportsInterface(interfaceID); + } + + /// @inheritdoc IPublicResolver + function getRNSUnified() external view returns (INSUnified) { + return _rnsUnified; + } + + /// @inheritdoc IPublicResolver + function getReverseRegistrar() external view returns (IReverseRegistrar) { + return _reverseRegistrar; + } + + /// @inheritdoc IPublicResolver + function multicallWithNodeCheck(bytes32 node, bytes[] calldata data) + external + override + returns (bytes[] memory results) + { + if (node != 0) { + for (uint256 i; i < data.length;) { + require(node == bytes32(data[i][4:36]), "PublicResolver: All records must have a matching namehash"); + unchecked { + ++i; + } + } + } + + return _tryMulticall(true, data); + } + + /// @inheritdoc IVersionResolver + function clearRecords(bytes32 node) external onlyAuthorized(node) { + _clearRecords(node); + } + + /// @inheritdoc IABIResolver + function setABI(bytes32 node, uint256 contentType, bytes calldata data) external onlyAuthorized(node) { + _setABI(node, contentType, data); + } + + /// @inheritdoc IAddressResolver + function setAddr(bytes32 node, address addr_) external onlyAuthorized(node) { + revert("PublicResolver: Cannot set address"); + _setAddr(node, addr_); + } + + /// @inheritdoc IContentHashResolver + function setContentHash(bytes32 node, bytes calldata hash) external onlyAuthorized(node) { + _setContentHash(node, hash); + } + + /// @inheritdoc IDNSRecordResolver + function setDNSRecords(bytes32 node, bytes calldata data) external onlyAuthorized(node) { + _setDNSRecords(node, data); + } + + /// @inheritdoc IDNSZoneResolver + function setZonehash(bytes32 node, bytes calldata hash) external onlyAuthorized(node) { + _setZonehash(node, hash); + } + + /// @inheritdoc IInterfaceResolver + function setInterface(bytes32 node, bytes4 interfaceID, address implementer) external onlyAuthorized(node) { + _setInterface(node, interfaceID, implementer); + } + + /// @inheritdoc INameResolver + function setName(bytes32 node, string calldata newName) external onlyAuthorized(node) { + _setName(node, newName); + } + + /// @inheritdoc IPublicKeyResolver + function setPubkey(bytes32 node, bytes32 x, bytes32 y) external onlyAuthorized(node) { + _setPubkey(node, x, y); + } + + /// @inheritdoc ITextResolver + function setText(bytes32 node, string calldata key, string calldata value) external onlyAuthorized(node) { + _setText(node, key, value); + } + + /// @inheritdoc IPublicResolver + function isAuthorized(bytes32 node, address account) public view returns (bool authorized) { + (authorized,) = _rnsUnified.canSetRecord(account, uint256(node), USER_FIELDS_INDICATOR); + } + + /// @dev Override {IAddressResolvable-addr}. + function addr(bytes32 node) + public + view + virtual + override(AddressResolvable, IAddressResolver, InterfaceResolvable) + returns (address payable) + { + return payable(_rnsUnified.ownerOf(uint256(node))); + } + + /// @dev Override {INameResolver-name}. + function name(bytes32 node) public view virtual override(INameResolver, NameResolvable) returns (string memory) { + address reversedAddress = _reverseRegistrar.getAddress(node); + string memory domainName = super.name(node); + uint256 tokenId = uint256(_rnsUnified.namehash(domainName)); + return _rnsUnified.ownerOf(tokenId) == reversedAddress ? domainName : ""; + } + + /** + * @dev Reverts if the msg sender is not authorized. + */ + function _requireAuthorized(bytes32 node, address account) internal view { + require(isAuthorized(node, account), "PublicResolver: unauthorized caller"); + } +} diff --git a/src/resolvers/TextResolvable.sol b/src/resolvers/TextResolvable.sol new file mode 100644 index 00000000..92b0290c --- /dev/null +++ b/src/resolvers/TextResolvable.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { BaseVersion } from "./BaseVersion.sol"; +import { ITextResolver } from "@rns-contracts/interfaces/resolvers/ITextResolver.sol"; + +abstract contract TextResolvable is BaseVersion, ITextResolver { + /// @dev Gap for upgradeability. + uint256[50] private ____gap; + /// @dev Mapping from version => node => key => text + mapping(uint64 version => mapping(bytes32 node => mapping(string key => string text))) internal _versionText; + + /** + * @dev Override {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceID) public view virtual override returns (bool) { + return interfaceID == type(ITextResolver).interfaceId || super.supportsInterface(interfaceID); + } + + /** + * @inheritdoc ITextResolver + */ + function text(bytes32 node, string calldata key) external view virtual override returns (string memory) { + return _versionText[_recordVersion[node]][node][key]; + } + + /** + * @dev See {ITextResolver-setText}. + */ + function _setText(bytes32 node, string calldata key, string calldata value) internal virtual { + _versionText[_recordVersion[node]][node][key] = value; + emit TextChanged(node, key, key, value); + } +} From 80d4738acb7d44a4f6dd4798702761595fe6b299 Mon Sep 17 00:00:00 2001 From: Duc Tho Tran Date: Thu, 12 Oct 2023 17:22:29 +0700 Subject: [PATCH 05/27] chore: resolve confict --- .gitmodules | 3 +++ remappings.txt | 1 + src/libraries/LibRNSDomain.sol | 31 +++++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+) diff --git a/.gitmodules b/.gitmodules index 8fa5be48..853782e5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,3 +13,6 @@ [submodule "lib/buffer"] path = lib/buffer url = https://github.com/ensdomains/buffer +[submodule "lib/pyth-sdk-solidity"] + path = lib/pyth-sdk-solidity + url = https://github.com/pyth-network/pyth-sdk-solidity diff --git a/remappings.txt b/remappings.txt index 1873e138..c7a9b45f 100644 --- a/remappings.txt +++ b/remappings.txt @@ -5,3 +5,4 @@ forge-std/=lib/forge-std/src/ contract-template/=lib/contract-template/src/ @ensdomains/ens-contracts/=lib/ens-contracts/contracts/ @ensdomains/buffer/=lib/buffer/ +@pythnetwork/=lib/pyth-sdk-solidity/ diff --git a/src/libraries/LibRNSDomain.sol b/src/libraries/LibRNSDomain.sol index 9baf281b..5ced21a7 100644 --- a/src/libraries/LibRNSDomain.sol +++ b/src/libraries/LibRNSDomain.sol @@ -21,4 +21,35 @@ library LibRNSDomain { hashed := keccak256(add(label, 32), mload(label)) } } + + /** + * @dev Returns the length of a given string + * + * @param s The string to measure the length of + * @return The length of the input string + */ + function strlen(string memory s) internal pure returns (uint256) { + unchecked { + uint256 i; + uint256 len; + uint256 bytelength = bytes(s).length; + for (len; i < bytelength; len++) { + bytes1 b = bytes(s)[i]; + if (b < 0x80) { + i += 1; + } else if (b < 0xE0) { + i += 2; + } else if (b < 0xF0) { + i += 3; + } else if (b < 0xF8) { + i += 4; + } else if (b < 0xFC) { + i += 5; + } else { + i += 6; + } + } + return len; + } + } } From 0ddf63120baa981279d4c7e8d0b3f380b73d15f1 Mon Sep 17 00:00:00 2001 From: Tu Do Date: Fri, 13 Oct 2023 11:21:18 +0700 Subject: [PATCH 06/27] feat: return tax price in `RNSDomainPrice` (#34) * feat: return usdTax and ronTax * feat: use struct --- src/RNSDomainPrice.sol | 11 ++++++----- src/interfaces/INSDomainPrice.sol | 7 ++++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/RNSDomainPrice.sol b/src/RNSDomainPrice.sol index 382d14c3..ba64d3e3 100644 --- a/src/RNSDomainPrice.sol +++ b/src/RNSDomainPrice.sol @@ -240,24 +240,25 @@ contract RNSDomainPrice is Initializable, AccessControlEnumerable, INSDomainPric function getRenewalFee(string memory label, uint256 duration) public view - returns (uint256 usdPrice, uint256 ronPrice) + returns (UnitPrice memory basePrice, UnitPrice memory tax) { uint256 nameLen = label.strlen(); bytes32 lbHash = label.hashLabel(); uint256 overriddenRenewalFee = _rnFeeOverriding[lbHash]; if (overriddenRenewalFee != 0) { - usdPrice = duration * ~overriddenRenewalFee; + basePrice.usd = duration * ~overriddenRenewalFee; } else { uint256 renewalFeeByLength = _rnFee[Math.min(nameLen, _rnfMaxLength)]; - usdPrice = duration * renewalFeeByLength; + basePrice.usd = duration * renewalFeeByLength; // tax is added of name is reserved for auction if (_auction.reserved(LibRNSDomain.toId(LibRNSDomain.RON_ID, label))) { - usdPrice += Math.mulDiv(_taxRatio, _getDomainPrice(lbHash), MAX_PERCENTAGE); + tax.usd = Math.mulDiv(_taxRatio, _getDomainPrice(lbHash), MAX_PERCENTAGE); } } - ronPrice = convertUSDToRON(usdPrice); + tax.ron = convertUSDToRON(tax.usd); + basePrice.ron = convertUSDToRON(basePrice.usd); } /** diff --git a/src/interfaces/INSDomainPrice.sol b/src/interfaces/INSDomainPrice.sol index b543c1d1..735a97fd 100644 --- a/src/interfaces/INSDomainPrice.sol +++ b/src/interfaces/INSDomainPrice.sol @@ -13,6 +13,11 @@ interface INSDomainPrice { uint256 fee; } + struct UnitPrice { + uint256 usd; + uint256 ron; + } + /// @dev Emitted when the renewal reservation ratio is updated. event TaxRatioUpdated(address indexed operator, uint256 indexed ratio); /// @dev Emitted when the maximum length of renewal fee is updated. @@ -111,7 +116,7 @@ interface INSDomainPrice { function getRenewalFee(string calldata label, uint256 duration) external view - returns (uint256 usdPrice, uint256 ronPrice); + returns (UnitPrice memory basePrice, UnitPrice memory tax); /** * @dev Returns the renewal fee of a label. Reverts if not overridden. From 8425f063c90c173d9a6e0d0a45ebeafe88066e8c Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Fri, 13 Oct 2023 18:38:42 +0700 Subject: [PATCH 07/27] feat: allow maintain reservation status for ids listed in auction contract --- src/RNSAuction.sol | 26 +++++++++++++++++++++++++- src/interfaces/INSAuction.sol | 14 ++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/src/RNSAuction.sol b/src/RNSAuction.sol index f95b7a65..00f77989 100644 --- a/src/RNSAuction.sol +++ b/src/RNSAuction.sol @@ -4,6 +4,7 @@ pragma solidity ^0.8.19; import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import { AccessControlEnumerable } from "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; import { Math } from "@openzeppelin/contracts/utils/math/Math.sol"; +import { BitMaps } from "@openzeppelin/contracts/utils/structs/BitMaps.sol"; import { INSUnified, INSAuction } from "./interfaces/INSAuction.sol"; import { LibSafeRange } from "./libraries/math/LibSafeRange.sol"; import { LibRNSDomain } from "./libraries/LibRNSDomain.sol"; @@ -12,6 +13,7 @@ import { RONTransferHelper } from "./libraries/transfers/RONTransferHelper.sol"; contract RNSAuction is Initializable, AccessControlEnumerable, INSAuction { using LibSafeRange for uint256; + using BitMaps for BitMaps.BitMap; using LibEventRange for EventRange; /// @inheritdoc INSAuction @@ -37,6 +39,8 @@ contract RNSAuction is Initializable, AccessControlEnumerable, INSAuction { address payable internal _treasury; /// @dev The gap ratio between 2 bids with the starting price. uint256 internal _bidGapRatio; + /// @dev Mapping from id => bool reserved status + BitMaps.BitMap internal _reserved; modifier whenNotStarted(bytes32 auctionId) { _requireNotStarted(auctionId); @@ -90,18 +94,38 @@ contract RNSAuction is Initializable, AccessControlEnumerable, INSAuction { for (uint256 i; i < length;) { (, ids[i]) = rnsUnified.mint(parentId, labels[i], address(0x0), address(this), domainExpiryDuration); + _reserved.set(ids[i]); unchecked { ++i; } } + + emit ReservedIdsUpdated(_msgSender(), ids, true); } /** * @inheritdoc INSAuction */ function reserved(uint256 id) public view returns (bool) { - return _rnsUnified.ownerOf(id) == address(this); + return _reserved.get(id); + } + + /** + * @inheritdoc INSAuction + */ + function setReservedIdsStatus(uint256[] calldata ids, bool shouldSet) external onlyRole(OPERATOR_ROLE) { + uint256 length = ids.length; + + for (uint256 i; i < length;) { + _reserved.setTo(ids[i], shouldSet); + + unchecked { + ++i; + } + } + + emit ReservedIdsUpdated(_msgSender(), ids, shouldSet); } /** diff --git a/src/interfaces/INSAuction.sol b/src/interfaces/INSAuction.sol index 878b914b..8b6e7b51 100644 --- a/src/interfaces/INSAuction.sol +++ b/src/interfaces/INSAuction.sol @@ -48,6 +48,8 @@ interface INSAuction { event TreasuryUpdated(address indexed addr); /// @dev Emitted when bid gap ratio is updated. event BidGapRatioUpdated(uint256 ratio); + /// @dev Emitted when operator update ids reservation status. + event ReservedIdsUpdated(address indexed operator, uint256[] ids, bool shouldSet); /** * @dev The maximum expiry duration @@ -69,6 +71,18 @@ interface INSAuction { */ function DOMAIN_EXPIRY_DURATION() external pure returns (uint64); + /** + * @dev Set ids reservation status. + * + * Requirements: + * - The method caller must be contract operator. + * + * @param ids The id corresponding for namehash of domain names + * @param shouldSet Boolean indicate whether ids should be reserved or not + * Emit an event {ReservedIdsUpdated}. + */ + function setReservedIdsStatus(uint256[] calldata ids, bool shouldSet) external; + /** * @dev Claims domain names for auction. * From b09eb661fb25cf955c8855926a5b8d83f6e1872c Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Fri, 13 Oct 2023 18:45:59 +0700 Subject: [PATCH 08/27] feat: remove setter and event --- src/RNSAuction.sol | 19 ------------------- src/interfaces/INSAuction.sol | 14 -------------- 2 files changed, 33 deletions(-) diff --git a/src/RNSAuction.sol b/src/RNSAuction.sol index 00f77989..bb0467bf 100644 --- a/src/RNSAuction.sol +++ b/src/RNSAuction.sol @@ -100,8 +100,6 @@ contract RNSAuction is Initializable, AccessControlEnumerable, INSAuction { ++i; } } - - emit ReservedIdsUpdated(_msgSender(), ids, true); } /** @@ -111,23 +109,6 @@ contract RNSAuction is Initializable, AccessControlEnumerable, INSAuction { return _reserved.get(id); } - /** - * @inheritdoc INSAuction - */ - function setReservedIdsStatus(uint256[] calldata ids, bool shouldSet) external onlyRole(OPERATOR_ROLE) { - uint256 length = ids.length; - - for (uint256 i; i < length;) { - _reserved.setTo(ids[i], shouldSet); - - unchecked { - ++i; - } - } - - emit ReservedIdsUpdated(_msgSender(), ids, shouldSet); - } - /** * @inheritdoc INSAuction */ diff --git a/src/interfaces/INSAuction.sol b/src/interfaces/INSAuction.sol index 8b6e7b51..878b914b 100644 --- a/src/interfaces/INSAuction.sol +++ b/src/interfaces/INSAuction.sol @@ -48,8 +48,6 @@ interface INSAuction { event TreasuryUpdated(address indexed addr); /// @dev Emitted when bid gap ratio is updated. event BidGapRatioUpdated(uint256 ratio); - /// @dev Emitted when operator update ids reservation status. - event ReservedIdsUpdated(address indexed operator, uint256[] ids, bool shouldSet); /** * @dev The maximum expiry duration @@ -71,18 +69,6 @@ interface INSAuction { */ function DOMAIN_EXPIRY_DURATION() external pure returns (uint64); - /** - * @dev Set ids reservation status. - * - * Requirements: - * - The method caller must be contract operator. - * - * @param ids The id corresponding for namehash of domain names - * @param shouldSet Boolean indicate whether ids should be reserved or not - * Emit an event {ReservedIdsUpdated}. - */ - function setReservedIdsStatus(uint256[] calldata ids, bool shouldSet) external; - /** * @dev Claims domain names for auction. * From 7c997bab0b44db55f3d898a42425af2fe825cf8a Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Sat, 14 Oct 2023 12:14:25 +0700 Subject: [PATCH 09/27] fix: fix operator not assigned in RNSDomainPrice::initialize --- src/RNSDomainPrice.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RNSDomainPrice.sol b/src/RNSDomainPrice.sol index 9679e04f..cf8e64e2 100644 --- a/src/RNSDomainPrice.sol +++ b/src/RNSDomainPrice.sol @@ -67,7 +67,7 @@ contract RNSDomainPrice is Initializable, AccessControlEnumerable, INSDomainPric bytes32 pythIdForRONUSD ) external initializer { uint256 length = operators.length; - bytes32 operatorRole; + bytes32 operatorRole = OPERATOR_ROLE; for (uint256 i; i < length;) { _setupRole(operatorRole, operators[i]); From 53277d94959cfd11e007ece4438ecb11694bd4e7 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Fri, 20 Oct 2023 18:08:52 +0700 Subject: [PATCH 10/27] feat: add expiry check --- src/RNSDomainPrice.sol | 14 ++++++++++++-- src/interfaces/INSDomainPrice.sol | 6 ++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/RNSDomainPrice.sol b/src/RNSDomainPrice.sol index 5ae85f64..8d4c85c7 100644 --- a/src/RNSDomainPrice.sol +++ b/src/RNSDomainPrice.sol @@ -5,10 +5,12 @@ import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable import { AccessControlEnumerable } from "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; import { Math } from "@openzeppelin/contracts/utils/math/Math.sol"; import { IPyth, PythStructs } from "@pythnetwork/IPyth.sol"; +import { INSUnified } from "./interfaces/INSUnified.sol"; import { INSAuction } from "./interfaces/INSAuction.sol"; import { INSDomainPrice } from "./interfaces/INSDomainPrice.sol"; import { PeriodScaler, LibPeriodScaler, Math } from "./libraries/math/PeriodScalingUtils.sol"; import { TimestampWrapper } from "./libraries/TimestampWrapperUtils.sol"; +import { LibSafeRange } from "./libraries/math/LibSafeRange.sol"; import { LibString } from "./libraries/LibString.sol"; import { LibRNSDomain } from "./libraries/LibRNSDomain.sol"; import { PythConverter } from "./libraries/pyth/PythConverter.sol"; @@ -25,6 +27,8 @@ contract RNSDomainPrice is Initializable, AccessControlEnumerable, INSDomainPric uint64 public constant MAX_PERCENTAGE = 100_00; /// @inheritdoc INSDomainPrice bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); + /// @inheritdoc INSDomainPrice + uint64 public constant MAX_AUCTION_DOMAIN_EXPIRY = 365 days * 3; /// @dev Gap for upgradeability. uint256[50] private ____gap; @@ -253,8 +257,14 @@ contract RNSDomainPrice is Initializable, AccessControlEnumerable, INSDomainPric } else { uint256 renewalFeeByLength = _rnFee[Math.min(nameLen, _rnfMaxLength)]; basePrice.usd = duration * renewalFeeByLength; - // tax is added of name is reserved for auction - if (_auction.reserved(LibRNSDomain.toId(LibRNSDomain.RON_ID, label))) { + uint256 id = LibRNSDomain.toId(LibRNSDomain.RON_ID, label); + INSAuction auction = _auction; + if (auction.reserved(id)) { + INSUnified rns = auction.getRNSUnified(); + uint256 expiry = + uint64(LibSafeRange.addWithUpperbound(rns.getRecord(id).mut.expiry, duration, type(uint64).max)); + if (expiry - block.timestamp > MAX_AUCTION_DOMAIN_EXPIRY) revert ExceedAuctionDomainExpiry(); + // tax is added of name is reserved for auction tax.usd = Math.mulDiv(_taxRatio, _getDomainPrice(lbHash), MAX_PERCENTAGE); } } diff --git a/src/interfaces/INSDomainPrice.sol b/src/interfaces/INSDomainPrice.sol index 735a97fd..ef35de30 100644 --- a/src/interfaces/INSDomainPrice.sol +++ b/src/interfaces/INSDomainPrice.sol @@ -7,6 +7,7 @@ import { IPyth } from "@pythnetwork/IPyth.sol"; interface INSDomainPrice { error InvalidArrayLength(); error RenewalFeeIsNotOverriden(); + error ExceedAuctionDomainExpiry(); struct RenewalFee { uint256 labelLength; @@ -39,6 +40,11 @@ interface INSDomainPrice { address indexed operator, IPyth indexed pyth, uint256 maxAcceptableAge, bytes32 indexed pythIdForRONUSD ); + /** + * @dev The maximum expiry duration of a domain after transferring to bidder. + */ + function MAX_AUCTION_DOMAIN_EXPIRY() external pure returns (uint64); + /** * @dev Returns the Pyth oracle config. */ From 68d8d9ab2b263d600be72d16b31a48d673749374 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Sat, 21 Oct 2023 22:57:37 +0700 Subject: [PATCH 11/27] feat: update logic & migration script --- .../20231021_UpgradeDomainPriceAndAuction.s..sol | 12 ++++++++++++ src/RNSAuction.sol | 9 ++++----- src/RNSDomainPrice.sol | 11 +++++++---- src/interfaces/INSAuction.sol | 4 ++-- src/interfaces/INSDomainPrice.sol | 2 +- 5 files changed, 26 insertions(+), 12 deletions(-) create mode 100644 script/20231021-upgrade-domain-price-and-auction/20231021_UpgradeDomainPriceAndAuction.s..sol diff --git a/script/20231021-upgrade-domain-price-and-auction/20231021_UpgradeDomainPriceAndAuction.s..sol b/script/20231021-upgrade-domain-price-and-auction/20231021_UpgradeDomainPriceAndAuction.s..sol new file mode 100644 index 00000000..ca410c29 --- /dev/null +++ b/script/20231021-upgrade-domain-price-and-auction/20231021_UpgradeDomainPriceAndAuction.s..sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { ContractKey } from "foundry-deployment-kit/configs/ContractConfig.sol"; +import { RNSDeploy } from "script/RNSDeploy.s.sol"; + +contract Migration__20231021_UpgradeDomainPriceAndAuction is RNSDeploy { + function run() public trySetUp { + _upgradeProxy(ContractKey.RNSAuction, EMPTY_ARGS); + _upgradeProxy(ContractKey.RNSDomainPrice, EMPTY_ARGS); + } +} diff --git a/src/RNSAuction.sol b/src/RNSAuction.sol index bb0467bf..6607ba87 100644 --- a/src/RNSAuction.sol +++ b/src/RNSAuction.sol @@ -27,7 +27,6 @@ contract RNSAuction is Initializable, AccessControlEnumerable, INSAuction { /// @dev Gap for upgradeability. uint256[50] private ____gap; - /// @dev The RNSUnified contract. INSUnified internal _rnsUnified; /// @dev Mapping from auction Id => event range @@ -207,13 +206,13 @@ contract RNSAuction is Initializable, AccessControlEnumerable, INSAuction { /** * @inheritdoc INSAuction */ - function bulkClaimBidNames(uint256[] calldata ids) external returns (bool[] memory claimeds) { + function bulkClaimBidNames(uint256[] calldata ids) external returns (uint256[] memory claimedAts) { uint256 id; uint256 accumulatedRON; EventRange memory range; DomainAuction memory auction; uint256 length = ids.length; - claimeds = new bool[](length); + claimedAts = new uint256[](length); INSUnified rnsUnified = _rnsUnified; uint64 expiry = uint64(block.timestamp.addWithUpperbound(DOMAIN_EXPIRY_DURATION, MAX_EXPIRY)); @@ -222,7 +221,7 @@ contract RNSAuction is Initializable, AccessControlEnumerable, INSAuction { auction = _domainAuction[id]; range = _auctionRange[auction.auctionId]; - if (!auction.bid.claimed) { + if (auction.bid.claimedAt == 0) { if (!range.isEnded()) revert NotYetEnded(); if (auction.bid.timestamp == 0) revert NoOneBidded(); @@ -230,7 +229,7 @@ contract RNSAuction is Initializable, AccessControlEnumerable, INSAuction { rnsUnified.setExpiry(id, expiry); rnsUnified.transferFrom(address(this), auction.bid.bidder, id); - _domainAuction[id].bid.claimed = claimeds[i] = true; + _domainAuction[id].bid.claimedAt = claimedAts[i] = block.timestamp; } unchecked { diff --git a/src/RNSDomainPrice.sol b/src/RNSDomainPrice.sol index 8d4c85c7..d57feefb 100644 --- a/src/RNSDomainPrice.sol +++ b/src/RNSDomainPrice.sol @@ -27,7 +27,7 @@ contract RNSDomainPrice is Initializable, AccessControlEnumerable, INSDomainPric uint64 public constant MAX_PERCENTAGE = 100_00; /// @inheritdoc INSDomainPrice bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); - /// @inheritdoc INSDomainPrice + /// @inheritdoc INSDomainPrice uint64 public constant MAX_AUCTION_DOMAIN_EXPIRY = 365 days * 3; /// @dev Gap for upgradeability. @@ -261,9 +261,12 @@ contract RNSDomainPrice is Initializable, AccessControlEnumerable, INSDomainPric INSAuction auction = _auction; if (auction.reserved(id)) { INSUnified rns = auction.getRNSUnified(); - uint256 expiry = - uint64(LibSafeRange.addWithUpperbound(rns.getRecord(id).mut.expiry, duration, type(uint64).max)); - if (expiry - block.timestamp > MAX_AUCTION_DOMAIN_EXPIRY) revert ExceedAuctionDomainExpiry(); + uint256 expiry = LibSafeRange.addWithUpperbound(rns.getRecord(id).mut.expiry, duration, type(uint64).max); + (INSAuction.DomainAuction memory domainAuction,) = auction.getAuction(id); + uint256 claimedAt = domainAuction.bid.claimedAt; + if (claimedAt != 0 && expiry - claimedAt > MAX_AUCTION_DOMAIN_EXPIRY) { + revert ExceedAuctionDomainExpiry(); + } // tax is added of name is reserved for auction tax.usd = Math.mulDiv(_taxRatio, _getDomainPrice(lbHash), MAX_PERCENTAGE); } diff --git a/src/interfaces/INSAuction.sol b/src/interfaces/INSAuction.sol index 878b914b..d4167e6d 100644 --- a/src/interfaces/INSAuction.sol +++ b/src/interfaces/INSAuction.sol @@ -22,7 +22,7 @@ interface INSAuction { address payable bidder; uint256 price; uint256 timestamp; - bool claimed; + uint256 claimedAt; } struct DomainAuction { @@ -161,7 +161,7 @@ interface INSAuction { * * @param ids The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron' */ - function bulkClaimBidNames(uint256[] calldata ids) external returns (bool[] memory claimeds); + function bulkClaimBidNames(uint256[] calldata ids) external returns (uint256[] memory claimedAts); /** * @dev Returns the treasury. diff --git a/src/interfaces/INSDomainPrice.sol b/src/interfaces/INSDomainPrice.sol index ef35de30..7cc52f45 100644 --- a/src/interfaces/INSDomainPrice.sol +++ b/src/interfaces/INSDomainPrice.sol @@ -40,7 +40,7 @@ interface INSDomainPrice { address indexed operator, IPyth indexed pyth, uint256 maxAcceptableAge, bytes32 indexed pythIdForRONUSD ); - /** + /** * @dev The maximum expiry duration of a domain after transferring to bidder. */ function MAX_AUCTION_DOMAIN_EXPIRY() external pure returns (uint64); From f3f590d9085276dd2110d24cdbf97131d2eb800a Mon Sep 17 00:00:00 2001 From: Tu Do Date: Sat, 21 Oct 2023 22:57:53 +0700 Subject: [PATCH 12/27] Update src/RNSDomainPrice.sol Co-authored-by: Duke.ron --- src/RNSDomainPrice.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RNSDomainPrice.sol b/src/RNSDomainPrice.sol index d57feefb..c9776665 100644 --- a/src/RNSDomainPrice.sol +++ b/src/RNSDomainPrice.sol @@ -267,7 +267,7 @@ contract RNSDomainPrice is Initializable, AccessControlEnumerable, INSDomainPric if (claimedAt != 0 && expiry - claimedAt > MAX_AUCTION_DOMAIN_EXPIRY) { revert ExceedAuctionDomainExpiry(); } - // tax is added of name is reserved for auction + // Tax is added to the name reserved for the auction tax.usd = Math.mulDiv(_taxRatio, _getDomainPrice(lbHash), MAX_PERCENTAGE); } } From ddd81c02b3d08e8e3de0980e0b070ddac5907b7a Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Mon, 23 Oct 2023 10:30:47 +0700 Subject: [PATCH 13/27] format: reorder function --- src/RNSAuction.sol | 2 ++ src/RNSDomainPrice.sol | 4 +--- src/interfaces/INSAuction.sol | 5 +++++ src/interfaces/INSDomainPrice.sol | 5 ----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/RNSAuction.sol b/src/RNSAuction.sol index 6607ba87..e8b25d2f 100644 --- a/src/RNSAuction.sol +++ b/src/RNSAuction.sol @@ -23,6 +23,8 @@ contract RNSAuction is Initializable, AccessControlEnumerable, INSAuction { /// @inheritdoc INSAuction uint64 public constant DOMAIN_EXPIRY_DURATION = 365 days; /// @inheritdoc INSAuction + uint64 public constant MAX_AUCTION_DOMAIN_EXPIRY = 365 days * 3; + /// @inheritdoc INSAuction bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); /// @dev Gap for upgradeability. diff --git a/src/RNSDomainPrice.sol b/src/RNSDomainPrice.sol index c9776665..7cb8fcbd 100644 --- a/src/RNSDomainPrice.sol +++ b/src/RNSDomainPrice.sol @@ -27,8 +27,6 @@ contract RNSDomainPrice is Initializable, AccessControlEnumerable, INSDomainPric uint64 public constant MAX_PERCENTAGE = 100_00; /// @inheritdoc INSDomainPrice bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); - /// @inheritdoc INSDomainPrice - uint64 public constant MAX_AUCTION_DOMAIN_EXPIRY = 365 days * 3; /// @dev Gap for upgradeability. uint256[50] private ____gap; @@ -264,7 +262,7 @@ contract RNSDomainPrice is Initializable, AccessControlEnumerable, INSDomainPric uint256 expiry = LibSafeRange.addWithUpperbound(rns.getRecord(id).mut.expiry, duration, type(uint64).max); (INSAuction.DomainAuction memory domainAuction,) = auction.getAuction(id); uint256 claimedAt = domainAuction.bid.claimedAt; - if (claimedAt != 0 && expiry - claimedAt > MAX_AUCTION_DOMAIN_EXPIRY) { + if (claimedAt != 0 && expiry - claimedAt > auction.MAX_AUCTION_DOMAIN_EXPIRY()) { revert ExceedAuctionDomainExpiry(); } // Tax is added to the name reserved for the auction diff --git a/src/interfaces/INSAuction.sol b/src/interfaces/INSAuction.sol index d4167e6d..53c9c5b2 100644 --- a/src/interfaces/INSAuction.sol +++ b/src/interfaces/INSAuction.sol @@ -54,6 +54,11 @@ interface INSAuction { */ function MAX_EXPIRY() external pure returns (uint64); + /** + * @dev The maximum expiry duration of a domain after transferring to bidder. + */ + function MAX_AUCTION_DOMAIN_EXPIRY() external pure returns (uint64); + /** * @dev Returns the operator role. */ diff --git a/src/interfaces/INSDomainPrice.sol b/src/interfaces/INSDomainPrice.sol index 7cc52f45..b4fc0c6e 100644 --- a/src/interfaces/INSDomainPrice.sol +++ b/src/interfaces/INSDomainPrice.sol @@ -40,11 +40,6 @@ interface INSDomainPrice { address indexed operator, IPyth indexed pyth, uint256 maxAcceptableAge, bytes32 indexed pythIdForRONUSD ); - /** - * @dev The maximum expiry duration of a domain after transferring to bidder. - */ - function MAX_AUCTION_DOMAIN_EXPIRY() external pure returns (uint64); - /** * @dev Returns the Pyth oracle config. */ From dc0ee7b4089acd5855a586b4fff9c025b3306201 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Mon, 23 Oct 2023 13:37:13 +0700 Subject: [PATCH 14/27] chore: add ugrade artiface RNSUnified, RNSAuction, RNSDomainPrice --- .../2021/run-1697784642.json | 52 + .../2021/run-1697784648.json | 111 + .../2021/run-latest.json | 111 + .../ronin-testnet/RNSAuctionLogic.json | 12802 +++++++++++- .../ronin-testnet/RNSDomainPriceLogic.json | 14657 +++++++++++++- .../ronin-testnet/RNSUnifiedLogic.json | 16528 +++++++++++++++- 6 files changed, 43887 insertions(+), 374 deletions(-) create mode 100644 broadcast/20231020_RNSUpgrade.s.sol/2021/run-1697784642.json create mode 100644 broadcast/20231020_RNSUpgrade.s.sol/2021/run-1697784648.json create mode 100644 broadcast/20231020_RNSUpgrade.s.sol/2021/run-latest.json diff --git a/broadcast/20231020_RNSUpgrade.s.sol/2021/run-1697784642.json b/broadcast/20231020_RNSUpgrade.s.sol/2021/run-1697784642.json new file mode 100644 index 00000000..819abd3f --- /dev/null +++ b/broadcast/20231020_RNSUpgrade.s.sol/2021/run-1697784642.json @@ -0,0 +1,52 @@ +{ + "transactions": [ + { + "hash": "0xd2305936a8478dbfe257a31fba93e5bf0f8e8198c242ca768316397ac027c2b8", + "transactionType": "CREATE", + "contractName": "RNSUnified", + "contractAddress": "0x993Cab4b697f05BF5221EC78B491C08A148004Bf", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x4b4e7c", + "value": "0x0", + "data": "0x6000608081815260c060405260a09182529060036200001f8382620001b1565b5060046200002e8282620001b1565b5050603c805460ff1916905550620000456200004b565b6200027d565b600054610100900460ff1615620000b85760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116146200010a576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200013757607f821691505b6020821081036200015857634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001ac57600081815260208120601f850160051c81016020861015620001875750805b601f850160051c820191505b81811015620001a85782815560010162000193565b5050505b505050565b81516001600160401b03811115620001cd57620001cd6200010c565b620001e581620001de845462000122565b846200015e565b602080601f8311600181146200021d5760008415620002045750858301515b600019600386901b1c1916600185901b178555620001a8565b600085815260208120601f198616915b828110156200024e578886015182559484019460019091019084016200022d565b50858210156200026d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b614303806200028d6000396000f3fe608060405234801561001057600080fd5b50600436106102f15760003560e01c806355a5133b1161019d578063abfaf005116100e9578063dbd18388116100a2578063ec63b01f1161007c578063ec63b01f1461072b578063f1e379081461073e578063fc284d1114610765578063fd3fa9191461077857600080fd5b8063dbd18388146106c9578063e63ab1e9146106da578063e985e9c5146106ef57600080fd5b8063abfaf0051461065c578063b88d4fde1461066f578063b967169014610682578063c87b56dd14610690578063ca15c873146106a3578063d547741f146106b657600080fd5b80639010d07c1161015657806396e494e81161013057806396e494e814610626578063a217fddf14610639578063a22cb46514610641578063a2309ff81461065457600080fd5b80639010d07c146105e157806391d14854146105f457806395d89b411461060757600080fd5b806355a5133b1461058257806355f804b3146105955780635c975abb146105a85780636352211e146105b357806370a08231146105c65780638456cb59146105d957600080fd5b80631cfa6ec01161025c57806333855d9f1161021557806342842e0e116101ef57806342842e0e1461051e57806342966c68146105315780634f6ccce7146105445780635569f33d1461055757600080fd5b806333855d9f146104ee57806336568abe146105035780633f4ba83a1461051657600080fd5b80631cfa6ec01461046b57806323b872dd1461047e578063248a9ca31461049157806328ed4f6c146104b55780632f2ff15d146104c85780632f745c59146104db57600080fd5b8063095ea7b3116102ae578063095ea7b3146103f5578063098799621461040a578063131a7e241461041d578063141a468c1461043057806318160ddd146104505780631a7a98e21461045857600080fd5b806301ffc9a7146102f657806303e9e6091461031e5780630570891f1461033e57806306fdde0314610370578063081812fc146103a7578063092c5b3b146103d2575b600080fd5b6103096103043660046134aa565b6107ab565b60405190151581526020015b60405180910390f35b61033161032c3660046134c7565b6107d7565b60405161031591906135b4565b61035161034c366004613642565b61092d565b604080516001600160401b039093168352602083019190915201610315565b604080518082019091526012815271526f6e696e204e616d65205365727669636560701b60208201525b60405161031591906136bf565b6103ba6103b53660046134c7565b610be4565b6040516001600160a01b039091168152602001610315565b6103e760008051602061428e83398151915281565b604051908152602001610315565b6104086104033660046136d2565b610c0b565b005b6103e7610418366004613787565b610d25565b61039a61042b3660046134c7565b610d30565b6103e761043e3660046134c7565b60096020526000908152604090205481565b603f546103e7565b61039a6104663660046134c7565b610d7d565b6104086104793660046137cf565b610e89565b61040861048c366004613810565b61101e565b6103e761049f3660046134c7565b6000908152600160208190526040909120015490565b6104086104c336600461384c565b611050565b6104086104d636600461384c565b6110aa565b6103e76104e93660046136d2565b6110d0565b6103e760008051602061426e83398151915281565b61040861051136600461384c565b611166565b6104086111e4565b61040861052c366004613810565b611207565b61040861053f3660046134c7565b611222565b6103e76105523660046134c7565b611250565b61056a610565366004613878565b6112e3565b6040516001600160401b039091168152602001610315565b61040861059036600461389b565b6113a8565b6104086105a33660046138b6565b6113d1565b603c5460ff16610309565b6103ba6105c13660046134c7565b6113e6565b6103e76105d43660046138f7565b611407565b61040861148d565b6103ba6105ef366004613912565b6114ad565b61030961060236600461384c565b6114cc565b604080518082019091526003815262524e5360e81b602082015261039a565b6103096106343660046134c7565b6114f7565b6103e7600081565b61040861064f366004613944565b611522565b6073546103e7565b61040861066a36600461396e565b61152d565b61040861067d366004613a04565b611745565b61056a6001600160401b0381565b61039a61069e3660046134c7565b611777565b6103e76106b13660046134c7565b6117ea565b6104086106c436600461384c565b611801565b60a7546001600160401b031661056a565b6103e76000805160206142ae83398151915281565b6103096106fd366004613a7f565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b610408610739366004613aa9565b611827565b6103e77f87a2b33e0b98030e29c3d23d732aa654f29b298e3891758d5f02a8b01c4840b281565b610408610773366004613878565b611911565b61078b610786366004613b2c565b611992565b6040805192151583526001600160e01b0319909116602083015201610315565b60006107b682611ad3565b806107d157506001600160e01b03198216630106c78f60e21b145b92915050565b6107df613438565b600082815260a8602052604090819020815160a081018352815460ff1692810192835260018201546060820152600282018054919384929091849160808501919061082990613b5f565b80601f016020809104026020016040519081016040528092919081815260200182805461085590613b5f565b80156108a25780601f10610877576101008083540402835291602001916108a2565b820191906000526020600020905b81548152906001019060200180831161088557829003601f168201915b5050509190925250505081526040805160808101825260038401546001600160a01b039081168252600490940154938416602080830191909152600160a01b85046001600160401b031692820192909252600160e01b90930460ff16151560608401520152905061091282611af8565b60208201516001600160401b03909116604090910152919050565b600080610938611b74565b6109423389611bbc565b61095e576040516282b42960e81b815260040160405180910390fd5b61099e8888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611bd892505050565b90506109a9816114f7565b6109c65760405163a3b8915f60e01b815260040160405180910390fd5b6000818152600560205260409020546001600160a01b0316156109ec576109ec81611bee565b6109f68482611c5d565b610a0b426001600160401b0380861690611c70565b9150610a178883611ca6565b610a1f613438565b604080516080810182526001600160a01b03808916825287166020808301919091526001600160401b03861682840152600085815260a88083528482206004015460ff600160e01b9091048116151560608087019190915287850195909552855194850186528e83529252929092205490918291610a9f91166001613ba9565b60ff1681526020018a815260200189898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509390945250509183525082815260a8602090815260409182902083518051825460ff191660ff909116178255918201516001820155918101518392919082906002820190610b2d9082613c10565b50505060209182015180516003830180546001600160a01b039283166001600160a01b031990911617905592810151600490920180546040808401516060909401511515600160e01b0260ff60e01b196001600160401b03909516600160a01b026001600160e01b0319909316959096169490941717919091169290921790915551829060008051602061424e83398151915290610bd090600019908590613ccf565b60405180910390a250965096945050505050565b6000610bef82611cec565b506000908152600760205260409020546001600160a01b031690565b6000610c1682611d4b565b9050806001600160a01b0316836001600160a01b031603610c885760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b0382161480610ca45750610ca481336106fd565b610d165760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610c7f565b610d208383611dab565b505050565b60006107d182611e19565b606081610d3c81611cec565b600083815260a8602090815260408083206009835292819020549051610d659392879101613ce8565b60405160208183030381529060405291505b50919050565b606081600003610d9b57505060408051602081019091526000815290565b600082815260a860205260409020600281018054610db890613b5f565b80601f0160208091040260200160405190810160405280929190818152602001828054610de490613b5f565b8015610e315780601f10610e0657610100808354040283529160200191610e31565b820191906000526020600020905b815481529060010190602001808311610e1457829003601f168201915b50505050509150806001015492505b8215610d775750600082815260a860209081526040918290209151610e6c918491600285019101613df6565b604051602081830303815290604052915080600101549250610e40565b610e91611b74565b8282610e9d8282611e8c565b610ea5613438565b600086815260a860205260409020600301610eca610ec36006611ead565b8790611ecf565b15610f0b57610edf6080860160608701613ea8565b6020830151901515606090910181905260018201805460ff60e01b1916600160e01b9092029190911790555b610f18610ec36005611ead565b15610f4e57610f4e87610f31606088016040890161389b565b60208501516001600160401b039091166040909101819052611edb565b610f5b610ec36003611ead565b15610f9157610f6d60208601866138f7565b60208301516001600160a01b039091169081905281546001600160a01b0319161781555b8660008051602061424e8339815191528784604051610fb1929190613ccf565b60405180910390a2610fc6610ec36004611ead565b1561101557600087815260a8602090815260409182902060040154611015926001600160a01b0390911691610fff9189019089016138f7565b8960405180602001604052806000815250611fb4565b50505050505050565b611029335b82611fe7565b6110455760405162461bcd60e51b8152600401610c7f90613ec3565b610d20838383612009565b611058611b74565b816110636004611ead565b61106d8282611e8c565b600084815260a8602090815260408083206004015481519283019091529181526110a4916001600160a01b03169085908790611fb4565b50505050565b600082815260016020819052604090912001546110c681612105565b610d20838361210f565b60006110db83611407565b821061113d5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610c7f565b506001600160a01b03919091166000908152603d60209081526040808320938352929052205490565b6001600160a01b03811633146111d65760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c7f565b6111e08282612131565b5050565b6000805160206142ae8339815191526111fc81612105565b611204612153565b50565b610d2083838360405180602001604052806000815250611745565b61122b33611023565b6112475760405162461bcd60e51b8152600401610c7f90613ec3565b61120481611bee565b600061125b603f5490565b82106112be5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610c7f565b603f82815481106112d1576112d1613f10565b90600052602060002001549050919050565b60006112ed611b74565b60008051602061428e83398151915261130581612105565b61130d613438565b600085815260a8602052604090206004015461133f906001600160401b03600160a01b90910481169086811690611c70565b6020820180516001600160401b03909216604092830152510151611364908690611edb565b60208101516040015192508460008051602061424e8339815191526113896005611ead565b83604051611398929190613ccf565b60405180910390a2505092915050565b6113b0611b74565b60008051602061428e8339815191526113c881612105565b6111e0826121a5565b60006113dc81612105565b610d2083836121fd565b60006113f182612246565b156113fe57506000919050565b6107d182611d4b565b60006001600160a01b0382166114715760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610c7f565b506001600160a01b031660009081526006602052604090205490565b6000805160206142ae8339815191526114a581612105565b611204612262565b60008281526002602052604081206114c5908361229f565b9392505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600061151a61150583611af8565b60a7546001600160401b0391821691166122ab565b421192915050565b6111e03383836122bf565b600054610100900460ff161580801561154d5750600054600160ff909116105b806115675750303b158015611567575060005460ff166001145b6115ca5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610c7f565b6000805460ff1916600117905580156115ed576000805461ff0019166101001790555b6115f860008961210f565b6116106000805160206142ae8339815191528861210f565b61162860008051602061428e8339815191528761210f565b61164060008051602061426e8339815191528661210f565b61164a83836121fd565b611653846121a5565b61165e886000611c5d565b611666613438565b6020808201516001600160401b03604090910152600080805260a89091527f89f57ae4d64764caecd045b845cfc13a5b86ba807e4a61f32108661671e72867805467ffffffffffffffff60a01b191667ffffffffffffffff60a01b17905560008051602061424e8339815191526116dd6005611ead565b836040516116ec929190613ccf565b60405180910390a250801561173b576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050565b61174f3383611fe7565b61176b5760405162461bcd60e51b8152600401610c7f90613ec3565b6110a484848484611fb4565b60608161178381611cec565b600061178d61238d565b905060008151116117ad57604051806020016040528060008152506117e2565b806117b73061241f565b6117c086612435565b6040516020016117d293929190613f26565b6040516020818303038152906040525b949350505050565b60008181526002602052604081206107d1906124c7565b6000828152600160208190526040909120015461181d81612105565b610d208383612131565b60008051602061426e83398151915261183f81612105565b600061184b6006611ead565b90506000611857613438565b602081015185151560609091015260005b8681101561173b5787878281811061188257611882613f10565b60209081029290920135600081815260a89093526040909220600401549194505060ff600160e01b9091041615158615151461190957600083815260a8602052604090819020600401805460ff60e01b1916600160e01b8915150217905551839060008051602061424e833981519152906119009087908690613ccf565b60405180910390a25b600101611868565b611919611b74565b60008051602061428e83398151915261193181612105565b611939613438565b60208101516001600160401b038416604090910181905261195b908590611edb565b8360008051602061424e8339815191526119756005611ead565b83604051611984929190613ccf565b60405180910390a250505050565b6000806119a0836007611ecf565b156119b757506000905063da698a4d60e01b611acb565b6000848152600560205260409020546001600160a01b03166119e55750600090506304a3dbd560e51b611acb565b6119f96119f26006611ead565b8490611ecf565b8015611a1a5750611a1860008051602061426e833981519152866114cc565b155b15611a3157506000905063c24b0f3f60e01b611acb565b6000611a4b60008051602061428e833981519152876114cc565b9050611a61611a5a6005611ead565b8590611ecf565b8015611a6b575080155b15611a8457506000915063ed4b948760e01b9050611acb565b611a8f846018611ecf565b8015611aa957508080611aa75750611aa78686611bbc565b155b15611ac15750600091506282b42960e81b9050611acb565b5060019150600090505b935093915050565b60006001600160e01b0319821663780e9d6360e01b14806107d157506107d1826124d1565b600081815260056020526040812054611b3b907f87a2b33e0b98030e29c3d23d732aa654f29b298e3891758d5f02a8b01c4840b2906001600160a01b03166114cc565b15611b4e57506001600160401b03919050565b50600090815260a86020526040902060040154600160a01b90046001600160401b031690565b603c5460ff1615611bba5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c7f565b565b6000611bc88383611fe7565b806114c557506114c58383612511565b6000918252805160209182012090526040902090565b611bf78161256f565b600081815260a8602052604090206003810180546001600160a01b031916905560040180546001600160e81b0319169055611c30613438565b8160008051602061424e833981519152601883604051611c51929190613ccf565b60405180910390a25050565b6073805460010190556111e08282612612565b600081841180611c7f57508183115b15611c8b5750806114c5565b611c9584846122ab565b9050818111156114c5575092915050565b600082815260a860205260409020600401546001600160401b03600160a01b909104811690821611156111e05760405163da87d84960e01b815260040160405180910390fd5b6000818152600560205260409020546001600160a01b03166112045760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610c7f565b6000818152600560205260408120546001600160a01b0316806107d15760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610c7f565b600081815260076020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611de082611d4b565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600081518015611e825760006020840160018303810160008052805b828110611e7d57828114602e600183035160f81c1480821715611e7257600186848603030180842060205260406000206000526001810187019650505b505060001901611e35565b505050505b5050600051919050565b600080611e9a338585611992565b91509150816110a4578060005260046000fd5b6000816006811115611ec157611ec1613e92565b60ff166001901b9050919050565b600082821615156114c5565b600082815260a86020526040902060010154611ef79082611ca6565b611f00826114f7565b15611f1e57604051631395a92360e01b815260040160405180910390fd5b600082815260a860205260409020600401546001600160401b03600160a01b909104811690821611611f6357604051631c21962760e11b815260040160405180910390fd5b611f6b613438565b6020908101516001600160401b03929092166040928301819052600093845260a89091529120600401805467ffffffffffffffff60a01b1916600160a01b909202919091179055565b611fbf848484612009565b611fcb848484846127ab565b6110a45760405162461bcd60e51b8152600401610c7f90613f76565b6000611ff282612246565b15611fff575060006107d1565b6114c583836128ac565b61201483838361292a565b61201c613438565b60006120286004611ead565b6020838101516001600160a01b038716908201819052600086815260a8909252604090912060040180546001600160a01b0319169091179055905061207b60008051602061426e833981519152336114cc565b1580156120a05750600083815260a86020526040902060040154600160e01b900460ff165b156120d657600083815260a860205260409020600401805460ff60e01b191690556120d3816120cf6006611ead565b1790565b90505b8260008051602061424e83398151915282846040516120f6929190613ccf565b60405180910390a25050505050565b6112048133612a9b565b6121198282612af4565b6000828152600260205260409020610d209082612b5f565b61213b8282612b74565b6000828152600260205260409020610d209082612bdb565b61215b612bf0565b603c805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60a780546001600160401b03831667ffffffffffffffff199091168117909155604080519182525133917f2f8e6689e76cebc7cf99a782594bd18a73b8d1a0fe640c99fc580dcd4de7cd1d919081900360200190a250565b607461220a828483613fc8565b50336001600160a01b03167ff765b68b6ff897de964353a0eb194e46ecea8772879eb880b4b0fd277124922c8383604051611c51929190614087565b600061225182611af8565b6001600160401b0316421192915050565b61226a611b74565b603c805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121883390565b60006114c58383612c39565b818101828110156107d157506000196107d1565b816001600160a01b0316836001600160a01b0316036123205760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610c7f565b6001600160a01b03838116600081815260086020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60606074805461239c90613b5f565b80601f01602080910402602001604051908101604052809291908181526020018280546123c890613b5f565b80156124155780601f106123ea57610100808354040283529160200191612415565b820191906000526020600020905b8154815290600101906020018083116123f857829003601f168201915b5050505050905090565b60606107d16001600160a01b0383166014612c63565b6060600061244283612dfe565b60010190506000816001600160401b03811115612461576124616136fc565b6040519080825280601f01601f19166020018201604052801561248b576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461249557509392505050565b60006107d1825490565b60006001600160e01b031982166380ac58cd60e01b148061250257506001600160e01b03198216635b5e139f60e01b145b806107d157506107d182612ed6565b6000805b82156125655750600082815260a860205260409020600401546001600160a01b03908116908416810361254c5760019150506107d1565b600092835260a860205260409092206001015491612515565b5060009392505050565b600061257a82611d4b565b905061258a816000846001612efb565b61259382611d4b565b600083815260076020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526006845282852080546000190190558785526005909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0382166126685760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610c7f565b6000818152600560205260409020546001600160a01b0316156126cd5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c7f565b6126db600083836001612efb565b6000818152600560205260409020546001600160a01b0316156127405760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c7f565b6001600160a01b038216600081815260066020908152604080832080546001019055848352600590915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b156128a157604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906127ef9033908990889088906004016140b6565b6020604051808303816000875af192505050801561282a575060408051601f3d908101601f19168201909252612827918101906140f3565b60015b612887573d808015612858576040519150601f19603f3d011682016040523d82523d6000602084013e61285d565b606091505b50805160000361287f5760405162461bcd60e51b8152600401610c7f90613f76565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506117e2565b506001949350505050565b6000806128b883611d4b565b9050806001600160a01b0316846001600160a01b031614806128ff57506001600160a01b0380821660009081526008602090815260408083209388168352929052205460ff165b806117e25750836001600160a01b031661291884610be4565b6001600160a01b031614949350505050565b826001600160a01b031661293d82611d4b565b6001600160a01b0316146129635760405162461bcd60e51b8152600401610c7f90614110565b6001600160a01b0382166129c55760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610c7f565b6129d28383836001612efb565b826001600160a01b03166129e582611d4b565b6001600160a01b031614612a0b5760405162461bcd60e51b8152600401610c7f90614110565b600081815260076020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260068552838620805460001901905590871680865283862080546001019055868652600590945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b612aa582826114cc565b6111e057612ab28161241f565b612abd836020612c63565b604051602001612ace929190614155565b60408051601f198184030181529082905262461bcd60e51b8252610c7f916004016136bf565b612afe82826114cc565b6111e05760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b60006114c5836001600160a01b038416612f07565b612b7e82826114cc565b156111e05760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006114c5836001600160a01b038416612f56565b603c5460ff16611bba5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c7f565b6000826000018281548110612c5057612c50613f10565b9060005260206000200154905092915050565b60606000612c728360026141ca565b612c7d9060026141e1565b6001600160401b03811115612c9457612c946136fc565b6040519080825280601f01601f191660200182016040528015612cbe576020820181803683370190505b509050600360fc1b81600081518110612cd957612cd9613f10565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612d0857612d08613f10565b60200101906001600160f81b031916908160001a9053506000612d2c8460026141ca565b612d379060016141e1565b90505b6001811115612daf576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612d6b57612d6b613f10565b1a60f81b828281518110612d8157612d81613f10565b60200101906001600160f81b031916908160001a90535060049490941c93612da8816141f4565b9050612d3a565b5083156114c55760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c7f565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310612e3d5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612e69576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612e8757662386f26fc10000830492506010015b6305f5e1008310612e9f576305f5e100830492506008015b6127108310612eb357612710830492506004015b60648310612ec5576064830492506002015b600a83106107d15760010192915050565b60006001600160e01b03198216635a05180f60e01b14806107d157506107d182613049565b6110a48484848461307e565b6000818152600183016020526040812054612f4e575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556107d1565b5060006107d1565b6000818152600183016020526040812054801561303f576000612f7a60018361420b565b8554909150600090612f8e9060019061420b565b9050818114612ff3576000866000018281548110612fae57612fae613f10565b9060005260206000200154905080876000018481548110612fd157612fd1613f10565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806130045761300461421e565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506107d1565b60009150506107d1565b60006001600160e01b03198216637965db0b60e01b14806107d157506301ffc9a760e01b6001600160e01b03198316146107d1565b61308a848484846131be565b60018111156130f95760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b6064820152608401610c7f565b816001600160a01b0385166131555761315081603f80546000838152604060208190528120829055600182018355919091527fc03004e3ce0784bf68186394306849f9b7b1200073105cd9aeb554a1802b58fd0155565b613178565b836001600160a01b0316856001600160a01b031614613178576131788582613231565b6001600160a01b0384166131945761318f816132ce565b6131b7565b846001600160a01b0316846001600160a01b0316146131b7576131b7848261337d565b5050505050565b6131ca848484846133c1565b603c5460ff16156110a45760405162461bcd60e51b815260206004820152602b60248201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760448201526a1a1a5b19481c185d5cd95960aa1b6064820152608401610c7f565b6000600161323e84611407565b613248919061420b565b6000838152603e602052604090205490915080821461329b576001600160a01b0384166000908152603d602090815260408083208584528252808320548484528184208190558352603e90915290208190555b506000918252603e602090815260408084208490556001600160a01b039094168352603d81528383209183525290812055565b603f546000906132e09060019061420b565b600083815260406020819052812054603f805493945090928490811061330857613308613f10565b9060005260206000200154905080603f838154811061332957613329613f10565b600091825260208083209091019290925582815260409182905281812084905585815290812055603f8054806133615761336161421e565b6001900381819060005260206000200160009055905550505050565b600061338883611407565b6001600160a01b039093166000908152603d602090815260408083208684528252808320859055938252603e9052919091209190915550565b815b6133cd82846141e1565b81101561343257600081815260096020526040812080549091906133f090614234565b918290555060405182907fcc2c68164f9f7f0c063ba98bcf89498c0f3f5e3acc32bf4ab46195ecb489c13b90600090a38061342a81614234565b9150506133c3565b506110a4565b604051806040016040528061346a6040518060600160405280600060ff16815260200160008152602001606081525090565b81526040805160808101825260008082526020828101829052928201819052606082015291015290565b6001600160e01b03198116811461120457600080fd5b6000602082840312156134bc57600080fd5b81356114c581613494565b6000602082840312156134d957600080fd5b5035919050565b60005b838110156134fb5781810151838201526020016134e3565b50506000910152565b6000815180845261351c8160208601602086016134e0565b601f01601f19169290920160200192915050565b805160a0808452815160ff1690840152602081015160c084015260400151606060e0840152600090613566610100850182613504565b9050602083015160018060a01b03808251166020870152806020830151166040870152506001600160401b036040820151166060860152606081015115156080860152508091505092915050565b6020815260006114c56020830184613530565b60008083601f8401126135d957600080fd5b5081356001600160401b038111156135f057600080fd5b60208301915083602082850101111561360857600080fd5b9250929050565b80356001600160a01b038116811461362657600080fd5b919050565b80356001600160401b038116811461362657600080fd5b60008060008060008060a0878903121561365b57600080fd5b8635955060208701356001600160401b0381111561367857600080fd5b61368489828a016135c7565b909650945061369790506040880161360f565b92506136a56060880161360f565b91506136b36080880161362b565b90509295509295509295565b6020815260006114c56020830184613504565b600080604083850312156136e557600080fd5b6136ee8361360f565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b038084111561372c5761372c6136fc565b604051601f8501601f19908116603f01168101908282118183101715613754576137546136fc565b8160405280935085815286868601111561376d57600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561379957600080fd5b81356001600160401b038111156137af57600080fd5b8201601f810184136137c057600080fd5b6117e284823560208401613712565b600080600083850360c08112156137e557600080fd5b84359350602085013592506080603f198201121561380257600080fd5b506040840190509250925092565b60008060006060848603121561382557600080fd5b61382e8461360f565b925061383c6020850161360f565b9150604084013590509250925092565b6000806040838503121561385f57600080fd5b8235915061386f6020840161360f565b90509250929050565b6000806040838503121561388b57600080fd5b8235915061386f6020840161362b565b6000602082840312156138ad57600080fd5b6114c58261362b565b600080602083850312156138c957600080fd5b82356001600160401b038111156138df57600080fd5b6138eb858286016135c7565b90969095509350505050565b60006020828403121561390957600080fd5b6114c58261360f565b6000806040838503121561392557600080fd5b50508035926020909101359150565b8035801515811461362657600080fd5b6000806040838503121561395757600080fd5b6139608361360f565b915061386f60208401613934565b600080600080600080600060c0888a03121561398957600080fd5b6139928861360f565b96506139a06020890161360f565b95506139ae6040890161360f565b94506139bc6060890161360f565b93506139ca6080890161362b565b925060a08801356001600160401b038111156139e557600080fd5b6139f18a828b016135c7565b989b979a50959850939692959293505050565b60008060008060808587031215613a1a57600080fd5b613a238561360f565b9350613a316020860161360f565b92506040850135915060608501356001600160401b03811115613a5357600080fd5b8501601f81018713613a6457600080fd5b613a7387823560208401613712565b91505092959194509250565b60008060408385031215613a9257600080fd5b613a9b8361360f565b915061386f6020840161360f565b600080600060408486031215613abe57600080fd5b83356001600160401b0380821115613ad557600080fd5b818601915086601f830112613ae957600080fd5b813581811115613af857600080fd5b8760208260051b8501011115613b0d57600080fd5b602092830195509350613b239186019050613934565b90509250925092565b600080600060608486031215613b4157600080fd5b613b4a8461360f565b95602085013595506040909401359392505050565b600181811c90821680613b7357607f821691505b602082108103610d7757634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60ff81811683821601908111156107d1576107d1613b93565b601f821115610d2057600081815260208120601f850160051c81016020861015613be95750805b601f850160051c820191505b81811015613c0857828155600101613bf5565b505050505050565b81516001600160401b03811115613c2957613c296136fc565b613c3d81613c378454613b5f565b84613bc2565b602080601f831160018114613c725760008415613c5a5750858301515b600019600386901b1c1916600185901b178555613c08565b600085815260208120601f198616915b82811015613ca157888601518255948401946001909101908401613c82565b5085821015613cbf5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8281526040602082015260006117e26040830184613530565b6060815260a0606082015260ff845416610100820152600060018086015461012084015260028601606061014085015260008154613d2581613b5f565b8061016088015261018085831660008114613d475760018114613d6157613d92565b60ff1984168983015282151560051b890182019450613d92565b8560005260208060002060005b85811015613d895781548c8201860152908901908201613d6e565b8b018401965050505b50505050613de26080860160038a0180546001600160a01b03908116835260019190910154908116602083015260a081901c6001600160401b0316604083015260e01c60ff161515606090910152565b602085019690965250505060400152919050565b600083516020613e0982858389016134e0565b8184019150601760f91b8252600160008654613e2481613b5f565b8184168015613e3a5760018114613e5357613e83565b60ff198316878601528115158202870185019350613e83565b896000528560002060005b83811015613e79578154898201880152908601908701613e5e565b5050848288010193505b50919998505050505050505050565b634e487b7160e01b600052602160045260246000fd5b600060208284031215613eba57600080fd5b6114c582613934565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60008451613f388184602089016134e0565b845190830190613f4c8183602089016134e0565b602f60f81b91019081528351613f698160018401602088016134e0565b0160010195945050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160401b03831115613fdf57613fdf6136fc565b613ff383613fed8354613b5f565b83613bc2565b6000601f841160018114614027576000851561400f5750838201355b600019600387901b1c1916600186901b1783556131b7565b600083815260209020601f19861690835b828110156140585786850135825560209485019460019092019101614038565b50868210156140755760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906140e990830184613504565b9695505050505050565b60006020828403121561410557600080fd5b81516114c581613494565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161418d8160178501602088016134e0565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516141be8160288401602088016134e0565b01602801949350505050565b80820281158282048414176107d1576107d1613b93565b808201808211156107d1576107d1613b93565b60008161420357614203613b93565b506000190190565b818103818111156107d1576107d1613b93565b634e487b7160e01b600052603160045260246000fd5b60006001820161424657614246613b93565b506001019056fe1c440effe366cd7c439a4890f8be2342fcaca9b4a192ce8cf2b0e76511b36eba9e4a939112df4627ab5078e49dd57d2c45b4cffd9ae0b912f9fc355e5b1080387b765e0e932d348852a6f810bfa1ab891e259123f02db8cdcde614c57022335765d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862aa26469706673582212204db3ed4679558e8429254be43180048fcce7532decc01b27a22e7276258a69e364736f6c63430008150033", + "nonce": "0x2c920" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x1243a7797e99d9a2fddcfc402b8cec153a8c59f108b1bec843f83f5b70c7771f", + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0x505d91E8fd2091794b45b27f86C045529fa92CD7", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x505d91e8fd2091794b45b27f86c045529fa92cd7", + "gas": "0xc291", + "value": "0x0", + "data": "0x99a88ec4000000000000000000000000f0c99c9677eda0d13291c093b27e6512e4acdf83000000000000000000000000993cab4b697f05bf5221ec78b491c08a148004bf", + "nonce": "0x2c921" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [], + "libraries": [], + "pending": [ + "0xd2305936a8478dbfe257a31fba93e5bf0f8e8198c242ca768316397ac027c2b8", + "0x1243a7797e99d9a2fddcfc402b8cec153a8c59f108b1bec843f83f5b70c7771f" + ], + "returns": {}, + "timestamp": 1697784642, + "chain": 2021, + "multi": false, + "commit": "3e2ea27" +} \ No newline at end of file diff --git a/broadcast/20231020_RNSUpgrade.s.sol/2021/run-1697784648.json b/broadcast/20231020_RNSUpgrade.s.sol/2021/run-1697784648.json new file mode 100644 index 00000000..df48ae33 --- /dev/null +++ b/broadcast/20231020_RNSUpgrade.s.sol/2021/run-1697784648.json @@ -0,0 +1,111 @@ +{ + "transactions": [ + { + "hash": "0xd2305936a8478dbfe257a31fba93e5bf0f8e8198c242ca768316397ac027c2b8", + "transactionType": "CREATE", + "contractName": "RNSUnified", + "contractAddress": "0x993Cab4b697f05BF5221EC78B491C08A148004Bf", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x4b4e7c", + "value": "0x0", + "data": "0x6000608081815260c060405260a09182529060036200001f8382620001b1565b5060046200002e8282620001b1565b5050603c805460ff1916905550620000456200004b565b6200027d565b600054610100900460ff1615620000b85760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116146200010a576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200013757607f821691505b6020821081036200015857634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001ac57600081815260208120601f850160051c81016020861015620001875750805b601f850160051c820191505b81811015620001a85782815560010162000193565b5050505b505050565b81516001600160401b03811115620001cd57620001cd6200010c565b620001e581620001de845462000122565b846200015e565b602080601f8311600181146200021d5760008415620002045750858301515b600019600386901b1c1916600185901b178555620001a8565b600085815260208120601f198616915b828110156200024e578886015182559484019460019091019084016200022d565b50858210156200026d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b614303806200028d6000396000f3fe608060405234801561001057600080fd5b50600436106102f15760003560e01c806355a5133b1161019d578063abfaf005116100e9578063dbd18388116100a2578063ec63b01f1161007c578063ec63b01f1461072b578063f1e379081461073e578063fc284d1114610765578063fd3fa9191461077857600080fd5b8063dbd18388146106c9578063e63ab1e9146106da578063e985e9c5146106ef57600080fd5b8063abfaf0051461065c578063b88d4fde1461066f578063b967169014610682578063c87b56dd14610690578063ca15c873146106a3578063d547741f146106b657600080fd5b80639010d07c1161015657806396e494e81161013057806396e494e814610626578063a217fddf14610639578063a22cb46514610641578063a2309ff81461065457600080fd5b80639010d07c146105e157806391d14854146105f457806395d89b411461060757600080fd5b806355a5133b1461058257806355f804b3146105955780635c975abb146105a85780636352211e146105b357806370a08231146105c65780638456cb59146105d957600080fd5b80631cfa6ec01161025c57806333855d9f1161021557806342842e0e116101ef57806342842e0e1461051e57806342966c68146105315780634f6ccce7146105445780635569f33d1461055757600080fd5b806333855d9f146104ee57806336568abe146105035780633f4ba83a1461051657600080fd5b80631cfa6ec01461046b57806323b872dd1461047e578063248a9ca31461049157806328ed4f6c146104b55780632f2ff15d146104c85780632f745c59146104db57600080fd5b8063095ea7b3116102ae578063095ea7b3146103f5578063098799621461040a578063131a7e241461041d578063141a468c1461043057806318160ddd146104505780631a7a98e21461045857600080fd5b806301ffc9a7146102f657806303e9e6091461031e5780630570891f1461033e57806306fdde0314610370578063081812fc146103a7578063092c5b3b146103d2575b600080fd5b6103096103043660046134aa565b6107ab565b60405190151581526020015b60405180910390f35b61033161032c3660046134c7565b6107d7565b60405161031591906135b4565b61035161034c366004613642565b61092d565b604080516001600160401b039093168352602083019190915201610315565b604080518082019091526012815271526f6e696e204e616d65205365727669636560701b60208201525b60405161031591906136bf565b6103ba6103b53660046134c7565b610be4565b6040516001600160a01b039091168152602001610315565b6103e760008051602061428e83398151915281565b604051908152602001610315565b6104086104033660046136d2565b610c0b565b005b6103e7610418366004613787565b610d25565b61039a61042b3660046134c7565b610d30565b6103e761043e3660046134c7565b60096020526000908152604090205481565b603f546103e7565b61039a6104663660046134c7565b610d7d565b6104086104793660046137cf565b610e89565b61040861048c366004613810565b61101e565b6103e761049f3660046134c7565b6000908152600160208190526040909120015490565b6104086104c336600461384c565b611050565b6104086104d636600461384c565b6110aa565b6103e76104e93660046136d2565b6110d0565b6103e760008051602061426e83398151915281565b61040861051136600461384c565b611166565b6104086111e4565b61040861052c366004613810565b611207565b61040861053f3660046134c7565b611222565b6103e76105523660046134c7565b611250565b61056a610565366004613878565b6112e3565b6040516001600160401b039091168152602001610315565b61040861059036600461389b565b6113a8565b6104086105a33660046138b6565b6113d1565b603c5460ff16610309565b6103ba6105c13660046134c7565b6113e6565b6103e76105d43660046138f7565b611407565b61040861148d565b6103ba6105ef366004613912565b6114ad565b61030961060236600461384c565b6114cc565b604080518082019091526003815262524e5360e81b602082015261039a565b6103096106343660046134c7565b6114f7565b6103e7600081565b61040861064f366004613944565b611522565b6073546103e7565b61040861066a36600461396e565b61152d565b61040861067d366004613a04565b611745565b61056a6001600160401b0381565b61039a61069e3660046134c7565b611777565b6103e76106b13660046134c7565b6117ea565b6104086106c436600461384c565b611801565b60a7546001600160401b031661056a565b6103e76000805160206142ae83398151915281565b6103096106fd366004613a7f565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b610408610739366004613aa9565b611827565b6103e77f87a2b33e0b98030e29c3d23d732aa654f29b298e3891758d5f02a8b01c4840b281565b610408610773366004613878565b611911565b61078b610786366004613b2c565b611992565b6040805192151583526001600160e01b0319909116602083015201610315565b60006107b682611ad3565b806107d157506001600160e01b03198216630106c78f60e21b145b92915050565b6107df613438565b600082815260a8602052604090819020815160a081018352815460ff1692810192835260018201546060820152600282018054919384929091849160808501919061082990613b5f565b80601f016020809104026020016040519081016040528092919081815260200182805461085590613b5f565b80156108a25780601f10610877576101008083540402835291602001916108a2565b820191906000526020600020905b81548152906001019060200180831161088557829003601f168201915b5050509190925250505081526040805160808101825260038401546001600160a01b039081168252600490940154938416602080830191909152600160a01b85046001600160401b031692820192909252600160e01b90930460ff16151560608401520152905061091282611af8565b60208201516001600160401b03909116604090910152919050565b600080610938611b74565b6109423389611bbc565b61095e576040516282b42960e81b815260040160405180910390fd5b61099e8888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611bd892505050565b90506109a9816114f7565b6109c65760405163a3b8915f60e01b815260040160405180910390fd5b6000818152600560205260409020546001600160a01b0316156109ec576109ec81611bee565b6109f68482611c5d565b610a0b426001600160401b0380861690611c70565b9150610a178883611ca6565b610a1f613438565b604080516080810182526001600160a01b03808916825287166020808301919091526001600160401b03861682840152600085815260a88083528482206004015460ff600160e01b9091048116151560608087019190915287850195909552855194850186528e83529252929092205490918291610a9f91166001613ba9565b60ff1681526020018a815260200189898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509390945250509183525082815260a8602090815260409182902083518051825460ff191660ff909116178255918201516001820155918101518392919082906002820190610b2d9082613c10565b50505060209182015180516003830180546001600160a01b039283166001600160a01b031990911617905592810151600490920180546040808401516060909401511515600160e01b0260ff60e01b196001600160401b03909516600160a01b026001600160e01b0319909316959096169490941717919091169290921790915551829060008051602061424e83398151915290610bd090600019908590613ccf565b60405180910390a250965096945050505050565b6000610bef82611cec565b506000908152600760205260409020546001600160a01b031690565b6000610c1682611d4b565b9050806001600160a01b0316836001600160a01b031603610c885760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b0382161480610ca45750610ca481336106fd565b610d165760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610c7f565b610d208383611dab565b505050565b60006107d182611e19565b606081610d3c81611cec565b600083815260a8602090815260408083206009835292819020549051610d659392879101613ce8565b60405160208183030381529060405291505b50919050565b606081600003610d9b57505060408051602081019091526000815290565b600082815260a860205260409020600281018054610db890613b5f565b80601f0160208091040260200160405190810160405280929190818152602001828054610de490613b5f565b8015610e315780601f10610e0657610100808354040283529160200191610e31565b820191906000526020600020905b815481529060010190602001808311610e1457829003601f168201915b50505050509150806001015492505b8215610d775750600082815260a860209081526040918290209151610e6c918491600285019101613df6565b604051602081830303815290604052915080600101549250610e40565b610e91611b74565b8282610e9d8282611e8c565b610ea5613438565b600086815260a860205260409020600301610eca610ec36006611ead565b8790611ecf565b15610f0b57610edf6080860160608701613ea8565b6020830151901515606090910181905260018201805460ff60e01b1916600160e01b9092029190911790555b610f18610ec36005611ead565b15610f4e57610f4e87610f31606088016040890161389b565b60208501516001600160401b039091166040909101819052611edb565b610f5b610ec36003611ead565b15610f9157610f6d60208601866138f7565b60208301516001600160a01b039091169081905281546001600160a01b0319161781555b8660008051602061424e8339815191528784604051610fb1929190613ccf565b60405180910390a2610fc6610ec36004611ead565b1561101557600087815260a8602090815260409182902060040154611015926001600160a01b0390911691610fff9189019089016138f7565b8960405180602001604052806000815250611fb4565b50505050505050565b611029335b82611fe7565b6110455760405162461bcd60e51b8152600401610c7f90613ec3565b610d20838383612009565b611058611b74565b816110636004611ead565b61106d8282611e8c565b600084815260a8602090815260408083206004015481519283019091529181526110a4916001600160a01b03169085908790611fb4565b50505050565b600082815260016020819052604090912001546110c681612105565b610d20838361210f565b60006110db83611407565b821061113d5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610c7f565b506001600160a01b03919091166000908152603d60209081526040808320938352929052205490565b6001600160a01b03811633146111d65760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c7f565b6111e08282612131565b5050565b6000805160206142ae8339815191526111fc81612105565b611204612153565b50565b610d2083838360405180602001604052806000815250611745565b61122b33611023565b6112475760405162461bcd60e51b8152600401610c7f90613ec3565b61120481611bee565b600061125b603f5490565b82106112be5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610c7f565b603f82815481106112d1576112d1613f10565b90600052602060002001549050919050565b60006112ed611b74565b60008051602061428e83398151915261130581612105565b61130d613438565b600085815260a8602052604090206004015461133f906001600160401b03600160a01b90910481169086811690611c70565b6020820180516001600160401b03909216604092830152510151611364908690611edb565b60208101516040015192508460008051602061424e8339815191526113896005611ead565b83604051611398929190613ccf565b60405180910390a2505092915050565b6113b0611b74565b60008051602061428e8339815191526113c881612105565b6111e0826121a5565b60006113dc81612105565b610d2083836121fd565b60006113f182612246565b156113fe57506000919050565b6107d182611d4b565b60006001600160a01b0382166114715760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610c7f565b506001600160a01b031660009081526006602052604090205490565b6000805160206142ae8339815191526114a581612105565b611204612262565b60008281526002602052604081206114c5908361229f565b9392505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600061151a61150583611af8565b60a7546001600160401b0391821691166122ab565b421192915050565b6111e03383836122bf565b600054610100900460ff161580801561154d5750600054600160ff909116105b806115675750303b158015611567575060005460ff166001145b6115ca5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610c7f565b6000805460ff1916600117905580156115ed576000805461ff0019166101001790555b6115f860008961210f565b6116106000805160206142ae8339815191528861210f565b61162860008051602061428e8339815191528761210f565b61164060008051602061426e8339815191528661210f565b61164a83836121fd565b611653846121a5565b61165e886000611c5d565b611666613438565b6020808201516001600160401b03604090910152600080805260a89091527f89f57ae4d64764caecd045b845cfc13a5b86ba807e4a61f32108661671e72867805467ffffffffffffffff60a01b191667ffffffffffffffff60a01b17905560008051602061424e8339815191526116dd6005611ead565b836040516116ec929190613ccf565b60405180910390a250801561173b576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050565b61174f3383611fe7565b61176b5760405162461bcd60e51b8152600401610c7f90613ec3565b6110a484848484611fb4565b60608161178381611cec565b600061178d61238d565b905060008151116117ad57604051806020016040528060008152506117e2565b806117b73061241f565b6117c086612435565b6040516020016117d293929190613f26565b6040516020818303038152906040525b949350505050565b60008181526002602052604081206107d1906124c7565b6000828152600160208190526040909120015461181d81612105565b610d208383612131565b60008051602061426e83398151915261183f81612105565b600061184b6006611ead565b90506000611857613438565b602081015185151560609091015260005b8681101561173b5787878281811061188257611882613f10565b60209081029290920135600081815260a89093526040909220600401549194505060ff600160e01b9091041615158615151461190957600083815260a8602052604090819020600401805460ff60e01b1916600160e01b8915150217905551839060008051602061424e833981519152906119009087908690613ccf565b60405180910390a25b600101611868565b611919611b74565b60008051602061428e83398151915261193181612105565b611939613438565b60208101516001600160401b038416604090910181905261195b908590611edb565b8360008051602061424e8339815191526119756005611ead565b83604051611984929190613ccf565b60405180910390a250505050565b6000806119a0836007611ecf565b156119b757506000905063da698a4d60e01b611acb565b6000848152600560205260409020546001600160a01b03166119e55750600090506304a3dbd560e51b611acb565b6119f96119f26006611ead565b8490611ecf565b8015611a1a5750611a1860008051602061426e833981519152866114cc565b155b15611a3157506000905063c24b0f3f60e01b611acb565b6000611a4b60008051602061428e833981519152876114cc565b9050611a61611a5a6005611ead565b8590611ecf565b8015611a6b575080155b15611a8457506000915063ed4b948760e01b9050611acb565b611a8f846018611ecf565b8015611aa957508080611aa75750611aa78686611bbc565b155b15611ac15750600091506282b42960e81b9050611acb565b5060019150600090505b935093915050565b60006001600160e01b0319821663780e9d6360e01b14806107d157506107d1826124d1565b600081815260056020526040812054611b3b907f87a2b33e0b98030e29c3d23d732aa654f29b298e3891758d5f02a8b01c4840b2906001600160a01b03166114cc565b15611b4e57506001600160401b03919050565b50600090815260a86020526040902060040154600160a01b90046001600160401b031690565b603c5460ff1615611bba5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c7f565b565b6000611bc88383611fe7565b806114c557506114c58383612511565b6000918252805160209182012090526040902090565b611bf78161256f565b600081815260a8602052604090206003810180546001600160a01b031916905560040180546001600160e81b0319169055611c30613438565b8160008051602061424e833981519152601883604051611c51929190613ccf565b60405180910390a25050565b6073805460010190556111e08282612612565b600081841180611c7f57508183115b15611c8b5750806114c5565b611c9584846122ab565b9050818111156114c5575092915050565b600082815260a860205260409020600401546001600160401b03600160a01b909104811690821611156111e05760405163da87d84960e01b815260040160405180910390fd5b6000818152600560205260409020546001600160a01b03166112045760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610c7f565b6000818152600560205260408120546001600160a01b0316806107d15760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610c7f565b600081815260076020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611de082611d4b565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600081518015611e825760006020840160018303810160008052805b828110611e7d57828114602e600183035160f81c1480821715611e7257600186848603030180842060205260406000206000526001810187019650505b505060001901611e35565b505050505b5050600051919050565b600080611e9a338585611992565b91509150816110a4578060005260046000fd5b6000816006811115611ec157611ec1613e92565b60ff166001901b9050919050565b600082821615156114c5565b600082815260a86020526040902060010154611ef79082611ca6565b611f00826114f7565b15611f1e57604051631395a92360e01b815260040160405180910390fd5b600082815260a860205260409020600401546001600160401b03600160a01b909104811690821611611f6357604051631c21962760e11b815260040160405180910390fd5b611f6b613438565b6020908101516001600160401b03929092166040928301819052600093845260a89091529120600401805467ffffffffffffffff60a01b1916600160a01b909202919091179055565b611fbf848484612009565b611fcb848484846127ab565b6110a45760405162461bcd60e51b8152600401610c7f90613f76565b6000611ff282612246565b15611fff575060006107d1565b6114c583836128ac565b61201483838361292a565b61201c613438565b60006120286004611ead565b6020838101516001600160a01b038716908201819052600086815260a8909252604090912060040180546001600160a01b0319169091179055905061207b60008051602061426e833981519152336114cc565b1580156120a05750600083815260a86020526040902060040154600160e01b900460ff165b156120d657600083815260a860205260409020600401805460ff60e01b191690556120d3816120cf6006611ead565b1790565b90505b8260008051602061424e83398151915282846040516120f6929190613ccf565b60405180910390a25050505050565b6112048133612a9b565b6121198282612af4565b6000828152600260205260409020610d209082612b5f565b61213b8282612b74565b6000828152600260205260409020610d209082612bdb565b61215b612bf0565b603c805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60a780546001600160401b03831667ffffffffffffffff199091168117909155604080519182525133917f2f8e6689e76cebc7cf99a782594bd18a73b8d1a0fe640c99fc580dcd4de7cd1d919081900360200190a250565b607461220a828483613fc8565b50336001600160a01b03167ff765b68b6ff897de964353a0eb194e46ecea8772879eb880b4b0fd277124922c8383604051611c51929190614087565b600061225182611af8565b6001600160401b0316421192915050565b61226a611b74565b603c805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121883390565b60006114c58383612c39565b818101828110156107d157506000196107d1565b816001600160a01b0316836001600160a01b0316036123205760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610c7f565b6001600160a01b03838116600081815260086020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60606074805461239c90613b5f565b80601f01602080910402602001604051908101604052809291908181526020018280546123c890613b5f565b80156124155780601f106123ea57610100808354040283529160200191612415565b820191906000526020600020905b8154815290600101906020018083116123f857829003601f168201915b5050505050905090565b60606107d16001600160a01b0383166014612c63565b6060600061244283612dfe565b60010190506000816001600160401b03811115612461576124616136fc565b6040519080825280601f01601f19166020018201604052801561248b576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461249557509392505050565b60006107d1825490565b60006001600160e01b031982166380ac58cd60e01b148061250257506001600160e01b03198216635b5e139f60e01b145b806107d157506107d182612ed6565b6000805b82156125655750600082815260a860205260409020600401546001600160a01b03908116908416810361254c5760019150506107d1565b600092835260a860205260409092206001015491612515565b5060009392505050565b600061257a82611d4b565b905061258a816000846001612efb565b61259382611d4b565b600083815260076020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526006845282852080546000190190558785526005909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0382166126685760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610c7f565b6000818152600560205260409020546001600160a01b0316156126cd5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c7f565b6126db600083836001612efb565b6000818152600560205260409020546001600160a01b0316156127405760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c7f565b6001600160a01b038216600081815260066020908152604080832080546001019055848352600590915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b156128a157604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906127ef9033908990889088906004016140b6565b6020604051808303816000875af192505050801561282a575060408051601f3d908101601f19168201909252612827918101906140f3565b60015b612887573d808015612858576040519150601f19603f3d011682016040523d82523d6000602084013e61285d565b606091505b50805160000361287f5760405162461bcd60e51b8152600401610c7f90613f76565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506117e2565b506001949350505050565b6000806128b883611d4b565b9050806001600160a01b0316846001600160a01b031614806128ff57506001600160a01b0380821660009081526008602090815260408083209388168352929052205460ff165b806117e25750836001600160a01b031661291884610be4565b6001600160a01b031614949350505050565b826001600160a01b031661293d82611d4b565b6001600160a01b0316146129635760405162461bcd60e51b8152600401610c7f90614110565b6001600160a01b0382166129c55760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610c7f565b6129d28383836001612efb565b826001600160a01b03166129e582611d4b565b6001600160a01b031614612a0b5760405162461bcd60e51b8152600401610c7f90614110565b600081815260076020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260068552838620805460001901905590871680865283862080546001019055868652600590945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b612aa582826114cc565b6111e057612ab28161241f565b612abd836020612c63565b604051602001612ace929190614155565b60408051601f198184030181529082905262461bcd60e51b8252610c7f916004016136bf565b612afe82826114cc565b6111e05760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b60006114c5836001600160a01b038416612f07565b612b7e82826114cc565b156111e05760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006114c5836001600160a01b038416612f56565b603c5460ff16611bba5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c7f565b6000826000018281548110612c5057612c50613f10565b9060005260206000200154905092915050565b60606000612c728360026141ca565b612c7d9060026141e1565b6001600160401b03811115612c9457612c946136fc565b6040519080825280601f01601f191660200182016040528015612cbe576020820181803683370190505b509050600360fc1b81600081518110612cd957612cd9613f10565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612d0857612d08613f10565b60200101906001600160f81b031916908160001a9053506000612d2c8460026141ca565b612d379060016141e1565b90505b6001811115612daf576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612d6b57612d6b613f10565b1a60f81b828281518110612d8157612d81613f10565b60200101906001600160f81b031916908160001a90535060049490941c93612da8816141f4565b9050612d3a565b5083156114c55760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c7f565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310612e3d5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612e69576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612e8757662386f26fc10000830492506010015b6305f5e1008310612e9f576305f5e100830492506008015b6127108310612eb357612710830492506004015b60648310612ec5576064830492506002015b600a83106107d15760010192915050565b60006001600160e01b03198216635a05180f60e01b14806107d157506107d182613049565b6110a48484848461307e565b6000818152600183016020526040812054612f4e575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556107d1565b5060006107d1565b6000818152600183016020526040812054801561303f576000612f7a60018361420b565b8554909150600090612f8e9060019061420b565b9050818114612ff3576000866000018281548110612fae57612fae613f10565b9060005260206000200154905080876000018481548110612fd157612fd1613f10565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806130045761300461421e565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506107d1565b60009150506107d1565b60006001600160e01b03198216637965db0b60e01b14806107d157506301ffc9a760e01b6001600160e01b03198316146107d1565b61308a848484846131be565b60018111156130f95760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b6064820152608401610c7f565b816001600160a01b0385166131555761315081603f80546000838152604060208190528120829055600182018355919091527fc03004e3ce0784bf68186394306849f9b7b1200073105cd9aeb554a1802b58fd0155565b613178565b836001600160a01b0316856001600160a01b031614613178576131788582613231565b6001600160a01b0384166131945761318f816132ce565b6131b7565b846001600160a01b0316846001600160a01b0316146131b7576131b7848261337d565b5050505050565b6131ca848484846133c1565b603c5460ff16156110a45760405162461bcd60e51b815260206004820152602b60248201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760448201526a1a1a5b19481c185d5cd95960aa1b6064820152608401610c7f565b6000600161323e84611407565b613248919061420b565b6000838152603e602052604090205490915080821461329b576001600160a01b0384166000908152603d602090815260408083208584528252808320548484528184208190558352603e90915290208190555b506000918252603e602090815260408084208490556001600160a01b039094168352603d81528383209183525290812055565b603f546000906132e09060019061420b565b600083815260406020819052812054603f805493945090928490811061330857613308613f10565b9060005260206000200154905080603f838154811061332957613329613f10565b600091825260208083209091019290925582815260409182905281812084905585815290812055603f8054806133615761336161421e565b6001900381819060005260206000200160009055905550505050565b600061338883611407565b6001600160a01b039093166000908152603d602090815260408083208684528252808320859055938252603e9052919091209190915550565b815b6133cd82846141e1565b81101561343257600081815260096020526040812080549091906133f090614234565b918290555060405182907fcc2c68164f9f7f0c063ba98bcf89498c0f3f5e3acc32bf4ab46195ecb489c13b90600090a38061342a81614234565b9150506133c3565b506110a4565b604051806040016040528061346a6040518060600160405280600060ff16815260200160008152602001606081525090565b81526040805160808101825260008082526020828101829052928201819052606082015291015290565b6001600160e01b03198116811461120457600080fd5b6000602082840312156134bc57600080fd5b81356114c581613494565b6000602082840312156134d957600080fd5b5035919050565b60005b838110156134fb5781810151838201526020016134e3565b50506000910152565b6000815180845261351c8160208601602086016134e0565b601f01601f19169290920160200192915050565b805160a0808452815160ff1690840152602081015160c084015260400151606060e0840152600090613566610100850182613504565b9050602083015160018060a01b03808251166020870152806020830151166040870152506001600160401b036040820151166060860152606081015115156080860152508091505092915050565b6020815260006114c56020830184613530565b60008083601f8401126135d957600080fd5b5081356001600160401b038111156135f057600080fd5b60208301915083602082850101111561360857600080fd5b9250929050565b80356001600160a01b038116811461362657600080fd5b919050565b80356001600160401b038116811461362657600080fd5b60008060008060008060a0878903121561365b57600080fd5b8635955060208701356001600160401b0381111561367857600080fd5b61368489828a016135c7565b909650945061369790506040880161360f565b92506136a56060880161360f565b91506136b36080880161362b565b90509295509295509295565b6020815260006114c56020830184613504565b600080604083850312156136e557600080fd5b6136ee8361360f565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b038084111561372c5761372c6136fc565b604051601f8501601f19908116603f01168101908282118183101715613754576137546136fc565b8160405280935085815286868601111561376d57600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561379957600080fd5b81356001600160401b038111156137af57600080fd5b8201601f810184136137c057600080fd5b6117e284823560208401613712565b600080600083850360c08112156137e557600080fd5b84359350602085013592506080603f198201121561380257600080fd5b506040840190509250925092565b60008060006060848603121561382557600080fd5b61382e8461360f565b925061383c6020850161360f565b9150604084013590509250925092565b6000806040838503121561385f57600080fd5b8235915061386f6020840161360f565b90509250929050565b6000806040838503121561388b57600080fd5b8235915061386f6020840161362b565b6000602082840312156138ad57600080fd5b6114c58261362b565b600080602083850312156138c957600080fd5b82356001600160401b038111156138df57600080fd5b6138eb858286016135c7565b90969095509350505050565b60006020828403121561390957600080fd5b6114c58261360f565b6000806040838503121561392557600080fd5b50508035926020909101359150565b8035801515811461362657600080fd5b6000806040838503121561395757600080fd5b6139608361360f565b915061386f60208401613934565b600080600080600080600060c0888a03121561398957600080fd5b6139928861360f565b96506139a06020890161360f565b95506139ae6040890161360f565b94506139bc6060890161360f565b93506139ca6080890161362b565b925060a08801356001600160401b038111156139e557600080fd5b6139f18a828b016135c7565b989b979a50959850939692959293505050565b60008060008060808587031215613a1a57600080fd5b613a238561360f565b9350613a316020860161360f565b92506040850135915060608501356001600160401b03811115613a5357600080fd5b8501601f81018713613a6457600080fd5b613a7387823560208401613712565b91505092959194509250565b60008060408385031215613a9257600080fd5b613a9b8361360f565b915061386f6020840161360f565b600080600060408486031215613abe57600080fd5b83356001600160401b0380821115613ad557600080fd5b818601915086601f830112613ae957600080fd5b813581811115613af857600080fd5b8760208260051b8501011115613b0d57600080fd5b602092830195509350613b239186019050613934565b90509250925092565b600080600060608486031215613b4157600080fd5b613b4a8461360f565b95602085013595506040909401359392505050565b600181811c90821680613b7357607f821691505b602082108103610d7757634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60ff81811683821601908111156107d1576107d1613b93565b601f821115610d2057600081815260208120601f850160051c81016020861015613be95750805b601f850160051c820191505b81811015613c0857828155600101613bf5565b505050505050565b81516001600160401b03811115613c2957613c296136fc565b613c3d81613c378454613b5f565b84613bc2565b602080601f831160018114613c725760008415613c5a5750858301515b600019600386901b1c1916600185901b178555613c08565b600085815260208120601f198616915b82811015613ca157888601518255948401946001909101908401613c82565b5085821015613cbf5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8281526040602082015260006117e26040830184613530565b6060815260a0606082015260ff845416610100820152600060018086015461012084015260028601606061014085015260008154613d2581613b5f565b8061016088015261018085831660008114613d475760018114613d6157613d92565b60ff1984168983015282151560051b890182019450613d92565b8560005260208060002060005b85811015613d895781548c8201860152908901908201613d6e565b8b018401965050505b50505050613de26080860160038a0180546001600160a01b03908116835260019190910154908116602083015260a081901c6001600160401b0316604083015260e01c60ff161515606090910152565b602085019690965250505060400152919050565b600083516020613e0982858389016134e0565b8184019150601760f91b8252600160008654613e2481613b5f565b8184168015613e3a5760018114613e5357613e83565b60ff198316878601528115158202870185019350613e83565b896000528560002060005b83811015613e79578154898201880152908601908701613e5e565b5050848288010193505b50919998505050505050505050565b634e487b7160e01b600052602160045260246000fd5b600060208284031215613eba57600080fd5b6114c582613934565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60008451613f388184602089016134e0565b845190830190613f4c8183602089016134e0565b602f60f81b91019081528351613f698160018401602088016134e0565b0160010195945050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160401b03831115613fdf57613fdf6136fc565b613ff383613fed8354613b5f565b83613bc2565b6000601f841160018114614027576000851561400f5750838201355b600019600387901b1c1916600186901b1783556131b7565b600083815260209020601f19861690835b828110156140585786850135825560209485019460019092019101614038565b50868210156140755760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906140e990830184613504565b9695505050505050565b60006020828403121561410557600080fd5b81516114c581613494565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161418d8160178501602088016134e0565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516141be8160288401602088016134e0565b01602801949350505050565b80820281158282048414176107d1576107d1613b93565b808201808211156107d1576107d1613b93565b60008161420357614203613b93565b506000190190565b818103818111156107d1576107d1613b93565b634e487b7160e01b600052603160045260246000fd5b60006001820161424657614246613b93565b506001019056fe1c440effe366cd7c439a4890f8be2342fcaca9b4a192ce8cf2b0e76511b36eba9e4a939112df4627ab5078e49dd57d2c45b4cffd9ae0b912f9fc355e5b1080387b765e0e932d348852a6f810bfa1ab891e259123f02db8cdcde614c57022335765d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862aa26469706673582212204db3ed4679558e8429254be43180048fcce7532decc01b27a22e7276258a69e364736f6c63430008150033", + "nonce": "0x2c920" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x1243a7797e99d9a2fddcfc402b8cec153a8c59f108b1bec843f83f5b70c7771f", + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0x505d91E8fd2091794b45b27f86C045529fa92CD7", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x505d91e8fd2091794b45b27f86c045529fa92cd7", + "gas": "0xc291", + "value": "0x0", + "data": "0x99a88ec4000000000000000000000000f0c99c9677eda0d13291c093b27e6512e4acdf83000000000000000000000000993cab4b697f05bf5221ec78b491c08a148004bf", + "nonce": "0x2c921" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "transactionHash": "0xd2305936a8478dbfe257a31fba93e5bf0f8e8198c242ca768316397ac027c2b8", + "transactionIndex": "0x0", + "blockHash": "0x3f7f3b8a3a2ae2d421baafafcca0fcd2fe864f4e7cf08a4fe94d32f8b569d39a", + "blockNumber": "0x145f377", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": null, + "cumulativeGasUsed": "0x39ed9b", + "gasUsed": "0x39ed9b", + "contractAddress": "0x993Cab4b697f05BF5221EC78B491C08A148004Bf", + "logs": [ + { + "address": "0x993Cab4b697f05BF5221EC78B491C08A148004Bf", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "blockHash": "0x3f7f3b8a3a2ae2d421baafafcca0fcd2fe864f4e7cf08a4fe94d32f8b569d39a", + "blockNumber": "0x145f377", + "transactionHash": "0xd2305936a8478dbfe257a31fba93e5bf0f8e8198c242ca768316397ac027c2b8", + "transactionIndex": "0x0", + "logIndex": "0x0", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000001000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x0", + "effectiveGasPrice": "0x4a817c800" + }, + { + "transactionHash": "0x1243a7797e99d9a2fddcfc402b8cec153a8c59f108b1bec843f83f5b70c7771f", + "transactionIndex": "0x1", + "blockHash": "0x3f7f3b8a3a2ae2d421baafafcca0fcd2fe864f4e7cf08a4fe94d32f8b569d39a", + "blockNumber": "0x145f377", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x505d91E8fd2091794b45b27f86C045529fa92CD7", + "cumulativeGasUsed": "0x3a72a5", + "gasUsed": "0x850a", + "contractAddress": null, + "logs": [ + { + "address": "0xf0c99c9677EDa0D13291C093b27E6512E4ACdF83", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000993cab4b697f05bf5221ec78b491c08a148004bf" + ], + "data": "0x", + "blockHash": "0x3f7f3b8a3a2ae2d421baafafcca0fcd2fe864f4e7cf08a4fe94d32f8b569d39a", + "blockNumber": "0x145f377", + "transactionHash": "0x1243a7797e99d9a2fddcfc402b8cec153a8c59f108b1bec843f83f5b70c7771f", + "transactionIndex": "0x1", + "logIndex": "0x1", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000800000000000000000000000410400000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000001000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x0", + "effectiveGasPrice": "0x4a817c800" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1697784648, + "chain": 2021, + "multi": false, + "commit": "3e2ea27" +} \ No newline at end of file diff --git a/broadcast/20231020_RNSUpgrade.s.sol/2021/run-latest.json b/broadcast/20231020_RNSUpgrade.s.sol/2021/run-latest.json new file mode 100644 index 00000000..df48ae33 --- /dev/null +++ b/broadcast/20231020_RNSUpgrade.s.sol/2021/run-latest.json @@ -0,0 +1,111 @@ +{ + "transactions": [ + { + "hash": "0xd2305936a8478dbfe257a31fba93e5bf0f8e8198c242ca768316397ac027c2b8", + "transactionType": "CREATE", + "contractName": "RNSUnified", + "contractAddress": "0x993Cab4b697f05BF5221EC78B491C08A148004Bf", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x4b4e7c", + "value": "0x0", + "data": "0x6000608081815260c060405260a09182529060036200001f8382620001b1565b5060046200002e8282620001b1565b5050603c805460ff1916905550620000456200004b565b6200027d565b600054610100900460ff1615620000b85760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116146200010a576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200013757607f821691505b6020821081036200015857634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001ac57600081815260208120601f850160051c81016020861015620001875750805b601f850160051c820191505b81811015620001a85782815560010162000193565b5050505b505050565b81516001600160401b03811115620001cd57620001cd6200010c565b620001e581620001de845462000122565b846200015e565b602080601f8311600181146200021d5760008415620002045750858301515b600019600386901b1c1916600185901b178555620001a8565b600085815260208120601f198616915b828110156200024e578886015182559484019460019091019084016200022d565b50858210156200026d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b614303806200028d6000396000f3fe608060405234801561001057600080fd5b50600436106102f15760003560e01c806355a5133b1161019d578063abfaf005116100e9578063dbd18388116100a2578063ec63b01f1161007c578063ec63b01f1461072b578063f1e379081461073e578063fc284d1114610765578063fd3fa9191461077857600080fd5b8063dbd18388146106c9578063e63ab1e9146106da578063e985e9c5146106ef57600080fd5b8063abfaf0051461065c578063b88d4fde1461066f578063b967169014610682578063c87b56dd14610690578063ca15c873146106a3578063d547741f146106b657600080fd5b80639010d07c1161015657806396e494e81161013057806396e494e814610626578063a217fddf14610639578063a22cb46514610641578063a2309ff81461065457600080fd5b80639010d07c146105e157806391d14854146105f457806395d89b411461060757600080fd5b806355a5133b1461058257806355f804b3146105955780635c975abb146105a85780636352211e146105b357806370a08231146105c65780638456cb59146105d957600080fd5b80631cfa6ec01161025c57806333855d9f1161021557806342842e0e116101ef57806342842e0e1461051e57806342966c68146105315780634f6ccce7146105445780635569f33d1461055757600080fd5b806333855d9f146104ee57806336568abe146105035780633f4ba83a1461051657600080fd5b80631cfa6ec01461046b57806323b872dd1461047e578063248a9ca31461049157806328ed4f6c146104b55780632f2ff15d146104c85780632f745c59146104db57600080fd5b8063095ea7b3116102ae578063095ea7b3146103f5578063098799621461040a578063131a7e241461041d578063141a468c1461043057806318160ddd146104505780631a7a98e21461045857600080fd5b806301ffc9a7146102f657806303e9e6091461031e5780630570891f1461033e57806306fdde0314610370578063081812fc146103a7578063092c5b3b146103d2575b600080fd5b6103096103043660046134aa565b6107ab565b60405190151581526020015b60405180910390f35b61033161032c3660046134c7565b6107d7565b60405161031591906135b4565b61035161034c366004613642565b61092d565b604080516001600160401b039093168352602083019190915201610315565b604080518082019091526012815271526f6e696e204e616d65205365727669636560701b60208201525b60405161031591906136bf565b6103ba6103b53660046134c7565b610be4565b6040516001600160a01b039091168152602001610315565b6103e760008051602061428e83398151915281565b604051908152602001610315565b6104086104033660046136d2565b610c0b565b005b6103e7610418366004613787565b610d25565b61039a61042b3660046134c7565b610d30565b6103e761043e3660046134c7565b60096020526000908152604090205481565b603f546103e7565b61039a6104663660046134c7565b610d7d565b6104086104793660046137cf565b610e89565b61040861048c366004613810565b61101e565b6103e761049f3660046134c7565b6000908152600160208190526040909120015490565b6104086104c336600461384c565b611050565b6104086104d636600461384c565b6110aa565b6103e76104e93660046136d2565b6110d0565b6103e760008051602061426e83398151915281565b61040861051136600461384c565b611166565b6104086111e4565b61040861052c366004613810565b611207565b61040861053f3660046134c7565b611222565b6103e76105523660046134c7565b611250565b61056a610565366004613878565b6112e3565b6040516001600160401b039091168152602001610315565b61040861059036600461389b565b6113a8565b6104086105a33660046138b6565b6113d1565b603c5460ff16610309565b6103ba6105c13660046134c7565b6113e6565b6103e76105d43660046138f7565b611407565b61040861148d565b6103ba6105ef366004613912565b6114ad565b61030961060236600461384c565b6114cc565b604080518082019091526003815262524e5360e81b602082015261039a565b6103096106343660046134c7565b6114f7565b6103e7600081565b61040861064f366004613944565b611522565b6073546103e7565b61040861066a36600461396e565b61152d565b61040861067d366004613a04565b611745565b61056a6001600160401b0381565b61039a61069e3660046134c7565b611777565b6103e76106b13660046134c7565b6117ea565b6104086106c436600461384c565b611801565b60a7546001600160401b031661056a565b6103e76000805160206142ae83398151915281565b6103096106fd366004613a7f565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b610408610739366004613aa9565b611827565b6103e77f87a2b33e0b98030e29c3d23d732aa654f29b298e3891758d5f02a8b01c4840b281565b610408610773366004613878565b611911565b61078b610786366004613b2c565b611992565b6040805192151583526001600160e01b0319909116602083015201610315565b60006107b682611ad3565b806107d157506001600160e01b03198216630106c78f60e21b145b92915050565b6107df613438565b600082815260a8602052604090819020815160a081018352815460ff1692810192835260018201546060820152600282018054919384929091849160808501919061082990613b5f565b80601f016020809104026020016040519081016040528092919081815260200182805461085590613b5f565b80156108a25780601f10610877576101008083540402835291602001916108a2565b820191906000526020600020905b81548152906001019060200180831161088557829003601f168201915b5050509190925250505081526040805160808101825260038401546001600160a01b039081168252600490940154938416602080830191909152600160a01b85046001600160401b031692820192909252600160e01b90930460ff16151560608401520152905061091282611af8565b60208201516001600160401b03909116604090910152919050565b600080610938611b74565b6109423389611bbc565b61095e576040516282b42960e81b815260040160405180910390fd5b61099e8888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611bd892505050565b90506109a9816114f7565b6109c65760405163a3b8915f60e01b815260040160405180910390fd5b6000818152600560205260409020546001600160a01b0316156109ec576109ec81611bee565b6109f68482611c5d565b610a0b426001600160401b0380861690611c70565b9150610a178883611ca6565b610a1f613438565b604080516080810182526001600160a01b03808916825287166020808301919091526001600160401b03861682840152600085815260a88083528482206004015460ff600160e01b9091048116151560608087019190915287850195909552855194850186528e83529252929092205490918291610a9f91166001613ba9565b60ff1681526020018a815260200189898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509390945250509183525082815260a8602090815260409182902083518051825460ff191660ff909116178255918201516001820155918101518392919082906002820190610b2d9082613c10565b50505060209182015180516003830180546001600160a01b039283166001600160a01b031990911617905592810151600490920180546040808401516060909401511515600160e01b0260ff60e01b196001600160401b03909516600160a01b026001600160e01b0319909316959096169490941717919091169290921790915551829060008051602061424e83398151915290610bd090600019908590613ccf565b60405180910390a250965096945050505050565b6000610bef82611cec565b506000908152600760205260409020546001600160a01b031690565b6000610c1682611d4b565b9050806001600160a01b0316836001600160a01b031603610c885760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b0382161480610ca45750610ca481336106fd565b610d165760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610c7f565b610d208383611dab565b505050565b60006107d182611e19565b606081610d3c81611cec565b600083815260a8602090815260408083206009835292819020549051610d659392879101613ce8565b60405160208183030381529060405291505b50919050565b606081600003610d9b57505060408051602081019091526000815290565b600082815260a860205260409020600281018054610db890613b5f565b80601f0160208091040260200160405190810160405280929190818152602001828054610de490613b5f565b8015610e315780601f10610e0657610100808354040283529160200191610e31565b820191906000526020600020905b815481529060010190602001808311610e1457829003601f168201915b50505050509150806001015492505b8215610d775750600082815260a860209081526040918290209151610e6c918491600285019101613df6565b604051602081830303815290604052915080600101549250610e40565b610e91611b74565b8282610e9d8282611e8c565b610ea5613438565b600086815260a860205260409020600301610eca610ec36006611ead565b8790611ecf565b15610f0b57610edf6080860160608701613ea8565b6020830151901515606090910181905260018201805460ff60e01b1916600160e01b9092029190911790555b610f18610ec36005611ead565b15610f4e57610f4e87610f31606088016040890161389b565b60208501516001600160401b039091166040909101819052611edb565b610f5b610ec36003611ead565b15610f9157610f6d60208601866138f7565b60208301516001600160a01b039091169081905281546001600160a01b0319161781555b8660008051602061424e8339815191528784604051610fb1929190613ccf565b60405180910390a2610fc6610ec36004611ead565b1561101557600087815260a8602090815260409182902060040154611015926001600160a01b0390911691610fff9189019089016138f7565b8960405180602001604052806000815250611fb4565b50505050505050565b611029335b82611fe7565b6110455760405162461bcd60e51b8152600401610c7f90613ec3565b610d20838383612009565b611058611b74565b816110636004611ead565b61106d8282611e8c565b600084815260a8602090815260408083206004015481519283019091529181526110a4916001600160a01b03169085908790611fb4565b50505050565b600082815260016020819052604090912001546110c681612105565b610d20838361210f565b60006110db83611407565b821061113d5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610c7f565b506001600160a01b03919091166000908152603d60209081526040808320938352929052205490565b6001600160a01b03811633146111d65760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c7f565b6111e08282612131565b5050565b6000805160206142ae8339815191526111fc81612105565b611204612153565b50565b610d2083838360405180602001604052806000815250611745565b61122b33611023565b6112475760405162461bcd60e51b8152600401610c7f90613ec3565b61120481611bee565b600061125b603f5490565b82106112be5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610c7f565b603f82815481106112d1576112d1613f10565b90600052602060002001549050919050565b60006112ed611b74565b60008051602061428e83398151915261130581612105565b61130d613438565b600085815260a8602052604090206004015461133f906001600160401b03600160a01b90910481169086811690611c70565b6020820180516001600160401b03909216604092830152510151611364908690611edb565b60208101516040015192508460008051602061424e8339815191526113896005611ead565b83604051611398929190613ccf565b60405180910390a2505092915050565b6113b0611b74565b60008051602061428e8339815191526113c881612105565b6111e0826121a5565b60006113dc81612105565b610d2083836121fd565b60006113f182612246565b156113fe57506000919050565b6107d182611d4b565b60006001600160a01b0382166114715760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610c7f565b506001600160a01b031660009081526006602052604090205490565b6000805160206142ae8339815191526114a581612105565b611204612262565b60008281526002602052604081206114c5908361229f565b9392505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600061151a61150583611af8565b60a7546001600160401b0391821691166122ab565b421192915050565b6111e03383836122bf565b600054610100900460ff161580801561154d5750600054600160ff909116105b806115675750303b158015611567575060005460ff166001145b6115ca5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610c7f565b6000805460ff1916600117905580156115ed576000805461ff0019166101001790555b6115f860008961210f565b6116106000805160206142ae8339815191528861210f565b61162860008051602061428e8339815191528761210f565b61164060008051602061426e8339815191528661210f565b61164a83836121fd565b611653846121a5565b61165e886000611c5d565b611666613438565b6020808201516001600160401b03604090910152600080805260a89091527f89f57ae4d64764caecd045b845cfc13a5b86ba807e4a61f32108661671e72867805467ffffffffffffffff60a01b191667ffffffffffffffff60a01b17905560008051602061424e8339815191526116dd6005611ead565b836040516116ec929190613ccf565b60405180910390a250801561173b576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050565b61174f3383611fe7565b61176b5760405162461bcd60e51b8152600401610c7f90613ec3565b6110a484848484611fb4565b60608161178381611cec565b600061178d61238d565b905060008151116117ad57604051806020016040528060008152506117e2565b806117b73061241f565b6117c086612435565b6040516020016117d293929190613f26565b6040516020818303038152906040525b949350505050565b60008181526002602052604081206107d1906124c7565b6000828152600160208190526040909120015461181d81612105565b610d208383612131565b60008051602061426e83398151915261183f81612105565b600061184b6006611ead565b90506000611857613438565b602081015185151560609091015260005b8681101561173b5787878281811061188257611882613f10565b60209081029290920135600081815260a89093526040909220600401549194505060ff600160e01b9091041615158615151461190957600083815260a8602052604090819020600401805460ff60e01b1916600160e01b8915150217905551839060008051602061424e833981519152906119009087908690613ccf565b60405180910390a25b600101611868565b611919611b74565b60008051602061428e83398151915261193181612105565b611939613438565b60208101516001600160401b038416604090910181905261195b908590611edb565b8360008051602061424e8339815191526119756005611ead565b83604051611984929190613ccf565b60405180910390a250505050565b6000806119a0836007611ecf565b156119b757506000905063da698a4d60e01b611acb565b6000848152600560205260409020546001600160a01b03166119e55750600090506304a3dbd560e51b611acb565b6119f96119f26006611ead565b8490611ecf565b8015611a1a5750611a1860008051602061426e833981519152866114cc565b155b15611a3157506000905063c24b0f3f60e01b611acb565b6000611a4b60008051602061428e833981519152876114cc565b9050611a61611a5a6005611ead565b8590611ecf565b8015611a6b575080155b15611a8457506000915063ed4b948760e01b9050611acb565b611a8f846018611ecf565b8015611aa957508080611aa75750611aa78686611bbc565b155b15611ac15750600091506282b42960e81b9050611acb565b5060019150600090505b935093915050565b60006001600160e01b0319821663780e9d6360e01b14806107d157506107d1826124d1565b600081815260056020526040812054611b3b907f87a2b33e0b98030e29c3d23d732aa654f29b298e3891758d5f02a8b01c4840b2906001600160a01b03166114cc565b15611b4e57506001600160401b03919050565b50600090815260a86020526040902060040154600160a01b90046001600160401b031690565b603c5460ff1615611bba5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c7f565b565b6000611bc88383611fe7565b806114c557506114c58383612511565b6000918252805160209182012090526040902090565b611bf78161256f565b600081815260a8602052604090206003810180546001600160a01b031916905560040180546001600160e81b0319169055611c30613438565b8160008051602061424e833981519152601883604051611c51929190613ccf565b60405180910390a25050565b6073805460010190556111e08282612612565b600081841180611c7f57508183115b15611c8b5750806114c5565b611c9584846122ab565b9050818111156114c5575092915050565b600082815260a860205260409020600401546001600160401b03600160a01b909104811690821611156111e05760405163da87d84960e01b815260040160405180910390fd5b6000818152600560205260409020546001600160a01b03166112045760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610c7f565b6000818152600560205260408120546001600160a01b0316806107d15760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610c7f565b600081815260076020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611de082611d4b565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600081518015611e825760006020840160018303810160008052805b828110611e7d57828114602e600183035160f81c1480821715611e7257600186848603030180842060205260406000206000526001810187019650505b505060001901611e35565b505050505b5050600051919050565b600080611e9a338585611992565b91509150816110a4578060005260046000fd5b6000816006811115611ec157611ec1613e92565b60ff166001901b9050919050565b600082821615156114c5565b600082815260a86020526040902060010154611ef79082611ca6565b611f00826114f7565b15611f1e57604051631395a92360e01b815260040160405180910390fd5b600082815260a860205260409020600401546001600160401b03600160a01b909104811690821611611f6357604051631c21962760e11b815260040160405180910390fd5b611f6b613438565b6020908101516001600160401b03929092166040928301819052600093845260a89091529120600401805467ffffffffffffffff60a01b1916600160a01b909202919091179055565b611fbf848484612009565b611fcb848484846127ab565b6110a45760405162461bcd60e51b8152600401610c7f90613f76565b6000611ff282612246565b15611fff575060006107d1565b6114c583836128ac565b61201483838361292a565b61201c613438565b60006120286004611ead565b6020838101516001600160a01b038716908201819052600086815260a8909252604090912060040180546001600160a01b0319169091179055905061207b60008051602061426e833981519152336114cc565b1580156120a05750600083815260a86020526040902060040154600160e01b900460ff165b156120d657600083815260a860205260409020600401805460ff60e01b191690556120d3816120cf6006611ead565b1790565b90505b8260008051602061424e83398151915282846040516120f6929190613ccf565b60405180910390a25050505050565b6112048133612a9b565b6121198282612af4565b6000828152600260205260409020610d209082612b5f565b61213b8282612b74565b6000828152600260205260409020610d209082612bdb565b61215b612bf0565b603c805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60a780546001600160401b03831667ffffffffffffffff199091168117909155604080519182525133917f2f8e6689e76cebc7cf99a782594bd18a73b8d1a0fe640c99fc580dcd4de7cd1d919081900360200190a250565b607461220a828483613fc8565b50336001600160a01b03167ff765b68b6ff897de964353a0eb194e46ecea8772879eb880b4b0fd277124922c8383604051611c51929190614087565b600061225182611af8565b6001600160401b0316421192915050565b61226a611b74565b603c805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121883390565b60006114c58383612c39565b818101828110156107d157506000196107d1565b816001600160a01b0316836001600160a01b0316036123205760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610c7f565b6001600160a01b03838116600081815260086020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60606074805461239c90613b5f565b80601f01602080910402602001604051908101604052809291908181526020018280546123c890613b5f565b80156124155780601f106123ea57610100808354040283529160200191612415565b820191906000526020600020905b8154815290600101906020018083116123f857829003601f168201915b5050505050905090565b60606107d16001600160a01b0383166014612c63565b6060600061244283612dfe565b60010190506000816001600160401b03811115612461576124616136fc565b6040519080825280601f01601f19166020018201604052801561248b576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461249557509392505050565b60006107d1825490565b60006001600160e01b031982166380ac58cd60e01b148061250257506001600160e01b03198216635b5e139f60e01b145b806107d157506107d182612ed6565b6000805b82156125655750600082815260a860205260409020600401546001600160a01b03908116908416810361254c5760019150506107d1565b600092835260a860205260409092206001015491612515565b5060009392505050565b600061257a82611d4b565b905061258a816000846001612efb565b61259382611d4b565b600083815260076020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526006845282852080546000190190558785526005909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0382166126685760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610c7f565b6000818152600560205260409020546001600160a01b0316156126cd5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c7f565b6126db600083836001612efb565b6000818152600560205260409020546001600160a01b0316156127405760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c7f565b6001600160a01b038216600081815260066020908152604080832080546001019055848352600590915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b156128a157604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906127ef9033908990889088906004016140b6565b6020604051808303816000875af192505050801561282a575060408051601f3d908101601f19168201909252612827918101906140f3565b60015b612887573d808015612858576040519150601f19603f3d011682016040523d82523d6000602084013e61285d565b606091505b50805160000361287f5760405162461bcd60e51b8152600401610c7f90613f76565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506117e2565b506001949350505050565b6000806128b883611d4b565b9050806001600160a01b0316846001600160a01b031614806128ff57506001600160a01b0380821660009081526008602090815260408083209388168352929052205460ff165b806117e25750836001600160a01b031661291884610be4565b6001600160a01b031614949350505050565b826001600160a01b031661293d82611d4b565b6001600160a01b0316146129635760405162461bcd60e51b8152600401610c7f90614110565b6001600160a01b0382166129c55760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610c7f565b6129d28383836001612efb565b826001600160a01b03166129e582611d4b565b6001600160a01b031614612a0b5760405162461bcd60e51b8152600401610c7f90614110565b600081815260076020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260068552838620805460001901905590871680865283862080546001019055868652600590945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b612aa582826114cc565b6111e057612ab28161241f565b612abd836020612c63565b604051602001612ace929190614155565b60408051601f198184030181529082905262461bcd60e51b8252610c7f916004016136bf565b612afe82826114cc565b6111e05760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b60006114c5836001600160a01b038416612f07565b612b7e82826114cc565b156111e05760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006114c5836001600160a01b038416612f56565b603c5460ff16611bba5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c7f565b6000826000018281548110612c5057612c50613f10565b9060005260206000200154905092915050565b60606000612c728360026141ca565b612c7d9060026141e1565b6001600160401b03811115612c9457612c946136fc565b6040519080825280601f01601f191660200182016040528015612cbe576020820181803683370190505b509050600360fc1b81600081518110612cd957612cd9613f10565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612d0857612d08613f10565b60200101906001600160f81b031916908160001a9053506000612d2c8460026141ca565b612d379060016141e1565b90505b6001811115612daf576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612d6b57612d6b613f10565b1a60f81b828281518110612d8157612d81613f10565b60200101906001600160f81b031916908160001a90535060049490941c93612da8816141f4565b9050612d3a565b5083156114c55760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c7f565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310612e3d5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612e69576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612e8757662386f26fc10000830492506010015b6305f5e1008310612e9f576305f5e100830492506008015b6127108310612eb357612710830492506004015b60648310612ec5576064830492506002015b600a83106107d15760010192915050565b60006001600160e01b03198216635a05180f60e01b14806107d157506107d182613049565b6110a48484848461307e565b6000818152600183016020526040812054612f4e575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556107d1565b5060006107d1565b6000818152600183016020526040812054801561303f576000612f7a60018361420b565b8554909150600090612f8e9060019061420b565b9050818114612ff3576000866000018281548110612fae57612fae613f10565b9060005260206000200154905080876000018481548110612fd157612fd1613f10565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806130045761300461421e565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506107d1565b60009150506107d1565b60006001600160e01b03198216637965db0b60e01b14806107d157506301ffc9a760e01b6001600160e01b03198316146107d1565b61308a848484846131be565b60018111156130f95760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b6064820152608401610c7f565b816001600160a01b0385166131555761315081603f80546000838152604060208190528120829055600182018355919091527fc03004e3ce0784bf68186394306849f9b7b1200073105cd9aeb554a1802b58fd0155565b613178565b836001600160a01b0316856001600160a01b031614613178576131788582613231565b6001600160a01b0384166131945761318f816132ce565b6131b7565b846001600160a01b0316846001600160a01b0316146131b7576131b7848261337d565b5050505050565b6131ca848484846133c1565b603c5460ff16156110a45760405162461bcd60e51b815260206004820152602b60248201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760448201526a1a1a5b19481c185d5cd95960aa1b6064820152608401610c7f565b6000600161323e84611407565b613248919061420b565b6000838152603e602052604090205490915080821461329b576001600160a01b0384166000908152603d602090815260408083208584528252808320548484528184208190558352603e90915290208190555b506000918252603e602090815260408084208490556001600160a01b039094168352603d81528383209183525290812055565b603f546000906132e09060019061420b565b600083815260406020819052812054603f805493945090928490811061330857613308613f10565b9060005260206000200154905080603f838154811061332957613329613f10565b600091825260208083209091019290925582815260409182905281812084905585815290812055603f8054806133615761336161421e565b6001900381819060005260206000200160009055905550505050565b600061338883611407565b6001600160a01b039093166000908152603d602090815260408083208684528252808320859055938252603e9052919091209190915550565b815b6133cd82846141e1565b81101561343257600081815260096020526040812080549091906133f090614234565b918290555060405182907fcc2c68164f9f7f0c063ba98bcf89498c0f3f5e3acc32bf4ab46195ecb489c13b90600090a38061342a81614234565b9150506133c3565b506110a4565b604051806040016040528061346a6040518060600160405280600060ff16815260200160008152602001606081525090565b81526040805160808101825260008082526020828101829052928201819052606082015291015290565b6001600160e01b03198116811461120457600080fd5b6000602082840312156134bc57600080fd5b81356114c581613494565b6000602082840312156134d957600080fd5b5035919050565b60005b838110156134fb5781810151838201526020016134e3565b50506000910152565b6000815180845261351c8160208601602086016134e0565b601f01601f19169290920160200192915050565b805160a0808452815160ff1690840152602081015160c084015260400151606060e0840152600090613566610100850182613504565b9050602083015160018060a01b03808251166020870152806020830151166040870152506001600160401b036040820151166060860152606081015115156080860152508091505092915050565b6020815260006114c56020830184613530565b60008083601f8401126135d957600080fd5b5081356001600160401b038111156135f057600080fd5b60208301915083602082850101111561360857600080fd5b9250929050565b80356001600160a01b038116811461362657600080fd5b919050565b80356001600160401b038116811461362657600080fd5b60008060008060008060a0878903121561365b57600080fd5b8635955060208701356001600160401b0381111561367857600080fd5b61368489828a016135c7565b909650945061369790506040880161360f565b92506136a56060880161360f565b91506136b36080880161362b565b90509295509295509295565b6020815260006114c56020830184613504565b600080604083850312156136e557600080fd5b6136ee8361360f565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b038084111561372c5761372c6136fc565b604051601f8501601f19908116603f01168101908282118183101715613754576137546136fc565b8160405280935085815286868601111561376d57600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561379957600080fd5b81356001600160401b038111156137af57600080fd5b8201601f810184136137c057600080fd5b6117e284823560208401613712565b600080600083850360c08112156137e557600080fd5b84359350602085013592506080603f198201121561380257600080fd5b506040840190509250925092565b60008060006060848603121561382557600080fd5b61382e8461360f565b925061383c6020850161360f565b9150604084013590509250925092565b6000806040838503121561385f57600080fd5b8235915061386f6020840161360f565b90509250929050565b6000806040838503121561388b57600080fd5b8235915061386f6020840161362b565b6000602082840312156138ad57600080fd5b6114c58261362b565b600080602083850312156138c957600080fd5b82356001600160401b038111156138df57600080fd5b6138eb858286016135c7565b90969095509350505050565b60006020828403121561390957600080fd5b6114c58261360f565b6000806040838503121561392557600080fd5b50508035926020909101359150565b8035801515811461362657600080fd5b6000806040838503121561395757600080fd5b6139608361360f565b915061386f60208401613934565b600080600080600080600060c0888a03121561398957600080fd5b6139928861360f565b96506139a06020890161360f565b95506139ae6040890161360f565b94506139bc6060890161360f565b93506139ca6080890161362b565b925060a08801356001600160401b038111156139e557600080fd5b6139f18a828b016135c7565b989b979a50959850939692959293505050565b60008060008060808587031215613a1a57600080fd5b613a238561360f565b9350613a316020860161360f565b92506040850135915060608501356001600160401b03811115613a5357600080fd5b8501601f81018713613a6457600080fd5b613a7387823560208401613712565b91505092959194509250565b60008060408385031215613a9257600080fd5b613a9b8361360f565b915061386f6020840161360f565b600080600060408486031215613abe57600080fd5b83356001600160401b0380821115613ad557600080fd5b818601915086601f830112613ae957600080fd5b813581811115613af857600080fd5b8760208260051b8501011115613b0d57600080fd5b602092830195509350613b239186019050613934565b90509250925092565b600080600060608486031215613b4157600080fd5b613b4a8461360f565b95602085013595506040909401359392505050565b600181811c90821680613b7357607f821691505b602082108103610d7757634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60ff81811683821601908111156107d1576107d1613b93565b601f821115610d2057600081815260208120601f850160051c81016020861015613be95750805b601f850160051c820191505b81811015613c0857828155600101613bf5565b505050505050565b81516001600160401b03811115613c2957613c296136fc565b613c3d81613c378454613b5f565b84613bc2565b602080601f831160018114613c725760008415613c5a5750858301515b600019600386901b1c1916600185901b178555613c08565b600085815260208120601f198616915b82811015613ca157888601518255948401946001909101908401613c82565b5085821015613cbf5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8281526040602082015260006117e26040830184613530565b6060815260a0606082015260ff845416610100820152600060018086015461012084015260028601606061014085015260008154613d2581613b5f565b8061016088015261018085831660008114613d475760018114613d6157613d92565b60ff1984168983015282151560051b890182019450613d92565b8560005260208060002060005b85811015613d895781548c8201860152908901908201613d6e565b8b018401965050505b50505050613de26080860160038a0180546001600160a01b03908116835260019190910154908116602083015260a081901c6001600160401b0316604083015260e01c60ff161515606090910152565b602085019690965250505060400152919050565b600083516020613e0982858389016134e0565b8184019150601760f91b8252600160008654613e2481613b5f565b8184168015613e3a5760018114613e5357613e83565b60ff198316878601528115158202870185019350613e83565b896000528560002060005b83811015613e79578154898201880152908601908701613e5e565b5050848288010193505b50919998505050505050505050565b634e487b7160e01b600052602160045260246000fd5b600060208284031215613eba57600080fd5b6114c582613934565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60008451613f388184602089016134e0565b845190830190613f4c8183602089016134e0565b602f60f81b91019081528351613f698160018401602088016134e0565b0160010195945050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160401b03831115613fdf57613fdf6136fc565b613ff383613fed8354613b5f565b83613bc2565b6000601f841160018114614027576000851561400f5750838201355b600019600387901b1c1916600186901b1783556131b7565b600083815260209020601f19861690835b828110156140585786850135825560209485019460019092019101614038565b50868210156140755760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906140e990830184613504565b9695505050505050565b60006020828403121561410557600080fd5b81516114c581613494565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161418d8160178501602088016134e0565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516141be8160288401602088016134e0565b01602801949350505050565b80820281158282048414176107d1576107d1613b93565b808201808211156107d1576107d1613b93565b60008161420357614203613b93565b506000190190565b818103818111156107d1576107d1613b93565b634e487b7160e01b600052603160045260246000fd5b60006001820161424657614246613b93565b506001019056fe1c440effe366cd7c439a4890f8be2342fcaca9b4a192ce8cf2b0e76511b36eba9e4a939112df4627ab5078e49dd57d2c45b4cffd9ae0b912f9fc355e5b1080387b765e0e932d348852a6f810bfa1ab891e259123f02db8cdcde614c57022335765d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862aa26469706673582212204db3ed4679558e8429254be43180048fcce7532decc01b27a22e7276258a69e364736f6c63430008150033", + "nonce": "0x2c920" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x1243a7797e99d9a2fddcfc402b8cec153a8c59f108b1bec843f83f5b70c7771f", + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0x505d91E8fd2091794b45b27f86C045529fa92CD7", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x505d91e8fd2091794b45b27f86c045529fa92cd7", + "gas": "0xc291", + "value": "0x0", + "data": "0x99a88ec4000000000000000000000000f0c99c9677eda0d13291c093b27e6512e4acdf83000000000000000000000000993cab4b697f05bf5221ec78b491c08a148004bf", + "nonce": "0x2c921" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "transactionHash": "0xd2305936a8478dbfe257a31fba93e5bf0f8e8198c242ca768316397ac027c2b8", + "transactionIndex": "0x0", + "blockHash": "0x3f7f3b8a3a2ae2d421baafafcca0fcd2fe864f4e7cf08a4fe94d32f8b569d39a", + "blockNumber": "0x145f377", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": null, + "cumulativeGasUsed": "0x39ed9b", + "gasUsed": "0x39ed9b", + "contractAddress": "0x993Cab4b697f05BF5221EC78B491C08A148004Bf", + "logs": [ + { + "address": "0x993Cab4b697f05BF5221EC78B491C08A148004Bf", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "blockHash": "0x3f7f3b8a3a2ae2d421baafafcca0fcd2fe864f4e7cf08a4fe94d32f8b569d39a", + "blockNumber": "0x145f377", + "transactionHash": "0xd2305936a8478dbfe257a31fba93e5bf0f8e8198c242ca768316397ac027c2b8", + "transactionIndex": "0x0", + "logIndex": "0x0", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000001000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x0", + "effectiveGasPrice": "0x4a817c800" + }, + { + "transactionHash": "0x1243a7797e99d9a2fddcfc402b8cec153a8c59f108b1bec843f83f5b70c7771f", + "transactionIndex": "0x1", + "blockHash": "0x3f7f3b8a3a2ae2d421baafafcca0fcd2fe864f4e7cf08a4fe94d32f8b569d39a", + "blockNumber": "0x145f377", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x505d91E8fd2091794b45b27f86C045529fa92CD7", + "cumulativeGasUsed": "0x3a72a5", + "gasUsed": "0x850a", + "contractAddress": null, + "logs": [ + { + "address": "0xf0c99c9677EDa0D13291C093b27E6512E4ACdF83", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000993cab4b697f05bf5221ec78b491c08a148004bf" + ], + "data": "0x", + "blockHash": "0x3f7f3b8a3a2ae2d421baafafcca0fcd2fe864f4e7cf08a4fe94d32f8b569d39a", + "blockNumber": "0x145f377", + "transactionHash": "0x1243a7797e99d9a2fddcfc402b8cec153a8c59f108b1bec843f83f5b70c7771f", + "transactionIndex": "0x1", + "logIndex": "0x1", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000800000000000000000000000410400000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000001000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x0", + "effectiveGasPrice": "0x4a817c800" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1697784648, + "chain": 2021, + "multi": false, + "commit": "3e2ea27" +} \ No newline at end of file diff --git a/deployments/ronin-testnet/RNSAuctionLogic.json b/deployments/ronin-testnet/RNSAuctionLogic.json index d224a43f..5a4f7d6a 100644 --- a/deployments/ronin-testnet/RNSAuctionLogic.json +++ b/deployments/ronin-testnet/RNSAuctionLogic.json @@ -304,6 +304,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "MAX_AUCTION_DOMAIN_EXPIRY", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "MAX_EXPIRY", @@ -354,9 +367,9 @@ "name": "bulkClaimBidNames", "outputs": [ { - "internalType": "bool[]", - "name": "claimeds", - "type": "bool[]" + "internalType": "uint256[]", + "name": "claimedAts", + "type": "uint256[]" } ], "stateMutability": "nonpayable", @@ -452,9 +465,9 @@ "type": "uint256" }, { - "internalType": "bool", - "name": "claimed", - "type": "bool" + "internalType": "uint256", + "name": "claimedAt", + "type": "uint256" } ], "internalType": "struct INSAuction.Bid", @@ -849,248 +862,12515 @@ "type": "function" } ], - "address": "0xCcD3837278C083027DeF4537b3e66343D940377F", + "address": "0xD48baA87869c75B6C32C5D8374128556229ddA80", "args": "0x", - "blockNumber": 21224275, - "bytecode": "0x608060405261000c610011565b6100d0565b600054610100900460ff161561007d5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116146100ce576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6124a6806100df6000396000f3fe6080604052600436106101b75760003560e01c806381bec1b3116100ec578063b96716901161008a578063db5e1ec611610064578063db5e1ec6146105a0578063ec14cf37146105c0578063f0f44260146105e0578063f5b541a61461060057600080fd5b8063b967169014610545578063ca15c87314610560578063d547741f1461058057600080fd5b806391d14854116100c657806391d14854146104e85780639979ef4514610508578063a217fddf1461051b578063a282d4ae1461053057600080fd5b806381bec1b31461048a5780638c843314146104aa5780639010d07c146104c857600080fd5b80634c255c97116101595780636e7d60f2116101335780636e7d60f21461039e578063777b0a18146103cb57806378bd7935146103eb578063791a26b41461045d57600080fd5b80634c255c971461034857806353f9195e1461035e57806360223b441461037e57600080fd5b8063248a9ca311610195578063248a9ca3146102955780632f2ff15d146102d457806336568abe146102f65780633b19e84a1461031657600080fd5b806301ffc9a7146101bc57806315a29162146101f157806319a3ee4014610265575b600080fd5b3480156101c857600080fd5b506101dc6101d7366004611d1f565b610622565b60405190151581526020015b60405180910390f35b3480156101fd57600080fd5b5061024a61020c366004611d49565b604080518082019091526000808252602082015250600090815260366020908152604091829020825180840190935280548352600101549082015290565b604080518251815260209283015192810192909252016101e8565b34801561027157600080fd5b5061027d6301e1338081565b6040516001600160401b0390911681526020016101e8565b3480156102a157600080fd5b506102c66102b0366004611d49565b6000908152600160208190526040909120015490565b6040519081526020016101e8565b3480156102e057600080fd5b506102f46102ef366004611d77565b61064d565b005b34801561030257600080fd5b506102f4610311366004611d77565b610678565b34801561032257600080fd5b506038546001600160a01b03165b6040516001600160a01b0390911681526020016101e8565b34801561035457600080fd5b506102c661271081565b34801561036a57600080fd5b506101dc610379366004611d49565b6106fb565b34801561038a57600080fd5b506102f4610399366004611d49565b61071e565b3480156103aa57600080fd5b506103be6103b9366004611df2565b610732565b6040516101e89190611e33565b3480156103d757600080fd5b506102f46103e6366004611e79565b610a6a565b3480156103f757600080fd5b5061040b610406366004611d49565b610bcd565b6040805183518152602080850151818301529382015180516001600160a01b03168284015293840151606080830191909152918401516080820152920151151560a083015260c082015260e0016101e8565b34801561046957600080fd5b5061047d610478366004611df2565b610cbd565b6040516101e89190611ef2565b34801561049657600080fd5b506102f46104a5366004611f42565b610e78565b3480156104b657600080fd5b506035546001600160a01b0316610330565b3480156104d457600080fd5b506103306104e3366004611f6f565b610ef5565b3480156104f457600080fd5b506101dc610503366004611d77565b610f14565b6102f4610516366004611d49565b610f3f565b34801561052757600080fd5b506102c6600081565b34801561053c57600080fd5b506039546102c6565b34801561055157600080fd5b5061027d6001600160401b0381565b34801561056c57600080fd5b506102c661057b366004611d49565b6110ff565b34801561058c57600080fd5b506102f461059b366004611d77565b611116565b3480156105ac57600080fd5b506102c66105bb366004611f91565b61113c565b3480156105cc57600080fd5b506102f46105db366004611fad565b6111d9565b3480156105ec57600080fd5b506102f46105fb366004612031565b611376565b34801561060c57600080fd5b506102c660008051602061245183398151915281565b60006001600160e01b03198216635a05180f60e01b148061064757506106478261138a565b92915050565b60008281526001602081905260409091200154610669816113bf565b61067383836113cc565b505050565b6001600160a01b03811633146106ed5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6106f782826113ee565b5050565b600881901c6000908152603a6020526040812054600160ff84161b161515610647565b6000610729816113bf565b6106f782611410565b6060600080610754604051806040016040528060008152602001600081525090565b610792604080516060808201835260008083526020808401829052845160808101865282815290810182905280850182905291820152909182015290565b85806001600160401b038111156107ab576107ab61204e565b6040519080825280602002602001820160405280156107d4578160200160208202803683370190505b506035549096506001600160a01b031660006107fc426301e133806001600160401b0361146e565b905060005b83811015610a46578a8a8281811061081b5761081b612064565b60209081029290920135600081815260378452604080822081516060808201845282548252600180840154838a0152845160808101865260028501546001600160a01b031681526003850154818b015260048501548187015260059094015460ff1615158483015282850193845282518652603689529484902084518086019095528054855290940154968301969096525190910151919b509850919650610a3e90505760208601514210156108e4576040516372d1250d60e01b815260040160405180910390fd5b84604001516040015160000361090d576040516323bbcc0160e01b815260040160405180910390fd5b6040850151602001516109209088612090565b60405163fc284d1160e01b8152600481018a90526001600160401b03841660248201529097506001600160a01b0384169063fc284d1190604401600060405180830381600087803b15801561097457600080fd5b505af1158015610988573d6000803e3d6000fd5b505050506040858101515190516323b872dd60e01b81523060048201526001600160a01b039182166024820152604481018a9052908416906323b872dd90606401600060405180830381600087803b1580156109e357600080fd5b505af11580156109f7573d6000803e3d6000fd5b505050506001898281518110610a0f57610a0f612064565b911515602092830291909101820181905260008a815260379092526040909120600501805460ff191690911790555b600101610801565b50603854610a5d906001600160a01b0316876114a4565b5050505050505092915050565b600080516020612451833981519152610a82816113bf565b85610a8c81611509565b84801580610a9a5750808414155b15610ab857604051634ec4810560e11b815260040160405180910390fd5b6000806000805b84811015610b81578a8a82818110610ad957610ad9612064565b905060200201359350610aeb846106fb565b610b0857604051637d6fe8d760e11b815260040160405180910390fd5b6000848152603760205260409020805493509150821580610b2857508b83145b80610b3557506004820154155b610b5257604051631dc8374160e01b815260040160405180910390fd5b8b8255888882818110610b6757610b67612064565b905060200201358260010181905550806001019050610abf565b508a7f9a845a1c4235343a450f5e39d4179b7e2a6c9586c02bff45d956717f4a19dd948b8b8b8b604051610bb894939291906120d5565b60405180910390a25050505050505050505050565b610c0b604080516060808201835260008083526020808401829052845160808101865282815290810182905280850182905291820152909182015290565b5060008181526037602090815260408083208151606080820184528254825260018084015483870152845160808101865260028501546001600160a01b0316815260038501548188015260048501548187015260059094015460ff161515918401919091528184019290925280518351808501855286815285018690528552603684528285208351808501909452805484529091015492820192909252909190610cb58382611556565b915050915091565b6060600080516020612451833981519152610cd7816113bf565b826000819003610cfa57604051634ec4810560e11b815260040160405180910390fd5b806001600160401b03811115610d1257610d1261204e565b604051908082528060200260200182016040528015610d3b578160200160208202803683370190505b506035549093506001600160a01b03167fba69923fa107dbf5a25a073a10b7c9216ae39fbadc95dc891d460d9ae315d6886301e1338060005b84811015610e6c57836001600160a01b0316630570891f848b8b85818110610d9e57610d9e612064565b9050602002810190610db09190612107565b600030886040518763ffffffff1660e01b8152600401610dd59695949392919061214d565b60408051808303816000875af1158015610df3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1791906121a9565b9050878281518110610e2b57610e2b612064565b602002602001018181525050610e64878281518110610e4c57610e4c612064565b6020026020010151603a6115ae90919063ffffffff16565b600101610d74565b50505050505092915050565b6000610e83816113bf565b81610e8d816115d7565b83610e9781611509565b60008581526036602090815260409091208535815590850135600182015550847fd8960c7efc6464cdd8dd07f4dc149b0a33bf7f60bf357838722d5b80f988fb1b85604051610ee691906121e3565b60405180910390a25050505050565b6000828152600260205260408120610f0d908361161c565b9392505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60008181526037602090815260408083208151606080820184528254825260018084015483870152845160808101865260028501546001600160a01b0316815260038501548188015260048501548187015260059094015460ff1615159184019190915281840192909252805185526036845282852083518085019094528054845290910154928201929092529091610fd88383611556565b9050610fe382611628565b611000576040516348c6117b60e11b815260040160405180910390fd5b8034101561102157604051632ca2f52b60e11b815260040160405180910390fd5b3361102d816000611643565b61104a57604051634bad17b360e01b815260040160405180910390fd5b604084810151805160209182015160008981526037845284902034600382018190556002820180546001600160a01b0319166001600160a01b038981169182178355426004909501949094558b5188519384529683015295810183905290831660608201529193909290918991907f5934294f4724ea4bb71fee8511b9ccb8dd6d2249ac4d120a81ccfcbbd0ad905f9060800160405180910390a381156110f5576110f583836114a4565b5050505050505050565b6000818152600260205260408120610647906116b9565b60008281526001602081905260409091200154611132816113bf565b61067383836113ee565b600080611148816113bf565b82611152816115d7565b33846040516020016111659291906121fa565b60408051808303601f1901815291815281516020928301206000818152603684529190912086358155918601356001830155935050827fd8960c7efc6464cdd8dd07f4dc149b0a33bf7f60bf357838722d5b80f988fb1b856040516111ca91906121e3565b60405180910390a25050919050565b600054610100900460ff16158080156111f95750600054600160ff909116105b806112135750303b158015611213575060005460ff166001145b6112765760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106e4565b6000805460ff191660011790558015611299576000805461ff0019166101001790555b6112a2836116c3565b6112ab82611410565b6112b6600088611734565b8460008051602061245183398151915260005b8281101561130957611301828a8a848181106112e7576112e7612064565b90506020020160208101906112fc9190612031565b611734565b6001016112c9565b5050603580546001600160a01b0319166001600160a01b03871617905550801561136d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b6000611381816113bf565b6106f7826116c3565b60006001600160e01b03198216637965db0b60e01b148061064757506301ffc9a760e01b6001600160e01b0319831614610647565b6113c9813361173e565b50565b6113d68282611771565b600082815260026020526040902061067390826117dc565b6113f882826117f1565b60008281526002602052604090206106739082611858565b6127108111156114335760405163220f1a1560e01b815260040160405180910390fd5b60398190556040518181527f846b33625d74f443855144a5f2aef4dda303cda3dfb1c704cb58ab70671823429060200160405180910390a150565b60008184118061147d57508183115b15611489575080610f0d565b611493848461186d565b905081811115610f0d575092915050565b60006114b08383611643565b905080610673576114c9836001600160a01b0316611881565b6114d283611897565b6040516020016114e3929190612245565b60408051601f198184030181529082905262461bcd60e51b82526106e4916004016122c3565b60008181526036602090815260409182902082518084019093528054835260010154908201526115399051421090565b6113c95760405163028e4e9760e51b815260040160405180910390fd5b600061156e83602001518460400151602001516118ae565b905082604001516020015160001415801561158c5750602082015142105b15610647576115a483602001516039546127106118c4565b610f0d9082612090565b600881901c600090815260209290925260409091208054600160ff9093169290921b9091179055565b60208101358135111580156115ff57506115ff6115f9368390038301836122f6565b51421090565b6113c9576040516302ef0c7360e21b815260040160405180910390fd5b6000610f0d83836119ae565b60004282600001511115801561064757505060200151421090565b604080516000808252602082019092526001600160a01b03841690839060405161166d9190612352565b60006040518083038185875af1925050503d80600081146116aa576040519150601f19603f3d011682016040523d82523d6000602084013e6116af565b606091505b5090949350505050565b6000610647825490565b6001600160a01b0381166116ea576040516362daafb160e11b815260040160405180910390fd5b603880546001600160a01b0319166001600160a01b0383169081179091556040517f7dae230f18360d76a040c81f050aa14eb9d6dc7901b20fc5d855e2a20fe814d190600090a250565b6106f782826113cc565b6117488282610f14565b6106f75761175581611881565b6117608360206119d8565b6040516020016114e392919061236e565b61177b8282610f14565b6106f75760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b6000610f0d836001600160a01b038416611b73565b6117fb8282610f14565b156106f75760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610f0d836001600160a01b038416611bc2565b818101828110156106475750600019610647565b60606106476001600160a01b03831660146119d8565b6060610647826118a684611cb5565b6001016119d8565b60008183116118bd5781610f0d565b5090919050565b60008080600019858709858702925082811083820303915050806000036118fe578382816118f4576118f46123e3565b0492505050610f0d565b8084116119455760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b60448201526064016106e4565b60008486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091026000889003889004909101858311909403939093029303949094049190911702949350505050565b60008260000182815481106119c5576119c5612064565b9060005260206000200154905092915050565b606060006119e78360026123f9565b6119f2906002612090565b6001600160401b03811115611a0957611a0961204e565b6040519080825280601f01601f191660200182016040528015611a33576020820181803683370190505b509050600360fc1b81600081518110611a4e57611a4e612064565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611a7d57611a7d612064565b60200101906001600160f81b031916908160001a9053506000611aa18460026123f9565b611aac906001612090565b90505b6001811115611b24576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611ae057611ae0612064565b1a60f81b828281518110611af657611af6612064565b60200101906001600160f81b031916908160001a90535060049490941c93611b1d81612410565b9050611aaf565b508315610f0d5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106e4565b6000818152600183016020526040812054611bba57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610647565b506000610647565b60008181526001830160205260408120548015611cab576000611be6600183612427565b8554909150600090611bfa90600190612427565b9050818114611c5f576000866000018281548110611c1a57611c1a612064565b9060005260206000200154905080876000018481548110611c3d57611c3d612064565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611c7057611c7061243a565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610647565b6000915050610647565b600080608083901c15611ccd5760809290921c916010015b604083901c15611ce25760409290921c916008015b602083901c15611cf75760209290921c916004015b601083901c15611d0c5760109290921c916002015b600883901c156106475760010192915050565b600060208284031215611d3157600080fd5b81356001600160e01b031981168114610f0d57600080fd5b600060208284031215611d5b57600080fd5b5035919050565b6001600160a01b03811681146113c957600080fd5b60008060408385031215611d8a57600080fd5b823591506020830135611d9c81611d62565b809150509250929050565b60008083601f840112611db957600080fd5b5081356001600160401b03811115611dd057600080fd5b6020830191508360208260051b8501011115611deb57600080fd5b9250929050565b60008060208385031215611e0557600080fd5b82356001600160401b03811115611e1b57600080fd5b611e2785828601611da7565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b81811015611e6d578351151583529284019291840191600101611e4f565b50909695505050505050565b600080600080600060608688031215611e9157600080fd5b8535945060208601356001600160401b0380821115611eaf57600080fd5b611ebb89838a01611da7565b90965094506040880135915080821115611ed457600080fd5b50611ee188828901611da7565b969995985093965092949392505050565b6020808252825182820181905260009190848201906040850190845b81811015611e6d57835183529284019291840191600101611f0e565b600060408284031215611f3c57600080fd5b50919050565b60008060608385031215611f5557600080fd5b82359150611f668460208501611f2a565b90509250929050565b60008060408385031215611f8257600080fd5b50508035926020909101359150565b600060408284031215611fa357600080fd5b610f0d8383611f2a565b60008060008060008060a08789031215611fc657600080fd5b8635611fd181611d62565b955060208701356001600160401b03811115611fec57600080fd5b611ff889828a01611da7565b909650945050604087013561200c81611d62565b9250606087013561201c81611d62565b80925050608087013590509295509295509295565b60006020828403121561204357600080fd5b8135610f0d81611d62565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156106475761064761207a565b81835260006001600160fb1b038311156120bc57600080fd5b8260051b80836020870137939093016020019392505050565b6040815260006120e96040830186886120a3565b82810360208401526120fc8185876120a3565b979650505050505050565b6000808335601e1984360301811261211e57600080fd5b8301803591506001600160401b0382111561213857600080fd5b602001915036819003821315611deb57600080fd5b86815260a060208201528460a0820152848660c0830137600060c08683018101919091526001600160a01b0394851660408301529290931660608401526001600160401b03166080830152601f909201601f1916010192915050565b600080604083850312156121bc57600080fd5b82516001600160401b03811681146121d357600080fd5b6020939093015192949293505050565b813581526020808301359082015260408101610647565b6001600160a01b038316815260608101610f0d602083018480358252602090810135910152565b60005b8381101561223c578181015183820152602001612224565b50506000910152565b7f5472616e7366657248656c7065723a20636f756c64206e6f74207472616e7366815269032b9102927a7103a37960b51b60208201526000835161229081602a850160208801612221565b660103b30b63ab2960cd1b602a9184019182015283516122b7816031840160208801612221565b01603101949350505050565b60208152600082518060208401526122e2816040850160208701612221565b601f01601f19169190910160400192915050565b60006040828403121561230857600080fd5b604051604081018181106001600160401b038211171561233857634e487b7160e01b600052604160045260246000fd5b604052823581526020928301359281019290925250919050565b60008251612364818460208701612221565b9190910192915050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516123a6816017850160208801612221565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516123d7816028840160208801612221565b01602801949350505050565b634e487b7160e01b600052601260045260246000fd5b80820281158282048414176106475761064761207a565b60008161241f5761241f61207a565b506000190190565b818103818111156106475761064761207a565b634e487b7160e01b600052603160045260246000fdfe97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929a2646970667358221220b309f671b8e19d4b799039d85a64646c38d5a7039b741c8381d1403a8713f8bf64736f6c63430008150033", - "chainId": 2021, - "contractName": "RNSAuction", - "deployedBytecode": "0x6080604052600436106101b75760003560e01c806381bec1b3116100ec578063b96716901161008a578063db5e1ec611610064578063db5e1ec6146105a0578063ec14cf37146105c0578063f0f44260146105e0578063f5b541a61461060057600080fd5b8063b967169014610545578063ca15c87314610560578063d547741f1461058057600080fd5b806391d14854116100c657806391d14854146104e85780639979ef4514610508578063a217fddf1461051b578063a282d4ae1461053057600080fd5b806381bec1b31461048a5780638c843314146104aa5780639010d07c146104c857600080fd5b80634c255c97116101595780636e7d60f2116101335780636e7d60f21461039e578063777b0a18146103cb57806378bd7935146103eb578063791a26b41461045d57600080fd5b80634c255c971461034857806353f9195e1461035e57806360223b441461037e57600080fd5b8063248a9ca311610195578063248a9ca3146102955780632f2ff15d146102d457806336568abe146102f65780633b19e84a1461031657600080fd5b806301ffc9a7146101bc57806315a29162146101f157806319a3ee4014610265575b600080fd5b3480156101c857600080fd5b506101dc6101d7366004611d1f565b610622565b60405190151581526020015b60405180910390f35b3480156101fd57600080fd5b5061024a61020c366004611d49565b604080518082019091526000808252602082015250600090815260366020908152604091829020825180840190935280548352600101549082015290565b604080518251815260209283015192810192909252016101e8565b34801561027157600080fd5b5061027d6301e1338081565b6040516001600160401b0390911681526020016101e8565b3480156102a157600080fd5b506102c66102b0366004611d49565b6000908152600160208190526040909120015490565b6040519081526020016101e8565b3480156102e057600080fd5b506102f46102ef366004611d77565b61064d565b005b34801561030257600080fd5b506102f4610311366004611d77565b610678565b34801561032257600080fd5b506038546001600160a01b03165b6040516001600160a01b0390911681526020016101e8565b34801561035457600080fd5b506102c661271081565b34801561036a57600080fd5b506101dc610379366004611d49565b6106fb565b34801561038a57600080fd5b506102f4610399366004611d49565b61071e565b3480156103aa57600080fd5b506103be6103b9366004611df2565b610732565b6040516101e89190611e33565b3480156103d757600080fd5b506102f46103e6366004611e79565b610a6a565b3480156103f757600080fd5b5061040b610406366004611d49565b610bcd565b6040805183518152602080850151818301529382015180516001600160a01b03168284015293840151606080830191909152918401516080820152920151151560a083015260c082015260e0016101e8565b34801561046957600080fd5b5061047d610478366004611df2565b610cbd565b6040516101e89190611ef2565b34801561049657600080fd5b506102f46104a5366004611f42565b610e78565b3480156104b657600080fd5b506035546001600160a01b0316610330565b3480156104d457600080fd5b506103306104e3366004611f6f565b610ef5565b3480156104f457600080fd5b506101dc610503366004611d77565b610f14565b6102f4610516366004611d49565b610f3f565b34801561052757600080fd5b506102c6600081565b34801561053c57600080fd5b506039546102c6565b34801561055157600080fd5b5061027d6001600160401b0381565b34801561056c57600080fd5b506102c661057b366004611d49565b6110ff565b34801561058c57600080fd5b506102f461059b366004611d77565b611116565b3480156105ac57600080fd5b506102c66105bb366004611f91565b61113c565b3480156105cc57600080fd5b506102f46105db366004611fad565b6111d9565b3480156105ec57600080fd5b506102f46105fb366004612031565b611376565b34801561060c57600080fd5b506102c660008051602061245183398151915281565b60006001600160e01b03198216635a05180f60e01b148061064757506106478261138a565b92915050565b60008281526001602081905260409091200154610669816113bf565b61067383836113cc565b505050565b6001600160a01b03811633146106ed5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6106f782826113ee565b5050565b600881901c6000908152603a6020526040812054600160ff84161b161515610647565b6000610729816113bf565b6106f782611410565b6060600080610754604051806040016040528060008152602001600081525090565b610792604080516060808201835260008083526020808401829052845160808101865282815290810182905280850182905291820152909182015290565b85806001600160401b038111156107ab576107ab61204e565b6040519080825280602002602001820160405280156107d4578160200160208202803683370190505b506035549096506001600160a01b031660006107fc426301e133806001600160401b0361146e565b905060005b83811015610a46578a8a8281811061081b5761081b612064565b60209081029290920135600081815260378452604080822081516060808201845282548252600180840154838a0152845160808101865260028501546001600160a01b031681526003850154818b015260048501548187015260059094015460ff1615158483015282850193845282518652603689529484902084518086019095528054855290940154968301969096525190910151919b509850919650610a3e90505760208601514210156108e4576040516372d1250d60e01b815260040160405180910390fd5b84604001516040015160000361090d576040516323bbcc0160e01b815260040160405180910390fd5b6040850151602001516109209088612090565b60405163fc284d1160e01b8152600481018a90526001600160401b03841660248201529097506001600160a01b0384169063fc284d1190604401600060405180830381600087803b15801561097457600080fd5b505af1158015610988573d6000803e3d6000fd5b505050506040858101515190516323b872dd60e01b81523060048201526001600160a01b039182166024820152604481018a9052908416906323b872dd90606401600060405180830381600087803b1580156109e357600080fd5b505af11580156109f7573d6000803e3d6000fd5b505050506001898281518110610a0f57610a0f612064565b911515602092830291909101820181905260008a815260379092526040909120600501805460ff191690911790555b600101610801565b50603854610a5d906001600160a01b0316876114a4565b5050505050505092915050565b600080516020612451833981519152610a82816113bf565b85610a8c81611509565b84801580610a9a5750808414155b15610ab857604051634ec4810560e11b815260040160405180910390fd5b6000806000805b84811015610b81578a8a82818110610ad957610ad9612064565b905060200201359350610aeb846106fb565b610b0857604051637d6fe8d760e11b815260040160405180910390fd5b6000848152603760205260409020805493509150821580610b2857508b83145b80610b3557506004820154155b610b5257604051631dc8374160e01b815260040160405180910390fd5b8b8255888882818110610b6757610b67612064565b905060200201358260010181905550806001019050610abf565b508a7f9a845a1c4235343a450f5e39d4179b7e2a6c9586c02bff45d956717f4a19dd948b8b8b8b604051610bb894939291906120d5565b60405180910390a25050505050505050505050565b610c0b604080516060808201835260008083526020808401829052845160808101865282815290810182905280850182905291820152909182015290565b5060008181526037602090815260408083208151606080820184528254825260018084015483870152845160808101865260028501546001600160a01b0316815260038501548188015260048501548187015260059094015460ff161515918401919091528184019290925280518351808501855286815285018690528552603684528285208351808501909452805484529091015492820192909252909190610cb58382611556565b915050915091565b6060600080516020612451833981519152610cd7816113bf565b826000819003610cfa57604051634ec4810560e11b815260040160405180910390fd5b806001600160401b03811115610d1257610d1261204e565b604051908082528060200260200182016040528015610d3b578160200160208202803683370190505b506035549093506001600160a01b03167fba69923fa107dbf5a25a073a10b7c9216ae39fbadc95dc891d460d9ae315d6886301e1338060005b84811015610e6c57836001600160a01b0316630570891f848b8b85818110610d9e57610d9e612064565b9050602002810190610db09190612107565b600030886040518763ffffffff1660e01b8152600401610dd59695949392919061214d565b60408051808303816000875af1158015610df3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1791906121a9565b9050878281518110610e2b57610e2b612064565b602002602001018181525050610e64878281518110610e4c57610e4c612064565b6020026020010151603a6115ae90919063ffffffff16565b600101610d74565b50505050505092915050565b6000610e83816113bf565b81610e8d816115d7565b83610e9781611509565b60008581526036602090815260409091208535815590850135600182015550847fd8960c7efc6464cdd8dd07f4dc149b0a33bf7f60bf357838722d5b80f988fb1b85604051610ee691906121e3565b60405180910390a25050505050565b6000828152600260205260408120610f0d908361161c565b9392505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60008181526037602090815260408083208151606080820184528254825260018084015483870152845160808101865260028501546001600160a01b0316815260038501548188015260048501548187015260059094015460ff1615159184019190915281840192909252805185526036845282852083518085019094528054845290910154928201929092529091610fd88383611556565b9050610fe382611628565b611000576040516348c6117b60e11b815260040160405180910390fd5b8034101561102157604051632ca2f52b60e11b815260040160405180910390fd5b3361102d816000611643565b61104a57604051634bad17b360e01b815260040160405180910390fd5b604084810151805160209182015160008981526037845284902034600382018190556002820180546001600160a01b0319166001600160a01b038981169182178355426004909501949094558b5188519384529683015295810183905290831660608201529193909290918991907f5934294f4724ea4bb71fee8511b9ccb8dd6d2249ac4d120a81ccfcbbd0ad905f9060800160405180910390a381156110f5576110f583836114a4565b5050505050505050565b6000818152600260205260408120610647906116b9565b60008281526001602081905260409091200154611132816113bf565b61067383836113ee565b600080611148816113bf565b82611152816115d7565b33846040516020016111659291906121fa565b60408051808303601f1901815291815281516020928301206000818152603684529190912086358155918601356001830155935050827fd8960c7efc6464cdd8dd07f4dc149b0a33bf7f60bf357838722d5b80f988fb1b856040516111ca91906121e3565b60405180910390a25050919050565b600054610100900460ff16158080156111f95750600054600160ff909116105b806112135750303b158015611213575060005460ff166001145b6112765760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106e4565b6000805460ff191660011790558015611299576000805461ff0019166101001790555b6112a2836116c3565b6112ab82611410565b6112b6600088611734565b8460008051602061245183398151915260005b8281101561130957611301828a8a848181106112e7576112e7612064565b90506020020160208101906112fc9190612031565b611734565b6001016112c9565b5050603580546001600160a01b0319166001600160a01b03871617905550801561136d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b6000611381816113bf565b6106f7826116c3565b60006001600160e01b03198216637965db0b60e01b148061064757506301ffc9a760e01b6001600160e01b0319831614610647565b6113c9813361173e565b50565b6113d68282611771565b600082815260026020526040902061067390826117dc565b6113f882826117f1565b60008281526002602052604090206106739082611858565b6127108111156114335760405163220f1a1560e01b815260040160405180910390fd5b60398190556040518181527f846b33625d74f443855144a5f2aef4dda303cda3dfb1c704cb58ab70671823429060200160405180910390a150565b60008184118061147d57508183115b15611489575080610f0d565b611493848461186d565b905081811115610f0d575092915050565b60006114b08383611643565b905080610673576114c9836001600160a01b0316611881565b6114d283611897565b6040516020016114e3929190612245565b60408051601f198184030181529082905262461bcd60e51b82526106e4916004016122c3565b60008181526036602090815260409182902082518084019093528054835260010154908201526115399051421090565b6113c95760405163028e4e9760e51b815260040160405180910390fd5b600061156e83602001518460400151602001516118ae565b905082604001516020015160001415801561158c5750602082015142105b15610647576115a483602001516039546127106118c4565b610f0d9082612090565b600881901c600090815260209290925260409091208054600160ff9093169290921b9091179055565b60208101358135111580156115ff57506115ff6115f9368390038301836122f6565b51421090565b6113c9576040516302ef0c7360e21b815260040160405180910390fd5b6000610f0d83836119ae565b60004282600001511115801561064757505060200151421090565b604080516000808252602082019092526001600160a01b03841690839060405161166d9190612352565b60006040518083038185875af1925050503d80600081146116aa576040519150601f19603f3d011682016040523d82523d6000602084013e6116af565b606091505b5090949350505050565b6000610647825490565b6001600160a01b0381166116ea576040516362daafb160e11b815260040160405180910390fd5b603880546001600160a01b0319166001600160a01b0383169081179091556040517f7dae230f18360d76a040c81f050aa14eb9d6dc7901b20fc5d855e2a20fe814d190600090a250565b6106f782826113cc565b6117488282610f14565b6106f75761175581611881565b6117608360206119d8565b6040516020016114e392919061236e565b61177b8282610f14565b6106f75760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b6000610f0d836001600160a01b038416611b73565b6117fb8282610f14565b156106f75760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610f0d836001600160a01b038416611bc2565b818101828110156106475750600019610647565b60606106476001600160a01b03831660146119d8565b6060610647826118a684611cb5565b6001016119d8565b60008183116118bd5781610f0d565b5090919050565b60008080600019858709858702925082811083820303915050806000036118fe578382816118f4576118f46123e3565b0492505050610f0d565b8084116119455760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b60448201526064016106e4565b60008486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091026000889003889004909101858311909403939093029303949094049190911702949350505050565b60008260000182815481106119c5576119c5612064565b9060005260206000200154905092915050565b606060006119e78360026123f9565b6119f2906002612090565b6001600160401b03811115611a0957611a0961204e565b6040519080825280601f01601f191660200182016040528015611a33576020820181803683370190505b509050600360fc1b81600081518110611a4e57611a4e612064565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611a7d57611a7d612064565b60200101906001600160f81b031916908160001a9053506000611aa18460026123f9565b611aac906001612090565b90505b6001811115611b24576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611ae057611ae0612064565b1a60f81b828281518110611af657611af6612064565b60200101906001600160f81b031916908160001a90535060049490941c93611b1d81612410565b9050611aaf565b508315610f0d5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106e4565b6000818152600183016020526040812054611bba57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610647565b506000610647565b60008181526001830160205260408120548015611cab576000611be6600183612427565b8554909150600090611bfa90600190612427565b9050818114611c5f576000866000018281548110611c1a57611c1a612064565b9060005260206000200154905080876000018481548110611c3d57611c3d612064565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611c7057611c7061243a565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610647565b6000915050610647565b600080608083901c15611ccd5760809290921c916010015b604083901c15611ce25760409290921c916008015b602083901c15611cf75760209290921c916004015b601083901c15611d0c5760109290921c916002015b600883901c156106475760010192915050565b600060208284031215611d3157600080fd5b81356001600160e01b031981168114610f0d57600080fd5b600060208284031215611d5b57600080fd5b5035919050565b6001600160a01b03811681146113c957600080fd5b60008060408385031215611d8a57600080fd5b823591506020830135611d9c81611d62565b809150509250929050565b60008083601f840112611db957600080fd5b5081356001600160401b03811115611dd057600080fd5b6020830191508360208260051b8501011115611deb57600080fd5b9250929050565b60008060208385031215611e0557600080fd5b82356001600160401b03811115611e1b57600080fd5b611e2785828601611da7565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b81811015611e6d578351151583529284019291840191600101611e4f565b50909695505050505050565b600080600080600060608688031215611e9157600080fd5b8535945060208601356001600160401b0380821115611eaf57600080fd5b611ebb89838a01611da7565b90965094506040880135915080821115611ed457600080fd5b50611ee188828901611da7565b969995985093965092949392505050565b6020808252825182820181905260009190848201906040850190845b81811015611e6d57835183529284019291840191600101611f0e565b600060408284031215611f3c57600080fd5b50919050565b60008060608385031215611f5557600080fd5b82359150611f668460208501611f2a565b90509250929050565b60008060408385031215611f8257600080fd5b50508035926020909101359150565b600060408284031215611fa357600080fd5b610f0d8383611f2a565b60008060008060008060a08789031215611fc657600080fd5b8635611fd181611d62565b955060208701356001600160401b03811115611fec57600080fd5b611ff889828a01611da7565b909650945050604087013561200c81611d62565b9250606087013561201c81611d62565b80925050608087013590509295509295509295565b60006020828403121561204357600080fd5b8135610f0d81611d62565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156106475761064761207a565b81835260006001600160fb1b038311156120bc57600080fd5b8260051b80836020870137939093016020019392505050565b6040815260006120e96040830186886120a3565b82810360208401526120fc8185876120a3565b979650505050505050565b6000808335601e1984360301811261211e57600080fd5b8301803591506001600160401b0382111561213857600080fd5b602001915036819003821315611deb57600080fd5b86815260a060208201528460a0820152848660c0830137600060c08683018101919091526001600160a01b0394851660408301529290931660608401526001600160401b03166080830152601f909201601f1916010192915050565b600080604083850312156121bc57600080fd5b82516001600160401b03811681146121d357600080fd5b6020939093015192949293505050565b813581526020808301359082015260408101610647565b6001600160a01b038316815260608101610f0d602083018480358252602090810135910152565b60005b8381101561223c578181015183820152602001612224565b50506000910152565b7f5472616e7366657248656c7065723a20636f756c64206e6f74207472616e7366815269032b9102927a7103a37960b51b60208201526000835161229081602a850160208801612221565b660103b30b63ab2960cd1b602a9184019182015283516122b7816031840160208801612221565b01603101949350505050565b60208152600082518060208401526122e2816040850160208701612221565b601f01601f19169190910160400192915050565b60006040828403121561230857600080fd5b604051604081018181106001600160401b038211171561233857634e487b7160e01b600052604160045260246000fd5b604052823581526020928301359281019290925250919050565b60008251612364818460208701612221565b9190910192915050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516123a6816017850160208801612221565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516123d7816028840160208801612221565b01602801949350505050565b634e487b7160e01b600052601260045260246000fd5b80820281158282048414176106475761064761207a565b60008161241f5761241f61207a565b506000190190565b818103818111156106475761064761207a565b634e487b7160e01b600052603160045260246000fdfe97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929a2646970667358221220b309f671b8e19d4b799039d85a64646c38d5a7039b741c8381d1403a8713f8bf64736f6c63430008150033", - "deployer": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", - "devdoc": { - "version": 1, - "kind": "dev", - "methods": { - "bulkClaimBidNames(uint256[])": { - "details": "Bulk claims the bid name. Requirements: - Must be called after ended time. - The method caller can be anyone.", - "params": { - "ids": "The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'" - } - }, - "bulkRegister(string[])": { - "details": "Claims domain names for auction. Requirements: - The method caller must be contract operator.", - "params": { - "labels": "The domain names. Eg, ['foo'] for 'foo.ron'" - }, - "returns": { - "ids": "The id corresponding for namehash of domain names." - } - }, - "createAuctionEvent((uint256,uint256))": { - "details": "Creates a new auction to sale with a specific time period. Requirements: - The method caller must be admin. Emits an event {AuctionEventSet}.", - "returns": { - "auctionId": "The auction id" - } - }, - "getAuction(uint256)": { - "details": "Returns the highest bid and address of the bidder.", - "params": { - "id": "The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'" - } - }, - "getAuctionEvent(bytes32)": { - "details": "Returns the event range of an auction." - }, - "getBidGapRatio()": { - "details": "Returns the gap ratio between 2 bids with the starting price. Value in range [0;100_00] is 0%-100%." - }, - "getRNSUnified()": { - "details": "Returns RNSUnified contract." - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "getTreasury()": { - "details": "Returns the treasury." - }, - "grantRole(bytes32,address)": { - "details": "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." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "listNamesForAuction(bytes32,uint256[],uint256[])": { - "details": "Lists reserved names to sale in a specified auction. Requirements: - The method caller must be contract operator. - Array length are matched and larger than 0. - Only allow to set when the domain is: + Not in any auction. + Or, in the current auction. + Or, this name is not bided. Emits an event {LabelsListed}. Note: If the name is already listed, this method replaces with a new input value.", - "params": { - "ids": "The namehashes id of domain names. Eg, namehash('foo.ron') for 'foo.ron'" - } - }, - "placeBid(uint256)": { - "details": "Places a bid for a domain name. Requirements: - The name is listed, or the auction is happening. - The msg.value is larger than the current bid price or the auction starting price. Emits an event {BidPlaced}.", - "params": { - "id": "The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'" - } - }, - "renounceRole(bytes32,address)": { - "details": "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." - }, - "reserved(uint256)": { - "details": "Checks whether a domain name is currently reserved for auction or not.", - "params": { - "id": "The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'" - } - }, - "revokeRole(bytes32,address)": { - "details": "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." - }, - "setAuctionEvent(bytes32,(uint256,uint256))": { - "details": "Updates the auction details. Requirements: - The method caller must be admin. Emits an event {AuctionEventSet}." - }, - "setBidGapRatio(uint256)": { - "details": "Sets commission ratio. Value in range [0;100_00] is 0%-100%. Requirements: - The method caller must be admin Emits an event {BidGapRatioUpdated}." - }, - "setTreasury(address)": { - "details": "Sets the treasury. Requirements: - The method caller must be admin Emits an event {TreasuryUpdated}." - }, - "supportsInterface(bytes4)": { - "details": "See {IERC165-supportsInterface}." - } + "ast": { + "absolutePath": "src/RNSAuction.sol", + "id": 59608, + "exportedSymbols": { + "AccessControlEnumerable": [ + 48591 + ], + "BitMaps": [ + 53728 + ], + "EventRange": [ + 65922 + ], + "INSAuction": [ + 64365 + ], + "INSUnified": [ + 65002 + ], + "Initializable": [ + 49864 + ], + "LibEventRange": [ + 65993 + ], + "LibRNSDomain": [ + 66069 + ], + "LibSafeRange": [ + 66613 + ], + "Math": [ + 53173 + ], + "RNSAuction": [ + 59607 + ], + "RONTransferHelper": [ + 67471 + ] }, - "events": { - "AuctionEventSet(bytes32,(uint256,uint256))": { - "details": "Emitted when an auction is set." - }, - "BidGapRatioUpdated(uint256)": { - "details": "Emitted when bid gap ratio is updated." - }, - "BidPlaced(bytes32,uint256,uint256,address,uint256,address)": { - "details": "Emitted when a bid is placed for a name." - }, - "Initialized(uint8)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "LabelsListed(bytes32,uint256[],uint256[])": { - "details": "Emitted when the labels are listed for auction." - }, - "RoleAdminChanged(bytes32,bytes32,bytes32)": { - "details": "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._" - }, - "RoleGranted(bytes32,address,address)": { - "details": "Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}." - }, - "RoleRevoked(bytes32,address,address)": { - "details": "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`)" - }, - "TreasuryUpdated(address)": { - "details": "Emitted when the treasury is updated." - } - } - }, - "isFoundry": true, - "metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyBidding\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BidderCannotReceiveRON\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EventIsNotCreatedOrAlreadyStarted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidArrayLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidEventRange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NameNotReserved\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoOneBidded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotYetEnded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NullAssignment\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"QueryIsNotInPeriod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RatioIsTooLarge\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"auctionId\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"startedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"endedAt\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"struct EventRange\",\"name\":\"range\",\"type\":\"tuple\"}],\"name\":\"AuctionEventSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"ratio\",\"type\":\"uint256\"}],\"name\":\"BidGapRatioUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"auctionId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address payable\",\"name\":\"bidder\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousBidder\",\"type\":\"address\"}],\"name\":\"BidPlaced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"auctionId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"startingPrices\",\"type\":\"uint256[]\"}],\"name\":\"LabelsListed\",\"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\":\"addr\",\"type\":\"address\"}],\"name\":\"TreasuryUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_EXPIRY_DURATION\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_EXPIRY\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_PERCENTAGE\",\"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\":[{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"}],\"name\":\"bulkClaimBidNames\",\"outputs\":[{\"internalType\":\"bool[]\",\"name\":\"claimeds\",\"type\":\"bool[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string[]\",\"name\":\"labels\",\"type\":\"string[]\"}],\"name\":\"bulkRegister\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"startedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"endedAt\",\"type\":\"uint256\"}],\"internalType\":\"struct EventRange\",\"name\":\"range\",\"type\":\"tuple\"}],\"name\":\"createAuctionEvent\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"auctionId\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getAuction\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"auctionId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"startingPrice\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address payable\",\"name\":\"bidder\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"claimed\",\"type\":\"bool\"}],\"internalType\":\"struct INSAuction.Bid\",\"name\":\"bid\",\"type\":\"tuple\"}],\"internalType\":\"struct INSAuction.DomainAuction\",\"name\":\"auction\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"beatPrice\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"auctionId\",\"type\":\"bytes32\"}],\"name\":\"getAuctionEvent\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"startedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"endedAt\",\"type\":\"uint256\"}],\"internalType\":\"struct EventRange\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBidGapRatio\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRNSUnified\",\"outputs\":[{\"internalType\":\"contract INSUnified\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTreasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"},{\"internalType\":\"contract INSUnified\",\"name\":\"rnsUnified\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"treasury\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"bidGapRatio\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"auctionId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"startingPrices\",\"type\":\"uint256[]\"}],\"name\":\"listNamesForAuction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"placeBid\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"reserved\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"auctionId\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"startedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"endedAt\",\"type\":\"uint256\"}],\"internalType\":\"struct EventRange\",\"name\":\"range\",\"type\":\"tuple\"}],\"name\":\"setAuctionEvent\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"ratio\",\"type\":\"uint256\"}],\"name\":\"setBidGapRatio\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setTreasury\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"AuctionEventSet(bytes32,(uint256,uint256))\":{\"details\":\"Emitted when an auction is set.\"},\"BidGapRatioUpdated(uint256)\":{\"details\":\"Emitted when bid gap ratio is updated.\"},\"BidPlaced(bytes32,uint256,uint256,address,uint256,address)\":{\"details\":\"Emitted when a bid is placed for a name.\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"LabelsListed(bytes32,uint256[],uint256[])\":{\"details\":\"Emitted when the labels are listed for auction.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"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._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"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`)\"},\"TreasuryUpdated(address)\":{\"details\":\"Emitted when the treasury is updated.\"}},\"kind\":\"dev\",\"methods\":{\"bulkClaimBidNames(uint256[])\":{\"details\":\"Bulk claims the bid name. Requirements: - Must be called after ended time. - The method caller can be anyone.\",\"params\":{\"ids\":\"The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'\"}},\"bulkRegister(string[])\":{\"details\":\"Claims domain names for auction. Requirements: - The method caller must be contract operator.\",\"params\":{\"labels\":\"The domain names. Eg, ['foo'] for 'foo.ron'\"},\"returns\":{\"ids\":\"The id corresponding for namehash of domain names.\"}},\"createAuctionEvent((uint256,uint256))\":{\"details\":\"Creates a new auction to sale with a specific time period. Requirements: - The method caller must be admin. Emits an event {AuctionEventSet}.\",\"returns\":{\"auctionId\":\"The auction id\"}},\"getAuction(uint256)\":{\"details\":\"Returns the highest bid and address of the bidder.\",\"params\":{\"id\":\"The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'\"}},\"getAuctionEvent(bytes32)\":{\"details\":\"Returns the event range of an auction.\"},\"getBidGapRatio()\":{\"details\":\"Returns the gap ratio between 2 bids with the starting price. Value in range [0;100_00] is 0%-100%.\"},\"getRNSUnified()\":{\"details\":\"Returns RNSUnified contract.\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"getTreasury()\":{\"details\":\"Returns the treasury.\"},\"grantRole(bytes32,address)\":{\"details\":\"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.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"listNamesForAuction(bytes32,uint256[],uint256[])\":{\"details\":\"Lists reserved names to sale in a specified auction. Requirements: - The method caller must be contract operator. - Array length are matched and larger than 0. - Only allow to set when the domain is: + Not in any auction. + Or, in the current auction. + Or, this name is not bided. Emits an event {LabelsListed}. Note: If the name is already listed, this method replaces with a new input value.\",\"params\":{\"ids\":\"The namehashes id of domain names. Eg, namehash('foo.ron') for 'foo.ron'\"}},\"placeBid(uint256)\":{\"details\":\"Places a bid for a domain name. Requirements: - The name is listed, or the auction is happening. - The msg.value is larger than the current bid price or the auction starting price. Emits an event {BidPlaced}.\",\"params\":{\"id\":\"The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'\"}},\"renounceRole(bytes32,address)\":{\"details\":\"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.\"},\"reserved(uint256)\":{\"details\":\"Checks whether a domain name is currently reserved for auction or not.\",\"params\":{\"id\":\"The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'\"}},\"revokeRole(bytes32,address)\":{\"details\":\"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.\"},\"setAuctionEvent(bytes32,(uint256,uint256))\":{\"details\":\"Updates the auction details. Requirements: - The method caller must be admin. Emits an event {AuctionEventSet}.\"},\"setBidGapRatio(uint256)\":{\"details\":\"Sets commission ratio. Value in range [0;100_00] is 0%-100%. Requirements: - The method caller must be admin Emits an event {BidGapRatioUpdated}.\"},\"setTreasury(address)\":{\"details\":\"Sets the treasury. Requirements: - The method caller must be admin Emits an event {TreasuryUpdated}.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"stateVariables\":{\"DOMAIN_EXPIRY_DURATION\":{\"details\":\"The expiry duration of a domain after transferring to bidder.\"},\"MAX_EXPIRY\":{\"details\":\"The maximum expiry duration\"},\"MAX_PERCENTAGE\":{\"details\":\"Max percentage 100%. Values [0; 100_00] reflexes [0; 100%]\"},\"OPERATOR_ROLE\":{\"details\":\"Returns the operator role.\"},\"____gap\":{\"details\":\"Gap for upgradeability.\"},\"_auctionRange\":{\"details\":\"Mapping from auction Id => event range\"},\"_bidGapRatio\":{\"details\":\"The gap ratio between 2 bids with the starting price.\"},\"_domainAuction\":{\"details\":\"Mapping from id of domain names => auction detail.\"},\"_reserved\":{\"details\":\"Mapping from id => bool reserved status\"},\"_rnsUnified\":{\"details\":\"The RNSUnified contract.\"},\"_treasury\":{\"details\":\"The treasury.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"createAuctionEvent((uint256,uint256))\":{\"notice\":\"Please use the method `setAuctionNames` to list all the reserved names.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/RNSAuction.sol\":\"RNSAuction\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@ensdomains/buffer/=lib/buffer/\",\":@ensdomains/ens-contracts/=lib/ens-contracts/contracts/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@pythnetwork/=lib/pyth-sdk-solidity/\",\":@rns-contracts/=src/\",\":buffer/=lib/buffer/contracts/\",\":contract-template/=lib/contract-template/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":ens-contracts/=lib/ens-contracts/contracts/\",\":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/script/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/openzeppelin-contracts/contracts/\",\":pyth-sdk-solidity/=lib/pyth-sdk-solidity/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Strings.sol\\\";\\nimport \\\"../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```solidity\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```solidity\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\\n * to enforce additional security measures for this role.\\n */\\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\\n struct RoleData {\\n mapping(address => bool) members;\\n bytes32 adminRole;\\n }\\n\\n mapping(bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(account),\\n \\\" is missing role \\\",\\n Strings.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * May emit a {RoleGranted} event.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n *\\n * NOTE: This function is deprecated in favor of {_grantRole}.\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0dd6e52cb394d7f5abe5dca2d4908a6be40417914720932de757de34a99ab87f\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerable.sol\\\";\\nimport \\\"./AccessControl.sol\\\";\\nimport \\\"../utils/structs/EnumerableSet.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {\\n return _roleMembers[role].at(index);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n}\\n\",\"keccak256\":\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerable is IAccessControl {\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x3d6069be9b4c01fb81840fb9c2c4dc58dd6a6a4aafaa2c6837de8699574d84c6\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x5bce51e11f7d194b79ea59fe00c9e8de9fa2c5530124960f29a24d4c740a3266\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Metadata is IERC721 {\\n /**\\n * @dev Returns the token collection name.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the token collection symbol.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\\n */\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x75b829ff2f26c14355d1cba20e16fe7b29ca58eb5fef665ede48bc0f9c6c74b9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/structs/BitMaps.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/BitMaps.sol)\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing uint256 to bool mapping in a compact and efficient way, providing the keys are sequential.\\n * Largely inspired by Uniswap's https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol[merkle-distributor].\\n */\\nlibrary BitMaps {\\n struct BitMap {\\n mapping(uint256 => uint256) _data;\\n }\\n\\n /**\\n * @dev Returns whether the bit at `index` is set.\\n */\\n function get(BitMap storage bitmap, uint256 index) internal view returns (bool) {\\n uint256 bucket = index >> 8;\\n uint256 mask = 1 << (index & 0xff);\\n return bitmap._data[bucket] & mask != 0;\\n }\\n\\n /**\\n * @dev Sets the bit at `index` to the boolean `value`.\\n */\\n function setTo(BitMap storage bitmap, uint256 index, bool value) internal {\\n if (value) {\\n set(bitmap, index);\\n } else {\\n unset(bitmap, index);\\n }\\n }\\n\\n /**\\n * @dev Sets the bit at `index`.\\n */\\n function set(BitMap storage bitmap, uint256 index) internal {\\n uint256 bucket = index >> 8;\\n uint256 mask = 1 << (index & 0xff);\\n bitmap._data[bucket] |= mask;\\n }\\n\\n /**\\n * @dev Unsets the bit at `index`.\\n */\\n function unset(BitMap storage bitmap, uint256 index) internal {\\n uint256 bucket = index >> 8;\\n uint256 mask = 1 << (index & 0xff);\\n bitmap._data[bucket] &= ~mask;\\n }\\n}\\n\",\"keccak256\":\"0xac946730f979a447732a5bed58aa30c995ae666c3e1663b312ab5fd11dbe3eb6\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"src/RNSAuction.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport { AccessControlEnumerable } from \\\"@openzeppelin/contracts/access/AccessControlEnumerable.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { BitMaps } from \\\"@openzeppelin/contracts/utils/structs/BitMaps.sol\\\";\\nimport { INSUnified, INSAuction } from \\\"./interfaces/INSAuction.sol\\\";\\nimport { LibSafeRange } from \\\"./libraries/math/LibSafeRange.sol\\\";\\nimport { LibRNSDomain } from \\\"./libraries/LibRNSDomain.sol\\\";\\nimport { LibEventRange, EventRange } from \\\"./libraries/LibEventRange.sol\\\";\\nimport { RONTransferHelper } from \\\"./libraries/transfers/RONTransferHelper.sol\\\";\\n\\ncontract RNSAuction is Initializable, AccessControlEnumerable, INSAuction {\\n using LibSafeRange for uint256;\\n using BitMaps for BitMaps.BitMap;\\n using LibEventRange for EventRange;\\n\\n /// @inheritdoc INSAuction\\n uint64 public constant MAX_EXPIRY = type(uint64).max;\\n /// @inheritdoc INSAuction\\n uint256 public constant MAX_PERCENTAGE = 100_00;\\n /// @inheritdoc INSAuction\\n uint64 public constant DOMAIN_EXPIRY_DURATION = 365 days;\\n /// @inheritdoc INSAuction\\n bytes32 public constant OPERATOR_ROLE = keccak256(\\\"OPERATOR_ROLE\\\");\\n\\n /// @dev Gap for upgradeability.\\n uint256[50] private ____gap;\\n\\n /// @dev The RNSUnified contract.\\n INSUnified internal _rnsUnified;\\n /// @dev Mapping from auction Id => event range\\n mapping(bytes32 auctionId => EventRange) internal _auctionRange;\\n /// @dev Mapping from id of domain names => auction detail.\\n mapping(uint256 id => DomainAuction) internal _domainAuction;\\n\\n /// @dev The treasury.\\n address payable internal _treasury;\\n /// @dev The gap ratio between 2 bids with the starting price.\\n uint256 internal _bidGapRatio;\\n /// @dev Mapping from id => bool reserved status\\n BitMaps.BitMap internal _reserved;\\n\\n modifier whenNotStarted(bytes32 auctionId) {\\n _requireNotStarted(auctionId);\\n _;\\n }\\n\\n modifier onlyValidEventRange(EventRange calldata range) {\\n _requireValidEventRange(range);\\n _;\\n }\\n\\n constructor() payable {\\n _disableInitializers();\\n }\\n\\n function initialize(\\n address admin,\\n address[] calldata operators,\\n INSUnified rnsUnified,\\n address payable treasury,\\n uint256 bidGapRatio\\n ) external initializer {\\n _setTreasury(treasury);\\n _setBidGapRatio(bidGapRatio);\\n _setupRole(DEFAULT_ADMIN_ROLE, admin);\\n\\n uint256 length = operators.length;\\n bytes32 operatorRole = OPERATOR_ROLE;\\n\\n for (uint256 i; i < length;) {\\n _setupRole(operatorRole, operators[i]);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n _rnsUnified = rnsUnified;\\n }\\n\\n /**\\n * @inheritdoc INSAuction\\n */\\n function bulkRegister(string[] calldata labels) external onlyRole(OPERATOR_ROLE) returns (uint256[] memory ids) {\\n uint256 length = labels.length;\\n if (length == 0) revert InvalidArrayLength();\\n ids = new uint256[](length);\\n INSUnified rnsUnified = _rnsUnified;\\n uint256 parentId = LibRNSDomain.RON_ID;\\n uint64 domainExpiryDuration = DOMAIN_EXPIRY_DURATION;\\n\\n for (uint256 i; i < length;) {\\n (, ids[i]) = rnsUnified.mint(parentId, labels[i], address(0x0), address(this), domainExpiryDuration);\\n _reserved.set(ids[i]);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @inheritdoc INSAuction\\n */\\n function reserved(uint256 id) public view returns (bool) {\\n return _reserved.get(id);\\n }\\n\\n /**\\n * @inheritdoc INSAuction\\n */\\n function createAuctionEvent(EventRange calldata range)\\n external\\n onlyRole(DEFAULT_ADMIN_ROLE)\\n onlyValidEventRange(range)\\n returns (bytes32 auctionId)\\n {\\n auctionId = keccak256(abi.encode(_msgSender(), range));\\n _auctionRange[auctionId] = range;\\n emit AuctionEventSet(auctionId, range);\\n }\\n\\n /**\\n * @inheritdoc INSAuction\\n */\\n function setAuctionEvent(bytes32 auctionId, EventRange calldata range)\\n external\\n onlyRole(DEFAULT_ADMIN_ROLE)\\n onlyValidEventRange(range)\\n whenNotStarted(auctionId)\\n {\\n _auctionRange[auctionId] = range;\\n emit AuctionEventSet(auctionId, range);\\n }\\n\\n /**\\n * @inheritdoc INSAuction\\n */\\n function getAuctionEvent(bytes32 auctionId) public view returns (EventRange memory) {\\n return _auctionRange[auctionId];\\n }\\n\\n /**\\n * @inheritdoc INSAuction\\n */\\n function listNamesForAuction(bytes32 auctionId, uint256[] calldata ids, uint256[] calldata startingPrices)\\n external\\n onlyRole(OPERATOR_ROLE)\\n whenNotStarted(auctionId)\\n {\\n uint256 length = ids.length;\\n if (length == 0 || length != startingPrices.length) revert InvalidArrayLength();\\n uint256 id;\\n bytes32 mAuctionId;\\n DomainAuction storage sAuction;\\n\\n for (uint256 i; i < length;) {\\n id = ids[i];\\n if (!reserved(id)) revert NameNotReserved();\\n\\n sAuction = _domainAuction[id];\\n mAuctionId = sAuction.auctionId;\\n if (!(mAuctionId == 0 || mAuctionId == auctionId || sAuction.bid.timestamp == 0)) {\\n revert AlreadyBidding();\\n }\\n\\n sAuction.auctionId = auctionId;\\n sAuction.startingPrice = startingPrices[i];\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n emit LabelsListed(auctionId, ids, startingPrices);\\n }\\n\\n /**\\n * @inheritdoc INSAuction\\n */\\n function placeBid(uint256 id) external payable {\\n DomainAuction memory auction = _domainAuction[id];\\n EventRange memory range = _auctionRange[auction.auctionId];\\n uint256 beatPrice = _getBeatPrice(auction, range);\\n\\n if (!range.isInPeriod()) revert QueryIsNotInPeriod();\\n if (msg.value < beatPrice) revert InsufficientAmount();\\n address payable bidder = payable(_msgSender());\\n // check whether the bidder can receive RON\\n if (!RONTransferHelper.send(bidder, 0)) revert BidderCannotReceiveRON();\\n address payable prvBidder = auction.bid.bidder;\\n uint256 prvPrice = auction.bid.price;\\n\\n Bid storage sBid = _domainAuction[id].bid;\\n sBid.price = msg.value;\\n sBid.bidder = bidder;\\n sBid.timestamp = block.timestamp;\\n emit BidPlaced(auction.auctionId, id, msg.value, bidder, prvPrice, prvBidder);\\n\\n // refund for previous bidder\\n if (prvPrice != 0) RONTransferHelper.safeTransfer(prvBidder, prvPrice);\\n }\\n\\n /**\\n * @inheritdoc INSAuction\\n */\\n function bulkClaimBidNames(uint256[] calldata ids) external returns (bool[] memory claimeds) {\\n uint256 id;\\n uint256 accumulatedRON;\\n EventRange memory range;\\n DomainAuction memory auction;\\n uint256 length = ids.length;\\n claimeds = new bool[](length);\\n INSUnified rnsUnified = _rnsUnified;\\n uint64 expiry = uint64(block.timestamp.addWithUpperbound(DOMAIN_EXPIRY_DURATION, MAX_EXPIRY));\\n\\n for (uint256 i; i < length;) {\\n id = ids[i];\\n auction = _domainAuction[id];\\n range = _auctionRange[auction.auctionId];\\n\\n if (!auction.bid.claimed) {\\n if (!range.isEnded()) revert NotYetEnded();\\n if (auction.bid.timestamp == 0) revert NoOneBidded();\\n\\n accumulatedRON += auction.bid.price;\\n rnsUnified.setExpiry(id, expiry);\\n rnsUnified.transferFrom(address(this), auction.bid.bidder, id);\\n\\n _domainAuction[id].bid.claimed = claimeds[i] = true;\\n }\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n RONTransferHelper.safeTransfer(_treasury, accumulatedRON);\\n }\\n\\n /**\\n * @inheritdoc INSAuction\\n */\\n function getRNSUnified() external view returns (INSUnified) {\\n return _rnsUnified;\\n }\\n\\n /**\\n * @inheritdoc INSAuction\\n */\\n function getTreasury() external view returns (address) {\\n return _treasury;\\n }\\n\\n /**\\n * @inheritdoc INSAuction\\n */\\n function getBidGapRatio() external view returns (uint256) {\\n return _bidGapRatio;\\n }\\n\\n /**\\n * @inheritdoc INSAuction\\n */\\n function setTreasury(address payable addr) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _setTreasury(addr);\\n }\\n\\n /**\\n * @inheritdoc INSAuction\\n */\\n\\n function setBidGapRatio(uint256 ratio) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _setBidGapRatio(ratio);\\n }\\n\\n /**\\n * @inheritdoc INSAuction\\n */\\n function getAuction(uint256 id) public view returns (DomainAuction memory auction, uint256 beatPrice) {\\n auction = _domainAuction[id];\\n EventRange memory range = getAuctionEvent(auction.auctionId);\\n beatPrice = _getBeatPrice(auction, range);\\n }\\n\\n /**\\n * @dev Helper method to set treasury.\\n *\\n * Emits an event {TreasuryUpdated}.\\n */\\n function _setTreasury(address payable addr) internal {\\n if (addr == address(0)) revert NullAssignment();\\n _treasury = addr;\\n emit TreasuryUpdated(addr);\\n }\\n\\n /**\\n * @dev Helper method to set bid gap ratio.\\n *\\n * Emits an event {BidGapRatioUpdated}.\\n */\\n function _setBidGapRatio(uint256 ratio) internal {\\n if (ratio > MAX_PERCENTAGE) revert RatioIsTooLarge();\\n _bidGapRatio = ratio;\\n emit BidGapRatioUpdated(ratio);\\n }\\n\\n /**\\n * @dev Helper method to get beat price.\\n */\\n function _getBeatPrice(DomainAuction memory auction, EventRange memory range)\\n internal\\n view\\n returns (uint256 beatPrice)\\n {\\n beatPrice = Math.max(auction.startingPrice, auction.bid.price);\\n // Beats price increases if domain is already bided and the event is not yet ended.\\n if (auction.bid.price != 0 && !range.isEnded()) {\\n beatPrice += Math.mulDiv(auction.startingPrice, _bidGapRatio, MAX_PERCENTAGE);\\n }\\n }\\n\\n /**\\n * @dev Helper method to ensure event range is valid.\\n */\\n function _requireValidEventRange(EventRange calldata range) internal view {\\n if (!(range.valid() && range.isNotYetStarted())) revert InvalidEventRange();\\n }\\n\\n /**\\n * @dev Helper method to ensure the auction is not yet started or not created.\\n */\\n function _requireNotStarted(bytes32 auctionId) internal view {\\n if (!_auctionRange[auctionId].isNotYetStarted()) revert EventIsNotCreatedOrAlreadyStarted();\\n }\\n}\\n\",\"keccak256\":\"0x829b755e81046b001c5b371494adcf15a22486fb379141a952d8df6b85c786ee\",\"license\":\"MIT\"},\"src/interfaces/INSAuction.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nimport { INSUnified } from \\\"./INSUnified.sol\\\";\\nimport { EventRange } from \\\"../libraries/LibEventRange.sol\\\";\\n\\ninterface INSAuction {\\n error NotYetEnded();\\n error NoOneBidded();\\n error NullAssignment();\\n error AlreadyBidding();\\n error RatioIsTooLarge();\\n error NameNotReserved();\\n error InvalidEventRange();\\n error QueryIsNotInPeriod();\\n error InsufficientAmount();\\n error InvalidArrayLength();\\n error BidderCannotReceiveRON();\\n error EventIsNotCreatedOrAlreadyStarted();\\n\\n struct Bid {\\n address payable bidder;\\n uint256 price;\\n uint256 timestamp;\\n bool claimed;\\n }\\n\\n struct DomainAuction {\\n bytes32 auctionId;\\n uint256 startingPrice;\\n Bid bid;\\n }\\n\\n /// @dev Emitted when an auction is set.\\n event AuctionEventSet(bytes32 indexed auctionId, EventRange range);\\n /// @dev Emitted when the labels are listed for auction.\\n event LabelsListed(bytes32 indexed auctionId, uint256[] ids, uint256[] startingPrices);\\n /// @dev Emitted when a bid is placed for a name.\\n event BidPlaced(\\n bytes32 indexed auctionId,\\n uint256 indexed id,\\n uint256 price,\\n address payable bidder,\\n uint256 previousPrice,\\n address previousBidder\\n );\\n /// @dev Emitted when the treasury is updated.\\n event TreasuryUpdated(address indexed addr);\\n /// @dev Emitted when bid gap ratio is updated.\\n event BidGapRatioUpdated(uint256 ratio);\\n\\n /**\\n * @dev The maximum expiry duration\\n */\\n function MAX_EXPIRY() external pure returns (uint64);\\n\\n /**\\n * @dev Returns the operator role.\\n */\\n function OPERATOR_ROLE() external pure returns (bytes32);\\n\\n /**\\n * @dev Max percentage 100%. Values [0; 100_00] reflexes [0; 100%]\\n */\\n function MAX_PERCENTAGE() external pure returns (uint256);\\n\\n /**\\n * @dev The expiry duration of a domain after transferring to bidder.\\n */\\n function DOMAIN_EXPIRY_DURATION() external pure returns (uint64);\\n\\n /**\\n * @dev Claims domain names for auction.\\n *\\n * Requirements:\\n * - The method caller must be contract operator.\\n *\\n * @param labels The domain names. Eg, ['foo'] for 'foo.ron'\\n * @return ids The id corresponding for namehash of domain names.\\n */\\n function bulkRegister(string[] calldata labels) external returns (uint256[] memory ids);\\n\\n /**\\n * @dev Checks whether a domain name is currently reserved for auction or not.\\n * @param id The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'\\n */\\n function reserved(uint256 id) external view returns (bool);\\n\\n /**\\n * @dev Creates a new auction to sale with a specific time period.\\n *\\n * Requirements:\\n * - The method caller must be admin.\\n *\\n * Emits an event {AuctionEventSet}.\\n *\\n * @return auctionId The auction id\\n * @notice Please use the method `setAuctionNames` to list all the reserved names.\\n */\\n function createAuctionEvent(EventRange calldata range) external returns (bytes32 auctionId);\\n\\n /**\\n * @dev Updates the auction details.\\n *\\n * Requirements:\\n * - The method caller must be admin.\\n *\\n * Emits an event {AuctionEventSet}.\\n */\\n function setAuctionEvent(bytes32 auctionId, EventRange calldata range) external;\\n\\n /**\\n * @dev Returns the event range of an auction.\\n */\\n function getAuctionEvent(bytes32 auctionId) external view returns (EventRange memory);\\n\\n /**\\n * @dev Lists reserved names to sale in a specified auction.\\n *\\n * Requirements:\\n * - The method caller must be contract operator.\\n * - Array length are matched and larger than 0.\\n * - Only allow to set when the domain is:\\n * + Not in any auction.\\n * + Or, in the current auction.\\n * + Or, this name is not bided.\\n *\\n * Emits an event {LabelsListed}.\\n *\\n * Note: If the name is already listed, this method replaces with a new input value.\\n *\\n * @param ids The namehashes id of domain names. Eg, namehash('foo.ron') for 'foo.ron'\\n */\\n function listNamesForAuction(bytes32 auctionId, uint256[] calldata ids, uint256[] calldata startingPrices) external;\\n\\n /**\\n * @dev Places a bid for a domain name.\\n *\\n * Requirements:\\n * - The name is listed, or the auction is happening.\\n * - The msg.value is larger than the current bid price or the auction starting price.\\n *\\n * Emits an event {BidPlaced}.\\n *\\n * @param id The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'\\n */\\n function placeBid(uint256 id) external payable;\\n\\n /**\\n * @dev Returns the highest bid and address of the bidder.\\n * @param id The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'\\n */\\n function getAuction(uint256 id) external view returns (DomainAuction memory, uint256 beatPrice);\\n\\n /**\\n * @dev Bulk claims the bid name.\\n *\\n * Requirements:\\n * - Must be called after ended time.\\n * - The method caller can be anyone.\\n *\\n * @param ids The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'\\n */\\n function bulkClaimBidNames(uint256[] calldata ids) external returns (bool[] memory claimeds);\\n\\n /**\\n * @dev Returns the treasury.\\n */\\n function getTreasury() external view returns (address);\\n\\n /**\\n * @dev Returns the gap ratio between 2 bids with the starting price. Value in range [0;100_00] is 0%-100%.\\n */\\n function getBidGapRatio() external view returns (uint256);\\n\\n /**\\n * @dev Sets the treasury.\\n *\\n * Requirements:\\n * - The method caller must be admin\\n *\\n * Emits an event {TreasuryUpdated}.\\n */\\n function setTreasury(address payable) external;\\n\\n /**\\n * @dev Sets commission ratio. Value in range [0;100_00] is 0%-100%.\\n *\\n * Requirements:\\n * - The method caller must be admin\\n *\\n * Emits an event {BidGapRatioUpdated}.\\n */\\n function setBidGapRatio(uint256) external;\\n\\n /**\\n * @dev Returns RNSUnified contract.\\n */\\n function getRNSUnified() external view returns (INSUnified);\\n}\\n\",\"keccak256\":\"0xb82e08a142b165c1e794a2c4207ba56154ffbfdaed0fd00bc0b858a6588ebe4f\",\"license\":\"MIT\"},\"src/interfaces/INSUnified.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nimport { IERC721Metadata } from \\\"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol\\\";\\nimport { IAccessControlEnumerable } from \\\"@openzeppelin/contracts/access/IAccessControlEnumerable.sol\\\";\\nimport { ModifyingIndicator } from \\\"../types/ModifyingIndicator.sol\\\";\\n\\ninterface INSUnified is IAccessControlEnumerable, IERC721Metadata {\\n /// @dev Error: The provided token id is expired.\\n error Expired();\\n /// @dev Error: The provided token id is unexists.\\n error Unexists();\\n /// @dev Error: The provided id expiry is greater than parent id expiry.\\n error ExceedParentExpiry();\\n /// @dev Error: The provided name is unavailable for registration.\\n error Unavailable();\\n /// @dev Error: The sender lacks the necessary permissions.\\n error Unauthorized();\\n /// @dev Error: Missing controller role required for modification.\\n error MissingControllerRole();\\n /// @dev Error: Attempting to set an immutable field, which cannot be modified.\\n error CannotSetImmutableField();\\n /// @dev Error: Missing protected settler role required for modification.\\n error MissingProtectedSettlerRole();\\n /// @dev Error: Attempting to set an expiry time that is not larger than the previous one.\\n error ExpiryTimeMustBeLargerThanTheOldOne();\\n /// @dev Error: The provided name must be registered or is in a grace period.\\n error NameMustBeRegisteredOrInGracePeriod();\\n\\n /**\\n * | Fields\\\\Idc | Modifying Indicator |\\n * | ---------- | ------------------- |\\n * | depth | 0b00000001 |\\n * | parentId | 0b00000010 |\\n * | label | 0b00000100 |\\n */\\n struct ImmutableRecord {\\n // The level-th of a domain.\\n uint8 depth;\\n // The node of parent token. Eg, parent node of vip.duke.ron equals to namehash('duke.ron')\\n uint256 parentId;\\n // The label of a domain. Eg, label is vip for domain vip.duke.ron\\n string label;\\n }\\n\\n /**\\n * | Fields\\\\Idc,Roles | Modifying Indicator | Controller | Protected setter | (Parent) Owner/Spender |\\n * | ---------------- | ------------------- | ---------- | ---------------- | ---------------------- |\\n * | resolver | 0b00001000 | x | | x |\\n * | owner | 0b00010000 | x | | x |\\n * | expiry | 0b00100000 | x | | |\\n * | protected | 0b01000000 | | x | |\\n * Note: (Parent) Owner/Spender means parent owner or current owner or current token spender.\\n */\\n struct MutableRecord {\\n // The resolver address.\\n address resolver;\\n // The record owner. This field must equal to the owner of token.\\n address owner;\\n // Expiry timestamp.\\n uint64 expiry;\\n // Flag indicating whether the token is protected or not.\\n bool protected;\\n }\\n\\n struct Record {\\n ImmutableRecord immut;\\n MutableRecord mut;\\n }\\n\\n /// @dev Emitted when a base URI is updated.\\n event BaseURIUpdated(address indexed operator, string newURI);\\n /// @dev Emitted when the grace period for all domain is updated.\\n event GracePeriodUpdated(address indexed operator, uint64 newGracePeriod);\\n\\n /**\\n * @dev Emitted when the record of node is updated.\\n * @param indicator The binary index of updated fields. Eg, 0b10101011 means fields at position 1, 2, 4, 6, 8 (right\\n * to left) needs to be updated.\\n * @param record The updated fields.\\n */\\n event RecordUpdated(uint256 indexed node, ModifyingIndicator indicator, Record record);\\n\\n /**\\n * @dev Returns the controller role.\\n * @notice Can set all fields {Record.mut} in token record, excepting {Record.mut.protected}.\\n */\\n function CONTROLLER_ROLE() external pure returns (bytes32);\\n\\n /**\\n * @dev Returns the protected setter role.\\n * @notice Can set field {Record.mut.protected} in token record by using method `bulkSetProtected`.\\n */\\n function PROTECTED_SETTLER_ROLE() external pure returns (bytes32);\\n\\n /**\\n * @dev Returns the reservation role.\\n * @notice Never expire for token owner has this role.\\n */\\n function RESERVATION_ROLE() external pure returns (bytes32);\\n\\n /**\\n * @dev Returns the max expiry value.\\n */\\n function MAX_EXPIRY() external pure returns (uint64);\\n\\n /**\\n * @dev Returns the name hash output of a domain.\\n */\\n function namehash(string memory domain) external pure returns (bytes32 node);\\n\\n /**\\n * @dev Returns true if the specified name is available for registration.\\n * Note: Only available after passing the grace period.\\n */\\n function available(uint256 id) external view returns (bool);\\n\\n /**\\n * @dev Returns the grace period in second(s).\\n * Note: This period affects the availability of the domain.\\n */\\n function getGracePeriod() external view returns (uint64);\\n\\n /**\\n * @dev Returns the total minted ids.\\n * Note: Burning id will not affect `totalMinted`.\\n */\\n function totalMinted() external view returns (uint256);\\n\\n /**\\n * @dev Sets the grace period in second(s).\\n *\\n * Requirements:\\n * - The method caller must have controller role.\\n *\\n * Note: This period affects the availability of the domain.\\n */\\n function setGracePeriod(uint64) external;\\n\\n /**\\n * @dev Sets the base uri.\\n *\\n * Requirements:\\n * - The method caller must be contract owner.\\n *\\n */\\n function setBaseURI(string calldata baseTokenURI) external;\\n\\n /**\\n * @dev Mints token for subnode.\\n *\\n * Requirements:\\n * - The token must be available.\\n * - The method caller must be (parent) owner or approved spender. See struct {MutableRecord}.\\n *\\n * Emits an event {RecordUpdated}.\\n *\\n * @param parentId The parent node to mint or create subnode.\\n * @param label The domain label. Eg, label is duke for domain duke.ron.\\n * @param resolver The resolver address.\\n * @param owner The token owner.\\n * @param duration Duration in second(s) to expire. Leave 0 to set as parent.\\n */\\n function mint(uint256 parentId, string calldata label, address resolver, address owner, uint64 duration)\\n external\\n returns (uint64 expiryTime, uint256 id);\\n\\n /**\\n * @dev Returns all record of a domain.\\n * Reverts if the token is non existent.\\n */\\n function getRecord(uint256 id) external view returns (Record memory record);\\n\\n /**\\n * @dev Returns the domain name of id.\\n */\\n function getDomain(uint256 id) external view returns (string memory domain);\\n\\n /**\\n * @dev Returns whether the requester is able to modify the record based on the updated index.\\n * Note: This method strictly follows the permission of struct {MutableRecord}.\\n */\\n function canSetRecord(address requester, uint256 id, ModifyingIndicator indicator)\\n external\\n view\\n returns (bool, bytes4 error);\\n\\n /**\\n * @dev Sets record of existing token. Update operation for {Record.mut}.\\n *\\n * Requirements:\\n * - The method caller must have role based on the corresponding `indicator`. See struct {MutableRecord}.\\n *\\n * Emits an event {RecordUpdated}.\\n */\\n function setRecord(uint256 id, ModifyingIndicator indicator, MutableRecord calldata record) external;\\n\\n /**\\n * @dev Reclaims ownership. Update operation for {Record.mut.owner}.\\n *\\n * Requirements:\\n * - The method caller should have controller role.\\n * - The method caller should be (parent) owner or approved spender. See struct {MutableRecord}.\\n *\\n * Emits an event {RecordUpdated}.\\n */\\n function reclaim(uint256 id, address owner) external;\\n\\n /**\\n * @dev Renews token. Update operation for {Record.mut.expiry}.\\n *\\n * Requirements:\\n * - The method caller should have controller role.\\n *\\n * Emits an event {RecordUpdated}.\\n */\\n function renew(uint256 id, uint64 duration) external returns (uint64 expiry);\\n\\n /**\\n * @dev Sets expiry time for a token. Update operation for {Record.mut.expiry}.\\n *\\n * Requirements:\\n * - The method caller must have controller role.\\n *\\n * Emits an event {RecordUpdated}.\\n */\\n function setExpiry(uint256 id, uint64 expiry) external;\\n\\n /**\\n * @dev Sets the protected status of a list of ids. Update operation for {Record.mut.protected}.\\n *\\n * Requirements:\\n * - The method caller must have protected setter role.\\n *\\n * Emits events {RecordUpdated}.\\n */\\n function bulkSetProtected(uint256[] calldata ids, bool protected) external;\\n}\\n\",\"keccak256\":\"0xaef1c58bb7c8688d6677a1c2739c0dc9e645ca5c64dd875be2f2b7a318a11406\",\"license\":\"MIT\"},\"src/libraries/LibEventRange.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nstruct EventRange {\\n uint256 startedAt;\\n uint256 endedAt;\\n}\\n\\nlibrary LibEventRange {\\n /**\\n * @dev Checks whether the event range is valid.\\n */\\n function valid(EventRange calldata range) internal pure returns (bool) {\\n return range.startedAt <= range.endedAt;\\n }\\n\\n /**\\n * @dev Returns whether the current range is not yet started.\\n */\\n function isNotYetStarted(EventRange memory range) internal view returns (bool) {\\n return block.timestamp < range.startedAt;\\n }\\n\\n /**\\n * @dev Returns whether the current range is ended or not.\\n */\\n function isEnded(EventRange memory range) internal view returns (bool) {\\n return range.endedAt <= block.timestamp;\\n }\\n\\n /**\\n * @dev Returns whether the current block is in period.\\n */\\n function isInPeriod(EventRange memory range) internal view returns (bool) {\\n return range.startedAt <= block.timestamp && block.timestamp < range.endedAt;\\n }\\n}\\n\",\"keccak256\":\"0x95bf015c4245919cbcbcd810dd597fdb23eb4e58b62df8ef74b1c8c60a969bea\",\"license\":\"MIT\"},\"src/libraries/LibRNSDomain.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nlibrary LibRNSDomain {\\n /// @dev Value equals to namehash('ron')\\n uint256 internal constant RON_ID = 0xba69923fa107dbf5a25a073a10b7c9216ae39fbadc95dc891d460d9ae315d688;\\n /// @dev Value equals to namehash('addr.reverse')\\n uint256 internal constant ADDR_REVERSE_ID = 0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2;\\n\\n /**\\n * @dev Calculate the corresponding id given parentId and label.\\n */\\n function toId(uint256 parentId, string memory label) internal pure returns (uint256 id) {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x0, parentId)\\n mstore(0x20, keccak256(add(label, 32), mload(label)))\\n id := keccak256(0x0, 64)\\n }\\n }\\n\\n /**\\n * @dev Calculates the hash of the label.\\n */\\n function hashLabel(string memory label) internal pure returns (bytes32 hashed) {\\n assembly (\\\"memory-safe\\\") {\\n hashed := keccak256(add(label, 32), mload(label))\\n }\\n }\\n\\n /**\\n * @dev Calculate the RNS namehash of a str.\\n */\\n function namehash(string memory str) internal pure returns (bytes32 hashed) {\\n // notice: this method is case-sensitive, ensure the string is lowercased before calling this method\\n assembly (\\\"memory-safe\\\") {\\n // load str length\\n let len := mload(str)\\n // returns bytes32(0x0) if length is zero\\n if iszero(iszero(len)) {\\n let hashedLen\\n // compute pointer to str[0]\\n let head := add(str, 32)\\n // compute pointer to str[length - 1]\\n let tail := add(head, sub(len, 1))\\n // cleanup dirty bytes if contains any\\n mstore(0x0, 0)\\n // loop backwards from `tail` to `head`\\n for { let i := tail } iszero(lt(i, head)) { i := sub(i, 1) } {\\n // check if `i` is `head`\\n let isHead := eq(i, head)\\n // check if `str[i-1]` is \\\".\\\"\\n // `0x2e` == bytes1(\\\".\\\")\\n let isDotNext := eq(shr(248, mload(sub(i, 1))), 0x2e)\\n if or(isHead, isDotNext) {\\n // size = distance(length, i) - hashedLength + 1\\n let size := add(sub(sub(tail, i), hashedLen), 1)\\n mstore(0x20, keccak256(i, size))\\n mstore(0x0, keccak256(0x0, 64))\\n // skip \\\".\\\" thereby + 1\\n hashedLen := add(hashedLen, add(size, 1))\\n }\\n }\\n }\\n hashed := mload(0x0)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x715029b2b420c6ec00bc1f939b837acf45d247fde8426089575b0e7b5e84518b\",\"license\":\"MIT\"},\"src/libraries/math/LibSafeRange.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nlibrary LibSafeRange {\\n function add(uint256 a, uint256 b) internal pure returns (uint256 c) {\\n unchecked {\\n c = a + b;\\n if (c < a) return type(uint256).max;\\n }\\n }\\n\\n /**\\n * @dev Returns value of a + b; in case result is larger than upperbound, upperbound is returned.\\n */\\n function addWithUpperbound(uint256 a, uint256 b, uint256 ceil) internal pure returns (uint256 c) {\\n if (a > ceil || b > ceil) return ceil;\\n c = add(a, b);\\n if (c > ceil) return ceil;\\n }\\n}\\n\",\"keccak256\":\"0x12cf5f592a2d80b9c1b0ea11b8fe2b3ed42fc6d62303ba667edc56464baa8810\",\"license\":\"MIT\"},\"src/libraries/transfers/RONTransferHelper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { Strings } from \\\"@openzeppelin/contracts/utils/Strings.sol\\\";\\n\\n/**\\n * @title RONTransferHelper\\n */\\nlibrary RONTransferHelper {\\n using Strings for *;\\n\\n /**\\n * @dev Transfers RON and wraps result for the method caller to a recipient.\\n */\\n function safeTransfer(address payable _to, uint256 _value) internal {\\n bool _success = send(_to, _value);\\n if (!_success) {\\n revert(\\n string.concat(\\\"TransferHelper: could not transfer RON to \\\", _to.toHexString(), \\\" value \\\", _value.toHexString())\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns whether the call was success.\\n * Note: this function should use with the `ReentrancyGuard`.\\n */\\n function send(address payable _to, uint256 _value) internal returns (bool _success) {\\n (_success,) = _to.call{ value: _value }(new bytes(0));\\n }\\n}\\n\",\"keccak256\":\"0x733e60374ee0a33d0da2ee24976b893ca6b6d9764243b175e1ac8025240394da\",\"license\":\"MIT\"},\"src/types/ModifyingIndicator.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\ntype ModifyingIndicator is uint256;\\n\\nusing { hasAny } for ModifyingIndicator global;\\nusing { or as | } for ModifyingIndicator global;\\nusing { and as & } for ModifyingIndicator global;\\nusing { eq as == } for ModifyingIndicator global;\\nusing { not as ~ } for ModifyingIndicator global;\\nusing { neq as != } for ModifyingIndicator global;\\n\\n/// @dev Indicator for modifying immutable fields: Depth, ParentId, Label. See struct {INSUnified.ImmutableRecord}.\\nModifyingIndicator constant IMMUTABLE_FIELDS_INDICATOR = ModifyingIndicator.wrap(0x7);\\n\\n/// @dev Indicator for modifying user fields: Resolver, Owner. See struct {INSUnified.MutableRecord}.\\nModifyingIndicator constant USER_FIELDS_INDICATOR = ModifyingIndicator.wrap(0x18);\\n\\n/// @dev Indicator when modifying all of the fields in {ModifyingField}.\\nModifyingIndicator constant ALL_FIELDS_INDICATOR = ModifyingIndicator.wrap(type(uint256).max);\\n\\nfunction eq(ModifyingIndicator self, ModifyingIndicator other) pure returns (bool) {\\n return ModifyingIndicator.unwrap(self) == ModifyingIndicator.unwrap(other);\\n}\\n\\nfunction neq(ModifyingIndicator self, ModifyingIndicator other) pure returns (bool) {\\n return !eq(self, other);\\n}\\n\\nfunction not(ModifyingIndicator self) pure returns (ModifyingIndicator) {\\n return ModifyingIndicator.wrap(~ModifyingIndicator.unwrap(self));\\n}\\n\\nfunction or(ModifyingIndicator self, ModifyingIndicator other) pure returns (ModifyingIndicator) {\\n return ModifyingIndicator.wrap(ModifyingIndicator.unwrap(self) | ModifyingIndicator.unwrap(other));\\n}\\n\\nfunction and(ModifyingIndicator self, ModifyingIndicator other) pure returns (ModifyingIndicator) {\\n return ModifyingIndicator.wrap(ModifyingIndicator.unwrap(self) & ModifyingIndicator.unwrap(other));\\n}\\n\\nfunction hasAny(ModifyingIndicator self, ModifyingIndicator other) pure returns (bool) {\\n return self & other != ModifyingIndicator.wrap(0);\\n}\\n\",\"keccak256\":\"0xe364b4d2e480a7f3e392a40f792303c0febf79c1a623eb4c2278f652210e2e6c\",\"license\":\"MIT\"}},\"version\":1}", - "nonce": 182497, - "numDeployments": 1, - "storageLayout": { - "storage": [ + "nodeType": "SourceUnit", + "src": "32:9969:83", + "nodes": [ { - "astId": 50000, - "contract": "src/RNSAuction.sol:RNSAuction", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8" + "id": 58609, + "nodeType": "PragmaDirective", + "src": "32:24:83", + "nodes": [], + "literals": [ + "solidity", + "^", + "0.8", + ".19" + ] }, { - "astId": 50003, - "contract": "src/RNSAuction.sol:RNSAuction", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" + "id": 58611, + "nodeType": "ImportDirective", + "src": "58:86:83", + "nodes": [], + "absolutePath": "lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol", + "file": "@openzeppelin/contracts/proxy/utils/Initializable.sol", + "nameLocation": "-1:-1:-1", + "scope": 59608, + "sourceUnit": 49865, + "symbolAliases": [ + { + "foreign": { + "id": 58610, + "name": "Initializable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 49864, + "src": "67:13:83", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" }, { - "astId": 48473, - "contract": "src/RNSAuction.sol:RNSAuction", - "label": "_roles", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_struct(RoleData)48468_storage)" + "id": 58613, + "nodeType": "ImportDirective", + "src": "145:101:83", + "nodes": [], + "absolutePath": "lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol", + "file": "@openzeppelin/contracts/access/AccessControlEnumerable.sol", + "nameLocation": "-1:-1:-1", + "scope": 59608, + "sourceUnit": 48592, + "symbolAliases": [ + { + "foreign": { + "id": 58612, + "name": "AccessControlEnumerable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48591, + "src": "154:23:83", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" }, { - "astId": 48783, - "contract": "src/RNSAuction.sol:RNSAuction", - "label": "_roleMembers", - "offset": 0, - "slot": "2", - "type": "t_mapping(t_bytes32,t_struct(AddressSet)54352_storage)" + "id": 58615, + "nodeType": "ImportDirective", + "src": "247:67:83", + "nodes": [], + "absolutePath": "lib/openzeppelin-contracts/contracts/utils/math/Math.sol", + "file": "@openzeppelin/contracts/utils/math/Math.sol", + "nameLocation": "-1:-1:-1", + "scope": 59608, + "sourceUnit": 53174, + "symbolAliases": [ + { + "foreign": { + "id": 58614, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53173, + "src": "256:4:83", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" }, { - "astId": 58885, - "contract": "src/RNSAuction.sol:RNSAuction", - "label": "____gap", - "offset": 0, - "slot": "3", - "type": "t_array(t_uint256)50_storage" + "id": 58617, + "nodeType": "ImportDirective", + "src": "315:76:83", + "nodes": [], + "absolutePath": "lib/openzeppelin-contracts/contracts/utils/structs/BitMaps.sol", + "file": "@openzeppelin/contracts/utils/structs/BitMaps.sol", + "nameLocation": "-1:-1:-1", + "scope": 59608, + "sourceUnit": 53729, + "symbolAliases": [ + { + "foreign": { + "id": 58616, + "name": "BitMaps", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53728, + "src": "324:7:83", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" }, { - "astId": 58889, - "contract": "src/RNSAuction.sol:RNSAuction", - "label": "_rnsUnified", - "offset": 0, - "slot": "53", - "type": "t_contract(INSUnified)65128" + "id": 58620, + "nodeType": "ImportDirective", + "src": "392:69:83", + "nodes": [], + "absolutePath": "src/interfaces/INSAuction.sol", + "file": "./interfaces/INSAuction.sol", + "nameLocation": "-1:-1:-1", + "scope": 59608, + "sourceUnit": 64366, + "symbolAliases": [ + { + "foreign": { + "id": 58618, + "name": "INSUnified", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65002, + "src": "401:10:83", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + }, + { + "foreign": { + "id": 58619, + "name": "INSAuction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64365, + "src": "413:10:83", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" }, { - "astId": 58895, - "contract": "src/RNSAuction.sol:RNSAuction", - "label": "_auctionRange", - "offset": 0, - "slot": "54", - "type": "t_mapping(t_bytes32,t_struct(EventRange)66048_storage)" + "id": 58622, + "nodeType": "ImportDirective", + "src": "462:65:83", + "nodes": [], + "absolutePath": "src/libraries/math/LibSafeRange.sol", + "file": "./libraries/math/LibSafeRange.sol", + "nameLocation": "-1:-1:-1", + "scope": 59608, + "sourceUnit": 66614, + "symbolAliases": [ + { + "foreign": { + "id": 58621, + "name": "LibSafeRange", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66613, + "src": "471:12:83", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" }, { - "astId": 58901, - "contract": "src/RNSAuction.sol:RNSAuction", - "label": "_domainAuction", - "offset": 0, - "slot": "55", - "type": "t_mapping(t_uint256,t_struct(DomainAuction)64309_storage)" + "id": 58624, + "nodeType": "ImportDirective", + "src": "528:60:83", + "nodes": [], + "absolutePath": "src/libraries/LibRNSDomain.sol", + "file": "./libraries/LibRNSDomain.sol", + "nameLocation": "-1:-1:-1", + "scope": 59608, + "sourceUnit": 66070, + "symbolAliases": [ + { + "foreign": { + "id": 58623, + "name": "LibRNSDomain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66069, + "src": "537:12:83", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" }, { - "astId": 58904, - "contract": "src/RNSAuction.sol:RNSAuction", - "label": "_treasury", - "offset": 0, - "slot": "56", - "type": "t_address_payable" + "id": 58627, + "nodeType": "ImportDirective", + "src": "589:74:83", + "nodes": [], + "absolutePath": "src/libraries/LibEventRange.sol", + "file": "./libraries/LibEventRange.sol", + "nameLocation": "-1:-1:-1", + "scope": 59608, + "sourceUnit": 65994, + "symbolAliases": [ + { + "foreign": { + "id": 58625, + "name": "LibEventRange", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65993, + "src": "598:13:83", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + }, + { + "foreign": { + "id": 58626, + "name": "EventRange", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65922, + "src": "613:10:83", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" }, { - "astId": 58907, - "contract": "src/RNSAuction.sol:RNSAuction", - "label": "_bidGapRatio", - "offset": 0, - "slot": "57", - "type": "t_uint256" + "id": 58629, + "nodeType": "ImportDirective", + "src": "664:80:83", + "nodes": [], + "absolutePath": "src/libraries/transfers/RONTransferHelper.sol", + "file": "./libraries/transfers/RONTransferHelper.sol", + "nameLocation": "-1:-1:-1", + "scope": 59608, + "sourceUnit": 67472, + "symbolAliases": [ + { + "foreign": { + "id": 58628, + "name": "RONTransferHelper", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67471, + "src": "673:17:83", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" }, { - "astId": 58911, - "contract": "src/RNSAuction.sol:RNSAuction", - "label": "_reserved", - "offset": 0, - "slot": "58", - "type": "t_struct(BitMap)53896_storage" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_address_payable": { - "encoding": "inplace", - "label": "address payable", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "encoding": "dynamic_array", - "label": "bytes32[]", + "id": 59607, + "nodeType": "ContractDefinition", + "src": "746:9254:83", + "nodes": [ + { + "id": 58638, + "nodeType": "UsingForDirective", + "src": "824:31:83", + "nodes": [], + "global": false, + "libraryName": { + "id": 58636, + "name": "LibSafeRange", + "nameLocations": [ + "830:12:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 66613, + "src": "830:12:83" + }, + "typeName": { + "id": 58637, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "847:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "id": 58642, + "nodeType": "UsingForDirective", + "src": "858:33:83", + "nodes": [], + "global": false, + "libraryName": { + "id": 58639, + "name": "BitMaps", + "nameLocations": [ + "864:7:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 53728, + "src": "864:7:83" + }, + "typeName": { + "id": 58641, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 58640, + "name": "BitMaps.BitMap", + "nameLocations": [ + "876:7:83", + "884:6:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 53598, + "src": "876:14:83" + }, + "referencedDeclaration": 53598, + "src": "876:14:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BitMap_$53598_storage_ptr", + "typeString": "struct BitMaps.BitMap" + } + } + }, + { + "id": 58646, + "nodeType": "UsingForDirective", + "src": "894:35:83", + "nodes": [], + "global": false, + "libraryName": { + "id": 58643, + "name": "LibEventRange", + "nameLocations": [ + "900:13:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65993, + "src": "900:13:83" + }, + "typeName": { + "id": 58645, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 58644, + "name": "EventRange", + "nameLocations": [ + "918:10:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65922, + "src": "918:10:83" + }, + "referencedDeclaration": 65922, + "src": "918:10:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_storage_ptr", + "typeString": "struct EventRange" + } + } + }, + { + "id": 58654, + "nodeType": "VariableDeclaration", + "src": "962:52:83", + "nodes": [], + "baseFunctions": [ + 64225 + ], + "constant": true, + "documentation": { + "id": 58647, + "nodeType": "StructuredDocumentation", + "src": "933:26:83", + "text": "@inheritdoc INSAuction" + }, + "functionSelector": "b9671690", + "mutability": "constant", + "name": "MAX_EXPIRY", + "nameLocation": "985:10:83", + "scope": 59607, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 58648, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "962:6:83", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "value": { + "expression": { + "arguments": [ + { + "id": 58651, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1003:6:83", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + }, + "typeName": { + "id": 58650, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1003:6:83", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + } + ], + "id": 58649, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "998:4:83", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 58652, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "998:12:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint64", + "typeString": "type(uint64)" + } + }, + "id": 58653, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "1011:3:83", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "998:16:83", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "public" + }, + { + "id": 58658, + "nodeType": "VariableDeclaration", + "src": "1047:47:83", + "nodes": [], + "baseFunctions": [ + 64243 + ], + "constant": true, + "documentation": { + "id": 58655, + "nodeType": "StructuredDocumentation", + "src": "1018:26:83", + "text": "@inheritdoc INSAuction" + }, + "functionSelector": "4c255c97", + "mutability": "constant", + "name": "MAX_PERCENTAGE", + "nameLocation": "1071:14:83", + "scope": 59607, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 58656, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1047:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "3130305f3030", + "id": 58657, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1088:6:83", + "typeDescriptions": { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + }, + "value": "100_00" + }, + "visibility": "public" + }, + { + "id": 58662, + "nodeType": "VariableDeclaration", + "src": "1127:56:83", + "nodes": [], + "baseFunctions": [ + 64249 + ], + "constant": true, + "documentation": { + "id": 58659, + "nodeType": "StructuredDocumentation", + "src": "1098:26:83", + "text": "@inheritdoc INSAuction" + }, + "functionSelector": "19a3ee40", + "mutability": "constant", + "name": "DOMAIN_EXPIRY_DURATION", + "nameLocation": "1150:22:83", + "scope": 59607, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 58660, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1127:6:83", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "value": { + "hexValue": "333635", + "id": 58661, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1175:8:83", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_31536000_by_1", + "typeString": "int_const 31536000" + }, + "value": "365" + }, + "visibility": "public" + }, + { + "id": 58668, + "nodeType": "VariableDeclaration", + "src": "1216:63:83", + "nodes": [], + "baseFunctions": [ + 64231 + ], + "constant": true, + "documentation": { + "id": 58663, + "nodeType": "StructuredDocumentation", + "src": "1187:26:83", + "text": "@inheritdoc INSAuction" + }, + "functionSelector": "0afe1bb3", + "mutability": "constant", + "name": "MAX_AUCTION_DOMAIN_EXPIRY", + "nameLocation": "1239:25:83", + "scope": 59607, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 58664, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1216:6:83", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "value": { + "commonType": { + "typeIdentifier": "t_rational_94608000_by_1", + "typeString": "int_const 94608000" + }, + "id": 58667, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "333635", + "id": 58665, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1267:8:83", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_31536000_by_1", + "typeString": "int_const 31536000" + }, + "value": "365" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "hexValue": "33", + "id": 58666, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1278:1:83", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "1267:12:83", + "typeDescriptions": { + "typeIdentifier": "t_rational_94608000_by_1", + "typeString": "int_const 94608000" + } + }, + "visibility": "public" + }, + { + "id": 58674, + "nodeType": "VariableDeclaration", + "src": "1312:66:83", + "nodes": [], + "baseFunctions": [ + 64237 + ], + "constant": true, + "documentation": { + "id": 58669, + "nodeType": "StructuredDocumentation", + "src": "1283:26:83", + "text": "@inheritdoc INSAuction" + }, + "functionSelector": "f5b541a6", + "mutability": "constant", + "name": "OPERATOR_ROLE", + "nameLocation": "1336:13:83", + "scope": 59607, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 58670, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1312:7:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "arguments": [ + { + "hexValue": "4f50455241544f525f524f4c45", + "id": 58672, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1362:15:83", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929", + "typeString": "literal_string \"OPERATOR_ROLE\"" + }, + "value": "OPERATOR_ROLE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929", + "typeString": "literal_string \"OPERATOR_ROLE\"" + } + ], + "id": 58671, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "1352:9:83", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 58673, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1352:26:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "public" + }, + { + "id": 58679, + "nodeType": "VariableDeclaration", + "src": "1418:27:83", + "nodes": [], + "constant": false, + "documentation": { + "id": 58675, + "nodeType": "StructuredDocumentation", + "src": "1383:32:83", + "text": "@dev Gap for upgradeability." + }, + "mutability": "mutable", + "name": "____gap", + "nameLocation": "1438:7:83", + "scope": 59607, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$50_storage", + "typeString": "uint256[50]" + }, + "typeName": { + "baseType": { + "id": 58676, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1418:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 58678, + "length": { + "hexValue": "3530", + "id": 58677, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1426:2:83", + "typeDescriptions": { + "typeIdentifier": "t_rational_50_by_1", + "typeString": "int_const 50" + }, + "value": "50" + }, + "nodeType": "ArrayTypeName", + "src": "1418:11:83", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$50_storage_ptr", + "typeString": "uint256[50]" + } + }, + "visibility": "private" + }, + { + "id": 58683, + "nodeType": "VariableDeclaration", + "src": "1485:31:83", + "nodes": [], + "constant": false, + "documentation": { + "id": 58680, + "nodeType": "StructuredDocumentation", + "src": "1449:33:83", + "text": "@dev The RNSUnified contract." + }, + "mutability": "mutable", + "name": "_rnsUnified", + "nameLocation": "1505:11:83", + "scope": 59607, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSUnified_$65002", + "typeString": "contract INSUnified" + }, + "typeName": { + "id": 58682, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 58681, + "name": "INSUnified", + "nameLocations": [ + "1485:10:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65002, + "src": "1485:10:83" + }, + "referencedDeclaration": 65002, + "src": "1485:10:83", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSUnified_$65002", + "typeString": "contract INSUnified" + } + }, + "visibility": "internal" + }, + { + "id": 58689, + "nodeType": "VariableDeclaration", + "src": "1570:63:83", + "nodes": [], + "constant": false, + "documentation": { + "id": 58684, + "nodeType": "StructuredDocumentation", + "src": "1520:47:83", + "text": "@dev Mapping from auction Id => event range" + }, + "mutability": "mutable", + "name": "_auctionRange", + "nameLocation": "1620:13:83", + "scope": 59607, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_EventRange_$65922_storage_$", + "typeString": "mapping(bytes32 => struct EventRange)" + }, + "typeName": { + "id": 58688, + "keyName": "auctionId", + "keyNameLocation": "1586:9:83", + "keyType": { + "id": 58685, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1578:7:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "1570:40:83", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_EventRange_$65922_storage_$", + "typeString": "mapping(bytes32 => struct EventRange)" + }, + "valueName": "", + "valueNameLocation": "-1:-1:-1", + "valueType": { + "id": 58687, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 58686, + "name": "EventRange", + "nameLocations": [ + "1599:10:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65922, + "src": "1599:10:83" + }, + "referencedDeclaration": 65922, + "src": "1599:10:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_storage_ptr", + "typeString": "struct EventRange" + } + } + }, + "visibility": "internal" + }, + { + "id": 58695, + "nodeType": "VariableDeclaration", + "src": "1699:60:83", + "nodes": [], + "constant": false, + "documentation": { + "id": 58690, + "nodeType": "StructuredDocumentation", + "src": "1637:59:83", + "text": "@dev Mapping from id of domain names => auction detail." + }, + "mutability": "mutable", + "name": "_domainAuction", + "nameLocation": "1745:14:83", + "scope": 59607, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_DomainAuction_$64175_storage_$", + "typeString": "mapping(uint256 => struct INSAuction.DomainAuction)" + }, + "typeName": { + "id": 58694, + "keyName": "id", + "keyNameLocation": "1715:2:83", + "keyType": { + "id": 58691, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1707:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "1699:36:83", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_DomainAuction_$64175_storage_$", + "typeString": "mapping(uint256 => struct INSAuction.DomainAuction)" + }, + "valueName": "", + "valueNameLocation": "-1:-1:-1", + "valueType": { + "id": 58693, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 58692, + "name": "DomainAuction", + "nameLocations": [ + "1721:13:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 64175, + "src": "1721:13:83" + }, + "referencedDeclaration": 64175, + "src": "1721:13:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_storage_ptr", + "typeString": "struct INSAuction.DomainAuction" + } + } + }, + "visibility": "internal" + }, + { + "id": 58698, + "nodeType": "VariableDeclaration", + "src": "1789:34:83", + "nodes": [], + "constant": false, + "documentation": { + "id": 58696, + "nodeType": "StructuredDocumentation", + "src": "1764:22:83", + "text": "@dev The treasury." + }, + "mutability": "mutable", + "name": "_treasury", + "nameLocation": "1814:9:83", + "scope": 59607, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 58697, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1789:15:83", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "visibility": "internal" + }, + { + "id": 58701, + "nodeType": "VariableDeclaration", + "src": "1892:29:83", + "nodes": [], + "constant": false, + "documentation": { + "id": 58699, + "nodeType": "StructuredDocumentation", + "src": "1827:62:83", + "text": "@dev The gap ratio between 2 bids with the starting price." + }, + "mutability": "mutable", + "name": "_bidGapRatio", + "nameLocation": "1909:12:83", + "scope": 59607, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 58700, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1892:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "id": 58705, + "nodeType": "VariableDeclaration", + "src": "1976:33:83", + "nodes": [], + "constant": false, + "documentation": { + "id": 58702, + "nodeType": "StructuredDocumentation", + "src": "1925:48:83", + "text": "@dev Mapping from id => bool reserved status" + }, + "mutability": "mutable", + "name": "_reserved", + "nameLocation": "2000:9:83", + "scope": 59607, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BitMap_$53598_storage", + "typeString": "struct BitMaps.BitMap" + }, + "typeName": { + "id": 58704, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 58703, + "name": "BitMaps.BitMap", + "nameLocations": [ + "1976:7:83", + "1984:6:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 53598, + "src": "1976:14:83" + }, + "referencedDeclaration": 53598, + "src": "1976:14:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BitMap_$53598_storage_ptr", + "typeString": "struct BitMaps.BitMap" + } + }, + "visibility": "internal" + }, + { + "id": 58715, + "nodeType": "ModifierDefinition", + "src": "2014:90:83", + "nodes": [], + "body": { + "id": 58714, + "nodeType": "Block", + "src": "2057:47:83", + "nodes": [], + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 58710, + "name": "auctionId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58707, + "src": "2082:9:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 58709, + "name": "_requireNotStarted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59606, + "src": "2063:18:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$__$", + "typeString": "function (bytes32) view" + } + }, + "id": 58711, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2063:29:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 58712, + "nodeType": "ExpressionStatement", + "src": "2063:29:83" + }, + { + "id": 58713, + "nodeType": "PlaceholderStatement", + "src": "2098:1:83" + } + ] + }, + "name": "whenNotStarted", + "nameLocation": "2023:14:83", + "parameters": { + "id": 58708, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 58707, + "mutability": "mutable", + "name": "auctionId", + "nameLocation": "2046:9:83", + "nodeType": "VariableDeclaration", + "scope": 58715, + "src": "2038:17:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 58706, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2038:7:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2037:19:83" + }, + "virtual": false, + "visibility": "internal" + }, + { + "id": 58726, + "nodeType": "ModifierDefinition", + "src": "2108:104:83", + "nodes": [], + "body": { + "id": 58725, + "nodeType": "Block", + "src": "2164:48:83", + "nodes": [], + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 58721, + "name": "range", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58718, + "src": "2194:5:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_calldata_ptr", + "typeString": "struct EventRange calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EventRange_$65922_calldata_ptr", + "typeString": "struct EventRange calldata" + } + ], + "id": 58720, + "name": "_requireValidEventRange", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59589, + "src": "2170:23:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_EventRange_$65922_calldata_ptr_$returns$__$", + "typeString": "function (struct EventRange calldata) view" + } + }, + "id": 58722, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2170:30:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 58723, + "nodeType": "ExpressionStatement", + "src": "2170:30:83" + }, + { + "id": 58724, + "nodeType": "PlaceholderStatement", + "src": "2206:1:83" + } + ] + }, + "name": "onlyValidEventRange", + "nameLocation": "2117:19:83", + "parameters": { + "id": 58719, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 58718, + "mutability": "mutable", + "name": "range", + "nameLocation": "2157:5:83", + "nodeType": "VariableDeclaration", + "scope": 58726, + "src": "2137:25:83", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_calldata_ptr", + "typeString": "struct EventRange" + }, + "typeName": { + "id": 58717, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 58716, + "name": "EventRange", + "nameLocations": [ + "2137:10:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65922, + "src": "2137:10:83" + }, + "referencedDeclaration": 65922, + "src": "2137:10:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_storage_ptr", + "typeString": "struct EventRange" + } + }, + "visibility": "internal" + } + ], + "src": "2136:27:83" + }, + "virtual": false, + "visibility": "internal" + }, + { + "id": 58733, + "nodeType": "FunctionDefinition", + "src": "2216:55:83", + "nodes": [], + "body": { + "id": 58732, + "nodeType": "Block", + "src": "2238:33:83", + "nodes": [], + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 58729, + "name": "_disableInitializers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 49845, + "src": "2244:20:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 58730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2244:22:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 58731, + "nodeType": "ExpressionStatement", + "src": "2244:22:83" + } + ] + }, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "parameters": { + "id": 58727, + "nodeType": "ParameterList", + "parameters": [], + "src": "2227:2:83" + }, + "returnParameters": { + "id": 58728, + "nodeType": "ParameterList", + "parameters": [], + "src": "2238:0:83" + }, + "scope": 59607, + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "id": 58796, + "nodeType": "FunctionDefinition", + "src": "2275:531:83", + "nodes": [], + "body": { + "id": 58795, + "nodeType": "Block", + "src": "2455:351:83", + "nodes": [], + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 58751, + "name": "treasury", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58743, + "src": "2474:8:83", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 58750, + "name": "_setTreasury", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59500, + "src": "2461:12:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$returns$__$", + "typeString": "function (address payable)" + } + }, + "id": 58752, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2461:22:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 58753, + "nodeType": "ExpressionStatement", + "src": "2461:22:83" + }, + { + "expression": { + "arguments": [ + { + "id": 58755, + "name": "bidGapRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58745, + "src": "2505:11:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 58754, + "name": "_setBidGapRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59522, + "src": "2489:15:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 58756, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2489:28:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 58757, + "nodeType": "ExpressionStatement", + "src": "2489:28:83" + }, + { + "expression": { + "arguments": [ + { + "id": 58759, + "name": "DEFAULT_ADMIN_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48178, + "src": "2534:18:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 58760, + "name": "admin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58735, + "src": "2554:5:83", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 58758, + "name": "_setupRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48374, + "src": "2523:10:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 58761, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2523:37:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 58762, + "nodeType": "ExpressionStatement", + "src": "2523:37:83" + }, + { + "assignments": [ + 58764 + ], + "declarations": [ + { + "constant": false, + "id": 58764, + "mutability": "mutable", + "name": "length", + "nameLocation": "2575:6:83", + "nodeType": "VariableDeclaration", + "scope": 58795, + "src": "2567:14:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 58763, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2567:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 58767, + "initialValue": { + "expression": { + "id": 58765, + "name": "operators", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58738, + "src": "2584:9:83", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 58766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2594:6:83", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2584:16:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2567:33:83" + }, + { + "assignments": [ + 58769 + ], + "declarations": [ + { + "constant": false, + "id": 58769, + "mutability": "mutable", + "name": "operatorRole", + "nameLocation": "2614:12:83", + "nodeType": "VariableDeclaration", + "scope": 58795, + "src": "2606:20:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 58768, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2606:7:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 58771, + "initialValue": { + "id": 58770, + "name": "OPERATOR_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58674, + "src": "2629:13:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2606:36:83" + }, + { + "body": { + "id": 58789, + "nodeType": "Block", + "src": "2678:93:83", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 58779, + "name": "operatorRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58769, + "src": "2697:12:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "baseExpression": { + "id": 58780, + "name": "operators", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58738, + "src": "2711:9:83", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 58782, + "indexExpression": { + "id": 58781, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58773, + "src": "2721:1:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2711:12:83", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 58778, + "name": "_setupRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48374, + "src": "2686:10:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 58783, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2686:38:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 58784, + "nodeType": "ExpressionStatement", + "src": "2686:38:83" + }, + { + "id": 58788, + "nodeType": "UncheckedBlock", + "src": "2733:32:83", + "statements": [ + { + "expression": { + "id": 58786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "2753:3:83", + "subExpression": { + "id": 58785, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58773, + "src": "2755:1:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 58787, + "nodeType": "ExpressionStatement", + "src": "2753:3:83" + } + ] + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 58777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 58775, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58773, + "src": "2665:1:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 58776, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58764, + "src": "2669:6:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2665:10:83", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 58790, + "initializationExpression": { + "assignments": [ + 58773 + ], + "declarations": [ + { + "constant": false, + "id": 58773, + "mutability": "mutable", + "name": "i", + "nameLocation": "2662:1:83", + "nodeType": "VariableDeclaration", + "scope": 58790, + "src": "2654:9:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 58772, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2654:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 58774, + "nodeType": "VariableDeclarationStatement", + "src": "2654:9:83" + }, + "nodeType": "ForStatement", + "src": "2649:122:83" + }, + { + "expression": { + "id": 58793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 58791, + "name": "_rnsUnified", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58683, + "src": "2777:11:83", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSUnified_$65002", + "typeString": "contract INSUnified" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 58792, + "name": "rnsUnified", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58741, + "src": "2791:10:83", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSUnified_$65002", + "typeString": "contract INSUnified" + } + }, + "src": "2777:24:83", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSUnified_$65002", + "typeString": "contract INSUnified" + } + }, + "id": 58794, + "nodeType": "ExpressionStatement", + "src": "2777:24:83" + } + ] + }, + "functionSelector": "ec14cf37", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 58748, + "kind": "modifierInvocation", + "modifierName": { + "id": 58747, + "name": "initializer", + "nameLocations": [ + "2443:11:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 49766, + "src": "2443:11:83" + }, + "nodeType": "ModifierInvocation", + "src": "2443:11:83" + } + ], + "name": "initialize", + "nameLocation": "2284:10:83", + "parameters": { + "id": 58746, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 58735, + "mutability": "mutable", + "name": "admin", + "nameLocation": "2308:5:83", + "nodeType": "VariableDeclaration", + "scope": 58796, + "src": "2300:13:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 58734, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2300:7:83", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 58738, + "mutability": "mutable", + "name": "operators", + "nameLocation": "2338:9:83", + "nodeType": "VariableDeclaration", + "scope": 58796, + "src": "2319:28:83", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 58736, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2319:7:83", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 58737, + "nodeType": "ArrayTypeName", + "src": "2319:9:83", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 58741, + "mutability": "mutable", + "name": "rnsUnified", + "nameLocation": "2364:10:83", + "nodeType": "VariableDeclaration", + "scope": 58796, + "src": "2353:21:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSUnified_$65002", + "typeString": "contract INSUnified" + }, + "typeName": { + "id": 58740, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 58739, + "name": "INSUnified", + "nameLocations": [ + "2353:10:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65002, + "src": "2353:10:83" + }, + "referencedDeclaration": 65002, + "src": "2353:10:83", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSUnified_$65002", + "typeString": "contract INSUnified" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 58743, + "mutability": "mutable", + "name": "treasury", + "nameLocation": "2396:8:83", + "nodeType": "VariableDeclaration", + "scope": 58796, + "src": "2380:24:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 58742, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2380:15:83", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 58745, + "mutability": "mutable", + "name": "bidGapRatio", + "nameLocation": "2418:11:83", + "nodeType": "VariableDeclaration", + "scope": 58796, + "src": "2410:19:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 58744, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2410:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2294:139:83" + }, + "returnParameters": { + "id": 58749, + "nodeType": "ParameterList", + "parameters": [], + "src": "2455:0:83" + }, + "scope": 59607, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 58886, + "nodeType": "FunctionDefinition", + "src": "2850:598:83", + "nodes": [], + "body": { + "id": 58885, + "nodeType": "Block", + "src": "2962:486:83", + "nodes": [], + "statements": [ + { + "assignments": [ + 58810 + ], + "declarations": [ + { + "constant": false, + "id": 58810, + "mutability": "mutable", + "name": "length", + "nameLocation": "2976:6:83", + "nodeType": "VariableDeclaration", + "scope": 58885, + "src": "2968:14:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 58809, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2968:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 58813, + "initialValue": { + "expression": { + "id": 58811, + "name": "labels", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58800, + "src": "2985:6:83", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_calldata_ptr_$dyn_calldata_ptr", + "typeString": "string calldata[] calldata" + } + }, + "id": 58812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2992:6:83", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2985:13:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2968:30:83" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 58816, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 58814, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58810, + "src": "3008:6:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 58815, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3018:1:83", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3008:11:83", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 58820, + "nodeType": "IfStatement", + "src": "3004:44:83", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 58817, + "name": "InvalidArrayLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64154, + "src": "3028:18:83", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 58818, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3028:20:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 58819, + "nodeType": "RevertStatement", + "src": "3021:27:83" + } + }, + { + "expression": { + "id": 58827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 58821, + "name": "ids", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58807, + "src": "3054:3:83", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 58825, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58810, + "src": "3074:6:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 58824, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "3060:13:83", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (uint256[] memory)" + }, + "typeName": { + "baseType": { + "id": 58822, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3064:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 58823, + "nodeType": "ArrayTypeName", + "src": "3064:9:83", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + } + }, + "id": 58826, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3060:21:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "src": "3054:27:83", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 58828, + "nodeType": "ExpressionStatement", + "src": "3054:27:83" + }, + { + "assignments": [ + 58831 + ], + "declarations": [ + { + "constant": false, + "id": 58831, + "mutability": "mutable", + "name": "rnsUnified", + "nameLocation": "3098:10:83", + "nodeType": "VariableDeclaration", + "scope": 58885, + "src": "3087:21:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSUnified_$65002", + "typeString": "contract INSUnified" + }, + "typeName": { + "id": 58830, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 58829, + "name": "INSUnified", + "nameLocations": [ + "3087:10:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65002, + "src": "3087:10:83" + }, + "referencedDeclaration": 65002, + "src": "3087:10:83", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSUnified_$65002", + "typeString": "contract INSUnified" + } + }, + "visibility": "internal" + } + ], + "id": 58833, + "initialValue": { + "id": 58832, + "name": "_rnsUnified", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58683, + "src": "3111:11:83", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSUnified_$65002", + "typeString": "contract INSUnified" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3087:35:83" + }, + { + "assignments": [ + 58835 + ], + "declarations": [ + { + "constant": false, + "id": 58835, + "mutability": "mutable", + "name": "parentId", + "nameLocation": "3136:8:83", + "nodeType": "VariableDeclaration", + "scope": 58885, + "src": "3128:16:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 58834, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3128:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 58838, + "initialValue": { + "expression": { + "id": 58836, + "name": "LibRNSDomain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66069, + "src": "3147:12:83", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_LibRNSDomain_$66069_$", + "typeString": "type(library LibRNSDomain)" + } + }, + "id": 58837, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "3160:6:83", + "memberName": "RON_ID", + "nodeType": "MemberAccess", + "referencedDeclaration": 66032, + "src": "3147:19:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3128:38:83" + }, + { + "assignments": [ + 58840 + ], + "declarations": [ + { + "constant": false, + "id": 58840, + "mutability": "mutable", + "name": "domainExpiryDuration", + "nameLocation": "3179:20:83", + "nodeType": "VariableDeclaration", + "scope": 58885, + "src": "3172:27:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 58839, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3172:6:83", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 58842, + "initialValue": { + "id": 58841, + "name": "DOMAIN_EXPIRY_DURATION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58662, + "src": "3202:22:83", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3172:52:83" + }, + { + "body": { + "id": 58883, + "nodeType": "Block", + "src": "3260:184:83", + "statements": [ + { + "expression": { + "id": 58869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "components": [ + null, + { + "baseExpression": { + "id": 58849, + "name": "ids", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58807, + "src": "3271:3:83", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 58851, + "indexExpression": { + "id": 58850, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58844, + "src": "3275:1:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3271:6:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 58852, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "3268:10:83", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$_t_uint256_$", + "typeString": "tuple(,uint256)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 58855, + "name": "parentId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58835, + "src": "3297:8:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 58856, + "name": "labels", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58800, + "src": "3307:6:83", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_calldata_ptr_$dyn_calldata_ptr", + "typeString": "string calldata[] calldata" + } + }, + "id": 58858, + "indexExpression": { + "id": 58857, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58844, + "src": "3314:1:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3307:9:83", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + { + "arguments": [ + { + "hexValue": "307830", + "id": 58861, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3326:3:83", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 58860, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3318:7:83", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 58859, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3318:7:83", + "typeDescriptions": {} + } + }, + "id": 58862, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3318:12:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 58865, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "3340:4:83", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RNSAuction_$59607", + "typeString": "contract RNSAuction" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_RNSAuction_$59607", + "typeString": "contract RNSAuction" + } + ], + "id": 58864, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3332:7:83", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 58863, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3332:7:83", + "typeDescriptions": {} + } + }, + "id": 58866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3332:13:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 58867, + "name": "domainExpiryDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58840, + "src": "3347:20:83", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "expression": { + "id": 58853, + "name": "rnsUnified", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58831, + "src": "3281:10:83", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSUnified_$65002", + "typeString": "contract INSUnified" + } + }, + "id": 58854, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3292:4:83", + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 64922, + "src": "3281:15:83", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_string_memory_ptr_$_t_address_$_t_address_$_t_uint64_$returns$_t_uint64_$_t_uint256_$", + "typeString": "function (uint256,string memory,address,address,uint64) external returns (uint64,uint256)" + } + }, + "id": 58868, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3281:87:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint64_$_t_uint256_$", + "typeString": "tuple(uint64,uint256)" + } + }, + "src": "3268:100:83", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 58870, + "nodeType": "ExpressionStatement", + "src": "3268:100:83" + }, + { + "expression": { + "arguments": [ + { + "baseExpression": { + "id": 58874, + "name": "ids", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58807, + "src": "3390:3:83", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 58876, + "indexExpression": { + "id": 58875, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58844, + "src": "3394:1:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3390:6:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 58871, + "name": "_reserved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58705, + "src": "3376:9:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BitMap_$53598_storage", + "typeString": "struct BitMaps.BitMap storage ref" + } + }, + "id": 58873, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3386:3:83", + "memberName": "set", + "nodeType": "MemberAccess", + "referencedDeclaration": 53693, + "src": "3376:13:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_BitMap_$53598_storage_ptr_$_t_uint256_$returns$__$attached_to$_t_struct$_BitMap_$53598_storage_ptr_$", + "typeString": "function (struct BitMaps.BitMap storage pointer,uint256)" + } + }, + "id": 58877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3376:21:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 58878, + "nodeType": "ExpressionStatement", + "src": "3376:21:83" + }, + { + "id": 58882, + "nodeType": "UncheckedBlock", + "src": "3406:32:83", + "statements": [ + { + "expression": { + "id": 58880, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "3426:3:83", + "subExpression": { + "id": 58879, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58844, + "src": "3428:1:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 58881, + "nodeType": "ExpressionStatement", + "src": "3426:3:83" + } + ] + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 58848, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 58846, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58844, + "src": "3247:1:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 58847, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58810, + "src": "3251:6:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3247:10:83", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 58884, + "initializationExpression": { + "assignments": [ + 58844 + ], + "declarations": [ + { + "constant": false, + "id": 58844, + "mutability": "mutable", + "name": "i", + "nameLocation": "3244:1:83", + "nodeType": "VariableDeclaration", + "scope": 58884, + "src": "3236:9:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 58843, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3236:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 58845, + "nodeType": "VariableDeclarationStatement", + "src": "3236:9:83" + }, + "nodeType": "ForStatement", + "src": "3231:213:83" + } + ] + }, + "baseFunctions": [ + 64259 + ], + "documentation": { + "id": 58797, + "nodeType": "StructuredDocumentation", + "src": "2810:37:83", + "text": " @inheritdoc INSAuction" + }, + "functionSelector": "791a26b4", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "id": 58803, + "name": "OPERATOR_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58674, + "src": "2916:13:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 58804, + "kind": "modifierInvocation", + "modifierName": { + "id": 58802, + "name": "onlyRole", + "nameLocations": [ + "2907:8:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 48189, + "src": "2907:8:83" + }, + "nodeType": "ModifierInvocation", + "src": "2907:23:83" + } + ], + "name": "bulkRegister", + "nameLocation": "2859:12:83", + "parameters": { + "id": 58801, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 58800, + "mutability": "mutable", + "name": "labels", + "nameLocation": "2890:6:83", + "nodeType": "VariableDeclaration", + "scope": 58886, + "src": "2872:24:83", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_calldata_ptr_$dyn_calldata_ptr", + "typeString": "string[]" + }, + "typeName": { + "baseType": { + "id": 58798, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2872:6:83", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "id": 58799, + "nodeType": "ArrayTypeName", + "src": "2872:8:83", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", + "typeString": "string[]" + } + }, + "visibility": "internal" + } + ], + "src": "2871:26:83" + }, + "returnParameters": { + "id": 58808, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 58807, + "mutability": "mutable", + "name": "ids", + "nameLocation": "2957:3:83", + "nodeType": "VariableDeclaration", + "scope": 58886, + "src": "2940:20:83", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 58805, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2940:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 58806, + "nodeType": "ArrayTypeName", + "src": "2940:9:83", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "2939:22:83" + }, + "scope": 59607, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 58900, + "nodeType": "FunctionDefinition", + "src": "3492:92:83", + "nodes": [], + "body": { + "id": 58899, + "nodeType": "Block", + "src": "3549:35:83", + "nodes": [], + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 58896, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58889, + "src": "3576:2:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 58894, + "name": "_reserved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58705, + "src": "3562:9:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BitMap_$53598_storage", + "typeString": "struct BitMaps.BitMap storage ref" + } + }, + "id": 58895, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3572:3:83", + "memberName": "get", + "nodeType": "MemberAccess", + "referencedDeclaration": 53634, + "src": "3562:13:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_BitMap_$53598_storage_ptr_$_t_uint256_$returns$_t_bool_$attached_to$_t_struct$_BitMap_$53598_storage_ptr_$", + "typeString": "function (struct BitMaps.BitMap storage pointer,uint256) view returns (bool)" + } + }, + "id": 58897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3562:17:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 58893, + "id": 58898, + "nodeType": "Return", + "src": "3555:24:83" + } + ] + }, + "baseFunctions": [ + 64267 + ], + "documentation": { + "id": 58887, + "nodeType": "StructuredDocumentation", + "src": "3452:37:83", + "text": " @inheritdoc INSAuction" + }, + "functionSelector": "53f9195e", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "reserved", + "nameLocation": "3501:8:83", + "parameters": { + "id": 58890, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 58889, + "mutability": "mutable", + "name": "id", + "nameLocation": "3518:2:83", + "nodeType": "VariableDeclaration", + "scope": 58900, + "src": "3510:10:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 58888, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3510:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3509:12:83" + }, + "returnParameters": { + "id": 58893, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 58892, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 58900, + "src": "3543:4:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 58891, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3543:4:83", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "3542:6:83" + }, + "scope": 59607, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "id": 58938, + "nodeType": "FunctionDefinition", + "src": "3628:313:83", + "nodes": [], + "body": { + "id": 58937, + "nodeType": "Block", + "src": "3794:147:83", + "nodes": [], + "statements": [ + { + "expression": { + "id": 58924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 58915, + "name": "auctionId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58913, + "src": "3800:9:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 58919, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51922, + "src": "3833:10:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 58920, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3833:12:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 58921, + "name": "range", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58904, + "src": "3847:5:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_calldata_ptr", + "typeString": "struct EventRange calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_struct$_EventRange_$65922_calldata_ptr", + "typeString": "struct EventRange calldata" + } + ], + "expression": { + "id": 58917, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "3822:3:83", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 58918, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "3826:6:83", + "memberName": "encode", + "nodeType": "MemberAccess", + "src": "3822:10:83", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 58922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3822:31:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 58916, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "3812:9:83", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 58923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3812:42:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "3800:54:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 58925, + "nodeType": "ExpressionStatement", + "src": "3800:54:83" + }, + { + "expression": { + "id": 58930, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 58926, + "name": "_auctionRange", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58689, + "src": "3860:13:83", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_EventRange_$65922_storage_$", + "typeString": "mapping(bytes32 => struct EventRange storage ref)" + } + }, + "id": 58928, + "indexExpression": { + "id": 58927, + "name": "auctionId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58913, + "src": "3874:9:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3860:24:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_storage", + "typeString": "struct EventRange storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 58929, + "name": "range", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58904, + "src": "3887:5:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_calldata_ptr", + "typeString": "struct EventRange calldata" + } + }, + "src": "3860:32:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_storage", + "typeString": "struct EventRange storage ref" + } + }, + "id": 58931, + "nodeType": "ExpressionStatement", + "src": "3860:32:83" + }, + { + "eventCall": { + "arguments": [ + { + "id": 58933, + "name": "auctionId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58913, + "src": "3919:9:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 58934, + "name": "range", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58904, + "src": "3930:5:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_calldata_ptr", + "typeString": "struct EventRange calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_struct$_EventRange_$65922_calldata_ptr", + "typeString": "struct EventRange calldata" + } + ], + "id": 58932, + "name": "AuctionEventSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64183, + "src": "3903:15:83", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_struct$_EventRange_$65922_memory_ptr_$returns$__$", + "typeString": "function (bytes32,struct EventRange memory)" + } + }, + "id": 58935, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3903:33:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 58936, + "nodeType": "EmitStatement", + "src": "3898:38:83" + } + ] + }, + "baseFunctions": [ + 64276 + ], + "documentation": { + "id": 58901, + "nodeType": "StructuredDocumentation", + "src": "3588:37:83", + "text": " @inheritdoc INSAuction" + }, + "functionSelector": "db5e1ec6", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "id": 58907, + "name": "DEFAULT_ADMIN_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48178, + "src": "3709:18:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 58908, + "kind": "modifierInvocation", + "modifierName": { + "id": 58906, + "name": "onlyRole", + "nameLocations": [ + "3700:8:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 48189, + "src": "3700:8:83" + }, + "nodeType": "ModifierInvocation", + "src": "3700:28:83" + }, + { + "arguments": [ + { + "id": 58910, + "name": "range", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58904, + "src": "3753:5:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_calldata_ptr", + "typeString": "struct EventRange calldata" + } + } + ], + "id": 58911, + "kind": "modifierInvocation", + "modifierName": { + "id": 58909, + "name": "onlyValidEventRange", + "nameLocations": [ + "3733:19:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 58726, + "src": "3733:19:83" + }, + "nodeType": "ModifierInvocation", + "src": "3733:26:83" + } + ], + "name": "createAuctionEvent", + "nameLocation": "3637:18:83", + "parameters": { + "id": 58905, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 58904, + "mutability": "mutable", + "name": "range", + "nameLocation": "3676:5:83", + "nodeType": "VariableDeclaration", + "scope": 58938, + "src": "3656:25:83", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_calldata_ptr", + "typeString": "struct EventRange" + }, + "typeName": { + "id": 58903, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 58902, + "name": "EventRange", + "nameLocations": [ + "3656:10:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65922, + "src": "3656:10:83" + }, + "referencedDeclaration": 65922, + "src": "3656:10:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_storage_ptr", + "typeString": "struct EventRange" + } + }, + "visibility": "internal" + } + ], + "src": "3655:27:83" + }, + "returnParameters": { + "id": 58914, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 58913, + "mutability": "mutable", + "name": "auctionId", + "nameLocation": "3781:9:83", + "nodeType": "VariableDeclaration", + "scope": 58938, + "src": "3773:17:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 58912, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3773:7:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3772:19:83" + }, + "scope": 59607, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 58968, + "nodeType": "FunctionDefinition", + "src": "3985:267:83", + "nodes": [], + "body": { + "id": 58967, + "nodeType": "Block", + "src": "4165:87:83", + "nodes": [], + "statements": [ + { + "expression": { + "id": 58960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 58956, + "name": "_auctionRange", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58689, + "src": "4171:13:83", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_EventRange_$65922_storage_$", + "typeString": "mapping(bytes32 => struct EventRange storage ref)" + } + }, + "id": 58958, + "indexExpression": { + "id": 58957, + "name": "auctionId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58941, + "src": "4185:9:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4171:24:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_storage", + "typeString": "struct EventRange storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 58959, + "name": "range", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58944, + "src": "4198:5:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_calldata_ptr", + "typeString": "struct EventRange calldata" + } + }, + "src": "4171:32:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_storage", + "typeString": "struct EventRange storage ref" + } + }, + "id": 58961, + "nodeType": "ExpressionStatement", + "src": "4171:32:83" + }, + { + "eventCall": { + "arguments": [ + { + "id": 58963, + "name": "auctionId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58941, + "src": "4230:9:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 58964, + "name": "range", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58944, + "src": "4241:5:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_calldata_ptr", + "typeString": "struct EventRange calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_struct$_EventRange_$65922_calldata_ptr", + "typeString": "struct EventRange calldata" + } + ], + "id": 58962, + "name": "AuctionEventSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64183, + "src": "4214:15:83", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_struct$_EventRange_$65922_memory_ptr_$returns$__$", + "typeString": "function (bytes32,struct EventRange memory)" + } + }, + "id": 58965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4214:33:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 58966, + "nodeType": "EmitStatement", + "src": "4209:38:83" + } + ] + }, + "baseFunctions": [ + 64285 + ], + "documentation": { + "id": 58939, + "nodeType": "StructuredDocumentation", + "src": "3945:37:83", + "text": " @inheritdoc INSAuction" + }, + "functionSelector": "81bec1b3", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "id": 58947, + "name": "DEFAULT_ADMIN_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48178, + "src": "4082:18:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 58948, + "kind": "modifierInvocation", + "modifierName": { + "id": 58946, + "name": "onlyRole", + "nameLocations": [ + "4073:8:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 48189, + "src": "4073:8:83" + }, + "nodeType": "ModifierInvocation", + "src": "4073:28:83" + }, + { + "arguments": [ + { + "id": 58950, + "name": "range", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58944, + "src": "4126:5:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_calldata_ptr", + "typeString": "struct EventRange calldata" + } + } + ], + "id": 58951, + "kind": "modifierInvocation", + "modifierName": { + "id": 58949, + "name": "onlyValidEventRange", + "nameLocations": [ + "4106:19:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 58726, + "src": "4106:19:83" + }, + "nodeType": "ModifierInvocation", + "src": "4106:26:83" + }, + { + "arguments": [ + { + "id": 58953, + "name": "auctionId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58941, + "src": "4152:9:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 58954, + "kind": "modifierInvocation", + "modifierName": { + "id": 58952, + "name": "whenNotStarted", + "nameLocations": [ + "4137:14:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 58715, + "src": "4137:14:83" + }, + "nodeType": "ModifierInvocation", + "src": "4137:25:83" + } + ], + "name": "setAuctionEvent", + "nameLocation": "3994:15:83", + "parameters": { + "id": 58945, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 58941, + "mutability": "mutable", + "name": "auctionId", + "nameLocation": "4018:9:83", + "nodeType": "VariableDeclaration", + "scope": 58968, + "src": "4010:17:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 58940, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4010:7:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 58944, + "mutability": "mutable", + "name": "range", + "nameLocation": "4049:5:83", + "nodeType": "VariableDeclaration", + "scope": 58968, + "src": "4029:25:83", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_calldata_ptr", + "typeString": "struct EventRange" + }, + "typeName": { + "id": 58943, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 58942, + "name": "EventRange", + "nameLocations": [ + "4029:10:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65922, + "src": "4029:10:83" + }, + "referencedDeclaration": 65922, + "src": "4029:10:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_storage_ptr", + "typeString": "struct EventRange" + } + }, + "visibility": "internal" + } + ], + "src": "4009:46:83" + }, + "returnParameters": { + "id": 58955, + "nodeType": "ParameterList", + "parameters": [], + "src": "4165:0:83" + }, + "scope": 59607, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 58982, + "nodeType": "FunctionDefinition", + "src": "4296:126:83", + "nodes": [], + "body": { + "id": 58981, + "nodeType": "Block", + "src": "4380:42:83", + "nodes": [], + "statements": [ + { + "expression": { + "baseExpression": { + "id": 58977, + "name": "_auctionRange", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58689, + "src": "4393:13:83", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_EventRange_$65922_storage_$", + "typeString": "mapping(bytes32 => struct EventRange storage ref)" + } + }, + "id": 58979, + "indexExpression": { + "id": 58978, + "name": "auctionId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58971, + "src": "4407:9:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4393:24:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_storage", + "typeString": "struct EventRange storage ref" + } + }, + "functionReturnParameters": 58976, + "id": 58980, + "nodeType": "Return", + "src": "4386:31:83" + } + ] + }, + "baseFunctions": [ + 64294 + ], + "documentation": { + "id": 58969, + "nodeType": "StructuredDocumentation", + "src": "4256:37:83", + "text": " @inheritdoc INSAuction" + }, + "functionSelector": "15a29162", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getAuctionEvent", + "nameLocation": "4305:15:83", + "parameters": { + "id": 58972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 58971, + "mutability": "mutable", + "name": "auctionId", + "nameLocation": "4329:9:83", + "nodeType": "VariableDeclaration", + "scope": 58982, + "src": "4321:17:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 58970, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4321:7:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4320:19:83" + }, + "returnParameters": { + "id": 58976, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 58975, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 58982, + "src": "4361:17:83", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_memory_ptr", + "typeString": "struct EventRange" + }, + "typeName": { + "id": 58974, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 58973, + "name": "EventRange", + "nameLocations": [ + "4361:10:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65922, + "src": "4361:10:83" + }, + "referencedDeclaration": 65922, + "src": "4361:10:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_storage_ptr", + "typeString": "struct EventRange" + } + }, + "visibility": "internal" + } + ], + "src": "4360:19:83" + }, + "scope": 59607, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "id": 59105, + "nodeType": "FunctionDefinition", + "src": "4466:884:83", + "nodes": [], + "body": { + "id": 59104, + "nodeType": "Block", + "src": "4646:704:83", + "nodes": [], + "statements": [ + { + "assignments": [ + 59001 + ], + "declarations": [ + { + "constant": false, + "id": 59001, + "mutability": "mutable", + "name": "length", + "nameLocation": "4660:6:83", + "nodeType": "VariableDeclaration", + "scope": 59104, + "src": "4652:14:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59000, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4652:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 59004, + "initialValue": { + "expression": { + "id": 59002, + "name": "ids", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58988, + "src": "4669:3:83", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 59003, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4673:6:83", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "4669:10:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4652:27:83" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 59012, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 59007, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 59005, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59001, + "src": "4689:6:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 59006, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4699:1:83", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4689:11:83", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 59011, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 59008, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59001, + "src": "4704:6:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "expression": { + "id": 59009, + "name": "startingPrices", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58991, + "src": "4714:14:83", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 59010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4729:6:83", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "4714:21:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4704:31:83", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4689:46:83", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 59016, + "nodeType": "IfStatement", + "src": "4685:79:83", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 59013, + "name": "InvalidArrayLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64154, + "src": "4744:18:83", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 59014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4744:20:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59015, + "nodeType": "RevertStatement", + "src": "4737:27:83" + } + }, + { + "assignments": [ + 59018 + ], + "declarations": [ + { + "constant": false, + "id": 59018, + "mutability": "mutable", + "name": "id", + "nameLocation": "4778:2:83", + "nodeType": "VariableDeclaration", + "scope": 59104, + "src": "4770:10:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59017, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4770:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 59019, + "nodeType": "VariableDeclarationStatement", + "src": "4770:10:83" + }, + { + "assignments": [ + 59021 + ], + "declarations": [ + { + "constant": false, + "id": 59021, + "mutability": "mutable", + "name": "mAuctionId", + "nameLocation": "4794:10:83", + "nodeType": "VariableDeclaration", + "scope": 59104, + "src": "4786:18:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 59020, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4786:7:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 59022, + "nodeType": "VariableDeclarationStatement", + "src": "4786:18:83" + }, + { + "assignments": [ + 59025 + ], + "declarations": [ + { + "constant": false, + "id": 59025, + "mutability": "mutable", + "name": "sAuction", + "nameLocation": "4832:8:83", + "nodeType": "VariableDeclaration", + "scope": 59104, + "src": "4810:30:83", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_storage_ptr", + "typeString": "struct INSAuction.DomainAuction" + }, + "typeName": { + "id": 59024, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 59023, + "name": "DomainAuction", + "nameLocations": [ + "4810:13:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 64175, + "src": "4810:13:83" + }, + "referencedDeclaration": 64175, + "src": "4810:13:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_storage_ptr", + "typeString": "struct INSAuction.DomainAuction" + } + }, + "visibility": "internal" + } + ], + "id": 59026, + "nodeType": "VariableDeclarationStatement", + "src": "4810:30:83" + }, + { + "body": { + "id": 59096, + "nodeType": "Block", + "src": "4876:414:83", + "statements": [ + { + "expression": { + "id": 59037, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 59033, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59018, + "src": "4884:2:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "baseExpression": { + "id": 59034, + "name": "ids", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58988, + "src": "4889:3:83", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 59036, + "indexExpression": { + "id": 59035, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59028, + "src": "4893:1:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4889:6:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4884:11:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 59038, + "nodeType": "ExpressionStatement", + "src": "4884:11:83" + }, + { + "condition": { + "id": 59042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4907:13:83", + "subExpression": { + "arguments": [ + { + "id": 59040, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59018, + "src": "4917:2:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 59039, + "name": "reserved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58900, + "src": "4908:8:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 59041, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4908:12:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 59046, + "nodeType": "IfStatement", + "src": "4903:43:83", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 59043, + "name": "NameNotReserved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64146, + "src": "4929:15:83", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 59044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4929:17:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59045, + "nodeType": "RevertStatement", + "src": "4922:24:83" + } + }, + { + "expression": { + "id": 59051, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 59047, + "name": "sAuction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59025, + "src": "4955:8:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_storage_ptr", + "typeString": "struct INSAuction.DomainAuction storage pointer" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "baseExpression": { + "id": 59048, + "name": "_domainAuction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58695, + "src": "4966:14:83", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_DomainAuction_$64175_storage_$", + "typeString": "mapping(uint256 => struct INSAuction.DomainAuction storage ref)" + } + }, + "id": 59050, + "indexExpression": { + "id": 59049, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59018, + "src": "4981:2:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4966:18:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_storage", + "typeString": "struct INSAuction.DomainAuction storage ref" + } + }, + "src": "4955:29:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_storage_ptr", + "typeString": "struct INSAuction.DomainAuction storage pointer" + } + }, + "id": 59052, + "nodeType": "ExpressionStatement", + "src": "4955:29:83" + }, + { + "expression": { + "id": 59056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 59053, + "name": "mAuctionId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59021, + "src": "4992:10:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 59054, + "name": "sAuction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59025, + "src": "5005:8:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_storage_ptr", + "typeString": "struct INSAuction.DomainAuction storage pointer" + } + }, + "id": 59055, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5014:9:83", + "memberName": "auctionId", + "nodeType": "MemberAccess", + "referencedDeclaration": 64169, + "src": "5005:18:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "4992:31:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 59057, + "nodeType": "ExpressionStatement", + "src": "4992:31:83" + }, + { + "condition": { + "id": 59072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "5035:76:83", + "subExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 59070, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 59064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 59060, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 59058, + "name": "mAuctionId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59021, + "src": "5037:10:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 59059, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5051:1:83", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5037:15:83", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 59063, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 59061, + "name": "mAuctionId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59021, + "src": "5056:10:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 59062, + "name": "auctionId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58985, + "src": "5070:9:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "5056:23:83", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5037:42:83", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 59069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "id": 59065, + "name": "sAuction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59025, + "src": "5083:8:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_storage_ptr", + "typeString": "struct INSAuction.DomainAuction storage pointer" + } + }, + "id": 59066, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5092:3:83", + "memberName": "bid", + "nodeType": "MemberAccess", + "referencedDeclaration": 64174, + "src": "5083:12:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bid_$64167_storage", + "typeString": "struct INSAuction.Bid storage ref" + } + }, + "id": 59067, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5096:9:83", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": 64164, + "src": "5083:22:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 59068, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5109:1:83", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5083:27:83", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5037:73:83", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 59071, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5036:75:83", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 59077, + "nodeType": "IfStatement", + "src": "5031:124:83", + "trueBody": { + "id": 59076, + "nodeType": "Block", + "src": "5113:42:83", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 59073, + "name": "AlreadyBidding", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64142, + "src": "5130:14:83", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 59074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5130:16:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59075, + "nodeType": "RevertStatement", + "src": "5123:23:83" + } + ] + } + }, + { + "expression": { + "id": 59082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 59078, + "name": "sAuction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59025, + "src": "5163:8:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_storage_ptr", + "typeString": "struct INSAuction.DomainAuction storage pointer" + } + }, + "id": 59080, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "5172:9:83", + "memberName": "auctionId", + "nodeType": "MemberAccess", + "referencedDeclaration": 64169, + "src": "5163:18:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 59081, + "name": "auctionId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58985, + "src": "5184:9:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "5163:30:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 59083, + "nodeType": "ExpressionStatement", + "src": "5163:30:83" + }, + { + "expression": { + "id": 59090, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 59084, + "name": "sAuction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59025, + "src": "5201:8:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_storage_ptr", + "typeString": "struct INSAuction.DomainAuction storage pointer" + } + }, + "id": 59086, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "5210:13:83", + "memberName": "startingPrice", + "nodeType": "MemberAccess", + "referencedDeclaration": 64171, + "src": "5201:22:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "baseExpression": { + "id": 59087, + "name": "startingPrices", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58991, + "src": "5226:14:83", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 59089, + "indexExpression": { + "id": 59088, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59028, + "src": "5241:1:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5226:17:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5201:42:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 59091, + "nodeType": "ExpressionStatement", + "src": "5201:42:83" + }, + { + "id": 59095, + "nodeType": "UncheckedBlock", + "src": "5252:32:83", + "statements": [ + { + "expression": { + "id": 59093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "5272:3:83", + "subExpression": { + "id": 59092, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59028, + "src": "5274:1:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 59094, + "nodeType": "ExpressionStatement", + "src": "5272:3:83" + } + ] + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 59032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 59030, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59028, + "src": "4863:1:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 59031, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59001, + "src": "4867:6:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4863:10:83", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 59097, + "initializationExpression": { + "assignments": [ + 59028 + ], + "declarations": [ + { + "constant": false, + "id": 59028, + "mutability": "mutable", + "name": "i", + "nameLocation": "4860:1:83", + "nodeType": "VariableDeclaration", + "scope": 59097, + "src": "4852:9:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59027, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4852:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 59029, + "nodeType": "VariableDeclarationStatement", + "src": "4852:9:83" + }, + "nodeType": "ForStatement", + "src": "4847:443:83" + }, + { + "eventCall": { + "arguments": [ + { + "id": 59099, + "name": "auctionId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58985, + "src": "5314:9:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 59100, + "name": "ids", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58988, + "src": "5325:3:83", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + { + "id": 59101, + "name": "startingPrices", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58991, + "src": "5330:14:83", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + ], + "id": 59098, + "name": "LabelsListed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64194, + "src": "5301:12:83", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$", + "typeString": "function (bytes32,uint256[] memory,uint256[] memory)" + } + }, + "id": 59102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5301:44:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59103, + "nodeType": "EmitStatement", + "src": "5296:49:83" + } + ] + }, + "baseFunctions": [ + 64306 + ], + "documentation": { + "id": 58983, + "nodeType": "StructuredDocumentation", + "src": "4426:37:83", + "text": " @inheritdoc INSAuction" + }, + "functionSelector": "777b0a18", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "id": 58994, + "name": "OPERATOR_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58674, + "src": "4599:13:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 58995, + "kind": "modifierInvocation", + "modifierName": { + "id": 58993, + "name": "onlyRole", + "nameLocations": [ + "4590:8:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 48189, + "src": "4590:8:83" + }, + "nodeType": "ModifierInvocation", + "src": "4590:23:83" + }, + { + "arguments": [ + { + "id": 58997, + "name": "auctionId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58985, + "src": "4633:9:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 58998, + "kind": "modifierInvocation", + "modifierName": { + "id": 58996, + "name": "whenNotStarted", + "nameLocations": [ + "4618:14:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 58715, + "src": "4618:14:83" + }, + "nodeType": "ModifierInvocation", + "src": "4618:25:83" + } + ], + "name": "listNamesForAuction", + "nameLocation": "4475:19:83", + "parameters": { + "id": 58992, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 58985, + "mutability": "mutable", + "name": "auctionId", + "nameLocation": "4503:9:83", + "nodeType": "VariableDeclaration", + "scope": 59105, + "src": "4495:17:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 58984, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4495:7:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 58988, + "mutability": "mutable", + "name": "ids", + "nameLocation": "4533:3:83", + "nodeType": "VariableDeclaration", + "scope": 59105, + "src": "4514:22:83", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 58986, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4514:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 58987, + "nodeType": "ArrayTypeName", + "src": "4514:9:83", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 58991, + "mutability": "mutable", + "name": "startingPrices", + "nameLocation": "4557:14:83", + "nodeType": "VariableDeclaration", + "scope": 59105, + "src": "4538:33:83", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 58989, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4538:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 58990, + "nodeType": "ArrayTypeName", + "src": "4538:9:83", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "4494:78:83" + }, + "returnParameters": { + "id": 58999, + "nodeType": "ParameterList", + "parameters": [], + "src": "4646:0:83" + }, + "scope": 59607, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 59230, + "nodeType": "FunctionDefinition", + "src": "5394:950:83", + "nodes": [], + "body": { + "id": 59229, + "nodeType": "Block", + "src": "5441:903:83", + "nodes": [], + "statements": [ + { + "assignments": [ + 59113 + ], + "declarations": [ + { + "constant": false, + "id": 59113, + "mutability": "mutable", + "name": "auction", + "nameLocation": "5468:7:83", + "nodeType": "VariableDeclaration", + "scope": 59229, + "src": "5447:28:83", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_memory_ptr", + "typeString": "struct INSAuction.DomainAuction" + }, + "typeName": { + "id": 59112, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 59111, + "name": "DomainAuction", + "nameLocations": [ + "5447:13:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 64175, + "src": "5447:13:83" + }, + "referencedDeclaration": 64175, + "src": "5447:13:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_storage_ptr", + "typeString": "struct INSAuction.DomainAuction" + } + }, + "visibility": "internal" + } + ], + "id": 59117, + "initialValue": { + "baseExpression": { + "id": 59114, + "name": "_domainAuction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58695, + "src": "5478:14:83", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_DomainAuction_$64175_storage_$", + "typeString": "mapping(uint256 => struct INSAuction.DomainAuction storage ref)" + } + }, + "id": 59116, + "indexExpression": { + "id": 59115, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59108, + "src": "5493:2:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5478:18:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_storage", + "typeString": "struct INSAuction.DomainAuction storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5447:49:83" + }, + { + "assignments": [ + 59120 + ], + "declarations": [ + { + "constant": false, + "id": 59120, + "mutability": "mutable", + "name": "range", + "nameLocation": "5520:5:83", + "nodeType": "VariableDeclaration", + "scope": 59229, + "src": "5502:23:83", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_memory_ptr", + "typeString": "struct EventRange" + }, + "typeName": { + "id": 59119, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 59118, + "name": "EventRange", + "nameLocations": [ + "5502:10:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65922, + "src": "5502:10:83" + }, + "referencedDeclaration": 65922, + "src": "5502:10:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_storage_ptr", + "typeString": "struct EventRange" + } + }, + "visibility": "internal" + } + ], + "id": 59125, + "initialValue": { + "baseExpression": { + "id": 59121, + "name": "_auctionRange", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58689, + "src": "5528:13:83", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_EventRange_$65922_storage_$", + "typeString": "mapping(bytes32 => struct EventRange storage ref)" + } + }, + "id": 59124, + "indexExpression": { + "expression": { + "id": 59122, + "name": "auction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59113, + "src": "5542:7:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_memory_ptr", + "typeString": "struct INSAuction.DomainAuction memory" + } + }, + "id": 59123, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5550:9:83", + "memberName": "auctionId", + "nodeType": "MemberAccess", + "referencedDeclaration": 64169, + "src": "5542:17:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5528:32:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_storage", + "typeString": "struct EventRange storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5502:58:83" + }, + { + "assignments": [ + 59127 + ], + "declarations": [ + { + "constant": false, + "id": 59127, + "mutability": "mutable", + "name": "beatPrice", + "nameLocation": "5574:9:83", + "nodeType": "VariableDeclaration", + "scope": 59229, + "src": "5566:17:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59126, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5566:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 59132, + "initialValue": { + "arguments": [ + { + "id": 59129, + "name": "auction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59113, + "src": "5600:7:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_memory_ptr", + "typeString": "struct INSAuction.DomainAuction memory" + } + }, + { + "id": 59130, + "name": "range", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59120, + "src": "5609:5:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_memory_ptr", + "typeString": "struct EventRange memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_DomainAuction_$64175_memory_ptr", + "typeString": "struct INSAuction.DomainAuction memory" + }, + { + "typeIdentifier": "t_struct$_EventRange_$65922_memory_ptr", + "typeString": "struct EventRange memory" + } + ], + "id": 59128, + "name": "_getBeatPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59568, + "src": "5586:13:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_DomainAuction_$64175_memory_ptr_$_t_struct$_EventRange_$65922_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (struct INSAuction.DomainAuction memory,struct EventRange memory) view returns (uint256)" + } + }, + "id": 59131, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5586:29:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5566:49:83" + }, + { + "condition": { + "id": 59136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "5626:19:83", + "subExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 59133, + "name": "range", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59120, + "src": "5627:5:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_memory_ptr", + "typeString": "struct EventRange memory" + } + }, + "id": 59134, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5633:10:83", + "memberName": "isInPeriod", + "nodeType": "MemberAccess", + "referencedDeclaration": 65992, + "src": "5627:16:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_EventRange_$65922_memory_ptr_$returns$_t_bool_$attached_to$_t_struct$_EventRange_$65922_memory_ptr_$", + "typeString": "function (struct EventRange memory) view returns (bool)" + } + }, + "id": 59135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5627:18:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 59140, + "nodeType": "IfStatement", + "src": "5622:52:83", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 59137, + "name": "QueryIsNotInPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64150, + "src": "5654:18:83", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 59138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5654:20:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59139, + "nodeType": "RevertStatement", + "src": "5647:27:83" + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 59144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 59141, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "5684:3:83", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 59142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5688:5:83", + "memberName": "value", + "nodeType": "MemberAccess", + "src": "5684:9:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 59143, + "name": "beatPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59127, + "src": "5696:9:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5684:21:83", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 59148, + "nodeType": "IfStatement", + "src": "5680:54:83", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 59145, + "name": "InsufficientAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64152, + "src": "5714:18:83", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 59146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5714:20:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59147, + "nodeType": "RevertStatement", + "src": "5707:27:83" + } + }, + { + "assignments": [ + 59150 + ], + "declarations": [ + { + "constant": false, + "id": 59150, + "mutability": "mutable", + "name": "bidder", + "nameLocation": "5756:6:83", + "nodeType": "VariableDeclaration", + "scope": 59229, + "src": "5740:22:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 59149, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5740:15:83", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "visibility": "internal" + } + ], + "id": 59156, + "initialValue": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 59153, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51922, + "src": "5773:10:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 59154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5773:12:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 59152, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5765:8:83", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 59151, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5765:8:83", + "stateMutability": "payable", + "typeDescriptions": {} + } + }, + "id": 59155, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5765:21:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5740:46:83" + }, + { + "condition": { + "id": 59162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "5844:34:83", + "subExpression": { + "arguments": [ + { + "id": 59159, + "name": "bidder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59150, + "src": "5868:6:83", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "hexValue": "30", + "id": 59160, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5876:1:83", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "expression": { + "id": 59157, + "name": "RONTransferHelper", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67471, + "src": "5845:17:83", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_RONTransferHelper_$67471_$", + "typeString": "type(library RONTransferHelper)" + } + }, + "id": 59158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5863:4:83", + "memberName": "send", + "nodeType": "MemberAccess", + "referencedDeclaration": 67470, + "src": "5845:22:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address payable,uint256) returns (bool)" + } + }, + "id": 59161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5845:33:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 59166, + "nodeType": "IfStatement", + "src": "5840:71:83", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 59163, + "name": "BidderCannotReceiveRON", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64156, + "src": "5887:22:83", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 59164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5887:24:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59165, + "nodeType": "RevertStatement", + "src": "5880:31:83" + } + }, + { + "assignments": [ + 59168 + ], + "declarations": [ + { + "constant": false, + "id": 59168, + "mutability": "mutable", + "name": "prvBidder", + "nameLocation": "5933:9:83", + "nodeType": "VariableDeclaration", + "scope": 59229, + "src": "5917:25:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 59167, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5917:15:83", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "visibility": "internal" + } + ], + "id": 59172, + "initialValue": { + "expression": { + "expression": { + "id": 59169, + "name": "auction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59113, + "src": "5945:7:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_memory_ptr", + "typeString": "struct INSAuction.DomainAuction memory" + } + }, + "id": 59170, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5953:3:83", + "memberName": "bid", + "nodeType": "MemberAccess", + "referencedDeclaration": 64174, + "src": "5945:11:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bid_$64167_memory_ptr", + "typeString": "struct INSAuction.Bid memory" + } + }, + "id": 59171, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5957:6:83", + "memberName": "bidder", + "nodeType": "MemberAccess", + "referencedDeclaration": 64160, + "src": "5945:18:83", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5917:46:83" + }, + { + "assignments": [ + 59174 + ], + "declarations": [ + { + "constant": false, + "id": 59174, + "mutability": "mutable", + "name": "prvPrice", + "nameLocation": "5977:8:83", + "nodeType": "VariableDeclaration", + "scope": 59229, + "src": "5969:16:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59173, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5969:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 59178, + "initialValue": { + "expression": { + "expression": { + "id": 59175, + "name": "auction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59113, + "src": "5988:7:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_memory_ptr", + "typeString": "struct INSAuction.DomainAuction memory" + } + }, + "id": 59176, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5996:3:83", + "memberName": "bid", + "nodeType": "MemberAccess", + "referencedDeclaration": 64174, + "src": "5988:11:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bid_$64167_memory_ptr", + "typeString": "struct INSAuction.Bid memory" + } + }, + "id": 59177, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6000:5:83", + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 64162, + "src": "5988:17:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5969:36:83" + }, + { + "assignments": [ + 59181 + ], + "declarations": [ + { + "constant": false, + "id": 59181, + "mutability": "mutable", + "name": "sBid", + "nameLocation": "6024:4:83", + "nodeType": "VariableDeclaration", + "scope": 59229, + "src": "6012:16:83", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bid_$64167_storage_ptr", + "typeString": "struct INSAuction.Bid" + }, + "typeName": { + "id": 59180, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 59179, + "name": "Bid", + "nameLocations": [ + "6012:3:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 64167, + "src": "6012:3:83" + }, + "referencedDeclaration": 64167, + "src": "6012:3:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bid_$64167_storage_ptr", + "typeString": "struct INSAuction.Bid" + } + }, + "visibility": "internal" + } + ], + "id": 59186, + "initialValue": { + "expression": { + "baseExpression": { + "id": 59182, + "name": "_domainAuction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58695, + "src": "6031:14:83", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_DomainAuction_$64175_storage_$", + "typeString": "mapping(uint256 => struct INSAuction.DomainAuction storage ref)" + } + }, + "id": 59184, + "indexExpression": { + "id": 59183, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59108, + "src": "6046:2:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6031:18:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_storage", + "typeString": "struct INSAuction.DomainAuction storage ref" + } + }, + "id": 59185, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6050:3:83", + "memberName": "bid", + "nodeType": "MemberAccess", + "referencedDeclaration": 64174, + "src": "6031:22:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bid_$64167_storage", + "typeString": "struct INSAuction.Bid storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6012:41:83" + }, + { + "expression": { + "id": 59192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 59187, + "name": "sBid", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59181, + "src": "6059:4:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bid_$64167_storage_ptr", + "typeString": "struct INSAuction.Bid storage pointer" + } + }, + "id": 59189, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "6064:5:83", + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 64162, + "src": "6059:10:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 59190, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6072:3:83", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 59191, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6076:5:83", + "memberName": "value", + "nodeType": "MemberAccess", + "src": "6072:9:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6059:22:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 59193, + "nodeType": "ExpressionStatement", + "src": "6059:22:83" + }, + { + "expression": { + "id": 59198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 59194, + "name": "sBid", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59181, + "src": "6087:4:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bid_$64167_storage_ptr", + "typeString": "struct INSAuction.Bid storage pointer" + } + }, + "id": 59196, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "6092:6:83", + "memberName": "bidder", + "nodeType": "MemberAccess", + "referencedDeclaration": 64160, + "src": "6087:11:83", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 59197, + "name": "bidder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59150, + "src": "6101:6:83", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6087:20:83", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 59199, + "nodeType": "ExpressionStatement", + "src": "6087:20:83" + }, + { + "expression": { + "id": 59205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 59200, + "name": "sBid", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59181, + "src": "6113:4:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bid_$64167_storage_ptr", + "typeString": "struct INSAuction.Bid storage pointer" + } + }, + "id": 59202, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "6118:9:83", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": 64164, + "src": "6113:14:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 59203, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "6130:5:83", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 59204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6136:9:83", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "6130:15:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6113:32:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 59206, + "nodeType": "ExpressionStatement", + "src": "6113:32:83" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 59208, + "name": "auction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59113, + "src": "6166:7:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_memory_ptr", + "typeString": "struct INSAuction.DomainAuction memory" + } + }, + "id": 59209, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6174:9:83", + "memberName": "auctionId", + "nodeType": "MemberAccess", + "referencedDeclaration": 64169, + "src": "6166:17:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 59210, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59108, + "src": "6185:2:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 59211, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6189:3:83", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 59212, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6193:5:83", + "memberName": "value", + "nodeType": "MemberAccess", + "src": "6189:9:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 59213, + "name": "bidder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59150, + "src": "6200:6:83", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 59214, + "name": "prvPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59174, + "src": "6208:8:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 59215, + "name": "prvBidder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59168, + "src": "6218:9:83", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 59207, + "name": "BidPlaced", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64209, + "src": "6156:9:83", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (bytes32,uint256,uint256,address payable,uint256,address)" + } + }, + "id": 59216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6156:72:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59217, + "nodeType": "EmitStatement", + "src": "6151:77:83" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 59220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 59218, + "name": "prvPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59174, + "src": "6273:8:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 59219, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6285:1:83", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6273:13:83", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 59228, + "nodeType": "IfStatement", + "src": "6269:70:83", + "trueBody": { + "expression": { + "arguments": [ + { + "id": 59224, + "name": "prvBidder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59168, + "src": "6319:9:83", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 59225, + "name": "prvPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59174, + "src": "6330:8:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 59221, + "name": "RONTransferHelper", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67471, + "src": "6288:17:83", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_RONTransferHelper_$67471_$", + "typeString": "type(library RONTransferHelper)" + } + }, + "id": 59223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6306:12:83", + "memberName": "safeTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 67446, + "src": "6288:30:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_uint256_$returns$__$", + "typeString": "function (address payable,uint256)" + } + }, + "id": 59226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6288:51:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59227, + "nodeType": "ExpressionStatement", + "src": "6288:51:83" + } + } + ] + }, + "baseFunctions": [ + 64312 + ], + "documentation": { + "id": 59106, + "nodeType": "StructuredDocumentation", + "src": "5354:37:83", + "text": " @inheritdoc INSAuction" + }, + "functionSelector": "9979ef45", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "placeBid", + "nameLocation": "5403:8:83", + "parameters": { + "id": 59109, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 59108, + "mutability": "mutable", + "name": "id", + "nameLocation": "5420:2:83", + "nodeType": "VariableDeclaration", + "scope": 59230, + "src": "5412:10:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59107, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5412:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5411:12:83" + }, + "returnParameters": { + "id": 59110, + "nodeType": "ParameterList", + "parameters": [], + "src": "5441:0:83" + }, + "scope": 59607, + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "id": 59386, + "nodeType": "FunctionDefinition", + "src": "6388:1072:83", + "nodes": [], + "body": { + "id": 59385, + "nodeType": "Block", + "src": "6486:974:83", + "nodes": [], + "statements": [ + { + "assignments": [ + 59241 + ], + "declarations": [ + { + "constant": false, + "id": 59241, + "mutability": "mutable", + "name": "id", + "nameLocation": "6500:2:83", + "nodeType": "VariableDeclaration", + "scope": 59385, + "src": "6492:10:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59240, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6492:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 59242, + "nodeType": "VariableDeclarationStatement", + "src": "6492:10:83" + }, + { + "assignments": [ + 59244 + ], + "declarations": [ + { + "constant": false, + "id": 59244, + "mutability": "mutable", + "name": "accumulatedRON", + "nameLocation": "6516:14:83", + "nodeType": "VariableDeclaration", + "scope": 59385, + "src": "6508:22:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59243, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6508:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 59245, + "nodeType": "VariableDeclarationStatement", + "src": "6508:22:83" + }, + { + "assignments": [ + 59248 + ], + "declarations": [ + { + "constant": false, + "id": 59248, + "mutability": "mutable", + "name": "range", + "nameLocation": "6554:5:83", + "nodeType": "VariableDeclaration", + "scope": 59385, + "src": "6536:23:83", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_memory_ptr", + "typeString": "struct EventRange" + }, + "typeName": { + "id": 59247, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 59246, + "name": "EventRange", + "nameLocations": [ + "6536:10:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65922, + "src": "6536:10:83" + }, + "referencedDeclaration": 65922, + "src": "6536:10:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_storage_ptr", + "typeString": "struct EventRange" + } + }, + "visibility": "internal" + } + ], + "id": 59249, + "nodeType": "VariableDeclarationStatement", + "src": "6536:23:83" + }, + { + "assignments": [ + 59252 + ], + "declarations": [ + { + "constant": false, + "id": 59252, + "mutability": "mutable", + "name": "auction", + "nameLocation": "6586:7:83", + "nodeType": "VariableDeclaration", + "scope": 59385, + "src": "6565:28:83", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_memory_ptr", + "typeString": "struct INSAuction.DomainAuction" + }, + "typeName": { + "id": 59251, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 59250, + "name": "DomainAuction", + "nameLocations": [ + "6565:13:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 64175, + "src": "6565:13:83" + }, + "referencedDeclaration": 64175, + "src": "6565:13:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_storage_ptr", + "typeString": "struct INSAuction.DomainAuction" + } + }, + "visibility": "internal" + } + ], + "id": 59253, + "nodeType": "VariableDeclarationStatement", + "src": "6565:28:83" + }, + { + "assignments": [ + 59255 + ], + "declarations": [ + { + "constant": false, + "id": 59255, + "mutability": "mutable", + "name": "length", + "nameLocation": "6607:6:83", + "nodeType": "VariableDeclaration", + "scope": 59385, + "src": "6599:14:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59254, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6599:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 59258, + "initialValue": { + "expression": { + "id": 59256, + "name": "ids", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59234, + "src": "6616:3:83", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 59257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6620:6:83", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "6616:10:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6599:27:83" + }, + { + "expression": { + "id": 59265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 59259, + "name": "claimedAts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59238, + "src": "6632:10:83", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 59263, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59255, + "src": "6659:6:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 59262, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "6645:13:83", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (uint256[] memory)" + }, + "typeName": { + "baseType": { + "id": 59260, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6649:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 59261, + "nodeType": "ArrayTypeName", + "src": "6649:9:83", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + } + }, + "id": 59264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6645:21:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "src": "6632:34:83", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 59266, + "nodeType": "ExpressionStatement", + "src": "6632:34:83" + }, + { + "assignments": [ + 59269 + ], + "declarations": [ + { + "constant": false, + "id": 59269, + "mutability": "mutable", + "name": "rnsUnified", + "nameLocation": "6683:10:83", + "nodeType": "VariableDeclaration", + "scope": 59385, + "src": "6672:21:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSUnified_$65002", + "typeString": "contract INSUnified" + }, + "typeName": { + "id": 59268, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 59267, + "name": "INSUnified", + "nameLocations": [ + "6672:10:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65002, + "src": "6672:10:83" + }, + "referencedDeclaration": 65002, + "src": "6672:10:83", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSUnified_$65002", + "typeString": "contract INSUnified" + } + }, + "visibility": "internal" + } + ], + "id": 59271, + "initialValue": { + "id": 59270, + "name": "_rnsUnified", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58683, + "src": "6696:11:83", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSUnified_$65002", + "typeString": "contract INSUnified" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6672:35:83" + }, + { + "assignments": [ + 59273 + ], + "declarations": [ + { + "constant": false, + "id": 59273, + "mutability": "mutable", + "name": "expiry", + "nameLocation": "6720:6:83", + "nodeType": "VariableDeclaration", + "scope": 59385, + "src": "6713:13:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 59272, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6713:6:83", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 59283, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 59279, + "name": "DOMAIN_EXPIRY_DURATION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58662, + "src": "6770:22:83", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 59280, + "name": "MAX_EXPIRY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58654, + "src": "6794:10:83", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "expression": { + "expression": { + "id": 59276, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "6736:5:83", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 59277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6742:9:83", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "6736:15:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 59278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6752:17:83", + "memberName": "addWithUpperbound", + "nodeType": "MemberAccess", + "referencedDeclaration": 66612, + "src": "6736:33:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$attached_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" + } + }, + "id": 59281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6736:69:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 59275, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6729:6:83", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + }, + "typeName": { + "id": 59274, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6729:6:83", + "typeDescriptions": {} + } + }, + "id": 59282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6729:77:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6713:93:83" + }, + { + "body": { + "id": 59376, + "nodeType": "Block", + "src": "6842:550:83", + "statements": [ + { + "expression": { + "id": 59294, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 59290, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59241, + "src": "6850:2:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "baseExpression": { + "id": 59291, + "name": "ids", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59234, + "src": "6855:3:83", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 59293, + "indexExpression": { + "id": 59292, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59285, + "src": "6859:1:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6855:6:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6850:11:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 59295, + "nodeType": "ExpressionStatement", + "src": "6850:11:83" + }, + { + "expression": { + "id": 59300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 59296, + "name": "auction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59252, + "src": "6869:7:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_memory_ptr", + "typeString": "struct INSAuction.DomainAuction memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "baseExpression": { + "id": 59297, + "name": "_domainAuction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58695, + "src": "6879:14:83", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_DomainAuction_$64175_storage_$", + "typeString": "mapping(uint256 => struct INSAuction.DomainAuction storage ref)" + } + }, + "id": 59299, + "indexExpression": { + "id": 59298, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59241, + "src": "6894:2:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6879:18:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_storage", + "typeString": "struct INSAuction.DomainAuction storage ref" + } + }, + "src": "6869:28:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_memory_ptr", + "typeString": "struct INSAuction.DomainAuction memory" + } + }, + "id": 59301, + "nodeType": "ExpressionStatement", + "src": "6869:28:83" + }, + { + "expression": { + "id": 59307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 59302, + "name": "range", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59248, + "src": "6905:5:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_memory_ptr", + "typeString": "struct EventRange memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "baseExpression": { + "id": 59303, + "name": "_auctionRange", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58689, + "src": "6913:13:83", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_EventRange_$65922_storage_$", + "typeString": "mapping(bytes32 => struct EventRange storage ref)" + } + }, + "id": 59306, + "indexExpression": { + "expression": { + "id": 59304, + "name": "auction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59252, + "src": "6927:7:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_memory_ptr", + "typeString": "struct INSAuction.DomainAuction memory" + } + }, + "id": 59305, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6935:9:83", + "memberName": "auctionId", + "nodeType": "MemberAccess", + "referencedDeclaration": 64169, + "src": "6927:17:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6913:32:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_storage", + "typeString": "struct EventRange storage ref" + } + }, + "src": "6905:40:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_memory_ptr", + "typeString": "struct EventRange memory" + } + }, + "id": 59308, + "nodeType": "ExpressionStatement", + "src": "6905:40:83" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 59313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "id": 59309, + "name": "auction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59252, + "src": "6958:7:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_memory_ptr", + "typeString": "struct INSAuction.DomainAuction memory" + } + }, + "id": 59310, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6966:3:83", + "memberName": "bid", + "nodeType": "MemberAccess", + "referencedDeclaration": 64174, + "src": "6958:11:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bid_$64167_memory_ptr", + "typeString": "struct INSAuction.Bid memory" + } + }, + "id": 59311, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6970:9:83", + "memberName": "claimedAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 64166, + "src": "6958:21:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 59312, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6983:1:83", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6958:26:83", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 59371, + "nodeType": "IfStatement", + "src": "6954:392:83", + "trueBody": { + "id": 59370, + "nodeType": "Block", + "src": "6986:360:83", + "statements": [ + { + "condition": { + "id": 59317, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "7000:16:83", + "subExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 59314, + "name": "range", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59248, + "src": "7001:5:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_memory_ptr", + "typeString": "struct EventRange memory" + } + }, + "id": 59315, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7007:7:83", + "memberName": "isEnded", + "nodeType": "MemberAccess", + "referencedDeclaration": 65970, + "src": "7001:13:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_EventRange_$65922_memory_ptr_$returns$_t_bool_$attached_to$_t_struct$_EventRange_$65922_memory_ptr_$", + "typeString": "function (struct EventRange memory) view returns (bool)" + } + }, + "id": 59316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7001:15:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 59321, + "nodeType": "IfStatement", + "src": "6996:42:83", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 59318, + "name": "NotYetEnded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64136, + "src": "7025:11:83", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 59319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7025:13:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59320, + "nodeType": "RevertStatement", + "src": "7018:20:83" + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 59326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "id": 59322, + "name": "auction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59252, + "src": "7052:7:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_memory_ptr", + "typeString": "struct INSAuction.DomainAuction memory" + } + }, + "id": 59323, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7060:3:83", + "memberName": "bid", + "nodeType": "MemberAccess", + "referencedDeclaration": 64174, + "src": "7052:11:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bid_$64167_memory_ptr", + "typeString": "struct INSAuction.Bid memory" + } + }, + "id": 59324, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7064:9:83", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": 64164, + "src": "7052:21:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 59325, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7077:1:83", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7052:26:83", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 59330, + "nodeType": "IfStatement", + "src": "7048:52:83", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 59327, + "name": "NoOneBidded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64138, + "src": "7087:11:83", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 59328, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7087:13:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59329, + "nodeType": "RevertStatement", + "src": "7080:20:83" + } + }, + { + "expression": { + "id": 59335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 59331, + "name": "accumulatedRON", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59244, + "src": "7111:14:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "expression": { + "expression": { + "id": 59332, + "name": "auction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59252, + "src": "7129:7:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_memory_ptr", + "typeString": "struct INSAuction.DomainAuction memory" + } + }, + "id": 59333, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7137:3:83", + "memberName": "bid", + "nodeType": "MemberAccess", + "referencedDeclaration": 64174, + "src": "7129:11:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bid_$64167_memory_ptr", + "typeString": "struct INSAuction.Bid memory" + } + }, + "id": 59334, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7141:5:83", + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 64162, + "src": "7129:17:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7111:35:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 59336, + "nodeType": "ExpressionStatement", + "src": "7111:35:83" + }, + { + "expression": { + "arguments": [ + { + "id": 59340, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59241, + "src": "7177:2:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 59341, + "name": "expiry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59273, + "src": "7181:6:83", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "expression": { + "id": 59337, + "name": "rnsUnified", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59269, + "src": "7156:10:83", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSUnified_$65002", + "typeString": "contract INSUnified" + } + }, + "id": 59339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7167:9:83", + "memberName": "setExpiry", + "nodeType": "MemberAccess", + "referencedDeclaration": 64992, + "src": "7156:20:83", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint64_$returns$__$", + "typeString": "function (uint256,uint64) external" + } + }, + "id": 59342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7156:32:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59343, + "nodeType": "ExpressionStatement", + "src": "7156:32:83" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 59349, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "7230:4:83", + "typeDescriptions": { + "typeIdentifier": "t_contract$_RNSAuction_$59607", + "typeString": "contract RNSAuction" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_RNSAuction_$59607", + "typeString": "contract RNSAuction" + } + ], + "id": 59348, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7222:7:83", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 59347, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7222:7:83", + "typeDescriptions": {} + } + }, + "id": 59350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7222:13:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "expression": { + "id": 59351, + "name": "auction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59252, + "src": "7237:7:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_memory_ptr", + "typeString": "struct INSAuction.DomainAuction memory" + } + }, + "id": 59352, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7245:3:83", + "memberName": "bid", + "nodeType": "MemberAccess", + "referencedDeclaration": 64174, + "src": "7237:11:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bid_$64167_memory_ptr", + "typeString": "struct INSAuction.Bid memory" + } + }, + "id": 59353, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7249:6:83", + "memberName": "bidder", + "nodeType": "MemberAccess", + "referencedDeclaration": 64160, + "src": "7237:18:83", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 59354, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59241, + "src": "7257:2:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 59344, + "name": "rnsUnified", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59269, + "src": "7198:10:83", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSUnified_$65002", + "typeString": "contract INSUnified" + } + }, + "id": 59346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7209:12:83", + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 51045, + "src": "7198:23:83", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256) external" + } + }, + "id": 59355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7198:62:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59356, + "nodeType": "ExpressionStatement", + "src": "7198:62:83" + }, + { + "expression": { + "id": 59368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "expression": { + "baseExpression": { + "id": 59357, + "name": "_domainAuction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58695, + "src": "7271:14:83", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_DomainAuction_$64175_storage_$", + "typeString": "mapping(uint256 => struct INSAuction.DomainAuction storage ref)" + } + }, + "id": 59359, + "indexExpression": { + "id": 59358, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59241, + "src": "7286:2:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7271:18:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_storage", + "typeString": "struct INSAuction.DomainAuction storage ref" + } + }, + "id": 59360, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7290:3:83", + "memberName": "bid", + "nodeType": "MemberAccess", + "referencedDeclaration": 64174, + "src": "7271:22:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bid_$64167_storage", + "typeString": "struct INSAuction.Bid storage ref" + } + }, + "id": 59361, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "7294:9:83", + "memberName": "claimedAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 64166, + "src": "7271:32:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 59367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 59362, + "name": "claimedAts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59238, + "src": "7306:10:83", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 59364, + "indexExpression": { + "id": 59363, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59285, + "src": "7317:1:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7306:13:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 59365, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "7322:5:83", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 59366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7328:9:83", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "7322:15:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7306:31:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7271:66:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 59369, + "nodeType": "ExpressionStatement", + "src": "7271:66:83" + } + ] + } + }, + { + "id": 59375, + "nodeType": "UncheckedBlock", + "src": "7354:32:83", + "statements": [ + { + "expression": { + "id": 59373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "7374:3:83", + "subExpression": { + "id": 59372, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59285, + "src": "7376:1:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 59374, + "nodeType": "ExpressionStatement", + "src": "7374:3:83" + } + ] + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 59289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 59287, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59285, + "src": "6829:1:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 59288, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59255, + "src": "6833:6:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6829:10:83", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 59377, + "initializationExpression": { + "assignments": [ + 59285 + ], + "declarations": [ + { + "constant": false, + "id": 59285, + "mutability": "mutable", + "name": "i", + "nameLocation": "6826:1:83", + "nodeType": "VariableDeclaration", + "scope": 59377, + "src": "6818:9:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59284, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6818:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 59286, + "nodeType": "VariableDeclarationStatement", + "src": "6818:9:83" + }, + "nodeType": "ForStatement", + "src": "6813:579:83" + }, + { + "expression": { + "arguments": [ + { + "id": 59381, + "name": "_treasury", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58698, + "src": "7429:9:83", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 59382, + "name": "accumulatedRON", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59244, + "src": "7440:14:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 59378, + "name": "RONTransferHelper", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67471, + "src": "7398:17:83", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_RONTransferHelper_$67471_$", + "typeString": "type(library RONTransferHelper)" + } + }, + "id": 59380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7416:12:83", + "memberName": "safeTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 67446, + "src": "7398:30:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_uint256_$returns$__$", + "typeString": "function (address payable,uint256)" + } + }, + "id": 59383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7398:57:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59384, + "nodeType": "ExpressionStatement", + "src": "7398:57:83" + } + ] + }, + "baseFunctions": [ + 64333 + ], + "documentation": { + "id": 59231, + "nodeType": "StructuredDocumentation", + "src": "6348:37:83", + "text": " @inheritdoc INSAuction" + }, + "functionSelector": "6e7d60f2", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "bulkClaimBidNames", + "nameLocation": "6397:17:83", + "parameters": { + "id": 59235, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 59234, + "mutability": "mutable", + "name": "ids", + "nameLocation": "6434:3:83", + "nodeType": "VariableDeclaration", + "scope": 59386, + "src": "6415:22:83", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 59232, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6415:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 59233, + "nodeType": "ArrayTypeName", + "src": "6415:9:83", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "6414:24:83" + }, + "returnParameters": { + "id": 59239, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 59238, + "mutability": "mutable", + "name": "claimedAts", + "nameLocation": "6474:10:83", + "nodeType": "VariableDeclaration", + "scope": 59386, + "src": "6457:27:83", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 59236, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6457:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 59237, + "nodeType": "ArrayTypeName", + "src": "6457:9:83", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "6456:29:83" + }, + "scope": 59607, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 59396, + "nodeType": "FunctionDefinition", + "src": "7504:89:83", + "nodes": [], + "body": { + "id": 59395, + "nodeType": "Block", + "src": "7564:29:83", + "nodes": [], + "statements": [ + { + "expression": { + "id": 59393, + "name": "_rnsUnified", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58683, + "src": "7577:11:83", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSUnified_$65002", + "typeString": "contract INSUnified" + } + }, + "functionReturnParameters": 59392, + "id": 59394, + "nodeType": "Return", + "src": "7570:18:83" + } + ] + }, + "baseFunctions": [ + 64364 + ], + "documentation": { + "id": 59387, + "nodeType": "StructuredDocumentation", + "src": "7464:37:83", + "text": " @inheritdoc INSAuction" + }, + "functionSelector": "8c843314", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getRNSUnified", + "nameLocation": "7513:13:83", + "parameters": { + "id": 59388, + "nodeType": "ParameterList", + "parameters": [], + "src": "7526:2:83" + }, + "returnParameters": { + "id": 59392, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 59391, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 59396, + "src": "7552:10:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSUnified_$65002", + "typeString": "contract INSUnified" + }, + "typeName": { + "id": 59390, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 59389, + "name": "INSUnified", + "nameLocations": [ + "7552:10:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65002, + "src": "7552:10:83" + }, + "referencedDeclaration": 65002, + "src": "7552:10:83", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSUnified_$65002", + "typeString": "contract INSUnified" + } + }, + "visibility": "internal" + } + ], + "src": "7551:12:83" + }, + "scope": 59607, + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "id": 59405, + "nodeType": "FunctionDefinition", + "src": "7637:82:83", + "nodes": [], + "body": { + "id": 59404, + "nodeType": "Block", + "src": "7692:27:83", + "nodes": [], + "statements": [ + { + "expression": { + "id": 59402, + "name": "_treasury", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58698, + "src": "7705:9:83", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "functionReturnParameters": 59401, + "id": 59403, + "nodeType": "Return", + "src": "7698:16:83" + } + ] + }, + "baseFunctions": [ + 64339 + ], + "documentation": { + "id": 59397, + "nodeType": "StructuredDocumentation", + "src": "7597:37:83", + "text": " @inheritdoc INSAuction" + }, + "functionSelector": "3b19e84a", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getTreasury", + "nameLocation": "7646:11:83", + "parameters": { + "id": 59398, + "nodeType": "ParameterList", + "parameters": [], + "src": "7657:2:83" + }, + "returnParameters": { + "id": 59401, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 59400, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 59405, + "src": "7683:7:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 59399, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7683:7:83", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "7682:9:83" + }, + "scope": 59607, + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "id": 59414, + "nodeType": "FunctionDefinition", + "src": "7763:88:83", + "nodes": [], + "body": { + "id": 59413, + "nodeType": "Block", + "src": "7821:30:83", + "nodes": [], + "statements": [ + { + "expression": { + "id": 59411, + "name": "_bidGapRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58701, + "src": "7834:12:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 59410, + "id": 59412, + "nodeType": "Return", + "src": "7827:19:83" + } + ] + }, + "baseFunctions": [ + 64345 + ], + "documentation": { + "id": 59406, + "nodeType": "StructuredDocumentation", + "src": "7723:37:83", + "text": " @inheritdoc INSAuction" + }, + "functionSelector": "a282d4ae", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBidGapRatio", + "nameLocation": "7772:14:83", + "parameters": { + "id": 59407, + "nodeType": "ParameterList", + "parameters": [], + "src": "7786:2:83" + }, + "returnParameters": { + "id": 59410, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 59409, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 59414, + "src": "7812:7:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59408, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7812:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7811:9:83" + }, + "scope": 59607, + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "id": 59428, + "nodeType": "FunctionDefinition", + "src": "7895:110:83", + "nodes": [], + "body": { + "id": 59427, + "nodeType": "Block", + "src": "7976:29:83", + "nodes": [], + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 59424, + "name": "addr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59417, + "src": "7995:4:83", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 59423, + "name": "_setTreasury", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59500, + "src": "7982:12:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$returns$__$", + "typeString": "function (address payable)" + } + }, + "id": 59425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7982:18:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59426, + "nodeType": "ExpressionStatement", + "src": "7982:18:83" + } + ] + }, + "baseFunctions": [ + 64351 + ], + "documentation": { + "id": 59415, + "nodeType": "StructuredDocumentation", + "src": "7855:37:83", + "text": " @inheritdoc INSAuction" + }, + "functionSelector": "f0f44260", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "id": 59420, + "name": "DEFAULT_ADMIN_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48178, + "src": "7956:18:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 59421, + "kind": "modifierInvocation", + "modifierName": { + "id": 59419, + "name": "onlyRole", + "nameLocations": [ + "7947:8:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 48189, + "src": "7947:8:83" + }, + "nodeType": "ModifierInvocation", + "src": "7947:28:83" + } + ], + "name": "setTreasury", + "nameLocation": "7904:11:83", + "parameters": { + "id": 59418, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 59417, + "mutability": "mutable", + "name": "addr", + "nameLocation": "7932:4:83", + "nodeType": "VariableDeclaration", + "scope": 59428, + "src": "7916:20:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 59416, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7916:15:83", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "visibility": "internal" + } + ], + "src": "7915:22:83" + }, + "returnParameters": { + "id": 59422, + "nodeType": "ParameterList", + "parameters": [], + "src": "7976:0:83" + }, + "scope": 59607, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 59442, + "nodeType": "FunctionDefinition", + "src": "8050:110:83", + "nodes": [], + "body": { + "id": 59441, + "nodeType": "Block", + "src": "8127:33:83", + "nodes": [], + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 59438, + "name": "ratio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59431, + "src": "8149:5:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 59437, + "name": "_setBidGapRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59522, + "src": "8133:15:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 59439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8133:22:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59440, + "nodeType": "ExpressionStatement", + "src": "8133:22:83" + } + ] + }, + "baseFunctions": [ + 64357 + ], + "documentation": { + "id": 59429, + "nodeType": "StructuredDocumentation", + "src": "8009:37:83", + "text": " @inheritdoc INSAuction" + }, + "functionSelector": "60223b44", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "id": 59434, + "name": "DEFAULT_ADMIN_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48178, + "src": "8107:18:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 59435, + "kind": "modifierInvocation", + "modifierName": { + "id": 59433, + "name": "onlyRole", + "nameLocations": [ + "8098:8:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 48189, + "src": "8098:8:83" + }, + "nodeType": "ModifierInvocation", + "src": "8098:28:83" + } + ], + "name": "setBidGapRatio", + "nameLocation": "8059:14:83", + "parameters": { + "id": 59432, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 59431, + "mutability": "mutable", + "name": "ratio", + "nameLocation": "8082:5:83", + "nodeType": "VariableDeclaration", + "scope": 59442, + "src": "8074:13:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59430, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8074:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8073:15:83" + }, + "returnParameters": { + "id": 59436, + "nodeType": "ParameterList", + "parameters": [], + "src": "8127:0:83" + }, + "scope": 59607, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 59475, + "nodeType": "FunctionDefinition", + "src": "8204:254:83", + "nodes": [], + "body": { + "id": 59474, + "nodeType": "Block", + "src": "8306:152:83", + "nodes": [], + "statements": [ + { + "expression": { + "id": 59457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 59453, + "name": "auction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59449, + "src": "8312:7:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_memory_ptr", + "typeString": "struct INSAuction.DomainAuction memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "baseExpression": { + "id": 59454, + "name": "_domainAuction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58695, + "src": "8322:14:83", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_DomainAuction_$64175_storage_$", + "typeString": "mapping(uint256 => struct INSAuction.DomainAuction storage ref)" + } + }, + "id": 59456, + "indexExpression": { + "id": 59455, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59445, + "src": "8337:2:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8322:18:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_storage", + "typeString": "struct INSAuction.DomainAuction storage ref" + } + }, + "src": "8312:28:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_memory_ptr", + "typeString": "struct INSAuction.DomainAuction memory" + } + }, + "id": 59458, + "nodeType": "ExpressionStatement", + "src": "8312:28:83" + }, + { + "assignments": [ + 59461 + ], + "declarations": [ + { + "constant": false, + "id": 59461, + "mutability": "mutable", + "name": "range", + "nameLocation": "8364:5:83", + "nodeType": "VariableDeclaration", + "scope": 59474, + "src": "8346:23:83", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_memory_ptr", + "typeString": "struct EventRange" + }, + "typeName": { + "id": 59460, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 59459, + "name": "EventRange", + "nameLocations": [ + "8346:10:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65922, + "src": "8346:10:83" + }, + "referencedDeclaration": 65922, + "src": "8346:10:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_storage_ptr", + "typeString": "struct EventRange" + } + }, + "visibility": "internal" + } + ], + "id": 59466, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 59463, + "name": "auction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59449, + "src": "8388:7:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_memory_ptr", + "typeString": "struct INSAuction.DomainAuction memory" + } + }, + "id": 59464, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8396:9:83", + "memberName": "auctionId", + "nodeType": "MemberAccess", + "referencedDeclaration": 64169, + "src": "8388:17:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 59462, + "name": "getAuctionEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58982, + "src": "8372:15:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_struct$_EventRange_$65922_memory_ptr_$", + "typeString": "function (bytes32) view returns (struct EventRange memory)" + } + }, + "id": 59465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8372:34:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_memory_ptr", + "typeString": "struct EventRange memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8346:60:83" + }, + { + "expression": { + "id": 59472, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 59467, + "name": "beatPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59451, + "src": "8412:9:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 59469, + "name": "auction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59449, + "src": "8438:7:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_memory_ptr", + "typeString": "struct INSAuction.DomainAuction memory" + } + }, + { + "id": 59470, + "name": "range", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59461, + "src": "8447:5:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_memory_ptr", + "typeString": "struct EventRange memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_DomainAuction_$64175_memory_ptr", + "typeString": "struct INSAuction.DomainAuction memory" + }, + { + "typeIdentifier": "t_struct$_EventRange_$65922_memory_ptr", + "typeString": "struct EventRange memory" + } + ], + "id": 59468, + "name": "_getBeatPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59568, + "src": "8424:13:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_DomainAuction_$64175_memory_ptr_$_t_struct$_EventRange_$65922_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (struct INSAuction.DomainAuction memory,struct EventRange memory) view returns (uint256)" + } + }, + "id": 59471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8424:29:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8412:41:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 59473, + "nodeType": "ExpressionStatement", + "src": "8412:41:83" + } + ] + }, + "baseFunctions": [ + 64323 + ], + "documentation": { + "id": 59443, + "nodeType": "StructuredDocumentation", + "src": "8164:37:83", + "text": " @inheritdoc INSAuction" + }, + "functionSelector": "78bd7935", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getAuction", + "nameLocation": "8213:10:83", + "parameters": { + "id": 59446, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 59445, + "mutability": "mutable", + "name": "id", + "nameLocation": "8232:2:83", + "nodeType": "VariableDeclaration", + "scope": 59475, + "src": "8224:10:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59444, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8224:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8223:12:83" + }, + "returnParameters": { + "id": 59452, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 59449, + "mutability": "mutable", + "name": "auction", + "nameLocation": "8278:7:83", + "nodeType": "VariableDeclaration", + "scope": 59475, + "src": "8257:28:83", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_memory_ptr", + "typeString": "struct INSAuction.DomainAuction" + }, + "typeName": { + "id": 59448, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 59447, + "name": "DomainAuction", + "nameLocations": [ + "8257:13:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 64175, + "src": "8257:13:83" + }, + "referencedDeclaration": 64175, + "src": "8257:13:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_storage_ptr", + "typeString": "struct INSAuction.DomainAuction" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 59451, + "mutability": "mutable", + "name": "beatPrice", + "nameLocation": "8295:9:83", + "nodeType": "VariableDeclaration", + "scope": 59475, + "src": "8287:17:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59450, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8287:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8256:49:83" + }, + "scope": 59607, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "id": 59500, + "nodeType": "FunctionDefinition", + "src": "8559:165:83", + "nodes": [], + "body": { + "id": 59499, + "nodeType": "Block", + "src": "8612:112:83", + "nodes": [], + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 59486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 59481, + "name": "addr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59478, + "src": "8622:4:83", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 59484, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8638:1:83", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 59483, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8630:7:83", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 59482, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8630:7:83", + "typeDescriptions": {} + } + }, + "id": 59485, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8630:10:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "8622:18:83", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 59490, + "nodeType": "IfStatement", + "src": "8618:47:83", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 59487, + "name": "NullAssignment", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64140, + "src": "8649:14:83", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 59488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8649:16:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59489, + "nodeType": "RevertStatement", + "src": "8642:23:83" + } + }, + { + "expression": { + "id": 59493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 59491, + "name": "_treasury", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58698, + "src": "8671:9:83", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 59492, + "name": "addr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59478, + "src": "8683:4:83", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "8671:16:83", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 59494, + "nodeType": "ExpressionStatement", + "src": "8671:16:83" + }, + { + "eventCall": { + "arguments": [ + { + "id": 59496, + "name": "addr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59478, + "src": "8714:4:83", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 59495, + "name": "TreasuryUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64214, + "src": "8698:15:83", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 59497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8698:21:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59498, + "nodeType": "EmitStatement", + "src": "8693:26:83" + } + ] + }, + "documentation": { + "id": 59476, + "nodeType": "StructuredDocumentation", + "src": "8462:94:83", + "text": " @dev Helper method to set treasury.\n Emits an event {TreasuryUpdated}." + }, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_setTreasury", + "nameLocation": "8568:12:83", + "parameters": { + "id": 59479, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 59478, + "mutability": "mutable", + "name": "addr", + "nameLocation": "8597:4:83", + "nodeType": "VariableDeclaration", + "scope": 59500, + "src": "8581:20:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 59477, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8581:15:83", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "visibility": "internal" + } + ], + "src": "8580:22:83" + }, + "returnParameters": { + "id": 59480, + "nodeType": "ParameterList", + "parameters": [], + "src": "8612:0:83" + }, + "scope": 59607, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "id": 59522, + "nodeType": "FunctionDefinition", + "src": "8833:174:83", + "nodes": [], + "body": { + "id": 59521, + "nodeType": "Block", + "src": "8882:125:83", + "nodes": [], + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 59508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 59506, + "name": "ratio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59503, + "src": "8892:5:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 59507, + "name": "MAX_PERCENTAGE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58658, + "src": "8900:14:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8892:22:83", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 59512, + "nodeType": "IfStatement", + "src": "8888:52:83", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 59509, + "name": "RatioIsTooLarge", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64144, + "src": "8923:15:83", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 59510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8923:17:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59511, + "nodeType": "RevertStatement", + "src": "8916:24:83" + } + }, + { + "expression": { + "id": 59515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 59513, + "name": "_bidGapRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58701, + "src": "8946:12:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 59514, + "name": "ratio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59503, + "src": "8961:5:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8946:20:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 59516, + "nodeType": "ExpressionStatement", + "src": "8946:20:83" + }, + { + "eventCall": { + "arguments": [ + { + "id": 59518, + "name": "ratio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59503, + "src": "8996:5:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 59517, + "name": "BidGapRatioUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64219, + "src": "8977:18:83", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 59519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8977:25:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59520, + "nodeType": "EmitStatement", + "src": "8972:30:83" + } + ] + }, + "documentation": { + "id": 59501, + "nodeType": "StructuredDocumentation", + "src": "8728:102:83", + "text": " @dev Helper method to set bid gap ratio.\n Emits an event {BidGapRatioUpdated}." + }, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_setBidGapRatio", + "nameLocation": "8842:15:83", + "parameters": { + "id": 59504, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 59503, + "mutability": "mutable", + "name": "ratio", + "nameLocation": "8866:5:83", + "nodeType": "VariableDeclaration", + "scope": 59522, + "src": "8858:13:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59502, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8858:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8857:15:83" + }, + "returnParameters": { + "id": 59505, + "nodeType": "ParameterList", + "parameters": [], + "src": "8882:0:83" + }, + "scope": 59607, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "id": 59568, + "nodeType": "FunctionDefinition", + "src": "9066:440:83", + "nodes": [], + "body": { + "id": 59567, + "nodeType": "Block", + "src": "9200:306:83", + "nodes": [], + "statements": [ + { + "expression": { + "id": 59543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 59534, + "name": "beatPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59532, + "src": "9206:9:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 59537, + "name": "auction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59526, + "src": "9227:7:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_memory_ptr", + "typeString": "struct INSAuction.DomainAuction memory" + } + }, + "id": 59538, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9235:13:83", + "memberName": "startingPrice", + "nodeType": "MemberAccess", + "referencedDeclaration": 64171, + "src": "9227:21:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "expression": { + "id": 59539, + "name": "auction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59526, + "src": "9250:7:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_memory_ptr", + "typeString": "struct INSAuction.DomainAuction memory" + } + }, + "id": 59540, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9258:3:83", + "memberName": "bid", + "nodeType": "MemberAccess", + "referencedDeclaration": 64174, + "src": "9250:11:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bid_$64167_memory_ptr", + "typeString": "struct INSAuction.Bid memory" + } + }, + "id": 59541, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9262:5:83", + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 64162, + "src": "9250:17:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 59535, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53173, + "src": "9218:4:83", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$53173_$", + "typeString": "type(library Math)" + } + }, + "id": 59536, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9223:3:83", + "memberName": "max", + "nodeType": "MemberAccess", + "referencedDeclaration": 52332, + "src": "9218:8:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 59542, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9218:50:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9206:62:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 59544, + "nodeType": "ExpressionStatement", + "src": "9206:62:83" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 59554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 59549, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "id": 59545, + "name": "auction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59526, + "src": "9366:7:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_memory_ptr", + "typeString": "struct INSAuction.DomainAuction memory" + } + }, + "id": 59546, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9374:3:83", + "memberName": "bid", + "nodeType": "MemberAccess", + "referencedDeclaration": 64174, + "src": "9366:11:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bid_$64167_memory_ptr", + "typeString": "struct INSAuction.Bid memory" + } + }, + "id": 59547, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9378:5:83", + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 64162, + "src": "9366:17:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 59548, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9387:1:83", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "9366:22:83", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "id": 59553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "9392:16:83", + "subExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 59550, + "name": "range", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59529, + "src": "9393:5:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_memory_ptr", + "typeString": "struct EventRange memory" + } + }, + "id": 59551, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9399:7:83", + "memberName": "isEnded", + "nodeType": "MemberAccess", + "referencedDeclaration": 65970, + "src": "9393:13:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_EventRange_$65922_memory_ptr_$returns$_t_bool_$attached_to$_t_struct$_EventRange_$65922_memory_ptr_$", + "typeString": "function (struct EventRange memory) view returns (bool)" + } + }, + "id": 59552, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9393:15:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "9366:42:83", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 59566, + "nodeType": "IfStatement", + "src": "9362:140:83", + "trueBody": { + "id": 59565, + "nodeType": "Block", + "src": "9410:92:83", + "statements": [ + { + "expression": { + "id": 59563, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 59555, + "name": "beatPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59532, + "src": "9418:9:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 59558, + "name": "auction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59526, + "src": "9443:7:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_memory_ptr", + "typeString": "struct INSAuction.DomainAuction memory" + } + }, + "id": 59559, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9451:13:83", + "memberName": "startingPrice", + "nodeType": "MemberAccess", + "referencedDeclaration": 64171, + "src": "9443:21:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 59560, + "name": "_bidGapRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58701, + "src": "9466:12:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 59561, + "name": "MAX_PERCENTAGE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58658, + "src": "9480:14:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 59556, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53173, + "src": "9431:4:83", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$53173_$", + "typeString": "type(library Math)" + } + }, + "id": 59557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9436:6:83", + "memberName": "mulDiv", + "nodeType": "MemberAccess", + "referencedDeclaration": 52521, + "src": "9431:11:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" + } + }, + "id": 59562, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9431:64:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9418:77:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 59564, + "nodeType": "ExpressionStatement", + "src": "9418:77:83" + } + ] + } + } + ] + }, + "documentation": { + "id": 59523, + "nodeType": "StructuredDocumentation", + "src": "9011:52:83", + "text": " @dev Helper method to get beat price." + }, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getBeatPrice", + "nameLocation": "9075:13:83", + "parameters": { + "id": 59530, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 59526, + "mutability": "mutable", + "name": "auction", + "nameLocation": "9110:7:83", + "nodeType": "VariableDeclaration", + "scope": 59568, + "src": "9089:28:83", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_memory_ptr", + "typeString": "struct INSAuction.DomainAuction" + }, + "typeName": { + "id": 59525, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 59524, + "name": "DomainAuction", + "nameLocations": [ + "9089:13:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 64175, + "src": "9089:13:83" + }, + "referencedDeclaration": 64175, + "src": "9089:13:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_storage_ptr", + "typeString": "struct INSAuction.DomainAuction" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 59529, + "mutability": "mutable", + "name": "range", + "nameLocation": "9137:5:83", + "nodeType": "VariableDeclaration", + "scope": 59568, + "src": "9119:23:83", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_memory_ptr", + "typeString": "struct EventRange" + }, + "typeName": { + "id": 59528, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 59527, + "name": "EventRange", + "nameLocations": [ + "9119:10:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65922, + "src": "9119:10:83" + }, + "referencedDeclaration": 65922, + "src": "9119:10:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_storage_ptr", + "typeString": "struct EventRange" + } + }, + "visibility": "internal" + } + ], + "src": "9088:55:83" + }, + "returnParameters": { + "id": 59533, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 59532, + "mutability": "mutable", + "name": "beatPrice", + "nameLocation": "9187:9:83", + "nodeType": "VariableDeclaration", + "scope": 59568, + "src": "9179:17:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59531, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9179:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "9178:19:83" + }, + "scope": 59607, + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "id": 59589, + "nodeType": "FunctionDefinition", + "src": "9578:160:83", + "nodes": [], + "body": { + "id": 59588, + "nodeType": "Block", + "src": "9652:86:83", + "nodes": [], + "statements": [ + { + "condition": { + "id": 59583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "9662:43:83", + "subExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 59581, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 59575, + "name": "range", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59572, + "src": "9664:5:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_calldata_ptr", + "typeString": "struct EventRange calldata" + } + }, + "id": 59576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9670:5:83", + "memberName": "valid", + "nodeType": "MemberAccess", + "referencedDeclaration": 65938, + "src": "9664:11:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_struct$_EventRange_$65922_calldata_ptr_$returns$_t_bool_$attached_to$_t_struct$_EventRange_$65922_calldata_ptr_$", + "typeString": "function (struct EventRange calldata) pure returns (bool)" + } + }, + "id": 59577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9664:13:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 59578, + "name": "range", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59572, + "src": "9681:5:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_calldata_ptr", + "typeString": "struct EventRange calldata" + } + }, + "id": 59579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9687:15:83", + "memberName": "isNotYetStarted", + "nodeType": "MemberAccess", + "referencedDeclaration": 65954, + "src": "9681:21:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_EventRange_$65922_memory_ptr_$returns$_t_bool_$attached_to$_t_struct$_EventRange_$65922_memory_ptr_$", + "typeString": "function (struct EventRange memory) view returns (bool)" + } + }, + "id": 59580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9681:23:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "9664:40:83", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 59582, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "9663:42:83", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 59587, + "nodeType": "IfStatement", + "src": "9658:75:83", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 59584, + "name": "InvalidEventRange", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64148, + "src": "9714:17:83", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 59585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9714:19:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59586, + "nodeType": "RevertStatement", + "src": "9707:26:83" + } + } + ] + }, + "documentation": { + "id": 59569, + "nodeType": "StructuredDocumentation", + "src": "9510:65:83", + "text": " @dev Helper method to ensure event range is valid." + }, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_requireValidEventRange", + "nameLocation": "9587:23:83", + "parameters": { + "id": 59573, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 59572, + "mutability": "mutable", + "name": "range", + "nameLocation": "9631:5:83", + "nodeType": "VariableDeclaration", + "scope": 59589, + "src": "9611:25:83", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_calldata_ptr", + "typeString": "struct EventRange" + }, + "typeName": { + "id": 59571, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 59570, + "name": "EventRange", + "nameLocations": [ + "9611:10:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65922, + "src": "9611:10:83" + }, + "referencedDeclaration": 65922, + "src": "9611:10:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_storage_ptr", + "typeString": "struct EventRange" + } + }, + "visibility": "internal" + } + ], + "src": "9610:27:83" + }, + "returnParameters": { + "id": 59574, + "nodeType": "ParameterList", + "parameters": [], + "src": "9652:0:83" + }, + "scope": 59607, + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "id": 59606, + "nodeType": "FunctionDefinition", + "src": "9835:163:83", + "nodes": [], + "body": { + "id": 59605, + "nodeType": "Block", + "src": "9896:102:83", + "nodes": [], + "statements": [ + { + "condition": { + "id": 59600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "9906:43:83", + "subExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "baseExpression": { + "id": 59595, + "name": "_auctionRange", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 58689, + "src": "9907:13:83", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_EventRange_$65922_storage_$", + "typeString": "mapping(bytes32 => struct EventRange storage ref)" + } + }, + "id": 59597, + "indexExpression": { + "id": 59596, + "name": "auctionId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59592, + "src": "9921:9:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9907:24:83", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EventRange_$65922_storage", + "typeString": "struct EventRange storage ref" + } + }, + "id": 59598, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9932:15:83", + "memberName": "isNotYetStarted", + "nodeType": "MemberAccess", + "referencedDeclaration": 65954, + "src": "9907:40:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_EventRange_$65922_memory_ptr_$returns$_t_bool_$attached_to$_t_struct$_EventRange_$65922_memory_ptr_$", + "typeString": "function (struct EventRange memory) view returns (bool)" + } + }, + "id": 59599, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9907:42:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 59604, + "nodeType": "IfStatement", + "src": "9902:91:83", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 59601, + "name": "EventIsNotCreatedOrAlreadyStarted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64158, + "src": "9958:33:83", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 59602, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9958:35:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59603, + "nodeType": "RevertStatement", + "src": "9951:42:83" + } + } + ] + }, + "documentation": { + "id": 59590, + "nodeType": "StructuredDocumentation", + "src": "9742:90:83", + "text": " @dev Helper method to ensure the auction is not yet started or not created." + }, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_requireNotStarted", + "nameLocation": "9844:18:83", + "parameters": { + "id": 59593, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 59592, + "mutability": "mutable", + "name": "auctionId", + "nameLocation": "9871:9:83", + "nodeType": "VariableDeclaration", + "scope": 59606, + "src": "9863:17:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 59591, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9863:7:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "9862:19:83" + }, + "returnParameters": { + "id": 59594, + "nodeType": "ParameterList", + "parameters": [], + "src": "9896:0:83" + }, + "scope": 59607, + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 58630, + "name": "Initializable", + "nameLocations": [ + "769:13:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 49864, + "src": "769:13:83" + }, + "id": 58631, + "nodeType": "InheritanceSpecifier", + "src": "769:13:83" + }, + { + "baseName": { + "id": 58632, + "name": "AccessControlEnumerable", + "nameLocations": [ + "784:23:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 48591, + "src": "784:23:83" + }, + "id": 58633, + "nodeType": "InheritanceSpecifier", + "src": "784:23:83" + }, + { + "baseName": { + "id": 58634, + "name": "INSAuction", + "nameLocations": [ + "809:10:83" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 64365, + "src": "809:10:83" + }, + "id": 58635, + "nodeType": "InheritanceSpecifier", + "src": "809:10:83" + } + ], + "canonicalName": "RNSAuction", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "linearizedBaseContracts": [ + 59607, + 64365, + 48591, + 48466, + 52295, + 52307, + 48689, + 48664, + 51932, + 49864 + ], + "name": "RNSAuction", + "nameLocation": "755:10:83", + "scope": 59608, + "usedErrors": [ + 64136, + 64138, + 64140, + 64142, + 64144, + 64146, + 64148, + 64150, + 64152, + 64154, + 64156, + 64158 + ], + "usedEvents": [ + 48603, + 48612, + 48621, + 49710, + 64183, + 64194, + 64209, + 64214, + 64219 + ] + } + ], + "license": "MIT" + }, + "blockNumber": 21444223, + "bytecode": "0x608060405261000c610011565b6100d0565b600054610100900460ff161561007d5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116146100ce576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61244c806100df6000396000f3fe6080604052600436106101c25760003560e01c8063791a26b4116100f7578063a282d4ae11610095578063db5e1ec611610064578063db5e1ec6146105b4578063ec14cf37146105d4578063f0f44260146105f4578063f5b541a61461061457600080fd5b8063a282d4ae14610544578063b967169014610559578063ca15c87314610574578063d547741f1461059457600080fd5b80639010d07c116100d15780639010d07c146104dc57806391d14854146104fc5780639979ef451461051c578063a217fddf1461052f57600080fd5b8063791a26b41461047e57806381bec1b31461049e5780638c843314146104be57600080fd5b80633b19e84a1161016457806360223b441161013e57806360223b44146103a15780636e7d60f2146103c1578063777b0a18146103ee57806378bd79351461040e57600080fd5b80633b19e84a146103395780634c255c971461036b57806353f9195e1461038157600080fd5b806319a3ee40116101a057806319a3ee40146102a0578063248a9ca3146102b85780632f2ff15d146102f757806336568abe1461031957600080fd5b806301ffc9a7146101c75780630afe1bb3146101fc57806315a291621461022c575b600080fd5b3480156101d357600080fd5b506101e76101e2366004611cff565b610636565b60405190151581526020015b60405180910390f35b34801561020857600080fd5b506102146305a39a8081565b6040516001600160401b0390911681526020016101f3565b34801561023857600080fd5b50610285610247366004611d29565b604080518082019091526000808252602082015250600090815260366020908152604091829020825180840190935280548352600101549082015290565b604080518251815260209283015192810192909252016101f3565b3480156102ac57600080fd5b506102146301e1338081565b3480156102c457600080fd5b506102e96102d3366004611d29565b6000908152600160208190526040909120015490565b6040519081526020016101f3565b34801561030357600080fd5b50610317610312366004611d57565b610661565b005b34801561032557600080fd5b50610317610334366004611d57565b61068c565b34801561034557600080fd5b506038546001600160a01b03165b6040516001600160a01b0390911681526020016101f3565b34801561037757600080fd5b506102e961271081565b34801561038d57600080fd5b506101e761039c366004611d29565b61070f565b3480156103ad57600080fd5b506103176103bc366004611d29565b610732565b3480156103cd57600080fd5b506103e16103dc366004611dd2565b610746565b6040516101f39190611e13565b3480156103fa57600080fd5b50610317610409366004611e57565b610a35565b34801561041a57600080fd5b5061042e610429366004611d29565b610b98565b6040805183518152602080850151818301529382015180516001600160a01b0316828401529384015160608083019190915291840151608082015292015160a083015260c082015260e0016101f3565b34801561048a57600080fd5b506103e1610499366004611dd2565b610c4d565b3480156104aa57600080fd5b506103176104b9366004611ee8565b610e08565b3480156104ca57600080fd5b506035546001600160a01b0316610353565b3480156104e857600080fd5b506103536104f7366004611f15565b610e85565b34801561050857600080fd5b506101e7610517366004611d57565b610ea4565b61031761052a366004611d29565b610ecf565b34801561053b57600080fd5b506102e9600081565b34801561055057600080fd5b506039546102e9565b34801561056557600080fd5b506102146001600160401b0381565b34801561058057600080fd5b506102e961058f366004611d29565b61108a565b3480156105a057600080fd5b506103176105af366004611d57565b6110a1565b3480156105c057600080fd5b506102e96105cf366004611f37565b6110c7565b3480156105e057600080fd5b506103176105ef366004611f53565b611164565b34801561060057600080fd5b5061031761060f366004611fd7565b611301565b34801561062057600080fd5b506102e96000805160206123f783398151915281565b60006001600160e01b03198216635a05180f60e01b148061065b575061065b82611315565b92915050565b6000828152600160208190526040909120015461067d8161134a565b6106878383611357565b505050565b6001600160a01b03811633146107015760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61070b8282611379565b5050565b600881901c6000908152603a6020526040812054600160ff84161b16151561065b565b600061073d8161134a565b61070b8261139b565b6060600080610768604051806040016040528060008152602001600081525090565b610770611caa565b85806001600160401b0381111561078957610789611ff4565b6040519080825280602002602001820160405280156107b2578160200160208202803683370190505b506035549096506001600160a01b031660006107da426301e133806001600160401b036113f9565b905060005b83811015610a11578a8a828181106107f9576107f961200a565b60209081029290920135600081815260378452604080822081516060808201845282548252600180840154838a0152845160808101865260028501546001600160a01b031681526003850154818b0152600485015481870152600590940154848301528285019384528251865260368952848620855180870190965280548652015497840197909752905190950151929c5099509297509091039050610a095760208601514210156108be576040516372d1250d60e01b815260040160405180910390fd5b8460400151604001516000036108e7576040516323bbcc0160e01b815260040160405180910390fd5b6040850151602001516108fa9088612036565b60405163fc284d1160e01b8152600481018a90526001600160401b03841660248201529097506001600160a01b0384169063fc284d1190604401600060405180830381600087803b15801561094e57600080fd5b505af1158015610962573d6000803e3d6000fd5b505050506040858101515190516323b872dd60e01b81523060048201526001600160a01b039182166024820152604481018a9052908416906323b872dd90606401600060405180830381600087803b1580156109bd57600080fd5b505af11580156109d1573d6000803e3d6000fd5b50505050428982815181106109e8576109e861200a565b602090810291909101810182905260008a8152603790915260409020600501555b6001016107df565b50603854610a28906001600160a01b03168761142f565b5050505050505092915050565b6000805160206123f7833981519152610a4d8161134a565b85610a5781611494565b84801580610a655750808414155b15610a8357604051634ec4810560e11b815260040160405180910390fd5b6000806000805b84811015610b4c578a8a82818110610aa457610aa461200a565b905060200201359350610ab68461070f565b610ad357604051637d6fe8d760e11b815260040160405180910390fd5b6000848152603760205260409020805493509150821580610af357508b83145b80610b0057506004820154155b610b1d57604051631dc8374160e01b815260040160405180910390fd5b8b8255888882818110610b3257610b3261200a565b905060200201358260010181905550806001019050610a8a565b508a7f9a845a1c4235343a450f5e39d4179b7e2a6c9586c02bff45d956717f4a19dd948b8b8b8b604051610b83949392919061207b565b60405180910390a25050505050505050505050565b610ba0611caa565b5060008181526037602090815260408083208151606080820184528254825260018084015483870152845160808101865260028501546001600160a01b03168152600385015481880152600485015481870152600590940154918401919091528184019290925280518351808501855286815285018690528552603684528285208351808501909452805484529091015492820192909252909190610c4583826114e1565b915050915091565b60606000805160206123f7833981519152610c678161134a565b826000819003610c8a57604051634ec4810560e11b815260040160405180910390fd5b806001600160401b03811115610ca257610ca2611ff4565b604051908082528060200260200182016040528015610ccb578160200160208202803683370190505b506035549093506001600160a01b03167fba69923fa107dbf5a25a073a10b7c9216ae39fbadc95dc891d460d9ae315d6886301e1338060005b84811015610dfc57836001600160a01b0316630570891f848b8b85818110610d2e57610d2e61200a565b9050602002810190610d4091906120ad565b600030886040518763ffffffff1660e01b8152600401610d65969594939291906120f3565b60408051808303816000875af1158015610d83573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610da7919061214f565b9050878281518110610dbb57610dbb61200a565b602002602001018181525050610df4878281518110610ddc57610ddc61200a565b6020026020010151603a61153990919063ffffffff16565b600101610d04565b50505050505092915050565b6000610e138161134a565b81610e1d81611562565b83610e2781611494565b60008581526036602090815260409091208535815590850135600182015550847fd8960c7efc6464cdd8dd07f4dc149b0a33bf7f60bf357838722d5b80f988fb1b85604051610e769190612189565b60405180910390a25050505050565b6000828152600260205260408120610e9d90836115a7565b9392505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60008181526037602090815260408083208151606080820184528254825260018084015483870152845160808101865260028501546001600160a01b031681526003850154818801526004850154818701526005909401549184019190915281840192909252805185526036845282852083518085019094528054845290910154928201929092529091610f6383836114e1565b9050610f6e826115b3565b610f8b576040516348c6117b60e11b815260040160405180910390fd5b80341015610fac57604051632ca2f52b60e11b815260040160405180910390fd5b33610fb88160006115ce565b610fd557604051634bad17b360e01b815260040160405180910390fd5b604084810151805160209182015160008981526037845284902034600382018190556002820180546001600160a01b0319166001600160a01b038981169182178355426004909501949094558b5188519384529683015295810183905290831660608201529193909290918991907f5934294f4724ea4bb71fee8511b9ccb8dd6d2249ac4d120a81ccfcbbd0ad905f9060800160405180910390a3811561108057611080838361142f565b5050505050505050565b600081815260026020526040812061065b90611644565b600082815260016020819052604090912001546110bd8161134a565b6106878383611379565b6000806110d38161134a565b826110dd81611562565b33846040516020016110f09291906121a0565b60408051808303601f1901815291815281516020928301206000818152603684529190912086358155918601356001830155935050827fd8960c7efc6464cdd8dd07f4dc149b0a33bf7f60bf357838722d5b80f988fb1b856040516111559190612189565b60405180910390a25050919050565b600054610100900460ff16158080156111845750600054600160ff909116105b8061119e5750303b15801561119e575060005460ff166001145b6112015760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106f8565b6000805460ff191660011790558015611224576000805461ff0019166101001790555b61122d8361164e565b6112368261139b565b6112416000886116bf565b846000805160206123f783398151915260005b828110156112945761128c828a8a848181106112725761127261200a565b90506020020160208101906112879190611fd7565b6116bf565b600101611254565b5050603580546001600160a01b0319166001600160a01b0387161790555080156112f8576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b600061130c8161134a565b61070b8261164e565b60006001600160e01b03198216637965db0b60e01b148061065b57506301ffc9a760e01b6001600160e01b031983161461065b565b61135481336116c9565b50565b61136182826116fc565b60008281526002602052604090206106879082611767565b611383828261177c565b600082815260026020526040902061068790826117e3565b6127108111156113be5760405163220f1a1560e01b815260040160405180910390fd5b60398190556040518181527f846b33625d74f443855144a5f2aef4dda303cda3dfb1c704cb58ab70671823429060200160405180910390a150565b60008184118061140857508183115b15611414575080610e9d565b61141e84846117f8565b905081811115610e9d575092915050565b600061143b83836115ce565b90508061068757611454836001600160a01b031661180c565b61145d83611822565b60405160200161146e9291906121eb565b60408051601f198184030181529082905262461bcd60e51b82526106f891600401612269565b60008181526036602090815260409182902082518084019093528054835260010154908201526114c49051421090565b6113545760405163028e4e9760e51b815260040160405180910390fd5b60006114f98360200151846040015160200151611839565b90508260400151602001516000141580156115175750602082015142105b1561065b5761152f836020015160395461271061184f565b610e9d9082612036565b600881901c600090815260209290925260409091208054600160ff9093169290921b9091179055565b602081013581351115801561158a575061158a6115843683900383018361229c565b51421090565b611354576040516302ef0c7360e21b815260040160405180910390fd5b6000610e9d8383611939565b60004282600001511115801561065b57505060200151421090565b604080516000808252602082019092526001600160a01b0384169083906040516115f891906122f8565b60006040518083038185875af1925050503d8060008114611635576040519150601f19603f3d011682016040523d82523d6000602084013e61163a565b606091505b5090949350505050565b600061065b825490565b6001600160a01b038116611675576040516362daafb160e11b815260040160405180910390fd5b603880546001600160a01b0319166001600160a01b0383169081179091556040517f7dae230f18360d76a040c81f050aa14eb9d6dc7901b20fc5d855e2a20fe814d190600090a250565b61070b8282611357565b6116d38282610ea4565b61070b576116e08161180c565b6116eb836020611963565b60405160200161146e929190612314565b6117068282610ea4565b61070b5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b6000610e9d836001600160a01b038416611afe565b6117868282610ea4565b1561070b5760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610e9d836001600160a01b038416611b4d565b8181018281101561065b575060001961065b565b606061065b6001600160a01b0383166014611963565b606061065b8261183184611c40565b600101611963565b60008183116118485781610e9d565b5090919050565b60008080600019858709858702925082811083820303915050806000036118895783828161187f5761187f612389565b0492505050610e9d565b8084116118d05760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b60448201526064016106f8565b60008486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091026000889003889004909101858311909403939093029303949094049190911702949350505050565b60008260000182815481106119505761195061200a565b9060005260206000200154905092915050565b6060600061197283600261239f565b61197d906002612036565b6001600160401b0381111561199457611994611ff4565b6040519080825280601f01601f1916602001820160405280156119be576020820181803683370190505b509050600360fc1b816000815181106119d9576119d961200a565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611a0857611a0861200a565b60200101906001600160f81b031916908160001a9053506000611a2c84600261239f565b611a37906001612036565b90505b6001811115611aaf576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611a6b57611a6b61200a565b1a60f81b828281518110611a8157611a8161200a565b60200101906001600160f81b031916908160001a90535060049490941c93611aa8816123b6565b9050611a3a565b508315610e9d5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106f8565b6000818152600183016020526040812054611b455750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561065b565b50600061065b565b60008181526001830160205260408120548015611c36576000611b716001836123cd565b8554909150600090611b85906001906123cd565b9050818114611bea576000866000018281548110611ba557611ba561200a565b9060005260206000200154905080876000018481548110611bc857611bc861200a565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611bfb57611bfb6123e0565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061065b565b600091505061065b565b600080608083901c15611c585760809290921c916010015b604083901c15611c6d5760409290921c916008015b602083901c15611c825760209290921c916004015b601083901c15611c975760109290921c916002015b600883901c1561065b5760010192915050565b60405180606001604052806000801916815260200160008152602001611cfa604051806080016040528060006001600160a01b031681526020016000815260200160008152602001600081525090565b905290565b600060208284031215611d1157600080fd5b81356001600160e01b031981168114610e9d57600080fd5b600060208284031215611d3b57600080fd5b5035919050565b6001600160a01b038116811461135457600080fd5b60008060408385031215611d6a57600080fd5b823591506020830135611d7c81611d42565b809150509250929050565b60008083601f840112611d9957600080fd5b5081356001600160401b03811115611db057600080fd5b6020830191508360208260051b8501011115611dcb57600080fd5b9250929050565b60008060208385031215611de557600080fd5b82356001600160401b03811115611dfb57600080fd5b611e0785828601611d87565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b81811015611e4b57835183529284019291840191600101611e2f565b50909695505050505050565b600080600080600060608688031215611e6f57600080fd5b8535945060208601356001600160401b0380821115611e8d57600080fd5b611e9989838a01611d87565b90965094506040880135915080821115611eb257600080fd5b50611ebf88828901611d87565b969995985093965092949392505050565b600060408284031215611ee257600080fd5b50919050565b60008060608385031215611efb57600080fd5b82359150611f0c8460208501611ed0565b90509250929050565b60008060408385031215611f2857600080fd5b50508035926020909101359150565b600060408284031215611f4957600080fd5b610e9d8383611ed0565b60008060008060008060a08789031215611f6c57600080fd5b8635611f7781611d42565b955060208701356001600160401b03811115611f9257600080fd5b611f9e89828a01611d87565b9096509450506040870135611fb281611d42565b92506060870135611fc281611d42565b80925050608087013590509295509295509295565b600060208284031215611fe957600080fd5b8135610e9d81611d42565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8082018082111561065b5761065b612020565b81835260006001600160fb1b0383111561206257600080fd5b8260051b80836020870137939093016020019392505050565b60408152600061208f604083018688612049565b82810360208401526120a2818587612049565b979650505050505050565b6000808335601e198436030181126120c457600080fd5b8301803591506001600160401b038211156120de57600080fd5b602001915036819003821315611dcb57600080fd5b86815260a060208201528460a0820152848660c0830137600060c08683018101919091526001600160a01b0394851660408301529290931660608401526001600160401b03166080830152601f909201601f1916010192915050565b6000806040838503121561216257600080fd5b82516001600160401b038116811461217957600080fd5b6020939093015192949293505050565b81358152602080830135908201526040810161065b565b6001600160a01b038316815260608101610e9d602083018480358252602090810135910152565b60005b838110156121e25781810151838201526020016121ca565b50506000910152565b7f5472616e7366657248656c7065723a20636f756c64206e6f74207472616e7366815269032b9102927a7103a37960b51b60208201526000835161223681602a8501602088016121c7565b660103b30b63ab2960cd1b602a91840191820152835161225d8160318401602088016121c7565b01603101949350505050565b60208152600082518060208401526122888160408501602087016121c7565b601f01601f19169190910160400192915050565b6000604082840312156122ae57600080fd5b604051604081018181106001600160401b03821117156122de57634e487b7160e01b600052604160045260246000fd5b604052823581526020928301359281019290925250919050565b6000825161230a8184602087016121c7565b9190910192915050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161234c8160178501602088016121c7565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161237d8160288401602088016121c7565b01602801949350505050565b634e487b7160e01b600052601260045260246000fd5b808202811582820484141761065b5761065b612020565b6000816123c5576123c5612020565b506000190190565b8181038181111561065b5761065b612020565b634e487b7160e01b600052603160045260246000fdfe97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929a264697066735822122095883c052475573f315aee3901b505a20f4dfa9fce451d9777b780042aebbd6064736f6c63430008150033", + "chainId": 2021, + "contractName": "RNSAuction", + "deployedBytecode": "0x6080604052600436106101c25760003560e01c8063791a26b4116100f7578063a282d4ae11610095578063db5e1ec611610064578063db5e1ec6146105b4578063ec14cf37146105d4578063f0f44260146105f4578063f5b541a61461061457600080fd5b8063a282d4ae14610544578063b967169014610559578063ca15c87314610574578063d547741f1461059457600080fd5b80639010d07c116100d15780639010d07c146104dc57806391d14854146104fc5780639979ef451461051c578063a217fddf1461052f57600080fd5b8063791a26b41461047e57806381bec1b31461049e5780638c843314146104be57600080fd5b80633b19e84a1161016457806360223b441161013e57806360223b44146103a15780636e7d60f2146103c1578063777b0a18146103ee57806378bd79351461040e57600080fd5b80633b19e84a146103395780634c255c971461036b57806353f9195e1461038157600080fd5b806319a3ee40116101a057806319a3ee40146102a0578063248a9ca3146102b85780632f2ff15d146102f757806336568abe1461031957600080fd5b806301ffc9a7146101c75780630afe1bb3146101fc57806315a291621461022c575b600080fd5b3480156101d357600080fd5b506101e76101e2366004611cff565b610636565b60405190151581526020015b60405180910390f35b34801561020857600080fd5b506102146305a39a8081565b6040516001600160401b0390911681526020016101f3565b34801561023857600080fd5b50610285610247366004611d29565b604080518082019091526000808252602082015250600090815260366020908152604091829020825180840190935280548352600101549082015290565b604080518251815260209283015192810192909252016101f3565b3480156102ac57600080fd5b506102146301e1338081565b3480156102c457600080fd5b506102e96102d3366004611d29565b6000908152600160208190526040909120015490565b6040519081526020016101f3565b34801561030357600080fd5b50610317610312366004611d57565b610661565b005b34801561032557600080fd5b50610317610334366004611d57565b61068c565b34801561034557600080fd5b506038546001600160a01b03165b6040516001600160a01b0390911681526020016101f3565b34801561037757600080fd5b506102e961271081565b34801561038d57600080fd5b506101e761039c366004611d29565b61070f565b3480156103ad57600080fd5b506103176103bc366004611d29565b610732565b3480156103cd57600080fd5b506103e16103dc366004611dd2565b610746565b6040516101f39190611e13565b3480156103fa57600080fd5b50610317610409366004611e57565b610a35565b34801561041a57600080fd5b5061042e610429366004611d29565b610b98565b6040805183518152602080850151818301529382015180516001600160a01b0316828401529384015160608083019190915291840151608082015292015160a083015260c082015260e0016101f3565b34801561048a57600080fd5b506103e1610499366004611dd2565b610c4d565b3480156104aa57600080fd5b506103176104b9366004611ee8565b610e08565b3480156104ca57600080fd5b506035546001600160a01b0316610353565b3480156104e857600080fd5b506103536104f7366004611f15565b610e85565b34801561050857600080fd5b506101e7610517366004611d57565b610ea4565b61031761052a366004611d29565b610ecf565b34801561053b57600080fd5b506102e9600081565b34801561055057600080fd5b506039546102e9565b34801561056557600080fd5b506102146001600160401b0381565b34801561058057600080fd5b506102e961058f366004611d29565b61108a565b3480156105a057600080fd5b506103176105af366004611d57565b6110a1565b3480156105c057600080fd5b506102e96105cf366004611f37565b6110c7565b3480156105e057600080fd5b506103176105ef366004611f53565b611164565b34801561060057600080fd5b5061031761060f366004611fd7565b611301565b34801561062057600080fd5b506102e96000805160206123f783398151915281565b60006001600160e01b03198216635a05180f60e01b148061065b575061065b82611315565b92915050565b6000828152600160208190526040909120015461067d8161134a565b6106878383611357565b505050565b6001600160a01b03811633146107015760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61070b8282611379565b5050565b600881901c6000908152603a6020526040812054600160ff84161b16151561065b565b600061073d8161134a565b61070b8261139b565b6060600080610768604051806040016040528060008152602001600081525090565b610770611caa565b85806001600160401b0381111561078957610789611ff4565b6040519080825280602002602001820160405280156107b2578160200160208202803683370190505b506035549096506001600160a01b031660006107da426301e133806001600160401b036113f9565b905060005b83811015610a11578a8a828181106107f9576107f961200a565b60209081029290920135600081815260378452604080822081516060808201845282548252600180840154838a0152845160808101865260028501546001600160a01b031681526003850154818b0152600485015481870152600590940154848301528285019384528251865260368952848620855180870190965280548652015497840197909752905190950151929c5099509297509091039050610a095760208601514210156108be576040516372d1250d60e01b815260040160405180910390fd5b8460400151604001516000036108e7576040516323bbcc0160e01b815260040160405180910390fd5b6040850151602001516108fa9088612036565b60405163fc284d1160e01b8152600481018a90526001600160401b03841660248201529097506001600160a01b0384169063fc284d1190604401600060405180830381600087803b15801561094e57600080fd5b505af1158015610962573d6000803e3d6000fd5b505050506040858101515190516323b872dd60e01b81523060048201526001600160a01b039182166024820152604481018a9052908416906323b872dd90606401600060405180830381600087803b1580156109bd57600080fd5b505af11580156109d1573d6000803e3d6000fd5b50505050428982815181106109e8576109e861200a565b602090810291909101810182905260008a8152603790915260409020600501555b6001016107df565b50603854610a28906001600160a01b03168761142f565b5050505050505092915050565b6000805160206123f7833981519152610a4d8161134a565b85610a5781611494565b84801580610a655750808414155b15610a8357604051634ec4810560e11b815260040160405180910390fd5b6000806000805b84811015610b4c578a8a82818110610aa457610aa461200a565b905060200201359350610ab68461070f565b610ad357604051637d6fe8d760e11b815260040160405180910390fd5b6000848152603760205260409020805493509150821580610af357508b83145b80610b0057506004820154155b610b1d57604051631dc8374160e01b815260040160405180910390fd5b8b8255888882818110610b3257610b3261200a565b905060200201358260010181905550806001019050610a8a565b508a7f9a845a1c4235343a450f5e39d4179b7e2a6c9586c02bff45d956717f4a19dd948b8b8b8b604051610b83949392919061207b565b60405180910390a25050505050505050505050565b610ba0611caa565b5060008181526037602090815260408083208151606080820184528254825260018084015483870152845160808101865260028501546001600160a01b03168152600385015481880152600485015481870152600590940154918401919091528184019290925280518351808501855286815285018690528552603684528285208351808501909452805484529091015492820192909252909190610c4583826114e1565b915050915091565b60606000805160206123f7833981519152610c678161134a565b826000819003610c8a57604051634ec4810560e11b815260040160405180910390fd5b806001600160401b03811115610ca257610ca2611ff4565b604051908082528060200260200182016040528015610ccb578160200160208202803683370190505b506035549093506001600160a01b03167fba69923fa107dbf5a25a073a10b7c9216ae39fbadc95dc891d460d9ae315d6886301e1338060005b84811015610dfc57836001600160a01b0316630570891f848b8b85818110610d2e57610d2e61200a565b9050602002810190610d4091906120ad565b600030886040518763ffffffff1660e01b8152600401610d65969594939291906120f3565b60408051808303816000875af1158015610d83573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610da7919061214f565b9050878281518110610dbb57610dbb61200a565b602002602001018181525050610df4878281518110610ddc57610ddc61200a565b6020026020010151603a61153990919063ffffffff16565b600101610d04565b50505050505092915050565b6000610e138161134a565b81610e1d81611562565b83610e2781611494565b60008581526036602090815260409091208535815590850135600182015550847fd8960c7efc6464cdd8dd07f4dc149b0a33bf7f60bf357838722d5b80f988fb1b85604051610e769190612189565b60405180910390a25050505050565b6000828152600260205260408120610e9d90836115a7565b9392505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60008181526037602090815260408083208151606080820184528254825260018084015483870152845160808101865260028501546001600160a01b031681526003850154818801526004850154818701526005909401549184019190915281840192909252805185526036845282852083518085019094528054845290910154928201929092529091610f6383836114e1565b9050610f6e826115b3565b610f8b576040516348c6117b60e11b815260040160405180910390fd5b80341015610fac57604051632ca2f52b60e11b815260040160405180910390fd5b33610fb88160006115ce565b610fd557604051634bad17b360e01b815260040160405180910390fd5b604084810151805160209182015160008981526037845284902034600382018190556002820180546001600160a01b0319166001600160a01b038981169182178355426004909501949094558b5188519384529683015295810183905290831660608201529193909290918991907f5934294f4724ea4bb71fee8511b9ccb8dd6d2249ac4d120a81ccfcbbd0ad905f9060800160405180910390a3811561108057611080838361142f565b5050505050505050565b600081815260026020526040812061065b90611644565b600082815260016020819052604090912001546110bd8161134a565b6106878383611379565b6000806110d38161134a565b826110dd81611562565b33846040516020016110f09291906121a0565b60408051808303601f1901815291815281516020928301206000818152603684529190912086358155918601356001830155935050827fd8960c7efc6464cdd8dd07f4dc149b0a33bf7f60bf357838722d5b80f988fb1b856040516111559190612189565b60405180910390a25050919050565b600054610100900460ff16158080156111845750600054600160ff909116105b8061119e5750303b15801561119e575060005460ff166001145b6112015760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106f8565b6000805460ff191660011790558015611224576000805461ff0019166101001790555b61122d8361164e565b6112368261139b565b6112416000886116bf565b846000805160206123f783398151915260005b828110156112945761128c828a8a848181106112725761127261200a565b90506020020160208101906112879190611fd7565b6116bf565b600101611254565b5050603580546001600160a01b0319166001600160a01b0387161790555080156112f8576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b600061130c8161134a565b61070b8261164e565b60006001600160e01b03198216637965db0b60e01b148061065b57506301ffc9a760e01b6001600160e01b031983161461065b565b61135481336116c9565b50565b61136182826116fc565b60008281526002602052604090206106879082611767565b611383828261177c565b600082815260026020526040902061068790826117e3565b6127108111156113be5760405163220f1a1560e01b815260040160405180910390fd5b60398190556040518181527f846b33625d74f443855144a5f2aef4dda303cda3dfb1c704cb58ab70671823429060200160405180910390a150565b60008184118061140857508183115b15611414575080610e9d565b61141e84846117f8565b905081811115610e9d575092915050565b600061143b83836115ce565b90508061068757611454836001600160a01b031661180c565b61145d83611822565b60405160200161146e9291906121eb565b60408051601f198184030181529082905262461bcd60e51b82526106f891600401612269565b60008181526036602090815260409182902082518084019093528054835260010154908201526114c49051421090565b6113545760405163028e4e9760e51b815260040160405180910390fd5b60006114f98360200151846040015160200151611839565b90508260400151602001516000141580156115175750602082015142105b1561065b5761152f836020015160395461271061184f565b610e9d9082612036565b600881901c600090815260209290925260409091208054600160ff9093169290921b9091179055565b602081013581351115801561158a575061158a6115843683900383018361229c565b51421090565b611354576040516302ef0c7360e21b815260040160405180910390fd5b6000610e9d8383611939565b60004282600001511115801561065b57505060200151421090565b604080516000808252602082019092526001600160a01b0384169083906040516115f891906122f8565b60006040518083038185875af1925050503d8060008114611635576040519150601f19603f3d011682016040523d82523d6000602084013e61163a565b606091505b5090949350505050565b600061065b825490565b6001600160a01b038116611675576040516362daafb160e11b815260040160405180910390fd5b603880546001600160a01b0319166001600160a01b0383169081179091556040517f7dae230f18360d76a040c81f050aa14eb9d6dc7901b20fc5d855e2a20fe814d190600090a250565b61070b8282611357565b6116d38282610ea4565b61070b576116e08161180c565b6116eb836020611963565b60405160200161146e929190612314565b6117068282610ea4565b61070b5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b6000610e9d836001600160a01b038416611afe565b6117868282610ea4565b1561070b5760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610e9d836001600160a01b038416611b4d565b8181018281101561065b575060001961065b565b606061065b6001600160a01b0383166014611963565b606061065b8261183184611c40565b600101611963565b60008183116118485781610e9d565b5090919050565b60008080600019858709858702925082811083820303915050806000036118895783828161187f5761187f612389565b0492505050610e9d565b8084116118d05760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b60448201526064016106f8565b60008486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091026000889003889004909101858311909403939093029303949094049190911702949350505050565b60008260000182815481106119505761195061200a565b9060005260206000200154905092915050565b6060600061197283600261239f565b61197d906002612036565b6001600160401b0381111561199457611994611ff4565b6040519080825280601f01601f1916602001820160405280156119be576020820181803683370190505b509050600360fc1b816000815181106119d9576119d961200a565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611a0857611a0861200a565b60200101906001600160f81b031916908160001a9053506000611a2c84600261239f565b611a37906001612036565b90505b6001811115611aaf576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611a6b57611a6b61200a565b1a60f81b828281518110611a8157611a8161200a565b60200101906001600160f81b031916908160001a90535060049490941c93611aa8816123b6565b9050611a3a565b508315610e9d5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106f8565b6000818152600183016020526040812054611b455750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561065b565b50600061065b565b60008181526001830160205260408120548015611c36576000611b716001836123cd565b8554909150600090611b85906001906123cd565b9050818114611bea576000866000018281548110611ba557611ba561200a565b9060005260206000200154905080876000018481548110611bc857611bc861200a565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611bfb57611bfb6123e0565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061065b565b600091505061065b565b600080608083901c15611c585760809290921c916010015b604083901c15611c6d5760409290921c916008015b602083901c15611c825760209290921c916004015b601083901c15611c975760109290921c916002015b600883901c1561065b5760010192915050565b60405180606001604052806000801916815260200160008152602001611cfa604051806080016040528060006001600160a01b031681526020016000815260200160008152602001600081525090565b905290565b600060208284031215611d1157600080fd5b81356001600160e01b031981168114610e9d57600080fd5b600060208284031215611d3b57600080fd5b5035919050565b6001600160a01b038116811461135457600080fd5b60008060408385031215611d6a57600080fd5b823591506020830135611d7c81611d42565b809150509250929050565b60008083601f840112611d9957600080fd5b5081356001600160401b03811115611db057600080fd5b6020830191508360208260051b8501011115611dcb57600080fd5b9250929050565b60008060208385031215611de557600080fd5b82356001600160401b03811115611dfb57600080fd5b611e0785828601611d87565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b81811015611e4b57835183529284019291840191600101611e2f565b50909695505050505050565b600080600080600060608688031215611e6f57600080fd5b8535945060208601356001600160401b0380821115611e8d57600080fd5b611e9989838a01611d87565b90965094506040880135915080821115611eb257600080fd5b50611ebf88828901611d87565b969995985093965092949392505050565b600060408284031215611ee257600080fd5b50919050565b60008060608385031215611efb57600080fd5b82359150611f0c8460208501611ed0565b90509250929050565b60008060408385031215611f2857600080fd5b50508035926020909101359150565b600060408284031215611f4957600080fd5b610e9d8383611ed0565b60008060008060008060a08789031215611f6c57600080fd5b8635611f7781611d42565b955060208701356001600160401b03811115611f9257600080fd5b611f9e89828a01611d87565b9096509450506040870135611fb281611d42565b92506060870135611fc281611d42565b80925050608087013590509295509295509295565b600060208284031215611fe957600080fd5b8135610e9d81611d42565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8082018082111561065b5761065b612020565b81835260006001600160fb1b0383111561206257600080fd5b8260051b80836020870137939093016020019392505050565b60408152600061208f604083018688612049565b82810360208401526120a2818587612049565b979650505050505050565b6000808335601e198436030181126120c457600080fd5b8301803591506001600160401b038211156120de57600080fd5b602001915036819003821315611dcb57600080fd5b86815260a060208201528460a0820152848660c0830137600060c08683018101919091526001600160a01b0394851660408301529290931660608401526001600160401b03166080830152601f909201601f1916010192915050565b6000806040838503121561216257600080fd5b82516001600160401b038116811461217957600080fd5b6020939093015192949293505050565b81358152602080830135908201526040810161065b565b6001600160a01b038316815260608101610e9d602083018480358252602090810135910152565b60005b838110156121e25781810151838201526020016121ca565b50506000910152565b7f5472616e7366657248656c7065723a20636f756c64206e6f74207472616e7366815269032b9102927a7103a37960b51b60208201526000835161223681602a8501602088016121c7565b660103b30b63ab2960cd1b602a91840191820152835161225d8160318401602088016121c7565b01603101949350505050565b60208152600082518060208401526122888160408501602087016121c7565b601f01601f19169190910160400192915050565b6000604082840312156122ae57600080fd5b604051604081018181106001600160401b03821117156122de57634e487b7160e01b600052604160045260246000fd5b604052823581526020928301359281019290925250919050565b6000825161230a8184602087016121c7565b9190910192915050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161234c8160178501602088016121c7565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161237d8160288401602088016121c7565b01602801949350505050565b634e487b7160e01b600052601260045260246000fd5b808202811582820484141761065b5761065b612020565b6000816123c5576123c5612020565b506000190190565b8181038181111561065b5761065b612020565b634e487b7160e01b600052603160045260246000fdfe97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929a264697066735822122095883c052475573f315aee3901b505a20f4dfa9fce451d9777b780042aebbd6064736f6c63430008150033", + "deployer": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "bulkClaimBidNames(uint256[])": { + "details": "Bulk claims the bid name. Requirements: - Must be called after ended time. - The method caller can be anyone.", + "params": { + "ids": "The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'" + } + }, + "bulkRegister(string[])": { + "details": "Claims domain names for auction. Requirements: - The method caller must be contract operator.", + "params": { + "labels": "The domain names. Eg, ['foo'] for 'foo.ron'" + }, + "returns": { + "ids": "The id corresponding for namehash of domain names." + } + }, + "createAuctionEvent((uint256,uint256))": { + "details": "Creates a new auction to sale with a specific time period. Requirements: - The method caller must be admin. Emits an event {AuctionEventSet}.", + "returns": { + "auctionId": "The auction id" + } + }, + "getAuction(uint256)": { + "details": "Returns the highest bid and address of the bidder.", + "params": { + "id": "The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'" + } + }, + "getAuctionEvent(bytes32)": { + "details": "Returns the event range of an auction." + }, + "getBidGapRatio()": { + "details": "Returns the gap ratio between 2 bids with the starting price. Value in range [0;100_00] is 0%-100%." + }, + "getRNSUnified()": { + "details": "Returns RNSUnified contract." + }, + "getRoleAdmin(bytes32)": { + "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." + }, + "getRoleMember(bytes32,uint256)": { + "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." + }, + "getRoleMemberCount(bytes32)": { + "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." + }, + "getTreasury()": { + "details": "Returns the treasury." + }, + "grantRole(bytes32,address)": { + "details": "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." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "listNamesForAuction(bytes32,uint256[],uint256[])": { + "details": "Lists reserved names to sale in a specified auction. Requirements: - The method caller must be contract operator. - Array length are matched and larger than 0. - Only allow to set when the domain is: + Not in any auction. + Or, in the current auction. + Or, this name is not bided. Emits an event {LabelsListed}. Note: If the name is already listed, this method replaces with a new input value.", + "params": { + "ids": "The namehashes id of domain names. Eg, namehash('foo.ron') for 'foo.ron'" + } + }, + "placeBid(uint256)": { + "details": "Places a bid for a domain name. Requirements: - The name is listed, or the auction is happening. - The msg.value is larger than the current bid price or the auction starting price. Emits an event {BidPlaced}.", + "params": { + "id": "The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'" + } + }, + "renounceRole(bytes32,address)": { + "details": "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." + }, + "reserved(uint256)": { + "details": "Checks whether a domain name is currently reserved for auction or not.", + "params": { + "id": "The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'" + } + }, + "revokeRole(bytes32,address)": { + "details": "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." + }, + "setAuctionEvent(bytes32,(uint256,uint256))": { + "details": "Updates the auction details. Requirements: - The method caller must be admin. Emits an event {AuctionEventSet}." + }, + "setBidGapRatio(uint256)": { + "details": "Sets commission ratio. Value in range [0;100_00] is 0%-100%. Requirements: - The method caller must be admin Emits an event {BidGapRatioUpdated}." + }, + "setTreasury(address)": { + "details": "Sets the treasury. Requirements: - The method caller must be admin Emits an event {TreasuryUpdated}." + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + } + }, + "events": { + "AuctionEventSet(bytes32,(uint256,uint256))": { + "details": "Emitted when an auction is set." + }, + "BidGapRatioUpdated(uint256)": { + "details": "Emitted when bid gap ratio is updated." + }, + "BidPlaced(bytes32,uint256,uint256,address,uint256,address)": { + "details": "Emitted when a bid is placed for a name." + }, + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + }, + "LabelsListed(bytes32,uint256[],uint256[])": { + "details": "Emitted when the labels are listed for auction." + }, + "RoleAdminChanged(bytes32,bytes32,bytes32)": { + "details": "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._" + }, + "RoleGranted(bytes32,address,address)": { + "details": "Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}." + }, + "RoleRevoked(bytes32,address,address)": { + "details": "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`)" + }, + "TreasuryUpdated(address)": { + "details": "Emitted when the treasury is updated." + } + } + }, + "isFoundry": true, + "metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyBidding\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BidderCannotReceiveRON\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EventIsNotCreatedOrAlreadyStarted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidArrayLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidEventRange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NameNotReserved\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoOneBidded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotYetEnded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NullAssignment\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"QueryIsNotInPeriod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RatioIsTooLarge\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"auctionId\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"startedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"endedAt\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"struct EventRange\",\"name\":\"range\",\"type\":\"tuple\"}],\"name\":\"AuctionEventSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"ratio\",\"type\":\"uint256\"}],\"name\":\"BidGapRatioUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"auctionId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address payable\",\"name\":\"bidder\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousBidder\",\"type\":\"address\"}],\"name\":\"BidPlaced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"auctionId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"startingPrices\",\"type\":\"uint256[]\"}],\"name\":\"LabelsListed\",\"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\":\"addr\",\"type\":\"address\"}],\"name\":\"TreasuryUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_EXPIRY_DURATION\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_AUCTION_DOMAIN_EXPIRY\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_EXPIRY\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_PERCENTAGE\",\"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\":[{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"}],\"name\":\"bulkClaimBidNames\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"claimedAts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string[]\",\"name\":\"labels\",\"type\":\"string[]\"}],\"name\":\"bulkRegister\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"startedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"endedAt\",\"type\":\"uint256\"}],\"internalType\":\"struct EventRange\",\"name\":\"range\",\"type\":\"tuple\"}],\"name\":\"createAuctionEvent\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"auctionId\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getAuction\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"auctionId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"startingPrice\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address payable\",\"name\":\"bidder\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"claimedAt\",\"type\":\"uint256\"}],\"internalType\":\"struct INSAuction.Bid\",\"name\":\"bid\",\"type\":\"tuple\"}],\"internalType\":\"struct INSAuction.DomainAuction\",\"name\":\"auction\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"beatPrice\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"auctionId\",\"type\":\"bytes32\"}],\"name\":\"getAuctionEvent\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"startedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"endedAt\",\"type\":\"uint256\"}],\"internalType\":\"struct EventRange\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBidGapRatio\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRNSUnified\",\"outputs\":[{\"internalType\":\"contract INSUnified\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTreasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"},{\"internalType\":\"contract INSUnified\",\"name\":\"rnsUnified\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"treasury\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"bidGapRatio\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"auctionId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"startingPrices\",\"type\":\"uint256[]\"}],\"name\":\"listNamesForAuction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"placeBid\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"reserved\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"auctionId\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"startedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"endedAt\",\"type\":\"uint256\"}],\"internalType\":\"struct EventRange\",\"name\":\"range\",\"type\":\"tuple\"}],\"name\":\"setAuctionEvent\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"ratio\",\"type\":\"uint256\"}],\"name\":\"setBidGapRatio\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setTreasury\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"AuctionEventSet(bytes32,(uint256,uint256))\":{\"details\":\"Emitted when an auction is set.\"},\"BidGapRatioUpdated(uint256)\":{\"details\":\"Emitted when bid gap ratio is updated.\"},\"BidPlaced(bytes32,uint256,uint256,address,uint256,address)\":{\"details\":\"Emitted when a bid is placed for a name.\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"LabelsListed(bytes32,uint256[],uint256[])\":{\"details\":\"Emitted when the labels are listed for auction.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"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._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"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`)\"},\"TreasuryUpdated(address)\":{\"details\":\"Emitted when the treasury is updated.\"}},\"kind\":\"dev\",\"methods\":{\"bulkClaimBidNames(uint256[])\":{\"details\":\"Bulk claims the bid name. Requirements: - Must be called after ended time. - The method caller can be anyone.\",\"params\":{\"ids\":\"The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'\"}},\"bulkRegister(string[])\":{\"details\":\"Claims domain names for auction. Requirements: - The method caller must be contract operator.\",\"params\":{\"labels\":\"The domain names. Eg, ['foo'] for 'foo.ron'\"},\"returns\":{\"ids\":\"The id corresponding for namehash of domain names.\"}},\"createAuctionEvent((uint256,uint256))\":{\"details\":\"Creates a new auction to sale with a specific time period. Requirements: - The method caller must be admin. Emits an event {AuctionEventSet}.\",\"returns\":{\"auctionId\":\"The auction id\"}},\"getAuction(uint256)\":{\"details\":\"Returns the highest bid and address of the bidder.\",\"params\":{\"id\":\"The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'\"}},\"getAuctionEvent(bytes32)\":{\"details\":\"Returns the event range of an auction.\"},\"getBidGapRatio()\":{\"details\":\"Returns the gap ratio between 2 bids with the starting price. Value in range [0;100_00] is 0%-100%.\"},\"getRNSUnified()\":{\"details\":\"Returns RNSUnified contract.\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"getTreasury()\":{\"details\":\"Returns the treasury.\"},\"grantRole(bytes32,address)\":{\"details\":\"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.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"listNamesForAuction(bytes32,uint256[],uint256[])\":{\"details\":\"Lists reserved names to sale in a specified auction. Requirements: - The method caller must be contract operator. - Array length are matched and larger than 0. - Only allow to set when the domain is: + Not in any auction. + Or, in the current auction. + Or, this name is not bided. Emits an event {LabelsListed}. Note: If the name is already listed, this method replaces with a new input value.\",\"params\":{\"ids\":\"The namehashes id of domain names. Eg, namehash('foo.ron') for 'foo.ron'\"}},\"placeBid(uint256)\":{\"details\":\"Places a bid for a domain name. Requirements: - The name is listed, or the auction is happening. - The msg.value is larger than the current bid price or the auction starting price. Emits an event {BidPlaced}.\",\"params\":{\"id\":\"The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'\"}},\"renounceRole(bytes32,address)\":{\"details\":\"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.\"},\"reserved(uint256)\":{\"details\":\"Checks whether a domain name is currently reserved for auction or not.\",\"params\":{\"id\":\"The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'\"}},\"revokeRole(bytes32,address)\":{\"details\":\"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.\"},\"setAuctionEvent(bytes32,(uint256,uint256))\":{\"details\":\"Updates the auction details. Requirements: - The method caller must be admin. Emits an event {AuctionEventSet}.\"},\"setBidGapRatio(uint256)\":{\"details\":\"Sets commission ratio. Value in range [0;100_00] is 0%-100%. Requirements: - The method caller must be admin Emits an event {BidGapRatioUpdated}.\"},\"setTreasury(address)\":{\"details\":\"Sets the treasury. Requirements: - The method caller must be admin Emits an event {TreasuryUpdated}.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"stateVariables\":{\"DOMAIN_EXPIRY_DURATION\":{\"details\":\"The expiry duration of a domain after transferring to bidder.\"},\"MAX_AUCTION_DOMAIN_EXPIRY\":{\"details\":\"The maximum expiry duration of a domain after transferring to bidder.\"},\"MAX_EXPIRY\":{\"details\":\"The maximum expiry duration\"},\"MAX_PERCENTAGE\":{\"details\":\"Max percentage 100%. Values [0; 100_00] reflexes [0; 100%]\"},\"OPERATOR_ROLE\":{\"details\":\"Returns the operator role.\"},\"____gap\":{\"details\":\"Gap for upgradeability.\"},\"_auctionRange\":{\"details\":\"Mapping from auction Id => event range\"},\"_bidGapRatio\":{\"details\":\"The gap ratio between 2 bids with the starting price.\"},\"_domainAuction\":{\"details\":\"Mapping from id of domain names => auction detail.\"},\"_reserved\":{\"details\":\"Mapping from id => bool reserved status\"},\"_rnsUnified\":{\"details\":\"The RNSUnified contract.\"},\"_treasury\":{\"details\":\"The treasury.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"createAuctionEvent((uint256,uint256))\":{\"notice\":\"Please use the method `setAuctionNames` to list all the reserved names.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/RNSAuction.sol\":\"RNSAuction\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@ensdomains/buffer/=lib/buffer/\",\":@ensdomains/ens-contracts/=lib/ens-contracts/contracts/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@pythnetwork/=lib/pyth-sdk-solidity/\",\":@rns-contracts/=src/\",\":buffer/=lib/buffer/contracts/\",\":contract-template/=lib/contract-template/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":ens-contracts/=lib/ens-contracts/contracts/\",\":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/script/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/openzeppelin-contracts/contracts/\",\":pyth-sdk-solidity/=lib/pyth-sdk-solidity/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Strings.sol\\\";\\nimport \\\"../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```solidity\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```solidity\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\\n * to enforce additional security measures for this role.\\n */\\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\\n struct RoleData {\\n mapping(address => bool) members;\\n bytes32 adminRole;\\n }\\n\\n mapping(bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(account),\\n \\\" is missing role \\\",\\n Strings.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * May emit a {RoleGranted} event.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n *\\n * NOTE: This function is deprecated in favor of {_grantRole}.\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0dd6e52cb394d7f5abe5dca2d4908a6be40417914720932de757de34a99ab87f\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerable.sol\\\";\\nimport \\\"./AccessControl.sol\\\";\\nimport \\\"../utils/structs/EnumerableSet.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {\\n return _roleMembers[role].at(index);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n}\\n\",\"keccak256\":\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerable is IAccessControl {\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x3d6069be9b4c01fb81840fb9c2c4dc58dd6a6a4aafaa2c6837de8699574d84c6\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x5bce51e11f7d194b79ea59fe00c9e8de9fa2c5530124960f29a24d4c740a3266\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Metadata is IERC721 {\\n /**\\n * @dev Returns the token collection name.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the token collection symbol.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\\n */\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x75b829ff2f26c14355d1cba20e16fe7b29ca58eb5fef665ede48bc0f9c6c74b9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/structs/BitMaps.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/BitMaps.sol)\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing uint256 to bool mapping in a compact and efficient way, providing the keys are sequential.\\n * Largely inspired by Uniswap's https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol[merkle-distributor].\\n */\\nlibrary BitMaps {\\n struct BitMap {\\n mapping(uint256 => uint256) _data;\\n }\\n\\n /**\\n * @dev Returns whether the bit at `index` is set.\\n */\\n function get(BitMap storage bitmap, uint256 index) internal view returns (bool) {\\n uint256 bucket = index >> 8;\\n uint256 mask = 1 << (index & 0xff);\\n return bitmap._data[bucket] & mask != 0;\\n }\\n\\n /**\\n * @dev Sets the bit at `index` to the boolean `value`.\\n */\\n function setTo(BitMap storage bitmap, uint256 index, bool value) internal {\\n if (value) {\\n set(bitmap, index);\\n } else {\\n unset(bitmap, index);\\n }\\n }\\n\\n /**\\n * @dev Sets the bit at `index`.\\n */\\n function set(BitMap storage bitmap, uint256 index) internal {\\n uint256 bucket = index >> 8;\\n uint256 mask = 1 << (index & 0xff);\\n bitmap._data[bucket] |= mask;\\n }\\n\\n /**\\n * @dev Unsets the bit at `index`.\\n */\\n function unset(BitMap storage bitmap, uint256 index) internal {\\n uint256 bucket = index >> 8;\\n uint256 mask = 1 << (index & 0xff);\\n bitmap._data[bucket] &= ~mask;\\n }\\n}\\n\",\"keccak256\":\"0xac946730f979a447732a5bed58aa30c995ae666c3e1663b312ab5fd11dbe3eb6\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"src/RNSAuction.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport { AccessControlEnumerable } from \\\"@openzeppelin/contracts/access/AccessControlEnumerable.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { BitMaps } from \\\"@openzeppelin/contracts/utils/structs/BitMaps.sol\\\";\\nimport { INSUnified, INSAuction } from \\\"./interfaces/INSAuction.sol\\\";\\nimport { LibSafeRange } from \\\"./libraries/math/LibSafeRange.sol\\\";\\nimport { LibRNSDomain } from \\\"./libraries/LibRNSDomain.sol\\\";\\nimport { LibEventRange, EventRange } from \\\"./libraries/LibEventRange.sol\\\";\\nimport { RONTransferHelper } from \\\"./libraries/transfers/RONTransferHelper.sol\\\";\\n\\ncontract RNSAuction is Initializable, AccessControlEnumerable, INSAuction {\\n using LibSafeRange for uint256;\\n using BitMaps for BitMaps.BitMap;\\n using LibEventRange for EventRange;\\n\\n /// @inheritdoc INSAuction\\n uint64 public constant MAX_EXPIRY = type(uint64).max;\\n /// @inheritdoc INSAuction\\n uint256 public constant MAX_PERCENTAGE = 100_00;\\n /// @inheritdoc INSAuction\\n uint64 public constant DOMAIN_EXPIRY_DURATION = 365 days;\\n /// @inheritdoc INSAuction\\n uint64 public constant MAX_AUCTION_DOMAIN_EXPIRY = 365 days * 3;\\n /// @inheritdoc INSAuction\\n bytes32 public constant OPERATOR_ROLE = keccak256(\\\"OPERATOR_ROLE\\\");\\n\\n /// @dev Gap for upgradeability.\\n uint256[50] private ____gap;\\n /// @dev The RNSUnified contract.\\n INSUnified internal _rnsUnified;\\n /// @dev Mapping from auction Id => event range\\n mapping(bytes32 auctionId => EventRange) internal _auctionRange;\\n /// @dev Mapping from id of domain names => auction detail.\\n mapping(uint256 id => DomainAuction) internal _domainAuction;\\n\\n /// @dev The treasury.\\n address payable internal _treasury;\\n /// @dev The gap ratio between 2 bids with the starting price.\\n uint256 internal _bidGapRatio;\\n /// @dev Mapping from id => bool reserved status\\n BitMaps.BitMap internal _reserved;\\n\\n modifier whenNotStarted(bytes32 auctionId) {\\n _requireNotStarted(auctionId);\\n _;\\n }\\n\\n modifier onlyValidEventRange(EventRange calldata range) {\\n _requireValidEventRange(range);\\n _;\\n }\\n\\n constructor() payable {\\n _disableInitializers();\\n }\\n\\n function initialize(\\n address admin,\\n address[] calldata operators,\\n INSUnified rnsUnified,\\n address payable treasury,\\n uint256 bidGapRatio\\n ) external initializer {\\n _setTreasury(treasury);\\n _setBidGapRatio(bidGapRatio);\\n _setupRole(DEFAULT_ADMIN_ROLE, admin);\\n\\n uint256 length = operators.length;\\n bytes32 operatorRole = OPERATOR_ROLE;\\n\\n for (uint256 i; i < length;) {\\n _setupRole(operatorRole, operators[i]);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n _rnsUnified = rnsUnified;\\n }\\n\\n /**\\n * @inheritdoc INSAuction\\n */\\n function bulkRegister(string[] calldata labels) external onlyRole(OPERATOR_ROLE) returns (uint256[] memory ids) {\\n uint256 length = labels.length;\\n if (length == 0) revert InvalidArrayLength();\\n ids = new uint256[](length);\\n INSUnified rnsUnified = _rnsUnified;\\n uint256 parentId = LibRNSDomain.RON_ID;\\n uint64 domainExpiryDuration = DOMAIN_EXPIRY_DURATION;\\n\\n for (uint256 i; i < length;) {\\n (, ids[i]) = rnsUnified.mint(parentId, labels[i], address(0x0), address(this), domainExpiryDuration);\\n _reserved.set(ids[i]);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @inheritdoc INSAuction\\n */\\n function reserved(uint256 id) public view returns (bool) {\\n return _reserved.get(id);\\n }\\n\\n /**\\n * @inheritdoc INSAuction\\n */\\n function createAuctionEvent(EventRange calldata range)\\n external\\n onlyRole(DEFAULT_ADMIN_ROLE)\\n onlyValidEventRange(range)\\n returns (bytes32 auctionId)\\n {\\n auctionId = keccak256(abi.encode(_msgSender(), range));\\n _auctionRange[auctionId] = range;\\n emit AuctionEventSet(auctionId, range);\\n }\\n\\n /**\\n * @inheritdoc INSAuction\\n */\\n function setAuctionEvent(bytes32 auctionId, EventRange calldata range)\\n external\\n onlyRole(DEFAULT_ADMIN_ROLE)\\n onlyValidEventRange(range)\\n whenNotStarted(auctionId)\\n {\\n _auctionRange[auctionId] = range;\\n emit AuctionEventSet(auctionId, range);\\n }\\n\\n /**\\n * @inheritdoc INSAuction\\n */\\n function getAuctionEvent(bytes32 auctionId) public view returns (EventRange memory) {\\n return _auctionRange[auctionId];\\n }\\n\\n /**\\n * @inheritdoc INSAuction\\n */\\n function listNamesForAuction(bytes32 auctionId, uint256[] calldata ids, uint256[] calldata startingPrices)\\n external\\n onlyRole(OPERATOR_ROLE)\\n whenNotStarted(auctionId)\\n {\\n uint256 length = ids.length;\\n if (length == 0 || length != startingPrices.length) revert InvalidArrayLength();\\n uint256 id;\\n bytes32 mAuctionId;\\n DomainAuction storage sAuction;\\n\\n for (uint256 i; i < length;) {\\n id = ids[i];\\n if (!reserved(id)) revert NameNotReserved();\\n\\n sAuction = _domainAuction[id];\\n mAuctionId = sAuction.auctionId;\\n if (!(mAuctionId == 0 || mAuctionId == auctionId || sAuction.bid.timestamp == 0)) {\\n revert AlreadyBidding();\\n }\\n\\n sAuction.auctionId = auctionId;\\n sAuction.startingPrice = startingPrices[i];\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n emit LabelsListed(auctionId, ids, startingPrices);\\n }\\n\\n /**\\n * @inheritdoc INSAuction\\n */\\n function placeBid(uint256 id) external payable {\\n DomainAuction memory auction = _domainAuction[id];\\n EventRange memory range = _auctionRange[auction.auctionId];\\n uint256 beatPrice = _getBeatPrice(auction, range);\\n\\n if (!range.isInPeriod()) revert QueryIsNotInPeriod();\\n if (msg.value < beatPrice) revert InsufficientAmount();\\n address payable bidder = payable(_msgSender());\\n // check whether the bidder can receive RON\\n if (!RONTransferHelper.send(bidder, 0)) revert BidderCannotReceiveRON();\\n address payable prvBidder = auction.bid.bidder;\\n uint256 prvPrice = auction.bid.price;\\n\\n Bid storage sBid = _domainAuction[id].bid;\\n sBid.price = msg.value;\\n sBid.bidder = bidder;\\n sBid.timestamp = block.timestamp;\\n emit BidPlaced(auction.auctionId, id, msg.value, bidder, prvPrice, prvBidder);\\n\\n // refund for previous bidder\\n if (prvPrice != 0) RONTransferHelper.safeTransfer(prvBidder, prvPrice);\\n }\\n\\n /**\\n * @inheritdoc INSAuction\\n */\\n function bulkClaimBidNames(uint256[] calldata ids) external returns (uint256[] memory claimedAts) {\\n uint256 id;\\n uint256 accumulatedRON;\\n EventRange memory range;\\n DomainAuction memory auction;\\n uint256 length = ids.length;\\n claimedAts = new uint256[](length);\\n INSUnified rnsUnified = _rnsUnified;\\n uint64 expiry = uint64(block.timestamp.addWithUpperbound(DOMAIN_EXPIRY_DURATION, MAX_EXPIRY));\\n\\n for (uint256 i; i < length;) {\\n id = ids[i];\\n auction = _domainAuction[id];\\n range = _auctionRange[auction.auctionId];\\n\\n if (auction.bid.claimedAt == 0) {\\n if (!range.isEnded()) revert NotYetEnded();\\n if (auction.bid.timestamp == 0) revert NoOneBidded();\\n\\n accumulatedRON += auction.bid.price;\\n rnsUnified.setExpiry(id, expiry);\\n rnsUnified.transferFrom(address(this), auction.bid.bidder, id);\\n\\n _domainAuction[id].bid.claimedAt = claimedAts[i] = block.timestamp;\\n }\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n RONTransferHelper.safeTransfer(_treasury, accumulatedRON);\\n }\\n\\n /**\\n * @inheritdoc INSAuction\\n */\\n function getRNSUnified() external view returns (INSUnified) {\\n return _rnsUnified;\\n }\\n\\n /**\\n * @inheritdoc INSAuction\\n */\\n function getTreasury() external view returns (address) {\\n return _treasury;\\n }\\n\\n /**\\n * @inheritdoc INSAuction\\n */\\n function getBidGapRatio() external view returns (uint256) {\\n return _bidGapRatio;\\n }\\n\\n /**\\n * @inheritdoc INSAuction\\n */\\n function setTreasury(address payable addr) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _setTreasury(addr);\\n }\\n\\n /**\\n * @inheritdoc INSAuction\\n */\\n\\n function setBidGapRatio(uint256 ratio) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _setBidGapRatio(ratio);\\n }\\n\\n /**\\n * @inheritdoc INSAuction\\n */\\n function getAuction(uint256 id) public view returns (DomainAuction memory auction, uint256 beatPrice) {\\n auction = _domainAuction[id];\\n EventRange memory range = getAuctionEvent(auction.auctionId);\\n beatPrice = _getBeatPrice(auction, range);\\n }\\n\\n /**\\n * @dev Helper method to set treasury.\\n *\\n * Emits an event {TreasuryUpdated}.\\n */\\n function _setTreasury(address payable addr) internal {\\n if (addr == address(0)) revert NullAssignment();\\n _treasury = addr;\\n emit TreasuryUpdated(addr);\\n }\\n\\n /**\\n * @dev Helper method to set bid gap ratio.\\n *\\n * Emits an event {BidGapRatioUpdated}.\\n */\\n function _setBidGapRatio(uint256 ratio) internal {\\n if (ratio > MAX_PERCENTAGE) revert RatioIsTooLarge();\\n _bidGapRatio = ratio;\\n emit BidGapRatioUpdated(ratio);\\n }\\n\\n /**\\n * @dev Helper method to get beat price.\\n */\\n function _getBeatPrice(DomainAuction memory auction, EventRange memory range)\\n internal\\n view\\n returns (uint256 beatPrice)\\n {\\n beatPrice = Math.max(auction.startingPrice, auction.bid.price);\\n // Beats price increases if domain is already bided and the event is not yet ended.\\n if (auction.bid.price != 0 && !range.isEnded()) {\\n beatPrice += Math.mulDiv(auction.startingPrice, _bidGapRatio, MAX_PERCENTAGE);\\n }\\n }\\n\\n /**\\n * @dev Helper method to ensure event range is valid.\\n */\\n function _requireValidEventRange(EventRange calldata range) internal view {\\n if (!(range.valid() && range.isNotYetStarted())) revert InvalidEventRange();\\n }\\n\\n /**\\n * @dev Helper method to ensure the auction is not yet started or not created.\\n */\\n function _requireNotStarted(bytes32 auctionId) internal view {\\n if (!_auctionRange[auctionId].isNotYetStarted()) revert EventIsNotCreatedOrAlreadyStarted();\\n }\\n}\\n\",\"keccak256\":\"0x9463c43178c0fc1ac03b8123e246347907b98d4feb480198182f4ea621e6f0f6\",\"license\":\"MIT\"},\"src/interfaces/INSAuction.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nimport { INSUnified } from \\\"./INSUnified.sol\\\";\\nimport { EventRange } from \\\"../libraries/LibEventRange.sol\\\";\\n\\ninterface INSAuction {\\n error NotYetEnded();\\n error NoOneBidded();\\n error NullAssignment();\\n error AlreadyBidding();\\n error RatioIsTooLarge();\\n error NameNotReserved();\\n error InvalidEventRange();\\n error QueryIsNotInPeriod();\\n error InsufficientAmount();\\n error InvalidArrayLength();\\n error BidderCannotReceiveRON();\\n error EventIsNotCreatedOrAlreadyStarted();\\n\\n struct Bid {\\n address payable bidder;\\n uint256 price;\\n uint256 timestamp;\\n uint256 claimedAt;\\n }\\n\\n struct DomainAuction {\\n bytes32 auctionId;\\n uint256 startingPrice;\\n Bid bid;\\n }\\n\\n /// @dev Emitted when an auction is set.\\n event AuctionEventSet(bytes32 indexed auctionId, EventRange range);\\n /// @dev Emitted when the labels are listed for auction.\\n event LabelsListed(bytes32 indexed auctionId, uint256[] ids, uint256[] startingPrices);\\n /// @dev Emitted when a bid is placed for a name.\\n event BidPlaced(\\n bytes32 indexed auctionId,\\n uint256 indexed id,\\n uint256 price,\\n address payable bidder,\\n uint256 previousPrice,\\n address previousBidder\\n );\\n /// @dev Emitted when the treasury is updated.\\n event TreasuryUpdated(address indexed addr);\\n /// @dev Emitted when bid gap ratio is updated.\\n event BidGapRatioUpdated(uint256 ratio);\\n\\n /**\\n * @dev The maximum expiry duration\\n */\\n function MAX_EXPIRY() external pure returns (uint64);\\n\\n /**\\n * @dev The maximum expiry duration of a domain after transferring to bidder.\\n */\\n function MAX_AUCTION_DOMAIN_EXPIRY() external pure returns (uint64);\\n\\n /**\\n * @dev Returns the operator role.\\n */\\n function OPERATOR_ROLE() external pure returns (bytes32);\\n\\n /**\\n * @dev Max percentage 100%. Values [0; 100_00] reflexes [0; 100%]\\n */\\n function MAX_PERCENTAGE() external pure returns (uint256);\\n\\n /**\\n * @dev The expiry duration of a domain after transferring to bidder.\\n */\\n function DOMAIN_EXPIRY_DURATION() external pure returns (uint64);\\n\\n /**\\n * @dev Claims domain names for auction.\\n *\\n * Requirements:\\n * - The method caller must be contract operator.\\n *\\n * @param labels The domain names. Eg, ['foo'] for 'foo.ron'\\n * @return ids The id corresponding for namehash of domain names.\\n */\\n function bulkRegister(string[] calldata labels) external returns (uint256[] memory ids);\\n\\n /**\\n * @dev Checks whether a domain name is currently reserved for auction or not.\\n * @param id The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'\\n */\\n function reserved(uint256 id) external view returns (bool);\\n\\n /**\\n * @dev Creates a new auction to sale with a specific time period.\\n *\\n * Requirements:\\n * - The method caller must be admin.\\n *\\n * Emits an event {AuctionEventSet}.\\n *\\n * @return auctionId The auction id\\n * @notice Please use the method `setAuctionNames` to list all the reserved names.\\n */\\n function createAuctionEvent(EventRange calldata range) external returns (bytes32 auctionId);\\n\\n /**\\n * @dev Updates the auction details.\\n *\\n * Requirements:\\n * - The method caller must be admin.\\n *\\n * Emits an event {AuctionEventSet}.\\n */\\n function setAuctionEvent(bytes32 auctionId, EventRange calldata range) external;\\n\\n /**\\n * @dev Returns the event range of an auction.\\n */\\n function getAuctionEvent(bytes32 auctionId) external view returns (EventRange memory);\\n\\n /**\\n * @dev Lists reserved names to sale in a specified auction.\\n *\\n * Requirements:\\n * - The method caller must be contract operator.\\n * - Array length are matched and larger than 0.\\n * - Only allow to set when the domain is:\\n * + Not in any auction.\\n * + Or, in the current auction.\\n * + Or, this name is not bided.\\n *\\n * Emits an event {LabelsListed}.\\n *\\n * Note: If the name is already listed, this method replaces with a new input value.\\n *\\n * @param ids The namehashes id of domain names. Eg, namehash('foo.ron') for 'foo.ron'\\n */\\n function listNamesForAuction(bytes32 auctionId, uint256[] calldata ids, uint256[] calldata startingPrices) external;\\n\\n /**\\n * @dev Places a bid for a domain name.\\n *\\n * Requirements:\\n * - The name is listed, or the auction is happening.\\n * - The msg.value is larger than the current bid price or the auction starting price.\\n *\\n * Emits an event {BidPlaced}.\\n *\\n * @param id The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'\\n */\\n function placeBid(uint256 id) external payable;\\n\\n /**\\n * @dev Returns the highest bid and address of the bidder.\\n * @param id The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'\\n */\\n function getAuction(uint256 id) external view returns (DomainAuction memory, uint256 beatPrice);\\n\\n /**\\n * @dev Bulk claims the bid name.\\n *\\n * Requirements:\\n * - Must be called after ended time.\\n * - The method caller can be anyone.\\n *\\n * @param ids The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'\\n */\\n function bulkClaimBidNames(uint256[] calldata ids) external returns (uint256[] memory claimedAts);\\n\\n /**\\n * @dev Returns the treasury.\\n */\\n function getTreasury() external view returns (address);\\n\\n /**\\n * @dev Returns the gap ratio between 2 bids with the starting price. Value in range [0;100_00] is 0%-100%.\\n */\\n function getBidGapRatio() external view returns (uint256);\\n\\n /**\\n * @dev Sets the treasury.\\n *\\n * Requirements:\\n * - The method caller must be admin\\n *\\n * Emits an event {TreasuryUpdated}.\\n */\\n function setTreasury(address payable) external;\\n\\n /**\\n * @dev Sets commission ratio. Value in range [0;100_00] is 0%-100%.\\n *\\n * Requirements:\\n * - The method caller must be admin\\n *\\n * Emits an event {BidGapRatioUpdated}.\\n */\\n function setBidGapRatio(uint256) external;\\n\\n /**\\n * @dev Returns RNSUnified contract.\\n */\\n function getRNSUnified() external view returns (INSUnified);\\n}\\n\",\"keccak256\":\"0x135ec8837e89471cc437e90897896264b2bb4ba36ff332f7d30485c397888e03\",\"license\":\"MIT\"},\"src/interfaces/INSUnified.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nimport { IERC721Metadata } from \\\"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol\\\";\\nimport { IAccessControlEnumerable } from \\\"@openzeppelin/contracts/access/IAccessControlEnumerable.sol\\\";\\nimport { ModifyingIndicator } from \\\"../types/ModifyingIndicator.sol\\\";\\n\\ninterface INSUnified is IAccessControlEnumerable, IERC721Metadata {\\n /// @dev Error: The provided token id is expired.\\n error Expired();\\n /// @dev Error: The provided token id is unexists.\\n error Unexists();\\n /// @dev Error: The provided id expiry is greater than parent id expiry.\\n error ExceedParentExpiry();\\n /// @dev Error: The provided name is unavailable for registration.\\n error Unavailable();\\n /// @dev Error: The sender lacks the necessary permissions.\\n error Unauthorized();\\n /// @dev Error: Missing controller role required for modification.\\n error MissingControllerRole();\\n /// @dev Error: Attempting to set an immutable field, which cannot be modified.\\n error CannotSetImmutableField();\\n /// @dev Error: Missing protected settler role required for modification.\\n error MissingProtectedSettlerRole();\\n /// @dev Error: Attempting to set an expiry time that is not larger than the previous one.\\n error ExpiryTimeMustBeLargerThanTheOldOne();\\n /// @dev Error: The provided name must be registered or is in a grace period.\\n error NameMustBeRegisteredOrInGracePeriod();\\n\\n /**\\n * | Fields\\\\Idc | Modifying Indicator |\\n * | ---------- | ------------------- |\\n * | depth | 0b00000001 |\\n * | parentId | 0b00000010 |\\n * | label | 0b00000100 |\\n */\\n struct ImmutableRecord {\\n // The level-th of a domain.\\n uint8 depth;\\n // The node of parent token. Eg, parent node of vip.duke.ron equals to namehash('duke.ron')\\n uint256 parentId;\\n // The label of a domain. Eg, label is vip for domain vip.duke.ron\\n string label;\\n }\\n\\n /**\\n * | Fields\\\\Idc,Roles | Modifying Indicator | Controller | Protected setter | (Parent) Owner/Spender |\\n * | ---------------- | ------------------- | ---------- | ---------------- | ---------------------- |\\n * | resolver | 0b00001000 | x | | x |\\n * | owner | 0b00010000 | x | | x |\\n * | expiry | 0b00100000 | x | | |\\n * | protected | 0b01000000 | | x | |\\n * Note: (Parent) Owner/Spender means parent owner or current owner or current token spender.\\n */\\n struct MutableRecord {\\n // The resolver address.\\n address resolver;\\n // The record owner. This field must equal to the owner of token.\\n address owner;\\n // Expiry timestamp.\\n uint64 expiry;\\n // Flag indicating whether the token is protected or not.\\n bool protected;\\n }\\n\\n struct Record {\\n ImmutableRecord immut;\\n MutableRecord mut;\\n }\\n\\n /// @dev Emitted when a base URI is updated.\\n event BaseURIUpdated(address indexed operator, string newURI);\\n /// @dev Emitted when the grace period for all domain is updated.\\n event GracePeriodUpdated(address indexed operator, uint64 newGracePeriod);\\n\\n /**\\n * @dev Emitted when the record of node is updated.\\n * @param indicator The binary index of updated fields. Eg, 0b10101011 means fields at position 1, 2, 4, 6, 8 (right\\n * to left) needs to be updated.\\n * @param record The updated fields.\\n */\\n event RecordUpdated(uint256 indexed node, ModifyingIndicator indicator, Record record);\\n\\n /**\\n * @dev Returns the controller role.\\n * @notice Can set all fields {Record.mut} in token record, excepting {Record.mut.protected}.\\n */\\n function CONTROLLER_ROLE() external pure returns (bytes32);\\n\\n /**\\n * @dev Returns the protected setter role.\\n * @notice Can set field {Record.mut.protected} in token record by using method `bulkSetProtected`.\\n */\\n function PROTECTED_SETTLER_ROLE() external pure returns (bytes32);\\n\\n /**\\n * @dev Returns the reservation role.\\n * @notice Never expire for token owner has this role.\\n */\\n function RESERVATION_ROLE() external pure returns (bytes32);\\n\\n /**\\n * @dev Returns the max expiry value.\\n */\\n function MAX_EXPIRY() external pure returns (uint64);\\n\\n /**\\n * @dev Returns the name hash output of a domain.\\n */\\n function namehash(string memory domain) external pure returns (bytes32 node);\\n\\n /**\\n * @dev Returns true if the specified name is available for registration.\\n * Note: Only available after passing the grace period.\\n */\\n function available(uint256 id) external view returns (bool);\\n\\n /**\\n * @dev Returns the grace period in second(s).\\n * Note: This period affects the availability of the domain.\\n */\\n function getGracePeriod() external view returns (uint64);\\n\\n /**\\n * @dev Returns the total minted ids.\\n * Note: Burning id will not affect `totalMinted`.\\n */\\n function totalMinted() external view returns (uint256);\\n\\n /**\\n * @dev Sets the grace period in second(s).\\n *\\n * Requirements:\\n * - The method caller must have controller role.\\n *\\n * Note: This period affects the availability of the domain.\\n */\\n function setGracePeriod(uint64) external;\\n\\n /**\\n * @dev Sets the base uri.\\n *\\n * Requirements:\\n * - The method caller must be contract owner.\\n *\\n */\\n function setBaseURI(string calldata baseTokenURI) external;\\n\\n /**\\n * @dev Mints token for subnode.\\n *\\n * Requirements:\\n * - The token must be available.\\n * - The method caller must be (parent) owner or approved spender. See struct {MutableRecord}.\\n *\\n * Emits an event {RecordUpdated}.\\n *\\n * @param parentId The parent node to mint or create subnode.\\n * @param label The domain label. Eg, label is duke for domain duke.ron.\\n * @param resolver The resolver address.\\n * @param owner The token owner.\\n * @param duration Duration in second(s) to expire. Leave 0 to set as parent.\\n */\\n function mint(uint256 parentId, string calldata label, address resolver, address owner, uint64 duration)\\n external\\n returns (uint64 expiryTime, uint256 id);\\n\\n /**\\n * @dev Returns all record of a domain.\\n * Reverts if the token is non existent.\\n */\\n function getRecord(uint256 id) external view returns (Record memory record);\\n\\n /**\\n * @dev Returns the domain name of id.\\n */\\n function getDomain(uint256 id) external view returns (string memory domain);\\n\\n /**\\n * @dev Returns whether the requester is able to modify the record based on the updated index.\\n * Note: This method strictly follows the permission of struct {MutableRecord}.\\n */\\n function canSetRecord(address requester, uint256 id, ModifyingIndicator indicator)\\n external\\n view\\n returns (bool, bytes4 error);\\n\\n /**\\n * @dev Sets record of existing token. Update operation for {Record.mut}.\\n *\\n * Requirements:\\n * - The method caller must have role based on the corresponding `indicator`. See struct {MutableRecord}.\\n *\\n * Emits an event {RecordUpdated}.\\n */\\n function setRecord(uint256 id, ModifyingIndicator indicator, MutableRecord calldata record) external;\\n\\n /**\\n * @dev Reclaims ownership. Update operation for {Record.mut.owner}.\\n *\\n * Requirements:\\n * - The method caller should have controller role.\\n * - The method caller should be (parent) owner or approved spender. See struct {MutableRecord}.\\n *\\n * Emits an event {RecordUpdated}.\\n */\\n function reclaim(uint256 id, address owner) external;\\n\\n /**\\n * @dev Renews token. Update operation for {Record.mut.expiry}.\\n *\\n * Requirements:\\n * - The method caller should have controller role.\\n *\\n * Emits an event {RecordUpdated}.\\n */\\n function renew(uint256 id, uint64 duration) external returns (uint64 expiry);\\n\\n /**\\n * @dev Sets expiry time for a token. Update operation for {Record.mut.expiry}.\\n *\\n * Requirements:\\n * - The method caller must have controller role.\\n *\\n * Emits an event {RecordUpdated}.\\n */\\n function setExpiry(uint256 id, uint64 expiry) external;\\n\\n /**\\n * @dev Sets the protected status of a list of ids. Update operation for {Record.mut.protected}.\\n *\\n * Requirements:\\n * - The method caller must have protected setter role.\\n *\\n * Emits events {RecordUpdated}.\\n */\\n function bulkSetProtected(uint256[] calldata ids, bool protected) external;\\n}\\n\",\"keccak256\":\"0xaef1c58bb7c8688d6677a1c2739c0dc9e645ca5c64dd875be2f2b7a318a11406\",\"license\":\"MIT\"},\"src/libraries/LibEventRange.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nstruct EventRange {\\n uint256 startedAt;\\n uint256 endedAt;\\n}\\n\\nlibrary LibEventRange {\\n /**\\n * @dev Checks whether the event range is valid.\\n */\\n function valid(EventRange calldata range) internal pure returns (bool) {\\n return range.startedAt <= range.endedAt;\\n }\\n\\n /**\\n * @dev Returns whether the current range is not yet started.\\n */\\n function isNotYetStarted(EventRange memory range) internal view returns (bool) {\\n return block.timestamp < range.startedAt;\\n }\\n\\n /**\\n * @dev Returns whether the current range is ended or not.\\n */\\n function isEnded(EventRange memory range) internal view returns (bool) {\\n return range.endedAt <= block.timestamp;\\n }\\n\\n /**\\n * @dev Returns whether the current block is in period.\\n */\\n function isInPeriod(EventRange memory range) internal view returns (bool) {\\n return range.startedAt <= block.timestamp && block.timestamp < range.endedAt;\\n }\\n}\\n\",\"keccak256\":\"0x95bf015c4245919cbcbcd810dd597fdb23eb4e58b62df8ef74b1c8c60a969bea\",\"license\":\"MIT\"},\"src/libraries/LibRNSDomain.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nlibrary LibRNSDomain {\\n /// @dev Value equals to namehash('ron')\\n uint256 internal constant RON_ID = 0xba69923fa107dbf5a25a073a10b7c9216ae39fbadc95dc891d460d9ae315d688;\\n /// @dev Value equals to namehash('addr.reverse')\\n uint256 internal constant ADDR_REVERSE_ID = 0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2;\\n\\n /**\\n * @dev Calculate the corresponding id given parentId and label.\\n */\\n function toId(uint256 parentId, string memory label) internal pure returns (uint256 id) {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x0, parentId)\\n mstore(0x20, keccak256(add(label, 32), mload(label)))\\n id := keccak256(0x0, 64)\\n }\\n }\\n\\n /**\\n * @dev Calculates the hash of the label.\\n */\\n function hashLabel(string memory label) internal pure returns (bytes32 hashed) {\\n assembly (\\\"memory-safe\\\") {\\n hashed := keccak256(add(label, 32), mload(label))\\n }\\n }\\n\\n /**\\n * @dev Calculate the RNS namehash of a str.\\n */\\n function namehash(string memory str) internal pure returns (bytes32 hashed) {\\n // notice: this method is case-sensitive, ensure the string is lowercased before calling this method\\n assembly (\\\"memory-safe\\\") {\\n // load str length\\n let len := mload(str)\\n // returns bytes32(0x0) if length is zero\\n if iszero(iszero(len)) {\\n let hashedLen\\n // compute pointer to str[0]\\n let head := add(str, 32)\\n // compute pointer to str[length - 1]\\n let tail := add(head, sub(len, 1))\\n // cleanup dirty bytes if contains any\\n mstore(0x0, 0)\\n // loop backwards from `tail` to `head`\\n for { let i := tail } iszero(lt(i, head)) { i := sub(i, 1) } {\\n // check if `i` is `head`\\n let isHead := eq(i, head)\\n // check if `str[i-1]` is \\\".\\\"\\n // `0x2e` == bytes1(\\\".\\\")\\n let isDotNext := eq(shr(248, mload(sub(i, 1))), 0x2e)\\n if or(isHead, isDotNext) {\\n // size = distance(length, i) - hashedLength + 1\\n let size := add(sub(sub(tail, i), hashedLen), 1)\\n mstore(0x20, keccak256(i, size))\\n mstore(0x0, keccak256(0x0, 64))\\n // skip \\\".\\\" thereby + 1\\n hashedLen := add(hashedLen, add(size, 1))\\n }\\n }\\n }\\n hashed := mload(0x0)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x715029b2b420c6ec00bc1f939b837acf45d247fde8426089575b0e7b5e84518b\",\"license\":\"MIT\"},\"src/libraries/math/LibSafeRange.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nlibrary LibSafeRange {\\n function add(uint256 a, uint256 b) internal pure returns (uint256 c) {\\n unchecked {\\n c = a + b;\\n if (c < a) return type(uint256).max;\\n }\\n }\\n\\n /**\\n * @dev Returns value of a + b; in case result is larger than upperbound, upperbound is returned.\\n */\\n function addWithUpperbound(uint256 a, uint256 b, uint256 ceil) internal pure returns (uint256 c) {\\n if (a > ceil || b > ceil) return ceil;\\n c = add(a, b);\\n if (c > ceil) return ceil;\\n }\\n}\\n\",\"keccak256\":\"0x12cf5f592a2d80b9c1b0ea11b8fe2b3ed42fc6d62303ba667edc56464baa8810\",\"license\":\"MIT\"},\"src/libraries/transfers/RONTransferHelper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { Strings } from \\\"@openzeppelin/contracts/utils/Strings.sol\\\";\\n\\n/**\\n * @title RONTransferHelper\\n */\\nlibrary RONTransferHelper {\\n using Strings for *;\\n\\n /**\\n * @dev Transfers RON and wraps result for the method caller to a recipient.\\n */\\n function safeTransfer(address payable _to, uint256 _value) internal {\\n bool _success = send(_to, _value);\\n if (!_success) {\\n revert(\\n string.concat(\\\"TransferHelper: could not transfer RON to \\\", _to.toHexString(), \\\" value \\\", _value.toHexString())\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns whether the call was success.\\n * Note: this function should use with the `ReentrancyGuard`.\\n */\\n function send(address payable _to, uint256 _value) internal returns (bool _success) {\\n (_success,) = _to.call{ value: _value }(new bytes(0));\\n }\\n}\\n\",\"keccak256\":\"0x733e60374ee0a33d0da2ee24976b893ca6b6d9764243b175e1ac8025240394da\",\"license\":\"MIT\"},\"src/types/ModifyingIndicator.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\ntype ModifyingIndicator is uint256;\\n\\nusing { hasAny } for ModifyingIndicator global;\\nusing { or as | } for ModifyingIndicator global;\\nusing { and as & } for ModifyingIndicator global;\\nusing { eq as == } for ModifyingIndicator global;\\nusing { not as ~ } for ModifyingIndicator global;\\nusing { neq as != } for ModifyingIndicator global;\\n\\n/// @dev Indicator for modifying immutable fields: Depth, ParentId, Label. See struct {INSUnified.ImmutableRecord}.\\nModifyingIndicator constant IMMUTABLE_FIELDS_INDICATOR = ModifyingIndicator.wrap(0x7);\\n\\n/// @dev Indicator for modifying user fields: Resolver, Owner. See struct {INSUnified.MutableRecord}.\\nModifyingIndicator constant USER_FIELDS_INDICATOR = ModifyingIndicator.wrap(0x18);\\n\\n/// @dev Indicator when modifying all of the fields in {ModifyingField}.\\nModifyingIndicator constant ALL_FIELDS_INDICATOR = ModifyingIndicator.wrap(type(uint256).max);\\n\\nfunction eq(ModifyingIndicator self, ModifyingIndicator other) pure returns (bool) {\\n return ModifyingIndicator.unwrap(self) == ModifyingIndicator.unwrap(other);\\n}\\n\\nfunction neq(ModifyingIndicator self, ModifyingIndicator other) pure returns (bool) {\\n return !eq(self, other);\\n}\\n\\nfunction not(ModifyingIndicator self) pure returns (ModifyingIndicator) {\\n return ModifyingIndicator.wrap(~ModifyingIndicator.unwrap(self));\\n}\\n\\nfunction or(ModifyingIndicator self, ModifyingIndicator other) pure returns (ModifyingIndicator) {\\n return ModifyingIndicator.wrap(ModifyingIndicator.unwrap(self) | ModifyingIndicator.unwrap(other));\\n}\\n\\nfunction and(ModifyingIndicator self, ModifyingIndicator other) pure returns (ModifyingIndicator) {\\n return ModifyingIndicator.wrap(ModifyingIndicator.unwrap(self) & ModifyingIndicator.unwrap(other));\\n}\\n\\nfunction hasAny(ModifyingIndicator self, ModifyingIndicator other) pure returns (bool) {\\n return self & other != ModifyingIndicator.wrap(0);\\n}\\n\",\"keccak256\":\"0xe364b4d2e480a7f3e392a40f792303c0febf79c1a623eb4c2278f652210e2e6c\",\"license\":\"MIT\"}},\"version\":1}", + "nonce": 182566, + "numDeployments": 2, + "storageLayout": { + "storage": [ + { + "astId": 49702, + "contract": "src/RNSAuction.sol:RNSAuction", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 49705, + "contract": "src/RNSAuction.sol:RNSAuction", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 48175, + "contract": "src/RNSAuction.sol:RNSAuction", + "label": "_roles", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_struct(RoleData)48170_storage)" + }, + { + "astId": 48485, + "contract": "src/RNSAuction.sol:RNSAuction", + "label": "_roleMembers", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_bytes32,t_struct(AddressSet)54054_storage)" + }, + { + "astId": 58679, + "contract": "src/RNSAuction.sol:RNSAuction", + "label": "____gap", + "offset": 0, + "slot": "3", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 58683, + "contract": "src/RNSAuction.sol:RNSAuction", + "label": "_rnsUnified", + "offset": 0, + "slot": "53", + "type": "t_contract(INSUnified)65002" + }, + { + "astId": 58689, + "contract": "src/RNSAuction.sol:RNSAuction", + "label": "_auctionRange", + "offset": 0, + "slot": "54", + "type": "t_mapping(t_bytes32,t_struct(EventRange)65922_storage)" + }, + { + "astId": 58695, + "contract": "src/RNSAuction.sol:RNSAuction", + "label": "_domainAuction", + "offset": 0, + "slot": "55", + "type": "t_mapping(t_uint256,t_struct(DomainAuction)64175_storage)" + }, + { + "astId": 58698, + "contract": "src/RNSAuction.sol:RNSAuction", + "label": "_treasury", + "offset": 0, + "slot": "56", + "type": "t_address_payable" + }, + { + "astId": 58701, + "contract": "src/RNSAuction.sol:RNSAuction", + "label": "_bidGapRatio", + "offset": 0, + "slot": "57", + "type": "t_uint256" + }, + { + "astId": 58705, + "contract": "src/RNSAuction.sol:RNSAuction", + "label": "_reserved", + "offset": 0, + "slot": "58", + "type": "t_struct(BitMap)53598_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_address_payable": { + "encoding": "inplace", + "label": "address payable", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "encoding": "dynamic_array", + "label": "bytes32[]", "numberOfBytes": "32", "base": "t_bytes32" }, @@ -1110,7 +13390,7 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_contract(INSUnified)65128": { + "t_contract(INSUnified)65002": { "encoding": "inplace", "label": "contract INSUnified", "numberOfBytes": "20" @@ -1122,26 +13402,26 @@ "numberOfBytes": "32", "value": "t_bool" }, - "t_mapping(t_bytes32,t_struct(AddressSet)54352_storage)": { + "t_mapping(t_bytes32,t_struct(AddressSet)54054_storage)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => struct EnumerableSet.AddressSet)", "numberOfBytes": "32", - "value": "t_struct(AddressSet)54352_storage" + "value": "t_struct(AddressSet)54054_storage" }, - "t_mapping(t_bytes32,t_struct(EventRange)66048_storage)": { + "t_mapping(t_bytes32,t_struct(EventRange)65922_storage)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => struct EventRange)", "numberOfBytes": "32", - "value": "t_struct(EventRange)66048_storage" + "value": "t_struct(EventRange)65922_storage" }, - "t_mapping(t_bytes32,t_struct(RoleData)48468_storage)": { + "t_mapping(t_bytes32,t_struct(RoleData)48170_storage)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => struct AccessControl.RoleData)", "numberOfBytes": "32", - "value": "t_struct(RoleData)48468_storage" + "value": "t_struct(RoleData)48170_storage" }, "t_mapping(t_bytes32,t_uint256)": { "encoding": "mapping", @@ -1150,12 +13430,12 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_mapping(t_uint256,t_struct(DomainAuction)64309_storage)": { + "t_mapping(t_uint256,t_struct(DomainAuction)64175_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct INSAuction.DomainAuction)", "numberOfBytes": "32", - "value": "t_struct(DomainAuction)64309_storage" + "value": "t_struct(DomainAuction)64175_storage" }, "t_mapping(t_uint256,t_uint256)": { "encoding": "mapping", @@ -1164,28 +13444,28 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_struct(AddressSet)54352_storage": { + "t_struct(AddressSet)54054_storage": { "encoding": "inplace", "label": "struct EnumerableSet.AddressSet", "numberOfBytes": "64", "members": [ { - "astId": 54351, + "astId": 54053, "contract": "src/RNSAuction.sol:RNSAuction", "label": "_inner", "offset": 0, "slot": "0", - "type": "t_struct(Set)54037_storage" + "type": "t_struct(Set)53739_storage" } ] }, - "t_struct(Bid)64301_storage": { + "t_struct(Bid)64167_storage": { "encoding": "inplace", "label": "struct INSAuction.Bid", "numberOfBytes": "128", "members": [ { - "astId": 64294, + "astId": 64160, "contract": "src/RNSAuction.sol:RNSAuction", "label": "bidder", "offset": 0, @@ -1193,7 +13473,7 @@ "type": "t_address_payable" }, { - "astId": 64296, + "astId": 64162, "contract": "src/RNSAuction.sol:RNSAuction", "label": "price", "offset": 0, @@ -1201,7 +13481,7 @@ "type": "t_uint256" }, { - "astId": 64298, + "astId": 64164, "contract": "src/RNSAuction.sol:RNSAuction", "label": "timestamp", "offset": 0, @@ -1209,22 +13489,22 @@ "type": "t_uint256" }, { - "astId": 64300, + "astId": 64166, "contract": "src/RNSAuction.sol:RNSAuction", - "label": "claimed", + "label": "claimedAt", "offset": 0, "slot": "3", - "type": "t_bool" + "type": "t_uint256" } ] }, - "t_struct(BitMap)53896_storage": { + "t_struct(BitMap)53598_storage": { "encoding": "inplace", "label": "struct BitMaps.BitMap", "numberOfBytes": "32", "members": [ { - "astId": 53895, + "astId": 53597, "contract": "src/RNSAuction.sol:RNSAuction", "label": "_data", "offset": 0, @@ -1233,13 +13513,13 @@ } ] }, - "t_struct(DomainAuction)64309_storage": { + "t_struct(DomainAuction)64175_storage": { "encoding": "inplace", "label": "struct INSAuction.DomainAuction", "numberOfBytes": "192", "members": [ { - "astId": 64303, + "astId": 64169, "contract": "src/RNSAuction.sol:RNSAuction", "label": "auctionId", "offset": 0, @@ -1247,7 +13527,7 @@ "type": "t_bytes32" }, { - "astId": 64305, + "astId": 64171, "contract": "src/RNSAuction.sol:RNSAuction", "label": "startingPrice", "offset": 0, @@ -1255,22 +13535,22 @@ "type": "t_uint256" }, { - "astId": 64308, + "astId": 64174, "contract": "src/RNSAuction.sol:RNSAuction", "label": "bid", "offset": 0, "slot": "2", - "type": "t_struct(Bid)64301_storage" + "type": "t_struct(Bid)64167_storage" } ] }, - "t_struct(EventRange)66048_storage": { + "t_struct(EventRange)65922_storage": { "encoding": "inplace", "label": "struct EventRange", "numberOfBytes": "64", "members": [ { - "astId": 66045, + "astId": 65919, "contract": "src/RNSAuction.sol:RNSAuction", "label": "startedAt", "offset": 0, @@ -1278,7 +13558,7 @@ "type": "t_uint256" }, { - "astId": 66047, + "astId": 65921, "contract": "src/RNSAuction.sol:RNSAuction", "label": "endedAt", "offset": 0, @@ -1287,13 +13567,13 @@ } ] }, - "t_struct(RoleData)48468_storage": { + "t_struct(RoleData)48170_storage": { "encoding": "inplace", "label": "struct AccessControl.RoleData", "numberOfBytes": "64", "members": [ { - "astId": 48465, + "astId": 48167, "contract": "src/RNSAuction.sol:RNSAuction", "label": "members", "offset": 0, @@ -1301,7 +13581,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 48467, + "astId": 48169, "contract": "src/RNSAuction.sol:RNSAuction", "label": "adminRole", "offset": 0, @@ -1310,13 +13590,13 @@ } ] }, - "t_struct(Set)54037_storage": { + "t_struct(Set)53739_storage": { "encoding": "inplace", "label": "struct EnumerableSet.Set", "numberOfBytes": "64", "members": [ { - "astId": 54032, + "astId": 53734, "contract": "src/RNSAuction.sol:RNSAuction", "label": "_values", "offset": 0, @@ -1324,7 +13604,7 @@ "type": "t_array(t_bytes32)dyn_storage" }, { - "astId": 54036, + "astId": 53738, "contract": "src/RNSAuction.sol:RNSAuction", "label": "_indexes", "offset": 0, @@ -1345,7 +13625,7 @@ } } }, - "timestamp": 1697372891, + "timestamp": 1698032742, "userdoc": { "version": 1, "kind": "user", diff --git a/deployments/ronin-testnet/RNSDomainPriceLogic.json b/deployments/ronin-testnet/RNSDomainPriceLogic.json index 0c8ae79a..3d4c2d43 100644 --- a/deployments/ronin-testnet/RNSDomainPriceLogic.json +++ b/deployments/ronin-testnet/RNSDomainPriceLogic.json @@ -37,6 +37,11 @@ "name": "ErrExponentTooLarge", "type": "error" }, + { + "inputs": [], + "name": "ExceedAuctionDomainExpiry", + "type": "error" + }, { "inputs": [], "name": "InvalidArrayLength", @@ -1002,13 +1007,14561 @@ "type": "function" } ], - "address": "0x7aC1624287b0959D664Cced3A01a51A440353B42", + "address": "0xa45Dd6a8DE1bCcb4C390f0504cC440B8Ef2a5b05", "args": "0x", - "blockNumber": 21224275, - "bytecode": "0x60806040526200000e62000014565b620000d5565b600054610100900460ff1615620000815760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811614620000d3576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b612bee80620000e56000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80635c68c83011610104578063ca15c873116100a2578063e229a67011610071578063e229a67014610480578063f4651f4914610493578063f5b541a6146104b4578063fe303ebf146104c957600080fd5b8063ca15c87314610434578063d40ed58c14610447578063d547741f1461045a578063dd28776d1461046d57600080fd5b80637174026e116100de5780637174026e146103db5780639010d07c146103ee57806391d1485414610419578063a217fddf1461042c57600080fd5b80635c68c830146103985780635ef32e2c146103ab578063713a69a7146103b357600080fd5b80632f6ee6951161017157806339e47da71161014b57806339e47da7146102ec5780634c255c971461034457806353faf90914610365578063599eaabf1461038557600080fd5b80632f6ee695146102ac57806335feb741146102c657806336568abe146102d957600080fd5b8063248a9ca3116101ad578063248a9ca31461023257806328dd3065146102565780632be09ecc1461026b5780632f2ff15d1461029957600080fd5b806301ffc9a7146101d4578063037f1769146101fc5780630a44f51f1461021d575b600080fd5b6101e76101e2366004612074565b6104dc565b60405190151581526020015b60405180910390f35b61020f61020a36600461209e565b610507565b6040519081526020016101f3565b610225610599565b6040516101f391906120b7565b61020f61024036600461209e565b6000908152600160208190526040909120015490565b61026961026436600461212e565b610676565b005b603554603954603a54604080516001600160a01b0390941684526020840192909252908201526060016101f3565b6102696102a7366004612163565b610692565b6102b4601281565b60405160ff90911681526020016101f3565b6102696102d43660046121d7565b6106bd565b6102696102e7366004612163565b6106d2565b604080518082018252600080825260209182015281518083018352603b546001600160c01b0381168083526001600160401b03600160c01b9092048216928401928352845190815291511691810191909152016101f3565b61034d61271081565b6040516001600160401b0390911681526020016101f3565b61037861037336600461225c565b610755565b6040516101f3919061231f565b61026961039336600461225c565b61087c565b61020f6103a6366004612365565b61093a565b60375461020f565b6103c66103c1366004612478565b6109b8565b604080519283526020830191909152016101f3565b61020f6103e936600461209e565b6109e4565b6104016103fc3660046124ac565b610a77565b6040516001600160a01b0390911681526020016101f3565b6101e7610427366004612163565b610a96565b61020f600081565b61020f61044236600461209e565b610ac1565b6102696104553660046124e6565b610ad8565b610269610468366004612163565b610c8e565b61026961047b3660046125bf565b610cb4565b61026961048e36600461262a565b610dc0565b6104a66104a1366004612646565b610dd4565b6040516101f392919061268a565b61020f600080516020612b9983398151915281565b6102696104d736600461209e565b610f68565b60006001600160e01b03198216635a05180f60e01b1480610501575061050182610f7c565b92915050565b603554603a5460395460405163052571af60e51b815260009361050193869360129384936001600160a01b03169263a4ae35e09261055092600401918252602082015260400190565b608060405180830381865afa15801561056d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059191906126c5565b929190610fb1565b603854606090806001600160401b038111156105b7576105b76123d6565b6040519080825280602002602001820160405280156105fc57816020015b60408051808201909152600080825260208201528152602001906001900390816105d55790505b5091506000805b82811015610670578060010191508184828151811061062457610624612750565b60200260200101516000018181525050603c60008381526020019081526020016000205484828151811061065a5761065a612750565b6020908102919091018101510152600101610603565b50505090565b600061068181610ff2565b61068c848484610fff565b50505050565b600082815260016020819052604090912001546106ae81610ff2565b6106b88383611071565b505050565b60006106c881610ff2565b6106b88383611093565b6001600160a01b03811633146107475760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61075182826111ac565b5050565b6060600080516020612b9983398151915261076f81610ff2565b60006107818b8b8b8b8b8b8b8b6111ce565b905033816001600160401b0381111561079c5761079c6123d6565b6040519080825280602002602001820160405280156107c5578160200160208202803683370190505b50935060005b8281101561086c57610842828e8e848181106107e9576107e9612750565b905060200201358d8d8581811061080257610802612750565b905060200201358c8c8681811061081b5761081b612750565b905060200201358b8b8781811061083457610834612750565b90506020020135600061121c565b85828151811061085457610854612750565b911515602092830291909101909101526001016107cb565b5050505098975050505050505050565b600080516020612b9983398151915261089481610ff2565b60006108a68a8a8a8a8a8a8a8a6111ce565b90503360005b8281101561092c57610923828d8d848181106108ca576108ca612750565b905060200201358c8c858181106108e3576108e3612750565b905060200201358b8b868181106108fc576108fc612750565b905060200201358a8a8781811061091557610915612750565b90506020020135600161121c565b506001016108ac565b505050505050505050505050565b6000603e600061097f85858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506112ab92505050565b8152602001908152602001600020549050806000036109b157604051635421761560e11b815260040160405180910390fd5b1992915050565b6000806109d26109cd84805160209091012090565b6112b6565b91506109dd826109e4565b9050915091565b603554603a5460395460405163052571af60e51b815260048101929092526024820152600091610501918491601291829161059191601119916001600160a01b03169063a4ae35e090604401608060405180830381865afa158015610a4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7191906126c5565b90611330565b6000828152600260205260408120610a8f908361148a565b9392505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600081815260026020526040812061050190611496565b600054610100900460ff1615808015610af85750600054600160ff909116105b80610b125750303b158015610b12575060005460ff166001145b610b755760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161073e565b6000805460ff191660011790558015610b98576000805461ff0019166101001790555b89600080516020612b9983398151915260005b82811015610beb57610be3828f8f84818110610bc957610bc9612750565b9050602002016020810190610bde9190612766565b6114a0565b600101610bab565b50603680546001600160a01b0319166001600160a01b038816179055610c1260008f6114a0565b610c1c8b8b611093565b610c25896114aa565b610c2e886114df565b610c39878686610fff565b5050801561092c576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050505050505050505050565b60008281526001602081905260409091200154610caa81610ff2565b6106b883836111ac565b600080516020612b99833981519152610ccc81610ff2565b83801580610cda5750808314155b15610cf857604051634ec4810560e11b815260040160405180910390fd5b600033815b83811015610db557868682818110610d1757610d17612750565b9050602002013519925082603e60008b8b85818110610d3857610d38612750565b90506020020135815260200190815260200160002081905550888882818110610d6357610d63612750565b90506020020135826001600160a01b03167fb52d278cb3ef3b003bdfb385ce2eb23a83eb6d713724abfba1acaa16ccf6621485604051610da591815260200190565b60405180910390a3600101610cfd565b505050505050505050565b6000610dcb81610ff2565b610751826114df565b604080518082019091526000808252602082015260408051808201909152600080825260208201526000610e078561155b565b855160208701209091506000906000818152603e60205260409020549091508015610e3e57610e37811987612799565b8552610f3b565b6000603c6000610e5086603854611649565b81526020019081526020016000205490508087610e6d9190612799565b86526036546001600160a01b03166353f9195e610ebb7fba69923fa107dbf5a25a073a10b7c9216ae39fbadc95dc891d460d9ae315d6888b6000918252805160209182012090526040902090565b6040518263ffffffff1660e01b8152600401610ed991815260200190565b602060405180830381865afa158015610ef6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1a91906127b0565b15610f3957610f36603754610f2e856112b6565b61271061165f565b85525b505b8351610f46906109e4565b60208501528451610f56906109e4565b60208601525092959194509092505050565b6000610f7381610ff2565b610751826114aa565b60006001600160e01b03198216637965db0b60e01b148061050157506301ffc9a760e01b6001600160e01b0319831614610501565b6000610fe784610fd7876000015160070b886040015186610fd291906127d2565b611748565b610fe2600187611748565b61165f565b90505b949350505050565b610ffc81336117a2565b50565b603580546001600160a01b0319166001600160a01b0385169081179091556039839055603a8290558190336001600160a01b03167f671083457675651266070f50f1438ef8190b7da64d38f16f5117246236b7dd5b8560405161106491815260200190565b60405180910390a4505050565b61107b82826117fb565b60008281526002602052604090206106b89082611866565b60408051808201909152600080825260208201523390603854839060005b8281101561115e578686828181106110cb576110cb612750565b9050604002018036038101906110e191906127f9565b93506110f182856000015161187b565b6020808601805187516000908152603c90935260409283902055865190519151929450916001600160a01b038816917f85211e946be6d537cd1b22a183d04151d4e5d0818e1ce75d2e5ebaecba0a5a779161114e91815260200190565b60405180910390a36001016110b1565b5060385481146111a457603881905560405181906001600160a01b038616907f7e7c3a4273ac1af351af63a82e91a8335bcb389ba681375a32dbe4455d0d474b90600090a35b505050505050565b6111b6828261188a565b60008281526002602052604090206106b890826118f1565b868015806111dc5750858114155b806111e75750838114155b806111f25750818114155b1561121057604051634ec4810560e11b815260040160405180910390fd5b98975050505050505050565b60008061122886610507565b6000888152603d6020526040902090915083806112455750805482115b9250821561129f57818155426001820155604080518381526020810187905287918a916001600160a01b038d16917f60d5fd6d2284807447aae62f93c05517a647b8e8479c3af2c27ee1d1c85b540f910160405180910390a45b50509695505050505050565b805160209091012090565b6000818152603d6020526040812060018101548083036112da575060009392505050565b60006112e68242612847565b835460408051808201909152603b546001600160c01b0381168252600160c01b90046001600160401b03166020820152919250611327919061271084611906565b95945050505050565b604080516080810182526000808252602082018190529181018290526060810191909152600061136960018560400151610fd29061285a565b90506001600160ff1b0381111561139f576040808501519051633e87ca5d60e11b815260039190910b600482015260240161073e565b60006113af6001610fd28661285a565b90506001600160ff1b038111156113df57604051633e87ca5d60e11b8152600385900b600482015260240161073e565b845160009060070b6113f1838561287d565b6113fb91906128c3565b9050677fffffffffffffff81131561144757604086810151875191516329b2fb5560e11b8152600391820b60048201529087900b602482015260079190910b604482015260640161073e565b60405180608001604052808260070b815260200187602001516001600160401b031681526020018660030b81526020018760600151815250935050505092915050565b6000610a8f83836119dc565b6000610501825490565b6107518282611071565b6037819055604051819033907f1e97e29c863545fad1ce79512b4deb3f0b7d30c3356bc7bbbd6588c9e68cf07390600090a350565b80603b6114ec8282612906565b503390507fa7f38b74141f9a2ac1b02640ded2b98431ef77f8cf2e3ade85c71d6c8420dc6461151e6020840184612948565b61152e6040850160208601612965565b604080516001600160c01b0390931683526001600160401b0390911660208301520160405180910390a250565b600080600080845190505b8083101561164157600085848151811061158257611582612750565b01602001516001600160f81b0319169050600160ff1b8110156115aa57600184019350611635565b600760fd1b6001600160f81b0319821610156115cb57600284019350611635565b600f60fc1b6001600160f81b0319821610156115ec57600384019350611635565b601f60fb1b6001600160f81b03198216101561160d57600484019350611635565b603f60fa1b6001600160f81b03198216101561162e57600584019350611635565b6006840193505b50600190910190611566565b509392505050565b60008183106116585781610a8f565b5090919050565b60008080600019858709858702925082811083820303915050806000036116995783828161168f5761168f6128ad565b0492505050610a8f565b8084116116e05760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b604482015260640161073e565b600084868809600260036001881981018916988990049182028318808302840302808302840302808302840302808302840302808302840302918202909203026000889003889004909101858311909403939093029303949094049190911702949350505050565b6000808260030b121561177a5761175e8261285a565b61176990600a612a66565b6117739084612a78565b9050610501565b60008260030b131561179b5761179182600a612a66565b6117739084612799565b5081610501565b6117ac8282610a96565b610751576117b981611a06565b6117c4836020611a18565b6040516020016117d5929190612ab0565b60408051601f198184030181529082905262461bcd60e51b825261073e91600401612b25565b6118058282610a96565b6107515760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b6000610a8f836001600160a01b038416611bb3565b60008183116116585781610a8f565b6118948282610a96565b156107515760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610a8f836001600160a01b038416611c02565b60008085602001516001600160401b0316836119229190612a78565b9050801580611939575085516001600160c01b0316155b156119475784915050610fea565b85516001600160c01b03166001600160401b0385160361196b576000915050610fea565b61ffff81111561199157604051637359f25f60e01b81526004810182905260240161073e565b60006119c18760000151866001600160401b0316036001600160c01b0316612710876001600160401b031661165f565b90506119d1868261271085611cf5565b979650505050505050565b60008260000182815481106119f3576119f3612750565b9060005260206000200154905092915050565b60606105016001600160a01b03831660145b60606000611a27836002612799565b611a32906002612b58565b6001600160401b03811115611a4957611a496123d6565b6040519080825280601f01601f191660200182016040528015611a73576020820181803683370190505b509050600360fc1b81600081518110611a8e57611a8e612750565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611abd57611abd612750565b60200101906001600160f81b031916908160001a9053506000611ae1846002612799565b611aec906001612b58565b90505b6001811115611b64576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611b2057611b20612750565b1a60f81b828281518110611b3657611b36612750565b60200101906001600160f81b031916908160001a90535060049490941c93611b5d81612b6b565b9050611aef565b508315610a8f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161073e565b6000818152600183016020526040812054611bfa57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610501565b506000610501565b60008181526001830160205260408120548015611ceb576000611c26600183612847565b8554909150600090611c3a90600190612847565b9050818114611c9f576000866000018281548110611c5a57611c5a612750565b9060005260206000200154905080876000018481548110611c7d57611c7d612750565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611cb057611cb0612b82565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610501565b6000915050610501565b600082841480611d07575061ffff8216155b15611d13575083610fea565b50836000808080611d3461ffff8716611d2b8a611e58565b61ffff16611649565b90505b61ffff811615611d8a57611d518561ffff83168a0a612029565b90945092508315611d6a57829450808603955080820191505b611d83600261ffff83160461ffff168761ffff16611649565b9050611d37565b505b61ffff851615611dfd57611da08488612029565b90935091508215611dbf57600019909401939092508290600101611d8c565b61ffff811615611de457858481611dd857611dd86128ad565b04935060001901611d8c565b611def84888861165f565b600019909501949350611d8c565b6000611e0887611e58565b90505b61ffff821615611e4c576000611e298261ffff168461ffff16611649565b90508061ffff16880a8681611e4057611e406128ad565b04955090910390611e0b565b50505050949350505050565b60006003821015611e6b575060ff919050565b6004821015611e7c57506080919050565b6010821015611e8d57506040919050565b610100821015611e9f57506020919050565b611bdc821015611eb157506014919050565b612c70821015611ec357506013919050565b614aa9821015611ed557506012919050565b618554821015611ee757506011919050565b62010000821015611efa57506010919050565b62021837821015611f0d5750600f919050565b6204e046821015611f205750600e919050565b620ced4c821015611f335750600d919050565b62285146821015611f465750600c919050565b629aa2ad821015611f595750600b919050565b6303080c01821015611f6d5750600a919050565b6315c5cbbd821015611f8157506009919050565b640100000000821015611f9657506008919050565b6417c6a1f29f821015611fab57506007919050565b6506597fa94f5c821015611fc157506006919050565b66093088c35d733b821015611fd857506005919050565b68010000000000000000821015611ff157506004919050565b6a285145f31ae515c447bb5782101561200c57506003919050565b600160801b82101561202057506002919050565b5060015b919050565b60008083600003612040575060019050600061206d565b83830283858281612053576120536128ad565b041461206657600080925092505061206d565b6001925090505b9250929050565b60006020828403121561208657600080fd5b81356001600160e01b031981168114610a8f57600080fd5b6000602082840312156120b057600080fd5b5035919050565b602080825282518282018190526000919060409081850190868401855b82811015612101576120f184835180518252602090810151910152565b92840192908501906001016120d4565b5091979650505050505050565b6001600160a01b0381168114610ffc57600080fd5b80356120248161210e565b60008060006060848603121561214357600080fd5b833561214e8161210e565b95602085013595506040909401359392505050565b6000806040838503121561217657600080fd5b8235915060208301356121888161210e565b809150509250929050565b60008083601f8401126121a557600080fd5b5081356001600160401b038111156121bc57600080fd5b6020830191508360208260061b850101111561206d57600080fd5b600080602083850312156121ea57600080fd5b82356001600160401b0381111561220057600080fd5b61220c85828601612193565b90969095509350505050565b60008083601f84011261222a57600080fd5b5081356001600160401b0381111561224157600080fd5b6020830191508360208260051b850101111561206d57600080fd5b6000806000806000806000806080898b03121561227857600080fd5b88356001600160401b038082111561228f57600080fd5b61229b8c838d01612218565b909a50985060208b01359150808211156122b457600080fd5b6122c08c838d01612218565b909850965060408b01359150808211156122d957600080fd5b6122e58c838d01612218565b909650945060608b01359150808211156122fe57600080fd5b5061230b8b828c01612218565b999c989b5096995094979396929594505050565b6020808252825182820181905260009190848201906040850190845b8181101561235957835115158352928401929184019160010161233b565b50909695505050505050565b6000806020838503121561237857600080fd5b82356001600160401b038082111561238f57600080fd5b818501915085601f8301126123a357600080fd5b8135818111156123b257600080fd5b8660208285010111156123c457600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126123fd57600080fd5b81356001600160401b0380821115612417576124176123d6565b604051601f8301601f19908116603f0116810190828211818310171561243f5761243f6123d6565b8160405283815286602085880101111561245857600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121561248a57600080fd5b81356001600160401b038111156124a057600080fd5b610fea848285016123ec565b600080604083850312156124bf57600080fd5b50508035926020909101359150565b6000604082840312156124e057600080fd5b50919050565b60008060008060008060008060008060006101408c8e03121561250857600080fd5b6125128c3561210e565b8b359a506001600160401b038060208e0135111561252f57600080fd5b61253f8e60208f01358f01612218565b909b50995060408d013581101561255557600080fd5b506125668d60408e01358e01612193565b909850965060608c0135955061257f8d60808e016124ce565b945060c08c013561258f8161210e565b935061259d60e08d01612123565b92506101008c013591506101208c013590509295989b509295989b9093969950565b600080600080604085870312156125d557600080fd5b84356001600160401b03808211156125ec57600080fd5b6125f888838901612218565b9096509450602087013591508082111561261157600080fd5b5061261e87828801612218565b95989497509550505050565b60006040828403121561263c57600080fd5b610a8f83836124ce565b6000806040838503121561265957600080fd5b82356001600160401b0381111561266f57600080fd5b61267b858286016123ec565b95602094909401359450505050565b825181526020808401518183015282516040830152820151606082015260808101610a8f565b6001600160401b0381168114610ffc57600080fd5b6000608082840312156126d757600080fd5b604051608081018181106001600160401b03821117156126f9576126f96123d6565b6040528251600781900b811461270e57600080fd5b8152602083015161271e816126b0565b60208201526040830151600381900b811461273857600080fd5b60408201526060928301519281019290925250919050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561277857600080fd5b8135610a8f8161210e565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761050157610501612783565b6000602082840312156127c257600080fd5b81518015158114610a8f57600080fd5b600381810b9083900b01637fffffff8113637fffffff198212171561050157610501612783565b60006040828403121561280b57600080fd5b604051604081018181106001600160401b038211171561282d5761282d6123d6565b604052823581526020928301359281019290925250919050565b8181038181111561050157610501612783565b60008160030b637fffffff19810361287457612874612783565b60000392915050565b80820260008212600160ff1b8414161561289957612899612783565b818105831482151761050157610501612783565b634e487b7160e01b600052601260045260246000fd5b6000826128d2576128d26128ad565b600160ff1b8214600019841416156128ec576128ec612783565b500590565b6001600160c01b0381168114610ffc57600080fd5b8135612911816128f1565b81546001600160c01b03199081166001600160c01b03929092169182178355602084013561293e816126b0565b60c01b1617905550565b60006020828403121561295a57600080fd5b8135610a8f816128f1565b60006020828403121561297757600080fd5b8135610a8f816126b0565b600181815b808511156129bd5781600019048211156129a3576129a3612783565b808516156129b057918102915b93841c9390800290612987565b509250929050565b6000826129d457506001610501565b816129e157506000610501565b81600181146129f75760028114612a0157612a1d565b6001915050610501565b60ff841115612a1257612a12612783565b50506001821b610501565b5060208310610133831016604e8410600b8410161715612a40575081810a610501565b612a4a8383612982565b8060001904821115612a5e57612a5e612783565b029392505050565b6000610a8f63ffffffff8416836129c5565b600082612a8757612a876128ad565b500490565b60005b83811015612aa7578181015183820152602001612a8f565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612ae8816017850160208801612a8c565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612b19816028840160208801612a8c565b01602801949350505050565b6020815260008251806020840152612b44816040850160208701612a8c565b601f01601f19169190910160400192915050565b8082018082111561050157610501612783565b600081612b7a57612b7a612783565b506000190190565b634e487b7160e01b600052603160045260246000fdfe97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929a264697066735822122076690926c2db8bd93ce00d4367403bba09c400c1ff6d19c14bc2e66eb1b25abc64736f6c63430008150033", + "ast": { + "absolutePath": "src/RNSDomainPrice.sol", + "id": 60776, + "exportedSymbols": { + "AccessControlEnumerable": [ + 48591 + ], + "INSAuction": [ + 64365 + ], + "INSDomainPrice": [ + 64629 + ], + "INSUnified": [ + 65002 + ], + "IPyth": [ + 54460 + ], + "Initializable": [ + 49864 + ], + "LibPeriodScaler": [ + 66715 + ], + "LibRNSDomain": [ + 66069 + ], + "LibSafeRange": [ + 66613 + ], + "LibString": [ + 66351 + ], + "Math": [ + 53173 + ], + "PeriodScaler": [ + 66624 + ], + "PythConverter": [ + 67404 + ], + "PythStructs": [ + 54503 + ], + "RNSDomainPrice": [ + 60775 + ], + "TimestampWrapper": [ + 66547 + ] + }, + "nodeType": "SourceUnit", + "src": "32:13046:84", + "nodes": [ + { + "id": 59609, + "nodeType": "PragmaDirective", + "src": "32:24:84", + "nodes": [], + "literals": [ + "solidity", + "^", + "0.8", + ".19" + ] + }, + { + "id": 59611, + "nodeType": "ImportDirective", + "src": "58:86:84", + "nodes": [], + "absolutePath": "lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol", + "file": "@openzeppelin/contracts/proxy/utils/Initializable.sol", + "nameLocation": "-1:-1:-1", + "scope": 60776, + "sourceUnit": 49865, + "symbolAliases": [ + { + "foreign": { + "id": 59610, + "name": "Initializable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 49864, + "src": "67:13:84", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 59613, + "nodeType": "ImportDirective", + "src": "145:101:84", + "nodes": [], + "absolutePath": "lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol", + "file": "@openzeppelin/contracts/access/AccessControlEnumerable.sol", + "nameLocation": "-1:-1:-1", + "scope": 60776, + "sourceUnit": 48592, + "symbolAliases": [ + { + "foreign": { + "id": 59612, + "name": "AccessControlEnumerable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48591, + "src": "154:23:84", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 59615, + "nodeType": "ImportDirective", + "src": "247:67:84", + "nodes": [], + "absolutePath": "lib/openzeppelin-contracts/contracts/utils/math/Math.sol", + "file": "@openzeppelin/contracts/utils/math/Math.sol", + "nameLocation": "-1:-1:-1", + "scope": 60776, + "sourceUnit": 53174, + "symbolAliases": [ + { + "foreign": { + "id": 59614, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53173, + "src": "256:4:84", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 59618, + "nodeType": "ImportDirective", + "src": "315:60:84", + "nodes": [], + "absolutePath": "lib/pyth-sdk-solidity/IPyth.sol", + "file": "@pythnetwork/IPyth.sol", + "nameLocation": "-1:-1:-1", + "scope": 60776, + "sourceUnit": 54461, + "symbolAliases": [ + { + "foreign": { + "id": 59616, + "name": "IPyth", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 54460, + "src": "324:5:84", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + }, + { + "foreign": { + "id": 59617, + "name": "PythStructs", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 54503, + "src": "331:11:84", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 59620, + "nodeType": "ImportDirective", + "src": "376:57:84", + "nodes": [], + "absolutePath": "src/interfaces/INSUnified.sol", + "file": "./interfaces/INSUnified.sol", + "nameLocation": "-1:-1:-1", + "scope": 60776, + "sourceUnit": 65003, + "symbolAliases": [ + { + "foreign": { + "id": 59619, + "name": "INSUnified", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65002, + "src": "385:10:84", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 59622, + "nodeType": "ImportDirective", + "src": "434:57:84", + "nodes": [], + "absolutePath": "src/interfaces/INSAuction.sol", + "file": "./interfaces/INSAuction.sol", + "nameLocation": "-1:-1:-1", + "scope": 60776, + "sourceUnit": 64366, + "symbolAliases": [ + { + "foreign": { + "id": 59621, + "name": "INSAuction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64365, + "src": "443:10:84", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 59624, + "nodeType": "ImportDirective", + "src": "492:65:84", + "nodes": [], + "absolutePath": "src/interfaces/INSDomainPrice.sol", + "file": "./interfaces/INSDomainPrice.sol", + "nameLocation": "-1:-1:-1", + "scope": 60776, + "sourceUnit": 64630, + "symbolAliases": [ + { + "foreign": { + "id": 59623, + "name": "INSDomainPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64629, + "src": "501:14:84", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 59628, + "nodeType": "ImportDirective", + "src": "558:94:84", + "nodes": [], + "absolutePath": "src/libraries/math/PeriodScalingUtils.sol", + "file": "./libraries/math/PeriodScalingUtils.sol", + "nameLocation": "-1:-1:-1", + "scope": 60776, + "sourceUnit": 66716, + "symbolAliases": [ + { + "foreign": { + "id": 59625, + "name": "PeriodScaler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66624, + "src": "567:12:84", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + }, + { + "foreign": { + "id": 59626, + "name": "LibPeriodScaler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66715, + "src": "581:15:84", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + }, + { + "foreign": { + "id": 59627, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53173, + "src": "598:4:84", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 59630, + "nodeType": "ImportDirective", + "src": "653:73:84", + "nodes": [], + "absolutePath": "src/libraries/TimestampWrapperUtils.sol", + "file": "./libraries/TimestampWrapperUtils.sol", + "nameLocation": "-1:-1:-1", + "scope": 60776, + "sourceUnit": 66548, + "symbolAliases": [ + { + "foreign": { + "id": 59629, + "name": "TimestampWrapper", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66547, + "src": "662:16:84", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 59632, + "nodeType": "ImportDirective", + "src": "727:65:84", + "nodes": [], + "absolutePath": "src/libraries/math/LibSafeRange.sol", + "file": "./libraries/math/LibSafeRange.sol", + "nameLocation": "-1:-1:-1", + "scope": 60776, + "sourceUnit": 66614, + "symbolAliases": [ + { + "foreign": { + "id": 59631, + "name": "LibSafeRange", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66613, + "src": "736:12:84", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 59634, + "nodeType": "ImportDirective", + "src": "793:54:84", + "nodes": [], + "absolutePath": "src/libraries/LibString.sol", + "file": "./libraries/LibString.sol", + "nameLocation": "-1:-1:-1", + "scope": 60776, + "sourceUnit": 66352, + "symbolAliases": [ + { + "foreign": { + "id": 59633, + "name": "LibString", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66351, + "src": "802:9:84", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 59636, + "nodeType": "ImportDirective", + "src": "848:60:84", + "nodes": [], + "absolutePath": "src/libraries/LibRNSDomain.sol", + "file": "./libraries/LibRNSDomain.sol", + "nameLocation": "-1:-1:-1", + "scope": 60776, + "sourceUnit": 66070, + "symbolAliases": [ + { + "foreign": { + "id": 59635, + "name": "LibRNSDomain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66069, + "src": "857:12:84", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 59638, + "nodeType": "ImportDirective", + "src": "909:67:84", + "nodes": [], + "absolutePath": "src/libraries/pyth/PythConverter.sol", + "file": "./libraries/pyth/PythConverter.sol", + "nameLocation": "-1:-1:-1", + "scope": 60776, + "sourceUnit": 67405, + "symbolAliases": [ + { + "foreign": { + "id": 59637, + "name": "PythConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67404, + "src": "918:13:84", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 60775, + "nodeType": "ContractDefinition", + "src": "978:12099:84", + "nodes": [ + { + "id": 59646, + "nodeType": "UsingForDirective", + "src": "1064:22:84", + "nodes": [], + "global": false, + "libraryName": { + "id": 59645, + "name": "LibString", + "nameLocations": [ + "1070:9:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 66351, + "src": "1070:9:84" + } + }, + { + "id": 59649, + "nodeType": "UsingForDirective", + "src": "1089:30:84", + "nodes": [], + "global": false, + "libraryName": { + "id": 59647, + "name": "LibRNSDomain", + "nameLocations": [ + "1095:12:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 66069, + "src": "1095:12:84" + }, + "typeName": { + "id": 59648, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1112:6:84", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + } + }, + { + "id": 59653, + "nodeType": "UsingForDirective", + "src": "1122:39:84", + "nodes": [], + "global": false, + "libraryName": { + "id": 59650, + "name": "LibPeriodScaler", + "nameLocations": [ + "1128:15:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 66715, + "src": "1128:15:84" + }, + "typeName": { + "id": 59652, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 59651, + "name": "PeriodScaler", + "nameLocations": [ + "1148:12:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 66624, + "src": "1148:12:84" + }, + "referencedDeclaration": 66624, + "src": "1148:12:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_PeriodScaler_$66624_storage_ptr", + "typeString": "struct PeriodScaler" + } + } + }, + { + "id": 59657, + "nodeType": "UsingForDirective", + "src": "1164:42:84", + "nodes": [], + "global": false, + "libraryName": { + "id": 59654, + "name": "PythConverter", + "nameLocations": [ + "1170:13:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 67404, + "src": "1170:13:84" + }, + "typeName": { + "id": 59656, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 59655, + "name": "PythStructs.Price", + "nameLocations": [ + "1188:11:84", + "1200:5:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 54493, + "src": "1188:17:84" + }, + "referencedDeclaration": 54493, + "src": "1188:17:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Price_$54493_storage_ptr", + "typeString": "struct PythStructs.Price" + } + } + }, + { + "id": 59661, + "nodeType": "VariableDeclaration", + "src": "1243:39:84", + "nodes": [], + "baseFunctions": [ + 64628 + ], + "constant": true, + "documentation": { + "id": 59658, + "nodeType": "StructuredDocumentation", + "src": "1210:30:84", + "text": "@inheritdoc INSDomainPrice" + }, + "functionSelector": "2f6ee695", + "mutability": "constant", + "name": "USD_DECIMALS", + "nameLocation": "1265:12:84", + "scope": 60775, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 59659, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1243:5:84", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": { + "hexValue": "3138", + "id": 59660, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1280:2:84", + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "visibility": "public" + }, + { + "id": 59665, + "nodeType": "VariableDeclaration", + "src": "1319:46:84", + "nodes": [], + "baseFunctions": [ + 64622 + ], + "constant": true, + "documentation": { + "id": 59662, + "nodeType": "StructuredDocumentation", + "src": "1286:30:84", + "text": "@inheritdoc INSDomainPrice" + }, + "functionSelector": "4c255c97", + "mutability": "constant", + "name": "MAX_PERCENTAGE", + "nameLocation": "1342:14:84", + "scope": 60775, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 59663, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1319:6:84", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "value": { + "hexValue": "3130305f3030", + "id": 59664, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1359:6:84", + "typeDescriptions": { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + }, + "value": "100_00" + }, + "visibility": "public" + }, + { + "id": 59671, + "nodeType": "VariableDeclaration", + "src": "1402:66:84", + "nodes": [], + "baseFunctions": [ + 64616 + ], + "constant": true, + "documentation": { + "id": 59666, + "nodeType": "StructuredDocumentation", + "src": "1369:30:84", + "text": "@inheritdoc INSDomainPrice" + }, + "functionSelector": "f5b541a6", + "mutability": "constant", + "name": "OPERATOR_ROLE", + "nameLocation": "1426:13:84", + "scope": 60775, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 59667, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1402:7:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "arguments": [ + { + "hexValue": "4f50455241544f525f524f4c45", + "id": 59669, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1452:15:84", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929", + "typeString": "literal_string \"OPERATOR_ROLE\"" + }, + "value": "OPERATOR_ROLE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929", + "typeString": "literal_string \"OPERATOR_ROLE\"" + } + ], + "id": 59668, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "1442:9:84", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 59670, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1442:26:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "public" + }, + { + "id": 59676, + "nodeType": "VariableDeclaration", + "src": "1508:27:84", + "nodes": [], + "constant": false, + "documentation": { + "id": 59672, + "nodeType": "StructuredDocumentation", + "src": "1473:32:84", + "text": "@dev Gap for upgradeability." + }, + "mutability": "mutable", + "name": "____gap", + "nameLocation": "1528:7:84", + "scope": 60775, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$50_storage", + "typeString": "uint256[50]" + }, + "typeName": { + "baseType": { + "id": 59673, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1508:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 59675, + "length": { + "hexValue": "3530", + "id": 59674, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1516:2:84", + "typeDescriptions": { + "typeIdentifier": "t_rational_50_by_1", + "typeString": "int_const 50" + }, + "value": "50" + }, + "nodeType": "ArrayTypeName", + "src": "1508:11:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$50_storage_ptr", + "typeString": "uint256[50]" + } + }, + "visibility": "private" + }, + { + "id": 59680, + "nodeType": "VariableDeclaration", + "src": "1572:20:84", + "nodes": [], + "constant": false, + "documentation": { + "id": 59677, + "nodeType": "StructuredDocumentation", + "src": "1540:29:84", + "text": "@dev Pyth oracle contract" + }, + "mutability": "mutable", + "name": "_pyth", + "nameLocation": "1587:5:84", + "scope": 60775, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPyth_$54460", + "typeString": "contract IPyth" + }, + "typeName": { + "id": 59679, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 59678, + "name": "IPyth", + "nameLocations": [ + "1572:5:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 54460, + "src": "1572:5:84" + }, + "referencedDeclaration": 54460, + "src": "1572:5:84", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPyth_$54460", + "typeString": "contract IPyth" + } + }, + "visibility": "internal" + }, + { + "id": 59684, + "nodeType": "VariableDeclaration", + "src": "1627:28:84", + "nodes": [], + "constant": false, + "documentation": { + "id": 59681, + "nodeType": "StructuredDocumentation", + "src": "1596:28:84", + "text": "@dev RNSAuction contract" + }, + "mutability": "mutable", + "name": "_auction", + "nameLocation": "1647:8:84", + "scope": 60775, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSAuction_$64365", + "typeString": "contract INSAuction" + }, + "typeName": { + "id": 59683, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 59682, + "name": "INSAuction", + "nameLocations": [ + "1627:10:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 64365, + "src": "1627:10:84" + }, + "referencedDeclaration": 64365, + "src": "1627:10:84", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSAuction_$64365", + "typeString": "contract INSAuction" + } + }, + "visibility": "internal" + }, + { + "id": 59687, + "nodeType": "VariableDeclaration", + "src": "1728:26:84", + "nodes": [], + "constant": false, + "documentation": { + "id": 59685, + "nodeType": "StructuredDocumentation", + "src": "1659:66:84", + "text": "@dev Extra fee for renewals based on the current domain price." + }, + "mutability": "mutable", + "name": "_taxRatio", + "nameLocation": "1745:9:84", + "scope": 60775, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59686, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1728:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "id": 59690, + "nodeType": "VariableDeclaration", + "src": "1799:30:84", + "nodes": [], + "constant": false, + "documentation": { + "id": 59688, + "nodeType": "StructuredDocumentation", + "src": "1758:38:84", + "text": "@dev Max length of the renewal fee" + }, + "mutability": "mutable", + "name": "_rnfMaxLength", + "nameLocation": "1816:13:84", + "scope": 60775, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59689, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1799:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "id": 59693, + "nodeType": "VariableDeclaration", + "src": "1891:34:84", + "nodes": [], + "constant": false, + "documentation": { + "id": 59691, + "nodeType": "StructuredDocumentation", + "src": "1833:55:84", + "text": "@dev Max acceptable age of the price oracle request" + }, + "mutability": "mutable", + "name": "_maxAcceptableAge", + "nameLocation": "1908:17:84", + "scope": 60775, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59692, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1891:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "id": 59696, + "nodeType": "VariableDeclaration", + "src": "1974:33:84", + "nodes": [], + "constant": false, + "documentation": { + "id": 59694, + "nodeType": "StructuredDocumentation", + "src": "1929:42:84", + "text": "@dev Price feed ID on Pyth for RON/USD" + }, + "mutability": "mutable", + "name": "_pythIdForRONUSD", + "nameLocation": "1991:16:84", + "scope": 60775, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 59695, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1974:7:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "id": 59700, + "nodeType": "VariableDeclaration", + "src": "2073:35:84", + "nodes": [], + "constant": false, + "documentation": { + "id": 59697, + "nodeType": "StructuredDocumentation", + "src": "2011:59:84", + "text": "@dev The percentage scale from domain price each period" + }, + "mutability": "mutable", + "name": "_dpDownScaler", + "nameLocation": "2095:13:84", + "scope": 60775, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_PeriodScaler_$66624_storage", + "typeString": "struct PeriodScaler" + }, + "typeName": { + "id": 59699, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 59698, + "name": "PeriodScaler", + "nameLocations": [ + "2073:12:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 66624, + "src": "2073:12:84" + }, + "referencedDeclaration": 66624, + "src": "2073:12:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_PeriodScaler_$66624_storage_ptr", + "typeString": "struct PeriodScaler" + } + }, + "visibility": "internal" + }, + { + "id": 59705, + "nodeType": "VariableDeclaration", + "src": "2173:59:84", + "nodes": [], + "constant": false, + "documentation": { + "id": 59701, + "nodeType": "StructuredDocumentation", + "src": "2113:57:84", + "text": "@dev Mapping from domain length => renewal fee in USD" + }, + "mutability": "mutable", + "name": "_rnFee", + "nameLocation": "2226:6:84", + "scope": 60775, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + }, + "typeName": { + "id": 59704, + "keyName": "length", + "keyNameLocation": "2189:6:84", + "keyType": { + "id": 59702, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2181:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2173:43:84", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + }, + "valueName": "usdPrice", + "valueNameLocation": "2207:8:84", + "valueType": { + "id": 59703, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2199:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + }, + { + "id": 59711, + "nodeType": "VariableDeclaration", + "src": "2288:65:84", + "nodes": [], + "constant": false, + "documentation": { + "id": 59706, + "nodeType": "StructuredDocumentation", + "src": "2236:49:84", + "text": "@dev Mapping from name => domain price in USD" + }, + "mutability": "mutable", + "name": "_dp", + "nameLocation": "2350:3:84", + "scope": 60775, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_TimestampWrapper_$66547_storage_$", + "typeString": "mapping(bytes32 => struct TimestampWrapper)" + }, + "typeName": { + "id": 59710, + "keyName": "lbHash", + "keyNameLocation": "2304:6:84", + "keyType": { + "id": 59707, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2296:7:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2288:52:84", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_TimestampWrapper_$66547_storage_$", + "typeString": "mapping(bytes32 => struct TimestampWrapper)" + }, + "valueName": "usdPrice", + "valueNameLocation": "2331:8:84", + "valueType": { + "id": 59709, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 59708, + "name": "TimestampWrapper", + "nameLocations": [ + "2314:16:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 66547, + "src": "2314:16:84" + }, + "referencedDeclaration": 66547, + "src": "2314:16:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_TimestampWrapper_$66547_storage_ptr", + "typeString": "struct TimestampWrapper" + } + } + }, + "visibility": "internal" + }, + { + "id": 59716, + "nodeType": "VariableDeclaration", + "src": "2432:69:84", + "nodes": [], + "constant": false, + "documentation": { + "id": 59712, + "nodeType": "StructuredDocumentation", + "src": "2357:72:84", + "text": "@dev Mapping from name => inverse bitwise of renewal fee overriding." + }, + "mutability": "mutable", + "name": "_rnFeeOverriding", + "nameLocation": "2485:16:84", + "scope": 60775, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + }, + "typeName": { + "id": 59715, + "keyName": "lbHash", + "keyNameLocation": "2448:6:84", + "keyType": { + "id": 59713, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2440:7:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2432:43:84", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + }, + "valueName": "usdPrice", + "valueNameLocation": "2466:8:84", + "valueType": { + "id": 59714, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2458:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + }, + { + "id": 59723, + "nodeType": "FunctionDefinition", + "src": "2506:55:84", + "nodes": [], + "body": { + "id": 59722, + "nodeType": "Block", + "src": "2528:33:84", + "nodes": [], + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 59719, + "name": "_disableInitializers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 49845, + "src": "2534:20:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 59720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2534:22:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59721, + "nodeType": "ExpressionStatement", + "src": "2534:22:84" + } + ] + }, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "parameters": { + "id": 59717, + "nodeType": "ParameterList", + "parameters": [], + "src": "2517:2:84" + }, + "returnParameters": { + "id": 59718, + "nodeType": "ParameterList", + "parameters": [], + "src": "2528:0:84" + }, + "scope": 60775, + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "id": 59808, + "nodeType": "FunctionDefinition", + "src": "2565:776:84", + "nodes": [], + "body": { + "id": 59807, + "nodeType": "Block", + "src": "2871:470:84", + "nodes": [], + "statements": [ + { + "assignments": [ + 59753 + ], + "declarations": [ + { + "constant": false, + "id": 59753, + "mutability": "mutable", + "name": "length", + "nameLocation": "2885:6:84", + "nodeType": "VariableDeclaration", + "scope": 59807, + "src": "2877:14:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59752, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2877:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 59756, + "initialValue": { + "expression": { + "id": 59754, + "name": "operators", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59728, + "src": "2894:9:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 59755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2904:6:84", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2894:16:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2877:33:84" + }, + { + "assignments": [ + 59758 + ], + "declarations": [ + { + "constant": false, + "id": 59758, + "mutability": "mutable", + "name": "operatorRole", + "nameLocation": "2924:12:84", + "nodeType": "VariableDeclaration", + "scope": 59807, + "src": "2916:20:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 59757, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2916:7:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 59760, + "initialValue": { + "id": 59759, + "name": "OPERATOR_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59671, + "src": "2939:13:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2916:36:84" + }, + { + "body": { + "id": 59778, + "nodeType": "Block", + "src": "2988:93:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 59768, + "name": "operatorRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59758, + "src": "3007:12:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "baseExpression": { + "id": 59769, + "name": "operators", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59728, + "src": "3021:9:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 59771, + "indexExpression": { + "id": 59770, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59762, + "src": "3031:1:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3021:12:84", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 59767, + "name": "_setupRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48374, + "src": "2996:10:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 59772, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2996:38:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59773, + "nodeType": "ExpressionStatement", + "src": "2996:38:84" + }, + { + "id": 59777, + "nodeType": "UncheckedBlock", + "src": "3043:32:84", + "statements": [ + { + "expression": { + "id": 59775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "3063:3:84", + "subExpression": { + "id": 59774, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59762, + "src": "3065:1:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 59776, + "nodeType": "ExpressionStatement", + "src": "3063:3:84" + } + ] + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 59766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 59764, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59762, + "src": "2975:1:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 59765, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59753, + "src": "2979:6:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2975:10:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 59779, + "initializationExpression": { + "assignments": [ + 59762 + ], + "declarations": [ + { + "constant": false, + "id": 59762, + "mutability": "mutable", + "name": "i", + "nameLocation": "2972:1:84", + "nodeType": "VariableDeclaration", + "scope": 59779, + "src": "2964:9:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59761, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2964:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 59763, + "nodeType": "VariableDeclarationStatement", + "src": "2964:9:84" + }, + "nodeType": "ForStatement", + "src": "2959:122:84" + }, + { + "expression": { + "id": 59782, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 59780, + "name": "_auction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59684, + "src": "3086:8:84", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSAuction_$64365", + "typeString": "contract INSAuction" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 59781, + "name": "auction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59743, + "src": "3097:7:84", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSAuction_$64365", + "typeString": "contract INSAuction" + } + }, + "src": "3086:18:84", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSAuction_$64365", + "typeString": "contract INSAuction" + } + }, + "id": 59783, + "nodeType": "ExpressionStatement", + "src": "3086:18:84" + }, + { + "expression": { + "arguments": [ + { + "id": 59785, + "name": "DEFAULT_ADMIN_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48178, + "src": "3121:18:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 59786, + "name": "admin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59725, + "src": "3141:5:84", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 59784, + "name": "_setupRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48374, + "src": "3110:10:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 59787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3110:37:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59788, + "nodeType": "ExpressionStatement", + "src": "3110:37:84" + }, + { + "expression": { + "arguments": [ + { + "id": 59790, + "name": "renewalFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59732, + "src": "3177:11:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_RenewalFee_$64382_calldata_ptr_$dyn_calldata_ptr", + "typeString": "struct INSDomainPrice.RenewalFee calldata[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_struct$_RenewalFee_$64382_calldata_ptr_$dyn_calldata_ptr", + "typeString": "struct INSDomainPrice.RenewalFee calldata[] calldata" + } + ], + "id": 59789, + "name": "_setRenewalFeeByLengths", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60700, + "src": "3153:23:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_struct$_RenewalFee_$64382_calldata_ptr_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (struct INSDomainPrice.RenewalFee calldata[] calldata)" + } + }, + "id": 59791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3153:36:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59792, + "nodeType": "ExpressionStatement", + "src": "3153:36:84" + }, + { + "expression": { + "arguments": [ + { + "id": 59794, + "name": "taxRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59734, + "src": "3208:8:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 59793, + "name": "_setTaxRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60595, + "src": "3195:12:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 59795, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3195:22:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59796, + "nodeType": "ExpressionStatement", + "src": "3195:22:84" + }, + { + "expression": { + "arguments": [ + { + "id": 59798, + "name": "domainPriceScaleRule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59737, + "src": "3248:20:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_PeriodScaler_$66624_calldata_ptr", + "typeString": "struct PeriodScaler calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_PeriodScaler_$66624_calldata_ptr", + "typeString": "struct PeriodScaler calldata" + } + ], + "id": 59797, + "name": "_setDomainPriceScaleRule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60616, + "src": "3223:24:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_PeriodScaler_$66624_calldata_ptr_$returns$__$", + "typeString": "function (struct PeriodScaler calldata)" + } + }, + "id": 59799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3223:46:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59800, + "nodeType": "ExpressionStatement", + "src": "3223:46:84" + }, + { + "expression": { + "arguments": [ + { + "id": 59802, + "name": "pyth", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59740, + "src": "3296:4:84", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPyth_$54460", + "typeString": "contract IPyth" + } + }, + { + "id": 59803, + "name": "maxAcceptableAge", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59745, + "src": "3302:16:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 59804, + "name": "pythIdForRONUSD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59747, + "src": "3320:15:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IPyth_$54460", + "typeString": "contract IPyth" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 59801, + "name": "_setPythOracleConfig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60732, + "src": "3275:20:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IPyth_$54460_$_t_uint256_$_t_bytes32_$returns$__$", + "typeString": "function (contract IPyth,uint256,bytes32)" + } + }, + "id": 59805, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3275:61:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59806, + "nodeType": "ExpressionStatement", + "src": "3275:61:84" + } + ] + }, + "functionSelector": "d40ed58c", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 59750, + "kind": "modifierInvocation", + "modifierName": { + "id": 59749, + "name": "initializer", + "nameLocations": [ + "2859:11:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 49766, + "src": "2859:11:84" + }, + "nodeType": "ModifierInvocation", + "src": "2859:11:84" + } + ], + "name": "initialize", + "nameLocation": "2574:10:84", + "parameters": { + "id": 59748, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 59725, + "mutability": "mutable", + "name": "admin", + "nameLocation": "2598:5:84", + "nodeType": "VariableDeclaration", + "scope": 59808, + "src": "2590:13:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 59724, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2590:7:84", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 59728, + "mutability": "mutable", + "name": "operators", + "nameLocation": "2628:9:84", + "nodeType": "VariableDeclaration", + "scope": 59808, + "src": "2609:28:84", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 59726, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2609:7:84", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 59727, + "nodeType": "ArrayTypeName", + "src": "2609:9:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 59732, + "mutability": "mutable", + "name": "renewalFees", + "nameLocation": "2665:11:84", + "nodeType": "VariableDeclaration", + "scope": 59808, + "src": "2643:33:84", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_RenewalFee_$64382_calldata_ptr_$dyn_calldata_ptr", + "typeString": "struct INSDomainPrice.RenewalFee[]" + }, + "typeName": { + "baseType": { + "id": 59730, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 59729, + "name": "RenewalFee", + "nameLocations": [ + "2643:10:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 64382, + "src": "2643:10:84" + }, + "referencedDeclaration": 64382, + "src": "2643:10:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RenewalFee_$64382_storage_ptr", + "typeString": "struct INSDomainPrice.RenewalFee" + } + }, + "id": 59731, + "nodeType": "ArrayTypeName", + "src": "2643:12:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_RenewalFee_$64382_storage_$dyn_storage_ptr", + "typeString": "struct INSDomainPrice.RenewalFee[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 59734, + "mutability": "mutable", + "name": "taxRatio", + "nameLocation": "2690:8:84", + "nodeType": "VariableDeclaration", + "scope": 59808, + "src": "2682:16:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59733, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2682:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 59737, + "mutability": "mutable", + "name": "domainPriceScaleRule", + "nameLocation": "2726:20:84", + "nodeType": "VariableDeclaration", + "scope": 59808, + "src": "2704:42:84", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_struct$_PeriodScaler_$66624_calldata_ptr", + "typeString": "struct PeriodScaler" + }, + "typeName": { + "id": 59736, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 59735, + "name": "PeriodScaler", + "nameLocations": [ + "2704:12:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 66624, + "src": "2704:12:84" + }, + "referencedDeclaration": 66624, + "src": "2704:12:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_PeriodScaler_$66624_storage_ptr", + "typeString": "struct PeriodScaler" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 59740, + "mutability": "mutable", + "name": "pyth", + "nameLocation": "2758:4:84", + "nodeType": "VariableDeclaration", + "scope": 59808, + "src": "2752:10:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPyth_$54460", + "typeString": "contract IPyth" + }, + "typeName": { + "id": 59739, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 59738, + "name": "IPyth", + "nameLocations": [ + "2752:5:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 54460, + "src": "2752:5:84" + }, + "referencedDeclaration": 54460, + "src": "2752:5:84", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPyth_$54460", + "typeString": "contract IPyth" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 59743, + "mutability": "mutable", + "name": "auction", + "nameLocation": "2779:7:84", + "nodeType": "VariableDeclaration", + "scope": 59808, + "src": "2768:18:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSAuction_$64365", + "typeString": "contract INSAuction" + }, + "typeName": { + "id": 59742, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 59741, + "name": "INSAuction", + "nameLocations": [ + "2768:10:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 64365, + "src": "2768:10:84" + }, + "referencedDeclaration": 64365, + "src": "2768:10:84", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSAuction_$64365", + "typeString": "contract INSAuction" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 59745, + "mutability": "mutable", + "name": "maxAcceptableAge", + "nameLocation": "2800:16:84", + "nodeType": "VariableDeclaration", + "scope": 59808, + "src": "2792:24:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59744, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2792:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 59747, + "mutability": "mutable", + "name": "pythIdForRONUSD", + "nameLocation": "2830:15:84", + "nodeType": "VariableDeclaration", + "scope": 59808, + "src": "2822:23:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 59746, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2822:7:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2584:265:84" + }, + "returnParameters": { + "id": 59751, + "nodeType": "ParameterList", + "parameters": [], + "src": "2871:0:84" + }, + "scope": 60775, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 59825, + "nodeType": "FunctionDefinition", + "src": "3389:179:84", + "nodes": [], + "body": { + "id": 59824, + "nodeType": "Block", + "src": "3506:62:84", + "nodes": [], + "statements": [ + { + "expression": { + "components": [ + { + "id": 59819, + "name": "_pyth", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59680, + "src": "3520:5:84", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPyth_$54460", + "typeString": "contract IPyth" + } + }, + { + "id": 59820, + "name": "_maxAcceptableAge", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59693, + "src": "3527:17:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 59821, + "name": "_pythIdForRONUSD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59696, + "src": "3546:16:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 59822, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "3519:44:84", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_contract$_IPyth_$54460_$_t_uint256_$_t_bytes32_$", + "typeString": "tuple(contract IPyth,uint256,bytes32)" + } + }, + "functionReturnParameters": 59818, + "id": 59823, + "nodeType": "Return", + "src": "3512:51:84" + } + ] + }, + "baseFunctions": [ + 64464 + ], + "documentation": { + "id": 59809, + "nodeType": "StructuredDocumentation", + "src": "3345:41:84", + "text": " @inheritdoc INSDomainPrice" + }, + "functionSelector": "2be09ecc", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPythOracleConfig", + "nameLocation": "3398:19:84", + "parameters": { + "id": 59810, + "nodeType": "ParameterList", + "parameters": [], + "src": "3417:2:84" + }, + "returnParameters": { + "id": 59818, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 59813, + "mutability": "mutable", + "name": "pyth", + "nameLocation": "3449:4:84", + "nodeType": "VariableDeclaration", + "scope": 59825, + "src": "3443:10:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPyth_$54460", + "typeString": "contract IPyth" + }, + "typeName": { + "id": 59812, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 59811, + "name": "IPyth", + "nameLocations": [ + "3443:5:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 54460, + "src": "3443:5:84" + }, + "referencedDeclaration": 54460, + "src": "3443:5:84", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPyth_$54460", + "typeString": "contract IPyth" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 59815, + "mutability": "mutable", + "name": "maxAcceptableAge", + "nameLocation": "3463:16:84", + "nodeType": "VariableDeclaration", + "scope": 59825, + "src": "3455:24:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59814, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3455:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 59817, + "mutability": "mutable", + "name": "pythIdForRONUSD", + "nameLocation": "3489:15:84", + "nodeType": "VariableDeclaration", + "scope": 59825, + "src": "3481:23:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 59816, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3481:7:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3442:63:84" + }, + "scope": 60775, + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "id": 59846, + "nodeType": "FunctionDefinition", + "src": "3616:212:84", + "nodes": [], + "body": { + "id": 59845, + "nodeType": "Block", + "src": "3756:72:84", + "nodes": [], + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 59840, + "name": "pyth", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59829, + "src": "3783:4:84", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPyth_$54460", + "typeString": "contract IPyth" + } + }, + { + "id": 59841, + "name": "maxAcceptableAge", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59831, + "src": "3789:16:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 59842, + "name": "pythIdForRONUSD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59833, + "src": "3807:15:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IPyth_$54460", + "typeString": "contract IPyth" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 59839, + "name": "_setPythOracleConfig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60732, + "src": "3762:20:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IPyth_$54460_$_t_uint256_$_t_bytes32_$returns$__$", + "typeString": "function (contract IPyth,uint256,bytes32)" + } + }, + "id": 59843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3762:61:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59844, + "nodeType": "ExpressionStatement", + "src": "3762:61:84" + } + ] + }, + "baseFunctions": [ + 64475 + ], + "documentation": { + "id": 59826, + "nodeType": "StructuredDocumentation", + "src": "3572:41:84", + "text": " @inheritdoc INSDomainPrice" + }, + "functionSelector": "28dd3065", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "id": 59836, + "name": "DEFAULT_ADMIN_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48178, + "src": "3734:18:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 59837, + "kind": "modifierInvocation", + "modifierName": { + "id": 59835, + "name": "onlyRole", + "nameLocations": [ + "3725:8:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 48189, + "src": "3725:8:84" + }, + "nodeType": "ModifierInvocation", + "src": "3725:28:84" + } + ], + "name": "setPythOracleConfig", + "nameLocation": "3625:19:84", + "parameters": { + "id": 59834, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 59829, + "mutability": "mutable", + "name": "pyth", + "nameLocation": "3651:4:84", + "nodeType": "VariableDeclaration", + "scope": 59846, + "src": "3645:10:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPyth_$54460", + "typeString": "contract IPyth" + }, + "typeName": { + "id": 59828, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 59827, + "name": "IPyth", + "nameLocations": [ + "3645:5:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 54460, + "src": "3645:5:84" + }, + "referencedDeclaration": 54460, + "src": "3645:5:84", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPyth_$54460", + "typeString": "contract IPyth" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 59831, + "mutability": "mutable", + "name": "maxAcceptableAge", + "nameLocation": "3665:16:84", + "nodeType": "VariableDeclaration", + "scope": 59846, + "src": "3657:24:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59830, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3657:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 59833, + "mutability": "mutable", + "name": "pythIdForRONUSD", + "nameLocation": "3691:15:84", + "nodeType": "VariableDeclaration", + "scope": 59846, + "src": "3683:23:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 59832, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3683:7:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3644:63:84" + }, + "returnParameters": { + "id": 59838, + "nodeType": "ParameterList", + "parameters": [], + "src": "3756:0:84" + }, + "scope": 60775, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 59905, + "nodeType": "FunctionDefinition", + "src": "3876:396:84", + "nodes": [], + "body": { + "id": 59904, + "nodeType": "Block", + "src": "3966:306:84", + "nodes": [], + "statements": [ + { + "assignments": [ + 59855 + ], + "declarations": [ + { + "constant": false, + "id": 59855, + "mutability": "mutable", + "name": "rnfMaxLength", + "nameLocation": "3980:12:84", + "nodeType": "VariableDeclaration", + "scope": 59904, + "src": "3972:20:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59854, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3972:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 59857, + "initialValue": { + "id": 59856, + "name": "_rnfMaxLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59690, + "src": "3995:13:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3972:36:84" + }, + { + "expression": { + "id": 59865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 59858, + "name": "renewalFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59852, + "src": "4014:11:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_RenewalFee_$64382_memory_ptr_$dyn_memory_ptr", + "typeString": "struct INSDomainPrice.RenewalFee memory[] memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 59863, + "name": "rnfMaxLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59855, + "src": "4045:12:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 59862, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "4028:16:84", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_struct$_RenewalFee_$64382_memory_ptr_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (struct INSDomainPrice.RenewalFee memory[] memory)" + }, + "typeName": { + "baseType": { + "id": 59860, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 59859, + "name": "RenewalFee", + "nameLocations": [ + "4032:10:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 64382, + "src": "4032:10:84" + }, + "referencedDeclaration": 64382, + "src": "4032:10:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RenewalFee_$64382_storage_ptr", + "typeString": "struct INSDomainPrice.RenewalFee" + } + }, + "id": 59861, + "nodeType": "ArrayTypeName", + "src": "4032:12:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_RenewalFee_$64382_storage_$dyn_storage_ptr", + "typeString": "struct INSDomainPrice.RenewalFee[]" + } + } + }, + "id": 59864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4028:30:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_RenewalFee_$64382_memory_ptr_$dyn_memory_ptr", + "typeString": "struct INSDomainPrice.RenewalFee memory[] memory" + } + }, + "src": "4014:44:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_RenewalFee_$64382_memory_ptr_$dyn_memory_ptr", + "typeString": "struct INSDomainPrice.RenewalFee memory[] memory" + } + }, + "id": 59866, + "nodeType": "ExpressionStatement", + "src": "4014:44:84" + }, + { + "assignments": [ + 59868 + ], + "declarations": [ + { + "constant": false, + "id": 59868, + "mutability": "mutable", + "name": "len", + "nameLocation": "4072:3:84", + "nodeType": "VariableDeclaration", + "scope": 59904, + "src": "4064:11:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59867, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4064:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 59869, + "nodeType": "VariableDeclarationStatement", + "src": "4064:11:84" + }, + { + "body": { + "id": 59902, + "nodeType": "Block", + "src": "4117:151:84", + "statements": [ + { + "id": 59901, + "nodeType": "UncheckedBlock", + "src": "4125:137:84", + "statements": [ + { + "expression": { + "id": 59880, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 59876, + "name": "len", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59868, + "src": "4145:3:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 59879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 59877, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59871, + "src": "4151:1:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "31", + "id": 59878, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4155:1:84", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "4151:5:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4145:11:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 59881, + "nodeType": "ExpressionStatement", + "src": "4145:11:84" + }, + { + "expression": { + "id": 59887, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 59882, + "name": "renewalFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59852, + "src": "4166:11:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_RenewalFee_$64382_memory_ptr_$dyn_memory_ptr", + "typeString": "struct INSDomainPrice.RenewalFee memory[] memory" + } + }, + "id": 59884, + "indexExpression": { + "id": 59883, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59871, + "src": "4178:1:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4166:14:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RenewalFee_$64382_memory_ptr", + "typeString": "struct INSDomainPrice.RenewalFee memory" + } + }, + "id": 59885, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "4181:11:84", + "memberName": "labelLength", + "nodeType": "MemberAccess", + "referencedDeclaration": 64379, + "src": "4166:26:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 59886, + "name": "len", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59868, + "src": "4195:3:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4166:32:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 59888, + "nodeType": "ExpressionStatement", + "src": "4166:32:84" + }, + { + "expression": { + "id": 59896, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 59889, + "name": "renewalFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59852, + "src": "4208:11:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_RenewalFee_$64382_memory_ptr_$dyn_memory_ptr", + "typeString": "struct INSDomainPrice.RenewalFee memory[] memory" + } + }, + "id": 59891, + "indexExpression": { + "id": 59890, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59871, + "src": "4220:1:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4208:14:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RenewalFee_$64382_memory_ptr", + "typeString": "struct INSDomainPrice.RenewalFee memory" + } + }, + "id": 59892, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "4223:3:84", + "memberName": "fee", + "nodeType": "MemberAccess", + "referencedDeclaration": 64381, + "src": "4208:18:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "baseExpression": { + "id": 59893, + "name": "_rnFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59705, + "src": "4229:6:84", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 59895, + "indexExpression": { + "id": 59894, + "name": "len", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59868, + "src": "4236:3:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4229:11:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4208:32:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 59897, + "nodeType": "ExpressionStatement", + "src": "4208:32:84" + }, + { + "expression": { + "id": 59899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "4250:3:84", + "subExpression": { + "id": 59898, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59871, + "src": "4252:1:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 59900, + "nodeType": "ExpressionStatement", + "src": "4250:3:84" + } + ] + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 59875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 59873, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59871, + "src": "4098:1:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 59874, + "name": "rnfMaxLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59855, + "src": "4102:12:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4098:16:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 59903, + "initializationExpression": { + "assignments": [ + 59871 + ], + "declarations": [ + { + "constant": false, + "id": 59871, + "mutability": "mutable", + "name": "i", + "nameLocation": "4095:1:84", + "nodeType": "VariableDeclaration", + "scope": 59903, + "src": "4087:9:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59870, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4087:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 59872, + "nodeType": "VariableDeclarationStatement", + "src": "4087:9:84" + }, + "nodeType": "ForStatement", + "src": "4082:186:84" + } + ] + }, + "baseFunctions": [ + 64497 + ], + "documentation": { + "id": 59847, + "nodeType": "StructuredDocumentation", + "src": "3832:41:84", + "text": " @inheritdoc INSDomainPrice" + }, + "functionSelector": "0a44f51f", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getRenewalFeeByLengths", + "nameLocation": "3885:22:84", + "parameters": { + "id": 59848, + "nodeType": "ParameterList", + "parameters": [], + "src": "3907:2:84" + }, + "returnParameters": { + "id": 59853, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 59852, + "mutability": "mutable", + "name": "renewalFees", + "nameLocation": "3953:11:84", + "nodeType": "VariableDeclaration", + "scope": 59905, + "src": "3933:31:84", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_RenewalFee_$64382_memory_ptr_$dyn_memory_ptr", + "typeString": "struct INSDomainPrice.RenewalFee[]" + }, + "typeName": { + "baseType": { + "id": 59850, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 59849, + "name": "RenewalFee", + "nameLocations": [ + "3933:10:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 64382, + "src": "3933:10:84" + }, + "referencedDeclaration": 64382, + "src": "3933:10:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RenewalFee_$64382_storage_ptr", + "typeString": "struct INSDomainPrice.RenewalFee" + } + }, + "id": 59851, + "nodeType": "ArrayTypeName", + "src": "3933:12:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_RenewalFee_$64382_storage_$dyn_storage_ptr", + "typeString": "struct INSDomainPrice.RenewalFee[]" + } + }, + "visibility": "internal" + } + ], + "src": "3932:33:84" + }, + "scope": 60775, + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "id": 59921, + "nodeType": "FunctionDefinition", + "src": "4320:152:84", + "nodes": [], + "body": { + "id": 59920, + "nodeType": "Block", + "src": "4425:47:84", + "nodes": [], + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 59917, + "name": "renewalFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59910, + "src": "4455:11:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_RenewalFee_$64382_calldata_ptr_$dyn_calldata_ptr", + "typeString": "struct INSDomainPrice.RenewalFee calldata[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_struct$_RenewalFee_$64382_calldata_ptr_$dyn_calldata_ptr", + "typeString": "struct INSDomainPrice.RenewalFee calldata[] calldata" + } + ], + "id": 59916, + "name": "_setRenewalFeeByLengths", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60700, + "src": "4431:23:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_struct$_RenewalFee_$64382_calldata_ptr_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (struct INSDomainPrice.RenewalFee calldata[] calldata)" + } + }, + "id": 59918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4431:36:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59919, + "nodeType": "ExpressionStatement", + "src": "4431:36:84" + } + ] + }, + "baseFunctions": [ + 64505 + ], + "documentation": { + "id": 59906, + "nodeType": "StructuredDocumentation", + "src": "4276:41:84", + "text": " @inheritdoc INSDomainPrice" + }, + "functionSelector": "35feb741", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "id": 59913, + "name": "DEFAULT_ADMIN_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48178, + "src": "4405:18:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 59914, + "kind": "modifierInvocation", + "modifierName": { + "id": 59912, + "name": "onlyRole", + "nameLocations": [ + "4396:8:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 48189, + "src": "4396:8:84" + }, + "nodeType": "ModifierInvocation", + "src": "4396:28:84" + } + ], + "name": "setRenewalFeeByLengths", + "nameLocation": "4329:22:84", + "parameters": { + "id": 59911, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 59910, + "mutability": "mutable", + "name": "renewalFees", + "nameLocation": "4374:11:84", + "nodeType": "VariableDeclaration", + "scope": 59921, + "src": "4352:33:84", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_RenewalFee_$64382_calldata_ptr_$dyn_calldata_ptr", + "typeString": "struct INSDomainPrice.RenewalFee[]" + }, + "typeName": { + "baseType": { + "id": 59908, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 59907, + "name": "RenewalFee", + "nameLocations": [ + "4352:10:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 64382, + "src": "4352:10:84" + }, + "referencedDeclaration": 64382, + "src": "4352:10:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RenewalFee_$64382_storage_ptr", + "typeString": "struct INSDomainPrice.RenewalFee" + } + }, + "id": 59909, + "nodeType": "ArrayTypeName", + "src": "4352:12:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_RenewalFee_$64382_storage_$dyn_storage_ptr", + "typeString": "struct INSDomainPrice.RenewalFee[]" + } + }, + "visibility": "internal" + } + ], + "src": "4351:35:84" + }, + "returnParameters": { + "id": 59915, + "nodeType": "ParameterList", + "parameters": [], + "src": "4425:0:84" + }, + "scope": 60775, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 59930, + "nodeType": "FunctionDefinition", + "src": "4520:88:84", + "nodes": [], + "body": { + "id": 59929, + "nodeType": "Block", + "src": "4581:27:84", + "nodes": [], + "statements": [ + { + "expression": { + "id": 59927, + "name": "_taxRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59687, + "src": "4594:9:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 59926, + "id": 59928, + "nodeType": "Return", + "src": "4587:16:84" + } + ] + }, + "baseFunctions": [ + 64511 + ], + "documentation": { + "id": 59922, + "nodeType": "StructuredDocumentation", + "src": "4476:41:84", + "text": " @inheritdoc INSDomainPrice" + }, + "functionSelector": "5ef32e2c", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getTaxRatio", + "nameLocation": "4529:11:84", + "parameters": { + "id": 59923, + "nodeType": "ParameterList", + "parameters": [], + "src": "4540:2:84" + }, + "returnParameters": { + "id": 59926, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 59925, + "mutability": "mutable", + "name": "ratio", + "nameLocation": "4574:5:84", + "nodeType": "VariableDeclaration", + "scope": 59930, + "src": "4566:13:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59924, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4566:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4565:15:84" + }, + "scope": 60775, + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "id": 59944, + "nodeType": "FunctionDefinition", + "src": "4656:104:84", + "nodes": [], + "body": { + "id": 59943, + "nodeType": "Block", + "src": "4730:30:84", + "nodes": [], + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 59940, + "name": "ratio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59933, + "src": "4749:5:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 59939, + "name": "_setTaxRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60595, + "src": "4736:12:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 59941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4736:19:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59942, + "nodeType": "ExpressionStatement", + "src": "4736:19:84" + } + ] + }, + "baseFunctions": [ + 64517 + ], + "documentation": { + "id": 59931, + "nodeType": "StructuredDocumentation", + "src": "4612:41:84", + "text": " @inheritdoc INSDomainPrice" + }, + "functionSelector": "fe303ebf", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "id": 59936, + "name": "DEFAULT_ADMIN_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48178, + "src": "4710:18:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 59937, + "kind": "modifierInvocation", + "modifierName": { + "id": 59935, + "name": "onlyRole", + "nameLocations": [ + "4701:8:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 48189, + "src": "4701:8:84" + }, + "nodeType": "ModifierInvocation", + "src": "4701:28:84" + } + ], + "name": "setTaxRatio", + "nameLocation": "4665:11:84", + "parameters": { + "id": 59934, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 59933, + "mutability": "mutable", + "name": "ratio", + "nameLocation": "4685:5:84", + "nodeType": "VariableDeclaration", + "scope": 59944, + "src": "4677:13:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59932, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4677:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4676:15:84" + }, + "returnParameters": { + "id": 59938, + "nodeType": "ParameterList", + "parameters": [], + "src": "4730:0:84" + }, + "scope": 60775, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 59954, + "nodeType": "FunctionDefinition", + "src": "4808:127:84", + "nodes": [], + "body": { + "id": 59953, + "nodeType": "Block", + "src": "4904:31:84", + "nodes": [], + "statements": [ + { + "expression": { + "id": 59951, + "name": "_dpDownScaler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59700, + "src": "4917:13:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_PeriodScaler_$66624_storage", + "typeString": "struct PeriodScaler storage ref" + } + }, + "functionReturnParameters": 59950, + "id": 59952, + "nodeType": "Return", + "src": "4910:20:84" + } + ] + }, + "baseFunctions": [ + 64482 + ], + "documentation": { + "id": 59945, + "nodeType": "StructuredDocumentation", + "src": "4764:41:84", + "text": " @inheritdoc INSDomainPrice" + }, + "functionSelector": "39e47da7", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getScaleDownRuleForDomainPrice", + "nameLocation": "4817:30:84", + "parameters": { + "id": 59946, + "nodeType": "ParameterList", + "parameters": [], + "src": "4847:2:84" + }, + "returnParameters": { + "id": 59950, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 59949, + "mutability": "mutable", + "name": "scaleRule", + "nameLocation": "4893:9:84", + "nodeType": "VariableDeclaration", + "scope": 59954, + "src": "4873:29:84", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_PeriodScaler_$66624_memory_ptr", + "typeString": "struct PeriodScaler" + }, + "typeName": { + "id": 59948, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 59947, + "name": "PeriodScaler", + "nameLocations": [ + "4873:12:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 66624, + "src": "4873:12:84" + }, + "referencedDeclaration": 66624, + "src": "4873:12:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_PeriodScaler_$66624_storage_ptr", + "typeString": "struct PeriodScaler" + } + }, + "visibility": "internal" + } + ], + "src": "4872:31:84" + }, + "scope": 60775, + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "id": 59969, + "nodeType": "FunctionDefinition", + "src": "4983:157:84", + "nodes": [], + "body": { + "id": 59968, + "nodeType": "Block", + "src": "5094:46:84", + "nodes": [], + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 59965, + "name": "scaleRule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59958, + "src": "5125:9:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_PeriodScaler_$66624_calldata_ptr", + "typeString": "struct PeriodScaler calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_PeriodScaler_$66624_calldata_ptr", + "typeString": "struct PeriodScaler calldata" + } + ], + "id": 59964, + "name": "_setDomainPriceScaleRule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60616, + "src": "5100:24:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_PeriodScaler_$66624_calldata_ptr_$returns$__$", + "typeString": "function (struct PeriodScaler calldata)" + } + }, + "id": 59966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5100:35:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59967, + "nodeType": "ExpressionStatement", + "src": "5100:35:84" + } + ] + }, + "baseFunctions": [ + 64489 + ], + "documentation": { + "id": 59955, + "nodeType": "StructuredDocumentation", + "src": "4939:41:84", + "text": " @inheritdoc INSDomainPrice" + }, + "functionSelector": "e229a670", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "id": 59961, + "name": "DEFAULT_ADMIN_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48178, + "src": "5074:18:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 59962, + "kind": "modifierInvocation", + "modifierName": { + "id": 59960, + "name": "onlyRole", + "nameLocations": [ + "5065:8:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 48189, + "src": "5065:8:84" + }, + "nodeType": "ModifierInvocation", + "src": "5065:28:84" + } + ], + "name": "setScaleDownRuleForDomainPrice", + "nameLocation": "4992:30:84", + "parameters": { + "id": 59959, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 59958, + "mutability": "mutable", + "name": "scaleRule", + "nameLocation": "5045:9:84", + "nodeType": "VariableDeclaration", + "scope": 59969, + "src": "5023:31:84", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_struct$_PeriodScaler_$66624_calldata_ptr", + "typeString": "struct PeriodScaler" + }, + "typeName": { + "id": 59957, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 59956, + "name": "PeriodScaler", + "nameLocations": [ + "5023:12:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 66624, + "src": "5023:12:84" + }, + "referencedDeclaration": 66624, + "src": "5023:12:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_PeriodScaler_$66624_storage_ptr", + "typeString": "struct PeriodScaler" + } + }, + "visibility": "internal" + } + ], + "src": "5022:33:84" + }, + "returnParameters": { + "id": 59963, + "nodeType": "ParameterList", + "parameters": [], + "src": "5094:0:84" + }, + "scope": 60775, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 59996, + "nodeType": "FunctionDefinition", + "src": "5188:226:84", + "nodes": [], + "body": { + "id": 59995, + "nodeType": "Block", + "src": "5283:131:84", + "nodes": [], + "statements": [ + { + "expression": { + "id": 59983, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 59977, + "name": "usdFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59975, + "src": "5289:6:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "baseExpression": { + "id": 59978, + "name": "_rnFeeOverriding", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59716, + "src": "5298:16:84", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 59982, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 59979, + "name": "label", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59972, + "src": "5315:5:84", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "id": 59980, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5321:9:84", + "memberName": "hashLabel", + "nodeType": "MemberAccess", + "referencedDeclaration": 66058, + "src": "5315:15:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_bytes32_$attached_to$_t_string_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes32)" + } + }, + "id": 59981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5315:17:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5298:35:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5289:44:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 59984, + "nodeType": "ExpressionStatement", + "src": "5289:44:84" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 59987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 59985, + "name": "usdFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59975, + "src": "5343:6:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 59986, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5353:1:84", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5343:11:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 59991, + "nodeType": "IfStatement", + "src": "5339:50:84", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 59988, + "name": "RenewalFeeIsNotOverriden", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64375, + "src": "5363:24:84", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 59989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5363:26:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59990, + "nodeType": "RevertStatement", + "src": "5356:33:84" + } + }, + { + "expression": { + "id": 59993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "~", + "prefix": true, + "src": "5402:7:84", + "subExpression": { + "id": 59992, + "name": "usdFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59975, + "src": "5403:6:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 59976, + "id": 59994, + "nodeType": "Return", + "src": "5395:14:84" + } + ] + }, + "baseFunctions": [ + 64549 + ], + "documentation": { + "id": 59970, + "nodeType": "StructuredDocumentation", + "src": "5144:41:84", + "text": " @inheritdoc INSDomainPrice" + }, + "functionSelector": "5c68c830", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getOverriddenRenewalFee", + "nameLocation": "5197:23:84", + "parameters": { + "id": 59973, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 59972, + "mutability": "mutable", + "name": "label", + "nameLocation": "5237:5:84", + "nodeType": "VariableDeclaration", + "scope": 59996, + "src": "5221:21:84", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 59971, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5221:6:84", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "5220:23:84" + }, + "returnParameters": { + "id": 59976, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 59975, + "mutability": "mutable", + "name": "usdFee", + "nameLocation": "5275:6:84", + "nodeType": "VariableDeclaration", + "scope": 59996, + "src": "5267:14:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59974, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5267:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5266:16:84" + }, + "scope": 60775, + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "id": 60070, + "nodeType": "FunctionDefinition", + "src": "5462:576:84", + "nodes": [], + "body": { + "id": 60069, + "nodeType": "Block", + "src": "5597:441:84", + "nodes": [], + "statements": [ + { + "assignments": [ + 60010 + ], + "declarations": [ + { + "constant": false, + "id": 60010, + "mutability": "mutable", + "name": "length", + "nameLocation": "5611:6:84", + "nodeType": "VariableDeclaration", + "scope": 60069, + "src": "5603:14:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60009, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5603:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 60013, + "initialValue": { + "expression": { + "id": 60011, + "name": "lbHashes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60000, + "src": "5620:8:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + }, + "id": 60012, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5629:6:84", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "5620:15:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5603:32:84" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 60021, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 60016, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 60014, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60010, + "src": "5645:6:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 60015, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5655:1:84", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5645:11:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 60020, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 60017, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60010, + "src": "5660:6:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "expression": { + "id": 60018, + "name": "usdPrices", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60003, + "src": "5670:9:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 60019, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5680:6:84", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "5670:16:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5660:26:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5645:41:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 60025, + "nodeType": "IfStatement", + "src": "5641:74:84", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 60022, + "name": "InvalidArrayLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64373, + "src": "5695:18:84", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 60023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5695:20:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 60024, + "nodeType": "RevertStatement", + "src": "5688:27:84" + } + }, + { + "assignments": [ + 60027 + ], + "declarations": [ + { + "constant": false, + "id": 60027, + "mutability": "mutable", + "name": "inverseBitwise", + "nameLocation": "5729:14:84", + "nodeType": "VariableDeclaration", + "scope": 60069, + "src": "5721:22:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60026, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5721:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 60028, + "nodeType": "VariableDeclarationStatement", + "src": "5721:22:84" + }, + { + "assignments": [ + 60030 + ], + "declarations": [ + { + "constant": false, + "id": 60030, + "mutability": "mutable", + "name": "operator", + "nameLocation": "5757:8:84", + "nodeType": "VariableDeclaration", + "scope": 60069, + "src": "5749:16:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 60029, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5749:7:84", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 60033, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 60031, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51922, + "src": "5768:10:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 60032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5768:12:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5749:31:84" + }, + { + "body": { + "id": 60067, + "nodeType": "Block", + "src": "5816:218:84", + "statements": [ + { + "expression": { + "id": 60045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 60040, + "name": "inverseBitwise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60027, + "src": "5824:14:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 60044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "~", + "prefix": true, + "src": "5841:13:84", + "subExpression": { + "baseExpression": { + "id": 60041, + "name": "usdPrices", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60003, + "src": "5842:9:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 60043, + "indexExpression": { + "id": 60042, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60035, + "src": "5852:1:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5842:12:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5824:30:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 60046, + "nodeType": "ExpressionStatement", + "src": "5824:30:84" + }, + { + "expression": { + "id": 60053, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 60047, + "name": "_rnFeeOverriding", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59716, + "src": "5862:16:84", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 60051, + "indexExpression": { + "baseExpression": { + "id": 60048, + "name": "lbHashes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60000, + "src": "5879:8:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + }, + "id": 60050, + "indexExpression": { + "id": 60049, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60035, + "src": "5888:1:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5879:11:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5862:29:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 60052, + "name": "inverseBitwise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60027, + "src": "5894:14:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5862:46:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 60054, + "nodeType": "ExpressionStatement", + "src": "5862:46:84" + }, + { + "eventCall": { + "arguments": [ + { + "id": 60056, + "name": "operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60030, + "src": "5949:8:84", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "baseExpression": { + "id": 60057, + "name": "lbHashes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60000, + "src": "5959:8:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + }, + "id": 60059, + "indexExpression": { + "id": 60058, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60035, + "src": "5968:1:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5959:11:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 60060, + "name": "inverseBitwise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60027, + "src": "5972:14:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 60055, + "name": "RenewalFeeOverridingUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64419, + "src": "5921:27:84", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bytes32_$_t_uint256_$returns$__$", + "typeString": "function (address,bytes32,uint256)" + } + }, + "id": 60061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5921:66:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 60062, + "nodeType": "EmitStatement", + "src": "5916:71:84" + }, + { + "id": 60066, + "nodeType": "UncheckedBlock", + "src": "5996:32:84", + "statements": [ + { + "expression": { + "id": 60064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "6016:3:84", + "subExpression": { + "id": 60063, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60035, + "src": "6018:1:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 60065, + "nodeType": "ExpressionStatement", + "src": "6016:3:84" + } + ] + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 60039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 60037, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60035, + "src": "5803:1:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 60038, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60010, + "src": "5807:6:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5803:10:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 60068, + "initializationExpression": { + "assignments": [ + 60035 + ], + "declarations": [ + { + "constant": false, + "id": 60035, + "mutability": "mutable", + "name": "i", + "nameLocation": "5800:1:84", + "nodeType": "VariableDeclaration", + "scope": 60068, + "src": "5792:9:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60034, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5792:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 60036, + "nodeType": "VariableDeclarationStatement", + "src": "5792:9:84" + }, + "nodeType": "ForStatement", + "src": "5787:247:84" + } + ] + }, + "baseFunctions": [ + 64559 + ], + "documentation": { + "id": 59997, + "nodeType": "StructuredDocumentation", + "src": "5418:41:84", + "text": " @inheritdoc INSDomainPrice" + }, + "functionSelector": "dd28776d", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "id": 60006, + "name": "OPERATOR_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59671, + "src": "5580:13:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 60007, + "kind": "modifierInvocation", + "modifierName": { + "id": 60005, + "name": "onlyRole", + "nameLocations": [ + "5571:8:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 48189, + "src": "5571:8:84" + }, + "nodeType": "ModifierInvocation", + "src": "5571:23:84" + } + ], + "name": "bulkOverrideRenewalFees", + "nameLocation": "5471:23:84", + "parameters": { + "id": 60004, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 60000, + "mutability": "mutable", + "name": "lbHashes", + "nameLocation": "5514:8:84", + "nodeType": "VariableDeclaration", + "scope": 60070, + "src": "5495:27:84", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 59998, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5495:7:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 59999, + "nodeType": "ArrayTypeName", + "src": "5495:9:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 60003, + "mutability": "mutable", + "name": "usdPrices", + "nameLocation": "5543:9:84", + "nodeType": "VariableDeclaration", + "scope": 60070, + "src": "5524:28:84", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 60001, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5524:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 60002, + "nodeType": "ArrayTypeName", + "src": "5524:9:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "5494:59:84" + }, + "returnParameters": { + "id": 60008, + "nodeType": "ParameterList", + "parameters": [], + "src": "5597:0:84" + }, + "scope": 60775, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 60148, + "nodeType": "FunctionDefinition", + "src": "6086:610:84", + "nodes": [], + "body": { + "id": 60147, + "nodeType": "Block", + "src": "6322:374:84", + "nodes": [], + "statements": [ + { + "assignments": [ + 60093 + ], + "declarations": [ + { + "constant": false, + "id": 60093, + "mutability": "mutable", + "name": "length", + "nameLocation": "6336:6:84", + "nodeType": "VariableDeclaration", + "scope": 60147, + "src": "6328:14:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60092, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6328:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 60100, + "initialValue": { + "arguments": [ + { + "id": 60095, + "name": "lbHashes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60074, + "src": "6386:8:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + }, + { + "id": 60096, + "name": "ronPrices", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60077, + "src": "6396:9:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + { + "id": 60097, + "name": "proofHashes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60080, + "src": "6407:11:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + }, + { + "id": 60098, + "name": "setTypes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60083, + "src": "6420:8:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + }, + { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + ], + "id": 60094, + "name": "_requireBulkSetDomainPriceArgumentsValid", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60513, + "src": "6345:40:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_array$_t_bytes32_$dyn_calldata_ptr_$_t_array$_t_uint256_$dyn_calldata_ptr_$_t_array$_t_bytes32_$dyn_calldata_ptr_$_t_array$_t_uint256_$dyn_calldata_ptr_$returns$_t_uint256_$", + "typeString": "function (bytes32[] calldata,uint256[] calldata,bytes32[] calldata,uint256[] calldata) pure returns (uint256)" + } + }, + "id": 60099, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6345:84:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6328:101:84" + }, + { + "assignments": [ + 60102 + ], + "declarations": [ + { + "constant": false, + "id": 60102, + "mutability": "mutable", + "name": "operator", + "nameLocation": "6443:8:84", + "nodeType": "VariableDeclaration", + "scope": 60147, + "src": "6435:16:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 60101, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6435:7:84", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 60105, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 60103, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51922, + "src": "6454:10:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 60104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6454:12:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6435:31:84" + }, + { + "expression": { + "id": 60112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 60106, + "name": "updated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60090, + "src": "6472:7:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$dyn_memory_ptr", + "typeString": "bool[] memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 60110, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60093, + "src": "6493:6:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 60109, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "6482:10:84", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_bool_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (bool[] memory)" + }, + "typeName": { + "baseType": { + "id": 60107, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6486:4:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 60108, + "nodeType": "ArrayTypeName", + "src": "6486:6:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$dyn_storage_ptr", + "typeString": "bool[]" + } + } + }, + "id": 60111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6482:18:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$dyn_memory_ptr", + "typeString": "bool[] memory" + } + }, + "src": "6472:28:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$dyn_memory_ptr", + "typeString": "bool[] memory" + } + }, + "id": 60113, + "nodeType": "ExpressionStatement", + "src": "6472:28:84" + }, + { + "body": { + "id": 60145, + "nodeType": "Block", + "src": "6536:156:84", + "statements": [ + { + "expression": { + "id": 60139, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 60120, + "name": "updated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60090, + "src": "6544:7:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$dyn_memory_ptr", + "typeString": "bool[] memory" + } + }, + "id": 60122, + "indexExpression": { + "id": 60121, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60115, + "src": "6552:1:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6544:10:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 60124, + "name": "operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60102, + "src": "6573:8:84", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "baseExpression": { + "id": 60125, + "name": "lbHashes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60074, + "src": "6583:8:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + }, + "id": 60127, + "indexExpression": { + "id": 60126, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60115, + "src": "6592:1:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6583:11:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "baseExpression": { + "id": 60128, + "name": "ronPrices", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60077, + "src": "6596:9:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 60130, + "indexExpression": { + "id": 60129, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60115, + "src": "6606:1:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6596:12:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 60131, + "name": "proofHashes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60080, + "src": "6610:11:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + }, + "id": 60133, + "indexExpression": { + "id": 60132, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60115, + "src": "6622:1:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6610:14:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "baseExpression": { + "id": 60134, + "name": "setTypes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60083, + "src": "6626:8:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 60136, + "indexExpression": { + "id": 60135, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60115, + "src": "6635:1:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6626:11:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "66616c7365", + "id": 60137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6639:5:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 60123, + "name": "_setDomainPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60578, + "src": "6557:15:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes32_$_t_uint256_$_t_bytes32_$_t_uint256_$_t_bool_$returns$_t_bool_$", + "typeString": "function (address,bytes32,uint256,bytes32,uint256,bool) returns (bool)" + } + }, + "id": 60138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6557:88:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6544:101:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 60140, + "nodeType": "ExpressionStatement", + "src": "6544:101:84" + }, + { + "id": 60144, + "nodeType": "UncheckedBlock", + "src": "6654:32:84", + "statements": [ + { + "expression": { + "id": 60142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "6674:3:84", + "subExpression": { + "id": 60141, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60115, + "src": "6676:1:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 60143, + "nodeType": "ExpressionStatement", + "src": "6674:3:84" + } + ] + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 60119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 60117, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60115, + "src": "6523:1:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 60118, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60093, + "src": "6527:6:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6523:10:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 60146, + "initializationExpression": { + "assignments": [ + 60115 + ], + "declarations": [ + { + "constant": false, + "id": 60115, + "mutability": "mutable", + "name": "i", + "nameLocation": "6520:1:84", + "nodeType": "VariableDeclaration", + "scope": 60146, + "src": "6512:9:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60114, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6512:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 60116, + "nodeType": "VariableDeclarationStatement", + "src": "6512:9:84" + }, + "nodeType": "ForStatement", + "src": "6507:185:84" + } + ] + }, + "baseFunctions": [ + 64578 + ], + "documentation": { + "id": 60071, + "nodeType": "StructuredDocumentation", + "src": "6042:41:84", + "text": " @inheritdoc INSDomainPrice" + }, + "functionSelector": "53faf909", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "id": 60086, + "name": "OPERATOR_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59671, + "src": "6275:13:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 60087, + "kind": "modifierInvocation", + "modifierName": { + "id": 60085, + "name": "onlyRole", + "nameLocations": [ + "6266:8:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 48189, + "src": "6266:8:84" + }, + "nodeType": "ModifierInvocation", + "src": "6266:23:84" + } + ], + "name": "bulkTrySetDomainPrice", + "nameLocation": "6095:21:84", + "parameters": { + "id": 60084, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 60074, + "mutability": "mutable", + "name": "lbHashes", + "nameLocation": "6141:8:84", + "nodeType": "VariableDeclaration", + "scope": 60148, + "src": "6122:27:84", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 60072, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6122:7:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 60073, + "nodeType": "ArrayTypeName", + "src": "6122:9:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 60077, + "mutability": "mutable", + "name": "ronPrices", + "nameLocation": "6174:9:84", + "nodeType": "VariableDeclaration", + "scope": 60148, + "src": "6155:28:84", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 60075, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6155:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 60076, + "nodeType": "ArrayTypeName", + "src": "6155:9:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 60080, + "mutability": "mutable", + "name": "proofHashes", + "nameLocation": "6208:11:84", + "nodeType": "VariableDeclaration", + "scope": 60148, + "src": "6189:30:84", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 60078, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6189:7:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 60079, + "nodeType": "ArrayTypeName", + "src": "6189:9:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 60083, + "mutability": "mutable", + "name": "setTypes", + "nameLocation": "6244:8:84", + "nodeType": "VariableDeclaration", + "scope": 60148, + "src": "6225:27:84", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 60081, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6225:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 60082, + "nodeType": "ArrayTypeName", + "src": "6225:9:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "6116:140:84" + }, + "returnParameters": { + "id": 60091, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 60090, + "mutability": "mutable", + "name": "updated", + "nameLocation": "6313:7:84", + "nodeType": "VariableDeclaration", + "scope": 60148, + "src": "6299:21:84", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$dyn_memory_ptr", + "typeString": "bool[]" + }, + "typeName": { + "baseType": { + "id": 60088, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6299:4:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 60089, + "nodeType": "ArrayTypeName", + "src": "6299:6:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$dyn_storage_ptr", + "typeString": "bool[]" + } + }, + "visibility": "internal" + } + ], + "src": "6298:23:84" + }, + "scope": 60775, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 60211, + "nodeType": "FunctionDefinition", + "src": "6744:526:84", + "nodes": [], + "body": { + "id": 60210, + "nodeType": "Block", + "src": "6945:325:84", + "nodes": [], + "statements": [ + { + "assignments": [ + 60168 + ], + "declarations": [ + { + "constant": false, + "id": 60168, + "mutability": "mutable", + "name": "length", + "nameLocation": "6959:6:84", + "nodeType": "VariableDeclaration", + "scope": 60210, + "src": "6951:14:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60167, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6951:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 60175, + "initialValue": { + "arguments": [ + { + "id": 60170, + "name": "lbHashes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60152, + "src": "7009:8:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + }, + { + "id": 60171, + "name": "ronPrices", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60155, + "src": "7019:9:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + { + "id": 60172, + "name": "proofHashes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60158, + "src": "7030:11:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + }, + { + "id": 60173, + "name": "setTypes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60161, + "src": "7043:8:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + }, + { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + ], + "id": 60169, + "name": "_requireBulkSetDomainPriceArgumentsValid", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60513, + "src": "6968:40:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_array$_t_bytes32_$dyn_calldata_ptr_$_t_array$_t_uint256_$dyn_calldata_ptr_$_t_array$_t_bytes32_$dyn_calldata_ptr_$_t_array$_t_uint256_$dyn_calldata_ptr_$returns$_t_uint256_$", + "typeString": "function (bytes32[] calldata,uint256[] calldata,bytes32[] calldata,uint256[] calldata) pure returns (uint256)" + } + }, + "id": 60174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6968:84:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6951:101:84" + }, + { + "assignments": [ + 60177 + ], + "declarations": [ + { + "constant": false, + "id": 60177, + "mutability": "mutable", + "name": "operator", + "nameLocation": "7066:8:84", + "nodeType": "VariableDeclaration", + "scope": 60210, + "src": "7058:16:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 60176, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7058:7:84", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 60180, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 60178, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51922, + "src": "7077:10:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 60179, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7077:12:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7058:31:84" + }, + { + "body": { + "id": 60208, + "nodeType": "Block", + "src": "7125:141:84", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 60188, + "name": "operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60177, + "src": "7149:8:84", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "baseExpression": { + "id": 60189, + "name": "lbHashes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60152, + "src": "7159:8:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + }, + "id": 60191, + "indexExpression": { + "id": 60190, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60182, + "src": "7168:1:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7159:11:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "baseExpression": { + "id": 60192, + "name": "ronPrices", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60155, + "src": "7172:9:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 60194, + "indexExpression": { + "id": 60193, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60182, + "src": "7182:1:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7172:12:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 60195, + "name": "proofHashes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60158, + "src": "7186:11:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + }, + "id": 60197, + "indexExpression": { + "id": 60196, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60182, + "src": "7198:1:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7186:14:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "baseExpression": { + "id": 60198, + "name": "setTypes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60161, + "src": "7202:8:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 60200, + "indexExpression": { + "id": 60199, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60182, + "src": "7211:1:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7202:11:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "74727565", + "id": 60201, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7215:4:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 60187, + "name": "_setDomainPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60578, + "src": "7133:15:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes32_$_t_uint256_$_t_bytes32_$_t_uint256_$_t_bool_$returns$_t_bool_$", + "typeString": "function (address,bytes32,uint256,bytes32,uint256,bool) returns (bool)" + } + }, + "id": 60202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7133:87:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 60203, + "nodeType": "ExpressionStatement", + "src": "7133:87:84" + }, + { + "id": 60207, + "nodeType": "UncheckedBlock", + "src": "7228:32:84", + "statements": [ + { + "expression": { + "id": 60205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "7248:3:84", + "subExpression": { + "id": 60204, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60182, + "src": "7250:1:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 60206, + "nodeType": "ExpressionStatement", + "src": "7248:3:84" + } + ] + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 60186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 60184, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60182, + "src": "7112:1:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 60185, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60168, + "src": "7116:6:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7112:10:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 60209, + "initializationExpression": { + "assignments": [ + 60182 + ], + "declarations": [ + { + "constant": false, + "id": 60182, + "mutability": "mutable", + "name": "i", + "nameLocation": "7109:1:84", + "nodeType": "VariableDeclaration", + "scope": 60209, + "src": "7101:9:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60181, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7101:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 60183, + "nodeType": "VariableDeclarationStatement", + "src": "7101:9:84" + }, + "nodeType": "ForStatement", + "src": "7096:170:84" + } + ] + }, + "baseFunctions": [ + 64594 + ], + "documentation": { + "id": 60149, + "nodeType": "StructuredDocumentation", + "src": "6700:41:84", + "text": " @inheritdoc INSDomainPrice" + }, + "functionSelector": "599eaabf", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "id": 60164, + "name": "OPERATOR_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59671, + "src": "6930:13:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 60165, + "kind": "modifierInvocation", + "modifierName": { + "id": 60163, + "name": "onlyRole", + "nameLocations": [ + "6921:8:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 48189, + "src": "6921:8:84" + }, + "nodeType": "ModifierInvocation", + "src": "6921:23:84" + } + ], + "name": "bulkSetDomainPrice", + "nameLocation": "6753:18:84", + "parameters": { + "id": 60162, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 60152, + "mutability": "mutable", + "name": "lbHashes", + "nameLocation": "6796:8:84", + "nodeType": "VariableDeclaration", + "scope": 60211, + "src": "6777:27:84", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 60150, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6777:7:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 60151, + "nodeType": "ArrayTypeName", + "src": "6777:9:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 60155, + "mutability": "mutable", + "name": "ronPrices", + "nameLocation": "6829:9:84", + "nodeType": "VariableDeclaration", + "scope": 60211, + "src": "6810:28:84", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 60153, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6810:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 60154, + "nodeType": "ArrayTypeName", + "src": "6810:9:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 60158, + "mutability": "mutable", + "name": "proofHashes", + "nameLocation": "6863:11:84", + "nodeType": "VariableDeclaration", + "scope": 60211, + "src": "6844:30:84", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 60156, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6844:7:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 60157, + "nodeType": "ArrayTypeName", + "src": "6844:9:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 60161, + "mutability": "mutable", + "name": "setTypes", + "nameLocation": "6899:8:84", + "nodeType": "VariableDeclaration", + "scope": 60211, + "src": "6880:27:84", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 60159, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6880:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 60160, + "nodeType": "ArrayTypeName", + "src": "6880:9:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "6771:140:84" + }, + "returnParameters": { + "id": 60166, + "nodeType": "ParameterList", + "parameters": [], + "src": "6945:0:84" + }, + "scope": 60775, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 60236, + "nodeType": "FunctionDefinition", + "src": "7318:200:84", + "nodes": [], + "body": { + "id": 60235, + "nodeType": "Block", + "src": "7420:98:84", + "nodes": [], + "statements": [ + { + "expression": { + "id": 60227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 60221, + "name": "usdPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60217, + "src": "7426:8:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 60223, + "name": "label", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60214, + "src": "7453:5:84", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "id": 60224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7459:9:84", + "memberName": "hashLabel", + "nodeType": "MemberAccess", + "referencedDeclaration": 66058, + "src": "7453:15:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_bytes32_$attached_to$_t_string_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes32)" + } + }, + "id": 60225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7453:17:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 60222, + "name": "_getDomainPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60774, + "src": "7437:15:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view returns (uint256)" + } + }, + "id": 60226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7437:34:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7426:45:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 60228, + "nodeType": "ExpressionStatement", + "src": "7426:45:84" + }, + { + "expression": { + "id": 60233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 60229, + "name": "ronPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60219, + "src": "7477:8:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 60231, + "name": "usdPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60217, + "src": "7504:8:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 60230, + "name": "convertUSDToRON", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60440, + "src": "7488:15:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256)" + } + }, + "id": 60232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7488:25:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7477:36:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 60234, + "nodeType": "ExpressionStatement", + "src": "7477:36:84" + } + ] + }, + "baseFunctions": [ + 64527 + ], + "documentation": { + "id": 60212, + "nodeType": "StructuredDocumentation", + "src": "7274:41:84", + "text": " @inheritdoc INSDomainPrice" + }, + "functionSelector": "713a69a7", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDomainPrice", + "nameLocation": "7327:14:84", + "parameters": { + "id": 60215, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 60214, + "mutability": "mutable", + "name": "label", + "nameLocation": "7356:5:84", + "nodeType": "VariableDeclaration", + "scope": 60236, + "src": "7342:19:84", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 60213, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "7342:6:84", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "7341:21:84" + }, + "returnParameters": { + "id": 60220, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 60217, + "mutability": "mutable", + "name": "usdPrice", + "nameLocation": "7392:8:84", + "nodeType": "VariableDeclaration", + "scope": 60236, + "src": "7384:16:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60216, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7384:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 60219, + "mutability": "mutable", + "name": "ronPrice", + "nameLocation": "7410:8:84", + "nodeType": "VariableDeclaration", + "scope": 60236, + "src": "7402:16:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60218, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7402:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7383:36:84" + }, + "scope": 60775, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "id": 60410, + "nodeType": "FunctionDefinition", + "src": "7566:1367:84", + "nodes": [], + "body": { + "id": 60409, + "nodeType": "Block", + "src": "7713:1220:84", + "nodes": [], + "statements": [ + { + "assignments": [ + 60251 + ], + "declarations": [ + { + "constant": false, + "id": 60251, + "mutability": "mutable", + "name": "nameLen", + "nameLocation": "7727:7:84", + "nodeType": "VariableDeclaration", + "scope": 60409, + "src": "7719:15:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60250, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7719:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 60255, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 60252, + "name": "label", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60239, + "src": "7737:5:84", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "id": 60253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7743:6:84", + "memberName": "strlen", + "nodeType": "MemberAccess", + "referencedDeclaration": 66176, + "src": "7737:12:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_uint256_$attached_to$_t_string_memory_ptr_$", + "typeString": "function (string memory) pure returns (uint256)" + } + }, + "id": 60254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7737:14:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7719:32:84" + }, + { + "assignments": [ + 60257 + ], + "declarations": [ + { + "constant": false, + "id": 60257, + "mutability": "mutable", + "name": "lbHash", + "nameLocation": "7765:6:84", + "nodeType": "VariableDeclaration", + "scope": 60409, + "src": "7757:14:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 60256, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7757:7:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 60261, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 60258, + "name": "label", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60239, + "src": "7774:5:84", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "id": 60259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7780:9:84", + "memberName": "hashLabel", + "nodeType": "MemberAccess", + "referencedDeclaration": 66058, + "src": "7774:15:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_bytes32_$attached_to$_t_string_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes32)" + } + }, + "id": 60260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7774:17:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7757:34:84" + }, + { + "assignments": [ + 60263 + ], + "declarations": [ + { + "constant": false, + "id": 60263, + "mutability": "mutable", + "name": "overriddenRenewalFee", + "nameLocation": "7805:20:84", + "nodeType": "VariableDeclaration", + "scope": 60409, + "src": "7797:28:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60262, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7797:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 60267, + "initialValue": { + "baseExpression": { + "id": 60264, + "name": "_rnFeeOverriding", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59716, + "src": "7828:16:84", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 60266, + "indexExpression": { + "id": 60265, + "name": "lbHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60257, + "src": "7845:6:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7828:24:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7797:55:84" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 60270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 60268, + "name": "overriddenRenewalFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60263, + "src": "7863:20:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 60269, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7887:1:84", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7863:25:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 60389, + "nodeType": "Block", + "src": "7959:877:84", + "statements": [ + { + "assignments": [ + 60282 + ], + "declarations": [ + { + "constant": false, + "id": 60282, + "mutability": "mutable", + "name": "renewalFeeByLength", + "nameLocation": "7975:18:84", + "nodeType": "VariableDeclaration", + "scope": 60389, + "src": "7967:26:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60281, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7967:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 60290, + "initialValue": { + "baseExpression": { + "id": 60283, + "name": "_rnFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59705, + "src": "7996:6:84", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 60289, + "indexExpression": { + "arguments": [ + { + "id": 60286, + "name": "nameLen", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60251, + "src": "8012:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 60287, + "name": "_rnfMaxLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59690, + "src": "8021:13:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 60284, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53173, + "src": "8003:4:84", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$53173_$", + "typeString": "type(library Math)" + } + }, + "id": 60285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8008:3:84", + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 52350, + "src": "8003:8:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 60288, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8003:32:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7996:40:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7967:69:84" + }, + { + "expression": { + "id": 60297, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 60291, + "name": "basePrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60245, + "src": "8044:9:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UnitPrice_$64387_memory_ptr", + "typeString": "struct INSDomainPrice.UnitPrice memory" + } + }, + "id": 60293, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "8054:3:84", + "memberName": "usd", + "nodeType": "MemberAccess", + "referencedDeclaration": 64384, + "src": "8044:13:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 60296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 60294, + "name": "duration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60241, + "src": "8060:8:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 60295, + "name": "renewalFeeByLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60282, + "src": "8071:18:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8060:29:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8044:45:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 60298, + "nodeType": "ExpressionStatement", + "src": "8044:45:84" + }, + { + "assignments": [ + 60300 + ], + "declarations": [ + { + "constant": false, + "id": 60300, + "mutability": "mutable", + "name": "id", + "nameLocation": "8105:2:84", + "nodeType": "VariableDeclaration", + "scope": 60389, + "src": "8097:10:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60299, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8097:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 60307, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 60303, + "name": "LibRNSDomain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66069, + "src": "8128:12:84", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_LibRNSDomain_$66069_$", + "typeString": "type(library LibRNSDomain)" + } + }, + "id": 60304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "8141:6:84", + "memberName": "RON_ID", + "nodeType": "MemberAccess", + "referencedDeclaration": 66032, + "src": "8128:19:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 60305, + "name": "label", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60239, + "src": "8149:5:84", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "id": 60301, + "name": "LibRNSDomain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66069, + "src": "8110:12:84", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_LibRNSDomain_$66069_$", + "typeString": "type(library LibRNSDomain)" + } + }, + "id": 60302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8123:4:84", + "memberName": "toId", + "nodeType": "MemberAccess", + "referencedDeclaration": 66048, + "src": "8110:17:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (uint256,string memory) pure returns (uint256)" + } + }, + "id": 60306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8110:45:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8097:58:84" + }, + { + "assignments": [ + 60310 + ], + "declarations": [ + { + "constant": false, + "id": 60310, + "mutability": "mutable", + "name": "auction", + "nameLocation": "8174:7:84", + "nodeType": "VariableDeclaration", + "scope": 60389, + "src": "8163:18:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSAuction_$64365", + "typeString": "contract INSAuction" + }, + "typeName": { + "id": 60309, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 60308, + "name": "INSAuction", + "nameLocations": [ + "8163:10:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 64365, + "src": "8163:10:84" + }, + "referencedDeclaration": 64365, + "src": "8163:10:84", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSAuction_$64365", + "typeString": "contract INSAuction" + } + }, + "visibility": "internal" + } + ], + "id": 60312, + "initialValue": { + "id": 60311, + "name": "_auction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59684, + "src": "8184:8:84", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSAuction_$64365", + "typeString": "contract INSAuction" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8163:29:84" + }, + { + "condition": { + "arguments": [ + { + "id": 60315, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60300, + "src": "8221:2:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 60313, + "name": "auction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60310, + "src": "8204:7:84", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSAuction_$64365", + "typeString": "contract INSAuction" + } + }, + "id": 60314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8212:8:84", + "memberName": "reserved", + "nodeType": "MemberAccess", + "referencedDeclaration": 64267, + "src": "8204:16:84", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view external returns (bool)" + } + }, + "id": 60316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8204:20:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 60388, + "nodeType": "IfStatement", + "src": "8200:630:84", + "trueBody": { + "id": 60387, + "nodeType": "Block", + "src": "8226:604:84", + "statements": [ + { + "assignments": [ + 60319 + ], + "declarations": [ + { + "constant": false, + "id": 60319, + "mutability": "mutable", + "name": "rns", + "nameLocation": "8247:3:84", + "nodeType": "VariableDeclaration", + "scope": 60387, + "src": "8236:14:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSUnified_$65002", + "typeString": "contract INSUnified" + }, + "typeName": { + "id": 60318, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 60317, + "name": "INSUnified", + "nameLocations": [ + "8236:10:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65002, + "src": "8236:10:84" + }, + "referencedDeclaration": 65002, + "src": "8236:10:84", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSUnified_$65002", + "typeString": "contract INSUnified" + } + }, + "visibility": "internal" + } + ], + "id": 60323, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 60320, + "name": "auction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60310, + "src": "8253:7:84", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSAuction_$64365", + "typeString": "contract INSAuction" + } + }, + "id": 60321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8261:13:84", + "memberName": "getRNSUnified", + "nodeType": "MemberAccess", + "referencedDeclaration": 64364, + "src": "8253:21:84", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_INSUnified_$65002_$", + "typeString": "function () view external returns (contract INSUnified)" + } + }, + "id": 60322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8253:23:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSUnified_$65002", + "typeString": "contract INSUnified" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8236:40:84" + }, + { + "assignments": [ + 60325 + ], + "declarations": [ + { + "constant": false, + "id": 60325, + "mutability": "mutable", + "name": "expiry", + "nameLocation": "8294:6:84", + "nodeType": "VariableDeclaration", + "scope": 60387, + "src": "8286:14:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60324, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8286:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 60341, + "initialValue": { + "arguments": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 60330, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60300, + "src": "8348:2:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 60328, + "name": "rns", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60319, + "src": "8334:3:84", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSUnified_$65002", + "typeString": "contract INSUnified" + } + }, + "id": 60329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8338:9:84", + "memberName": "getRecord", + "nodeType": "MemberAccess", + "referencedDeclaration": 64931, + "src": "8334:13:84", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_struct$_Record_$64815_memory_ptr_$", + "typeString": "function (uint256) view external returns (struct INSUnified.Record memory)" + } + }, + "id": 60331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8334:17:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$64815_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + }, + "id": 60332, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8352:3:84", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 64814, + "src": "8334:21:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$64808_memory_ptr", + "typeString": "struct INSUnified.MutableRecord memory" + } + }, + "id": 60333, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8356:6:84", + "memberName": "expiry", + "nodeType": "MemberAccess", + "referencedDeclaration": 64805, + "src": "8334:28:84", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 60334, + "name": "duration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60241, + "src": "8364:8:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "arguments": [ + { + "id": 60337, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8379:6:84", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + }, + "typeName": { + "id": 60336, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "8379:6:84", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + } + ], + "id": 60335, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "8374:4:84", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 60338, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8374:12:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint64", + "typeString": "type(uint64)" + } + }, + "id": 60339, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "8387:3:84", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "8374:16:84", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "expression": { + "id": 60326, + "name": "LibSafeRange", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66613, + "src": "8303:12:84", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_LibSafeRange_$66613_$", + "typeString": "type(library LibSafeRange)" + } + }, + "id": 60327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8316:17:84", + "memberName": "addWithUpperbound", + "nodeType": "MemberAccess", + "referencedDeclaration": 66612, + "src": "8303:30:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" + } + }, + "id": 60340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8303:88:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8286:105:84" + }, + { + "assignments": [ + 60346, + null + ], + "declarations": [ + { + "constant": false, + "id": 60346, + "mutability": "mutable", + "name": "domainAuction", + "nameLocation": "8434:13:84", + "nodeType": "VariableDeclaration", + "scope": 60387, + "src": "8402:45:84", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_memory_ptr", + "typeString": "struct INSAuction.DomainAuction" + }, + "typeName": { + "id": 60345, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 60344, + "name": "INSAuction.DomainAuction", + "nameLocations": [ + "8402:10:84", + "8413:13:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 64175, + "src": "8402:24:84" + }, + "referencedDeclaration": 64175, + "src": "8402:24:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_storage_ptr", + "typeString": "struct INSAuction.DomainAuction" + } + }, + "visibility": "internal" + }, + null + ], + "id": 60351, + "initialValue": { + "arguments": [ + { + "id": 60349, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60300, + "src": "8471:2:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 60347, + "name": "auction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60310, + "src": "8452:7:84", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSAuction_$64365", + "typeString": "contract INSAuction" + } + }, + "id": 60348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8460:10:84", + "memberName": "getAuction", + "nodeType": "MemberAccess", + "referencedDeclaration": 64323, + "src": "8452:18:84", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_struct$_DomainAuction_$64175_memory_ptr_$_t_uint256_$", + "typeString": "function (uint256) view external returns (struct INSAuction.DomainAuction memory,uint256)" + } + }, + "id": 60350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8452:22:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_struct$_DomainAuction_$64175_memory_ptr_$_t_uint256_$", + "typeString": "tuple(struct INSAuction.DomainAuction memory,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8401:73:84" + }, + { + "assignments": [ + 60353 + ], + "declarations": [ + { + "constant": false, + "id": 60353, + "mutability": "mutable", + "name": "claimedAt", + "nameLocation": "8492:9:84", + "nodeType": "VariableDeclaration", + "scope": 60387, + "src": "8484:17:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60352, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8484:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 60357, + "initialValue": { + "expression": { + "expression": { + "id": 60354, + "name": "domainAuction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60346, + "src": "8504:13:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DomainAuction_$64175_memory_ptr", + "typeString": "struct INSAuction.DomainAuction memory" + } + }, + "id": 60355, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8518:3:84", + "memberName": "bid", + "nodeType": "MemberAccess", + "referencedDeclaration": 64174, + "src": "8504:17:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bid_$64167_memory_ptr", + "typeString": "struct INSAuction.Bid memory" + } + }, + "id": 60356, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8522:9:84", + "memberName": "claimedAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 64166, + "src": "8504:27:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8484:47:84" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 60368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 60360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 60358, + "name": "claimedAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60353, + "src": "8545:9:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 60359, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8558:1:84", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8545:14:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 60367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 60363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 60361, + "name": "expiry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60325, + "src": "8563:6:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 60362, + "name": "claimedAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60353, + "src": "8572:9:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8563:18:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 60364, + "name": "auction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60310, + "src": "8584:7:84", + "typeDescriptions": { + "typeIdentifier": "t_contract$_INSAuction_$64365", + "typeString": "contract INSAuction" + } + }, + "id": 60365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8592:25:84", + "memberName": "MAX_AUCTION_DOMAIN_EXPIRY", + "nodeType": "MemberAccess", + "referencedDeclaration": 64231, + "src": "8584:33:84", + "typeDescriptions": { + "typeIdentifier": "t_function_external_pure$__$returns$_t_uint64_$", + "typeString": "function () pure external returns (uint64)" + } + }, + "id": 60366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8584:35:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "8563:56:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "8545:74:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 60373, + "nodeType": "IfStatement", + "src": "8541:137:84", + "trueBody": { + "id": 60372, + "nodeType": "Block", + "src": "8621:57:84", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 60369, + "name": "ExceedAuctionDomainExpiry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64377, + "src": "8640:25:84", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 60370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8640:27:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 60371, + "nodeType": "RevertStatement", + "src": "8633:34:84" + } + ] + } + }, + { + "expression": { + "id": 60385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 60374, + "name": "tax", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60248, + "src": "8748:3:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UnitPrice_$64387_memory_ptr", + "typeString": "struct INSDomainPrice.UnitPrice memory" + } + }, + "id": 60376, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "8752:3:84", + "memberName": "usd", + "nodeType": "MemberAccess", + "referencedDeclaration": 64384, + "src": "8748:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 60379, + "name": "_taxRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59687, + "src": "8770:9:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [ + { + "id": 60381, + "name": "lbHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60257, + "src": "8797:6:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 60380, + "name": "_getDomainPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60774, + "src": "8781:15:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view returns (uint256)" + } + }, + "id": 60382, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8781:23:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 60383, + "name": "MAX_PERCENTAGE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59665, + "src": "8806:14:84", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "expression": { + "id": 60377, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53173, + "src": "8758:4:84", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$53173_$", + "typeString": "type(library Math)" + } + }, + "id": 60378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8763:6:84", + "memberName": "mulDiv", + "nodeType": "MemberAccess", + "referencedDeclaration": 52521, + "src": "8758:11:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" + } + }, + "id": 60384, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8758:63:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8748:73:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 60386, + "nodeType": "ExpressionStatement", + "src": "8748:73:84" + } + ] + } + } + ] + }, + "id": 60390, + "nodeType": "IfStatement", + "src": "7859:977:84", + "trueBody": { + "id": 60280, + "nodeType": "Block", + "src": "7890:63:84", + "statements": [ + { + "expression": { + "id": 60278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 60271, + "name": "basePrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60245, + "src": "7898:9:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UnitPrice_$64387_memory_ptr", + "typeString": "struct INSDomainPrice.UnitPrice memory" + } + }, + "id": 60273, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "7908:3:84", + "memberName": "usd", + "nodeType": "MemberAccess", + "referencedDeclaration": 64384, + "src": "7898:13:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 60277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 60274, + "name": "duration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60241, + "src": "7914:8:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 60276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "~", + "prefix": true, + "src": "7925:21:84", + "subExpression": { + "id": 60275, + "name": "overriddenRenewalFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60263, + "src": "7926:20:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7914:32:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7898:48:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 60279, + "nodeType": "ExpressionStatement", + "src": "7898:48:84" + } + ] + } + }, + { + "expression": { + "id": 60398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 60391, + "name": "tax", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60248, + "src": "8842:3:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UnitPrice_$64387_memory_ptr", + "typeString": "struct INSDomainPrice.UnitPrice memory" + } + }, + "id": 60393, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "8846:3:84", + "memberName": "ron", + "nodeType": "MemberAccess", + "referencedDeclaration": 64386, + "src": "8842:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 60395, + "name": "tax", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60248, + "src": "8868:3:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UnitPrice_$64387_memory_ptr", + "typeString": "struct INSDomainPrice.UnitPrice memory" + } + }, + "id": 60396, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8872:3:84", + "memberName": "usd", + "nodeType": "MemberAccess", + "referencedDeclaration": 64384, + "src": "8868:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 60394, + "name": "convertUSDToRON", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60440, + "src": "8852:15:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256)" + } + }, + "id": 60397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8852:24:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8842:34:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 60399, + "nodeType": "ExpressionStatement", + "src": "8842:34:84" + }, + { + "expression": { + "id": 60407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 60400, + "name": "basePrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60245, + "src": "8882:9:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UnitPrice_$64387_memory_ptr", + "typeString": "struct INSDomainPrice.UnitPrice memory" + } + }, + "id": 60402, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "8892:3:84", + "memberName": "ron", + "nodeType": "MemberAccess", + "referencedDeclaration": 64386, + "src": "8882:13:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 60404, + "name": "basePrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60245, + "src": "8914:9:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UnitPrice_$64387_memory_ptr", + "typeString": "struct INSDomainPrice.UnitPrice memory" + } + }, + "id": 60405, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8924:3:84", + "memberName": "usd", + "nodeType": "MemberAccess", + "referencedDeclaration": 64384, + "src": "8914:13:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 60403, + "name": "convertUSDToRON", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60440, + "src": "8898:15:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256)" + } + }, + "id": 60406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8898:30:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8882:46:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 60408, + "nodeType": "ExpressionStatement", + "src": "8882:46:84" + } + ] + }, + "baseFunctions": [ + 64541 + ], + "documentation": { + "id": 60237, + "nodeType": "StructuredDocumentation", + "src": "7522:41:84", + "text": " @inheritdoc INSDomainPrice" + }, + "functionSelector": "f4651f49", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getRenewalFee", + "nameLocation": "7575:13:84", + "parameters": { + "id": 60242, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 60239, + "mutability": "mutable", + "name": "label", + "nameLocation": "7603:5:84", + "nodeType": "VariableDeclaration", + "scope": 60410, + "src": "7589:19:84", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 60238, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "7589:6:84", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 60241, + "mutability": "mutable", + "name": "duration", + "nameLocation": "7618:8:84", + "nodeType": "VariableDeclaration", + "scope": 60410, + "src": "7610:16:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60240, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7610:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7588:39:84" + }, + "returnParameters": { + "id": 60249, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 60245, + "mutability": "mutable", + "name": "basePrice", + "nameLocation": "7678:9:84", + "nodeType": "VariableDeclaration", + "scope": 60410, + "src": "7661:26:84", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UnitPrice_$64387_memory_ptr", + "typeString": "struct INSDomainPrice.UnitPrice" + }, + "typeName": { + "id": 60244, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 60243, + "name": "UnitPrice", + "nameLocations": [ + "7661:9:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 64387, + "src": "7661:9:84" + }, + "referencedDeclaration": 64387, + "src": "7661:9:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UnitPrice_$64387_storage_ptr", + "typeString": "struct INSDomainPrice.UnitPrice" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 60248, + "mutability": "mutable", + "name": "tax", + "nameLocation": "7706:3:84", + "nodeType": "VariableDeclaration", + "scope": 60410, + "src": "7689:20:84", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UnitPrice_$64387_memory_ptr", + "typeString": "struct INSDomainPrice.UnitPrice" + }, + "typeName": { + "id": 60247, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 60246, + "name": "UnitPrice", + "nameLocations": [ + "7689:9:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 64387, + "src": "7689:9:84" + }, + "referencedDeclaration": 64387, + "src": "7689:9:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_UnitPrice_$64387_storage_ptr", + "typeString": "struct INSDomainPrice.UnitPrice" + } + }, + "visibility": "internal" + } + ], + "src": "7660:50:84" + }, + "scope": 60775, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "id": 60440, + "nodeType": "FunctionDefinition", + "src": "8981:286:84", + "nodes": [], + "body": { + "id": 60439, + "nodeType": "Block", + "src": "9059:208:84", + "nodes": [], + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 60428, + "name": "usdWei", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60413, + "src": "9178:6:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 60433, + "name": "USD_DECIMALS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59661, + "src": "9218:12:84", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 60432, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9211:6:84", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint32_$", + "typeString": "type(uint32)" + }, + "typeName": { + "id": 60431, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "9211:6:84", + "typeDescriptions": {} + } + }, + "id": 60434, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9211:20:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 60430, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9205:5:84", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int32_$", + "typeString": "type(int32)" + }, + "typeName": { + "id": 60429, + "name": "int32", + "nodeType": "ElementaryTypeName", + "src": "9205:5:84", + "typeDescriptions": {} + } + }, + "id": 60435, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9205:27:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int32", + "typeString": "int32" + } + }, + { + "hexValue": "3138", + "id": 60436, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9253:2:84", + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_int32", + "typeString": "int32" + }, + { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + } + ], + "expression": { + "arguments": [ + { + "id": 60425, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "9151:3:84", + "subExpression": { + "hexValue": "3138", + "id": 60424, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9152:2:84", + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_18_by_1", + "typeString": "int_const -18" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_minus_18_by_1", + "typeString": "int_const -18" + } + ], + "expression": { + "arguments": [ + { + "id": 60420, + "name": "_pythIdForRONUSD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59696, + "src": "9098:16:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 60421, + "name": "_maxAcceptableAge", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59693, + "src": "9116:17:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 60418, + "name": "_pyth", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59680, + "src": "9072:5:84", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPyth_$54460", + "typeString": "contract IPyth" + } + }, + "id": 60419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9078:19:84", + "memberName": "getPriceNoOlderThan", + "nodeType": "MemberAccess", + "referencedDeclaration": 54392, + "src": "9072:25:84", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$_t_uint256_$returns$_t_struct$_Price_$54493_memory_ptr_$", + "typeString": "function (bytes32,uint256) view external returns (struct PythStructs.Price memory)" + } + }, + "id": 60422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9072:62:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Price_$54493_memory_ptr", + "typeString": "struct PythStructs.Price memory" + } + }, + "id": 60423, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9135:7:84", + "memberName": "inverse", + "nodeType": "MemberAccess", + "referencedDeclaration": 67403, + "src": "9072:70:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_struct$_Price_$54493_memory_ptr_$_t_int32_$returns$_t_struct$_Price_$54493_memory_ptr_$attached_to$_t_struct$_Price_$54493_memory_ptr_$", + "typeString": "function (struct PythStructs.Price memory,int32) pure returns (struct PythStructs.Price memory)" + } + }, + "id": 60426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [ + "9145:4:84" + ], + "names": [ + "expo" + ], + "nodeType": "FunctionCall", + "src": "9072:85:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Price_$54493_memory_ptr", + "typeString": "struct PythStructs.Price memory" + } + }, + "id": 60427, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9158:3:84", + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 67295, + "src": "9072:89:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_struct$_Price_$54493_memory_ptr_$_t_uint256_$_t_int32_$_t_int32_$returns$_t_uint256_$attached_to$_t_struct$_Price_$54493_memory_ptr_$", + "typeString": "function (struct PythStructs.Price memory,uint256,int32,int32) pure returns (uint256)" + } + }, + "id": 60437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [ + "9170:6:84", + "9192:11:84", + "9240:11:84" + ], + "names": [ + "inpWei", + "inpDecimals", + "outDecimals" + ], + "nodeType": "FunctionCall", + "src": "9072:190:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 60417, + "id": 60438, + "nodeType": "Return", + "src": "9065:197:84" + } + ] + }, + "baseFunctions": [ + 64602 + ], + "documentation": { + "id": 60411, + "nodeType": "StructuredDocumentation", + "src": "8937:41:84", + "text": " @inheritdoc INSDomainPrice" + }, + "functionSelector": "7174026e", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "convertUSDToRON", + "nameLocation": "8990:15:84", + "parameters": { + "id": 60414, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 60413, + "mutability": "mutable", + "name": "usdWei", + "nameLocation": "9014:6:84", + "nodeType": "VariableDeclaration", + "scope": 60440, + "src": "9006:14:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60412, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9006:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "9005:16:84" + }, + "returnParameters": { + "id": 60417, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 60416, + "mutability": "mutable", + "name": "ronWei", + "nameLocation": "9051:6:84", + "nodeType": "VariableDeclaration", + "scope": 60440, + "src": "9043:14:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60415, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9043:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "9042:16:84" + }, + "scope": 60775, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "id": 60466, + "nodeType": "FunctionDefinition", + "src": "9315:263:84", + "nodes": [], + "body": { + "id": 60465, + "nodeType": "Block", + "src": "9393:185:84", + "nodes": [], + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 60454, + "name": "ronWei", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60443, + "src": "9489:6:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "3138", + "id": 60455, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9516:2:84", + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 60460, + "name": "USD_DECIMALS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59661, + "src": "9552:12:84", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 60459, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9545:6:84", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint32_$", + "typeString": "type(uint32)" + }, + "typeName": { + "id": 60458, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "9545:6:84", + "typeDescriptions": {} + } + }, + "id": 60461, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9545:20:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 60457, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9539:5:84", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int32_$", + "typeString": "type(int32)" + }, + "typeName": { + "id": 60456, + "name": "int32", + "nodeType": "ElementaryTypeName", + "src": "9539:5:84", + "typeDescriptions": {} + } + }, + "id": 60462, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9539:27:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int32", + "typeString": "int32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + { + "typeIdentifier": "t_int32", + "typeString": "int32" + } + ], + "expression": { + "arguments": [ + { + "id": 60450, + "name": "_pythIdForRONUSD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59696, + "src": "9432:16:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 60451, + "name": "_maxAcceptableAge", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59693, + "src": "9450:17:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 60448, + "name": "_pyth", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59680, + "src": "9406:5:84", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPyth_$54460", + "typeString": "contract IPyth" + } + }, + "id": 60449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9412:19:84", + "memberName": "getPriceNoOlderThan", + "nodeType": "MemberAccess", + "referencedDeclaration": 54392, + "src": "9406:25:84", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$_t_uint256_$returns$_t_struct$_Price_$54493_memory_ptr_$", + "typeString": "function (bytes32,uint256) view external returns (struct PythStructs.Price memory)" + } + }, + "id": 60452, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9406:62:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Price_$54493_memory_ptr", + "typeString": "struct PythStructs.Price memory" + } + }, + "id": 60453, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9469:3:84", + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 67295, + "src": "9406:66:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_struct$_Price_$54493_memory_ptr_$_t_uint256_$_t_int32_$_t_int32_$returns$_t_uint256_$attached_to$_t_struct$_Price_$54493_memory_ptr_$", + "typeString": "function (struct PythStructs.Price memory,uint256,int32,int32) pure returns (uint256)" + } + }, + "id": 60463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [ + "9481:6:84", + "9503:11:84", + "9526:11:84" + ], + "names": [ + "inpWei", + "inpDecimals", + "outDecimals" + ], + "nodeType": "FunctionCall", + "src": "9406:167:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 60447, + "id": 60464, + "nodeType": "Return", + "src": "9399:174:84" + } + ] + }, + "baseFunctions": [ + 64610 + ], + "documentation": { + "id": 60441, + "nodeType": "StructuredDocumentation", + "src": "9271:41:84", + "text": " @inheritdoc INSDomainPrice" + }, + "functionSelector": "037f1769", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "convertRONToUSD", + "nameLocation": "9324:15:84", + "parameters": { + "id": 60444, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 60443, + "mutability": "mutable", + "name": "ronWei", + "nameLocation": "9348:6:84", + "nodeType": "VariableDeclaration", + "scope": 60466, + "src": "9340:14:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60442, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9340:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "9339:16:84" + }, + "returnParameters": { + "id": 60447, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 60446, + "mutability": "mutable", + "name": "usdWei", + "nameLocation": "9385:6:84", + "nodeType": "VariableDeclaration", + "scope": 60466, + "src": "9377:14:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60445, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9377:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "9376:16:84" + }, + "scope": 60775, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "id": 60513, + "nodeType": "FunctionDefinition", + "src": "9676:419:84", + "nodes": [], + "body": { + "id": 60512, + "nodeType": "Block", + "src": "9905:190:84", + "nodes": [], + "statements": [ + { + "expression": { + "id": 60487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 60484, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60482, + "src": "9911:6:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 60485, + "name": "lbHashes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60470, + "src": "9920:8:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + }, + "id": 60486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9929:6:84", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "9920:15:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9911:24:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 60488, + "nodeType": "ExpressionStatement", + "src": "9911:24:84" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 60506, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 60501, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 60496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 60491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 60489, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60482, + "src": "9945:6:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 60490, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9955:1:84", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "9945:11:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 60495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 60492, + "name": "ronPrices", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60473, + "src": "9960:9:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 60493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9970:6:84", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "9960:16:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 60494, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60482, + "src": "9980:6:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9960:26:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "9945:41:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 60500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 60497, + "name": "proofHashes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60476, + "src": "9990:11:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + }, + "id": 60498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10002:6:84", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "9990:18:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 60499, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60482, + "src": "10012:6:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9990:28:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "9945:73:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 60505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 60502, + "name": "setTypes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60479, + "src": "10022:8:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 60503, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10031:6:84", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "10022:15:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 60504, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60482, + "src": "10041:6:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10022:25:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "9945:102:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 60511, + "nodeType": "IfStatement", + "src": "9941:150:84", + "trueBody": { + "id": 60510, + "nodeType": "Block", + "src": "10049:42:84", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 60507, + "name": "InvalidArrayLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64373, + "src": "10064:18:84", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 60508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10064:20:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 60509, + "nodeType": "RevertStatement", + "src": "10057:27:84" + } + ] + } + } + ] + }, + "documentation": { + "id": 60467, + "nodeType": "StructuredDocumentation", + "src": "9582:91:84", + "text": " @dev Reverts if the arguments of the method {bulkSetDomainPrice} is invalid." + }, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_requireBulkSetDomainPriceArgumentsValid", + "nameLocation": "9685:40:84", + "parameters": { + "id": 60480, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 60470, + "mutability": "mutable", + "name": "lbHashes", + "nameLocation": "9750:8:84", + "nodeType": "VariableDeclaration", + "scope": 60513, + "src": "9731:27:84", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 60468, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9731:7:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 60469, + "nodeType": "ArrayTypeName", + "src": "9731:9:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 60473, + "mutability": "mutable", + "name": "ronPrices", + "nameLocation": "9783:9:84", + "nodeType": "VariableDeclaration", + "scope": 60513, + "src": "9764:28:84", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 60471, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9764:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 60472, + "nodeType": "ArrayTypeName", + "src": "9764:9:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 60476, + "mutability": "mutable", + "name": "proofHashes", + "nameLocation": "9817:11:84", + "nodeType": "VariableDeclaration", + "scope": 60513, + "src": "9798:30:84", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 60474, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9798:7:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 60475, + "nodeType": "ArrayTypeName", + "src": "9798:9:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 60479, + "mutability": "mutable", + "name": "setTypes", + "nameLocation": "9853:8:84", + "nodeType": "VariableDeclaration", + "scope": 60513, + "src": "9834:27:84", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 60477, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9834:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 60478, + "nodeType": "ArrayTypeName", + "src": "9834:9:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "9725:140:84" + }, + "returnParameters": { + "id": 60483, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 60482, + "mutability": "mutable", + "name": "length", + "nameLocation": "9897:6:84", + "nodeType": "VariableDeclaration", + "scope": 60513, + "src": "9889:14:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60481, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9889:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "9888:16:84" + }, + "scope": 60775, + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "id": 60578, + "nodeType": "FunctionDefinition", + "src": "10214:503:84", + "nodes": [], + "body": { + "id": 60577, + "nodeType": "Block", + "src": "10400:317:84", + "nodes": [], + "statements": [ + { + "assignments": [ + 60532 + ], + "declarations": [ + { + "constant": false, + "id": 60532, + "mutability": "mutable", + "name": "usdPrice", + "nameLocation": "10414:8:84", + "nodeType": "VariableDeclaration", + "scope": 60577, + "src": "10406:16:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60531, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10406:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 60536, + "initialValue": { + "arguments": [ + { + "id": 60534, + "name": "ronPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60520, + "src": "10441:8:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 60533, + "name": "convertRONToUSD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60466, + "src": "10425:15:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256)" + } + }, + "id": 60535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10425:25:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10406:44:84" + }, + { + "assignments": [ + 60539 + ], + "declarations": [ + { + "constant": false, + "id": 60539, + "mutability": "mutable", + "name": "dp", + "nameLocation": "10481:2:84", + "nodeType": "VariableDeclaration", + "scope": 60577, + "src": "10456:27:84", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_TimestampWrapper_$66547_storage_ptr", + "typeString": "struct TimestampWrapper" + }, + "typeName": { + "id": 60538, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 60537, + "name": "TimestampWrapper", + "nameLocations": [ + "10456:16:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 66547, + "src": "10456:16:84" + }, + "referencedDeclaration": 66547, + "src": "10456:16:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_TimestampWrapper_$66547_storage_ptr", + "typeString": "struct TimestampWrapper" + } + }, + "visibility": "internal" + } + ], + "id": 60543, + "initialValue": { + "baseExpression": { + "id": 60540, + "name": "_dp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59711, + "src": "10486:3:84", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_TimestampWrapper_$66547_storage_$", + "typeString": "mapping(bytes32 => struct TimestampWrapper storage ref)" + } + }, + "id": 60542, + "indexExpression": { + "id": 60541, + "name": "lbHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60518, + "src": "10490:6:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10486:11:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_TimestampWrapper_$66547_storage", + "typeString": "struct TimestampWrapper storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10456:41:84" + }, + { + "expression": { + "id": 60551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 60544, + "name": "updated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60529, + "src": "10503:7:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 60550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 60545, + "name": "forced", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60526, + "src": "10513:6:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 60549, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 60546, + "name": "dp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60539, + "src": "10523:2:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_TimestampWrapper_$66547_storage_ptr", + "typeString": "struct TimestampWrapper storage pointer" + } + }, + "id": 60547, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10526:5:84", + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": 66544, + "src": "10523:8:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 60548, + "name": "usdPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60532, + "src": "10534:8:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10523:19:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10513:29:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10503:39:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 60552, + "nodeType": "ExpressionStatement", + "src": "10503:39:84" + }, + { + "condition": { + "id": 60553, + "name": "updated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60529, + "src": "10553:7:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 60576, + "nodeType": "IfStatement", + "src": "10549:164:84", + "trueBody": { + "id": 60575, + "nodeType": "Block", + "src": "10562:151:84", + "statements": [ + { + "expression": { + "id": 60558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 60554, + "name": "dp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60539, + "src": "10570:2:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_TimestampWrapper_$66547_storage_ptr", + "typeString": "struct TimestampWrapper storage pointer" + } + }, + "id": 60556, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "10573:5:84", + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": 66544, + "src": "10570:8:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 60557, + "name": "usdPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60532, + "src": "10581:8:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10570:19:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 60559, + "nodeType": "ExpressionStatement", + "src": "10570:19:84" + }, + { + "expression": { + "id": 60565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 60560, + "name": "dp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60539, + "src": "10597:2:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_TimestampWrapper_$66547_storage_ptr", + "typeString": "struct TimestampWrapper storage pointer" + } + }, + "id": 60562, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "10600:9:84", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": 66546, + "src": "10597:12:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 60563, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "10612:5:84", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 60564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10618:9:84", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "10612:15:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10597:30:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 60566, + "nodeType": "ExpressionStatement", + "src": "10597:30:84" + }, + { + "eventCall": { + "arguments": [ + { + "id": 60568, + "name": "operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60516, + "src": "10659:8:84", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 60569, + "name": "lbHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60518, + "src": "10669:6:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 60570, + "name": "usdPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60532, + "src": "10677:8:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 60571, + "name": "proofHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60522, + "src": "10687:9:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 60572, + "name": "setType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60524, + "src": "10698:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 60567, + "name": "DomainPriceUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64432, + "src": "10640:18:84", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bytes32_$_t_uint256_$_t_bytes32_$_t_uint256_$returns$__$", + "typeString": "function (address,bytes32,uint256,bytes32,uint256)" + } + }, + "id": 60573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10640:66:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 60574, + "nodeType": "EmitStatement", + "src": "10635:71:84" + } + ] + } + } + ] + }, + "documentation": { + "id": 60514, + "nodeType": "StructuredDocumentation", + "src": "10099:112:84", + "text": " @dev Helper method to set domain price.\n Emits an event {DomainPriceUpdated} optionally." + }, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_setDomainPrice", + "nameLocation": "10223:15:84", + "parameters": { + "id": 60527, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 60516, + "mutability": "mutable", + "name": "operator", + "nameLocation": "10252:8:84", + "nodeType": "VariableDeclaration", + "scope": 60578, + "src": "10244:16:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 60515, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10244:7:84", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 60518, + "mutability": "mutable", + "name": "lbHash", + "nameLocation": "10274:6:84", + "nodeType": "VariableDeclaration", + "scope": 60578, + "src": "10266:14:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 60517, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "10266:7:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 60520, + "mutability": "mutable", + "name": "ronPrice", + "nameLocation": "10294:8:84", + "nodeType": "VariableDeclaration", + "scope": 60578, + "src": "10286:16:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60519, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10286:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 60522, + "mutability": "mutable", + "name": "proofHash", + "nameLocation": "10316:9:84", + "nodeType": "VariableDeclaration", + "scope": 60578, + "src": "10308:17:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 60521, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "10308:7:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 60524, + "mutability": "mutable", + "name": "setType", + "nameLocation": "10339:7:84", + "nodeType": "VariableDeclaration", + "scope": 60578, + "src": "10331:15:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60523, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10331:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 60526, + "mutability": "mutable", + "name": "forced", + "nameLocation": "10357:6:84", + "nodeType": "VariableDeclaration", + "scope": 60578, + "src": "10352:11:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 60525, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10352:4:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "10238:129:84" + }, + "returnParameters": { + "id": 60530, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 60529, + "mutability": "mutable", + "name": "updated", + "nameLocation": "10391:7:84", + "nodeType": "VariableDeclaration", + "scope": 60578, + "src": "10386:12:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 60528, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10386:4:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "10385:14:84" + }, + "scope": 60775, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "id": 60595, + "nodeType": "FunctionDefinition", + "src": "10819:121:84", + "nodes": [], + "body": { + "id": 60594, + "nodeType": "Block", + "src": "10865:75:84", + "nodes": [], + "statements": [ + { + "expression": { + "id": 60586, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 60584, + "name": "_taxRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59687, + "src": "10871:9:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 60585, + "name": "ratio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60581, + "src": "10883:5:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10871:17:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 60587, + "nodeType": "ExpressionStatement", + "src": "10871:17:84" + }, + { + "eventCall": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 60589, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51922, + "src": "10915:10:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 60590, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10915:12:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 60591, + "name": "ratio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60581, + "src": "10929:5:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 60588, + "name": "TaxRatioUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64394, + "src": "10899:15:84", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 60592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10899:36:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 60593, + "nodeType": "EmitStatement", + "src": "10894:41:84" + } + ] + }, + "documentation": { + "id": 60579, + "nodeType": "StructuredDocumentation", + "src": "10721:95:84", + "text": " @dev Sets renewal reservation ratio.\n Emits an event {TaxRatioUpdated}." + }, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_setTaxRatio", + "nameLocation": "10828:12:84", + "parameters": { + "id": 60582, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 60581, + "mutability": "mutable", + "name": "ratio", + "nameLocation": "10849:5:84", + "nodeType": "VariableDeclaration", + "scope": 60595, + "src": "10841:13:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60580, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10841:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "10840:15:84" + }, + "returnParameters": { + "id": 60583, + "nodeType": "ParameterList", + "parameters": [], + "src": "10865:0:84" + }, + "scope": 60775, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "id": 60616, + "nodeType": "FunctionDefinition", + "src": "11050:243:84", + "nodes": [], + "body": { + "id": 60615, + "nodeType": "Block", + "src": "11137:156:84", + "nodes": [], + "statements": [ + { + "expression": { + "id": 60604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 60602, + "name": "_dpDownScaler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59700, + "src": "11143:13:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_PeriodScaler_$66624_storage", + "typeString": "struct PeriodScaler storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 60603, + "name": "domainPriceScaleRule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60599, + "src": "11159:20:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_PeriodScaler_$66624_calldata_ptr", + "typeString": "struct PeriodScaler calldata" + } + }, + "src": "11143:36:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_PeriodScaler_$66624_storage", + "typeString": "struct PeriodScaler storage ref" + } + }, + "id": 60605, + "nodeType": "ExpressionStatement", + "src": "11143:36:84" + }, + { + "eventCall": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 60607, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51922, + "src": "11218:10:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 60608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11218:12:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 60609, + "name": "domainPriceScaleRule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60599, + "src": "11232:20:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_PeriodScaler_$66624_calldata_ptr", + "typeString": "struct PeriodScaler calldata" + } + }, + "id": 60610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11253:5:84", + "memberName": "ratio", + "nodeType": "MemberAccess", + "referencedDeclaration": 66621, + "src": "11232:26:84", + "typeDescriptions": { + "typeIdentifier": "t_uint192", + "typeString": "uint192" + } + }, + { + "expression": { + "id": 60611, + "name": "domainPriceScaleRule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60599, + "src": "11260:20:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_PeriodScaler_$66624_calldata_ptr", + "typeString": "struct PeriodScaler calldata" + } + }, + "id": 60612, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11281:6:84", + "memberName": "period", + "nodeType": "MemberAccess", + "referencedDeclaration": 66623, + "src": "11260:27:84", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint192", + "typeString": "uint192" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 60606, + "name": "DomainPriceScaleRuleUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64441, + "src": "11190:27:84", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint192_$_t_uint64_$returns$__$", + "typeString": "function (address,uint192,uint64)" + } + }, + "id": 60613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11190:98:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 60614, + "nodeType": "EmitStatement", + "src": "11185:103:84" + } + ] + }, + "documentation": { + "id": 60596, + "nodeType": "StructuredDocumentation", + "src": "10944:103:84", + "text": " @dev Sets domain price scale rule.\n Emits events {DomainPriceScaleRuleUpdated}." + }, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_setDomainPriceScaleRule", + "nameLocation": "11059:24:84", + "parameters": { + "id": 60600, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 60599, + "mutability": "mutable", + "name": "domainPriceScaleRule", + "nameLocation": "11106:20:84", + "nodeType": "VariableDeclaration", + "scope": 60616, + "src": "11084:42:84", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_struct$_PeriodScaler_$66624_calldata_ptr", + "typeString": "struct PeriodScaler" + }, + "typeName": { + "id": 60598, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 60597, + "name": "PeriodScaler", + "nameLocations": [ + "11084:12:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 66624, + "src": "11084:12:84" + }, + "referencedDeclaration": 66624, + "src": "11084:12:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_PeriodScaler_$66624_storage_ptr", + "typeString": "struct PeriodScaler" + } + }, + "visibility": "internal" + } + ], + "src": "11083:44:84" + }, + "returnParameters": { + "id": 60601, + "nodeType": "ParameterList", + "parameters": [], + "src": "11137:0:84" + }, + "scope": 60775, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "id": 60700, + "nodeType": "FunctionDefinition", + "src": "11450:754:84", + "nodes": [], + "body": { + "id": 60699, + "nodeType": "Block", + "src": "11527:677:84", + "nodes": [], + "statements": [ + { + "assignments": [ + 60625 + ], + "declarations": [ + { + "constant": false, + "id": 60625, + "mutability": "mutable", + "name": "operator", + "nameLocation": "11541:8:84", + "nodeType": "VariableDeclaration", + "scope": 60699, + "src": "11533:16:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 60624, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11533:7:84", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 60628, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 60626, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51922, + "src": "11552:10:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 60627, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11552:12:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11533:31:84" + }, + { + "assignments": [ + 60631 + ], + "declarations": [ + { + "constant": false, + "id": 60631, + "mutability": "mutable", + "name": "renewalFee", + "nameLocation": "11588:10:84", + "nodeType": "VariableDeclaration", + "scope": 60699, + "src": "11570:28:84", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RenewalFee_$64382_memory_ptr", + "typeString": "struct INSDomainPrice.RenewalFee" + }, + "typeName": { + "id": 60630, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 60629, + "name": "RenewalFee", + "nameLocations": [ + "11570:10:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 64382, + "src": "11570:10:84" + }, + "referencedDeclaration": 64382, + "src": "11570:10:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RenewalFee_$64382_storage_ptr", + "typeString": "struct INSDomainPrice.RenewalFee" + } + }, + "visibility": "internal" + } + ], + "id": 60632, + "nodeType": "VariableDeclarationStatement", + "src": "11570:28:84" + }, + { + "assignments": [ + 60634 + ], + "declarations": [ + { + "constant": false, + "id": 60634, + "mutability": "mutable", + "name": "length", + "nameLocation": "11612:6:84", + "nodeType": "VariableDeclaration", + "scope": 60699, + "src": "11604:14:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60633, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11604:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 60637, + "initialValue": { + "expression": { + "id": 60635, + "name": "renewalFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60621, + "src": "11621:11:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_RenewalFee_$64382_calldata_ptr_$dyn_calldata_ptr", + "typeString": "struct INSDomainPrice.RenewalFee calldata[] calldata" + } + }, + "id": 60636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11633:6:84", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "11621:18:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11604:35:84" + }, + { + "assignments": [ + 60639 + ], + "declarations": [ + { + "constant": false, + "id": 60639, + "mutability": "mutable", + "name": "maxRenewalFeeLength", + "nameLocation": "11653:19:84", + "nodeType": "VariableDeclaration", + "scope": 60699, + "src": "11645:27:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60638, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11645:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 60641, + "initialValue": { + "id": 60640, + "name": "_rnfMaxLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59690, + "src": "11675:13:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11645:43:84" + }, + { + "body": { + "id": 60683, + "nodeType": "Block", + "src": "11724:308:84", + "statements": [ + { + "expression": { + "id": 60652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 60648, + "name": "renewalFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60631, + "src": "11732:10:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RenewalFee_$64382_memory_ptr", + "typeString": "struct INSDomainPrice.RenewalFee memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "baseExpression": { + "id": 60649, + "name": "renewalFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60621, + "src": "11745:11:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_RenewalFee_$64382_calldata_ptr_$dyn_calldata_ptr", + "typeString": "struct INSDomainPrice.RenewalFee calldata[] calldata" + } + }, + "id": 60651, + "indexExpression": { + "id": 60650, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60643, + "src": "11757:1:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11745:14:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RenewalFee_$64382_calldata_ptr", + "typeString": "struct INSDomainPrice.RenewalFee calldata" + } + }, + "src": "11732:27:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RenewalFee_$64382_memory_ptr", + "typeString": "struct INSDomainPrice.RenewalFee memory" + } + }, + "id": 60653, + "nodeType": "ExpressionStatement", + "src": "11732:27:84" + }, + { + "expression": { + "id": 60661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 60654, + "name": "maxRenewalFeeLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60639, + "src": "11767:19:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 60657, + "name": "maxRenewalFeeLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60639, + "src": "11798:19:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 60658, + "name": "renewalFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60631, + "src": "11819:10:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RenewalFee_$64382_memory_ptr", + "typeString": "struct INSDomainPrice.RenewalFee memory" + } + }, + "id": 60659, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11830:11:84", + "memberName": "labelLength", + "nodeType": "MemberAccess", + "referencedDeclaration": 64379, + "src": "11819:22:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 60655, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53173, + "src": "11789:4:84", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$53173_$", + "typeString": "type(library Math)" + } + }, + "id": 60656, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11794:3:84", + "memberName": "max", + "nodeType": "MemberAccess", + "referencedDeclaration": 52332, + "src": "11789:8:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 60660, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11789:53:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11767:75:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 60662, + "nodeType": "ExpressionStatement", + "src": "11767:75:84" + }, + { + "expression": { + "id": 60669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 60663, + "name": "_rnFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59705, + "src": "11850:6:84", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 60666, + "indexExpression": { + "expression": { + "id": 60664, + "name": "renewalFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60631, + "src": "11857:10:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RenewalFee_$64382_memory_ptr", + "typeString": "struct INSDomainPrice.RenewalFee memory" + } + }, + "id": 60665, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11868:11:84", + "memberName": "labelLength", + "nodeType": "MemberAccess", + "referencedDeclaration": 64379, + "src": "11857:22:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11850:30:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 60667, + "name": "renewalFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60631, + "src": "11883:10:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RenewalFee_$64382_memory_ptr", + "typeString": "struct INSDomainPrice.RenewalFee memory" + } + }, + "id": 60668, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11894:3:84", + "memberName": "fee", + "nodeType": "MemberAccess", + "referencedDeclaration": 64381, + "src": "11883:14:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11850:47:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 60670, + "nodeType": "ExpressionStatement", + "src": "11850:47:84" + }, + { + "eventCall": { + "arguments": [ + { + "id": 60672, + "name": "operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60625, + "src": "11936:8:84", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 60673, + "name": "renewalFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60631, + "src": "11946:10:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RenewalFee_$64382_memory_ptr", + "typeString": "struct INSDomainPrice.RenewalFee memory" + } + }, + "id": 60674, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11957:11:84", + "memberName": "labelLength", + "nodeType": "MemberAccess", + "referencedDeclaration": 64379, + "src": "11946:22:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 60675, + "name": "renewalFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60631, + "src": "11970:10:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RenewalFee_$64382_memory_ptr", + "typeString": "struct INSDomainPrice.RenewalFee memory" + } + }, + "id": 60676, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11981:3:84", + "memberName": "fee", + "nodeType": "MemberAccess", + "referencedDeclaration": 64381, + "src": "11970:14:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 60671, + "name": "RenewalFeeByLengthUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64410, + "src": "11910:25:84", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 60677, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11910:75:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 60678, + "nodeType": "EmitStatement", + "src": "11905:80:84" + }, + { + "id": 60682, + "nodeType": "UncheckedBlock", + "src": "11994:32:84", + "statements": [ + { + "expression": { + "id": 60680, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "12014:3:84", + "subExpression": { + "id": 60679, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60643, + "src": "12016:1:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 60681, + "nodeType": "ExpressionStatement", + "src": "12014:3:84" + } + ] + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 60647, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 60645, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60643, + "src": "11711:1:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 60646, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60634, + "src": "11715:6:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11711:10:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 60684, + "initializationExpression": { + "assignments": [ + 60643 + ], + "declarations": [ + { + "constant": false, + "id": 60643, + "mutability": "mutable", + "name": "i", + "nameLocation": "11708:1:84", + "nodeType": "VariableDeclaration", + "scope": 60684, + "src": "11700:9:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60642, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11700:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 60644, + "nodeType": "VariableDeclarationStatement", + "src": "11700:9:84" + }, + "nodeType": "ForStatement", + "src": "11695:337:84" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 60687, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 60685, + "name": "maxRenewalFeeLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60639, + "src": "12042:19:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 60686, + "name": "_rnfMaxLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59690, + "src": "12065:13:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12042:36:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 60698, + "nodeType": "IfStatement", + "src": "12038:162:84", + "trueBody": { + "id": 60697, + "nodeType": "Block", + "src": "12080:120:84", + "statements": [ + { + "expression": { + "id": 60690, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 60688, + "name": "_rnfMaxLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59690, + "src": "12088:13:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 60689, + "name": "maxRenewalFeeLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60639, + "src": "12104:19:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12088:35:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 60691, + "nodeType": "ExpressionStatement", + "src": "12088:35:84" + }, + { + "eventCall": { + "arguments": [ + { + "id": 60693, + "name": "operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60625, + "src": "12163:8:84", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 60694, + "name": "maxRenewalFeeLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60639, + "src": "12173:19:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 60692, + "name": "MaxRenewalFeeLengthUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64401, + "src": "12136:26:84", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 60695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12136:57:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 60696, + "nodeType": "EmitStatement", + "src": "12131:62:84" + } + ] + } + } + ] + }, + "documentation": { + "id": 60617, + "nodeType": "StructuredDocumentation", + "src": "11297:150:84", + "text": " @dev Sets renewal fee.\n Emits events {RenewalFeeByLengthUpdated}.\n Emits an event {MaxRenewalFeeLengthUpdated} optionally." + }, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_setRenewalFeeByLengths", + "nameLocation": "11459:23:84", + "parameters": { + "id": 60622, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 60621, + "mutability": "mutable", + "name": "renewalFees", + "nameLocation": "11505:11:84", + "nodeType": "VariableDeclaration", + "scope": 60700, + "src": "11483:33:84", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_RenewalFee_$64382_calldata_ptr_$dyn_calldata_ptr", + "typeString": "struct INSDomainPrice.RenewalFee[]" + }, + "typeName": { + "baseType": { + "id": 60619, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 60618, + "name": "RenewalFee", + "nameLocations": [ + "11483:10:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 64382, + "src": "11483:10:84" + }, + "referencedDeclaration": 64382, + "src": "11483:10:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RenewalFee_$64382_storage_ptr", + "typeString": "struct INSDomainPrice.RenewalFee" + } + }, + "id": 60620, + "nodeType": "ArrayTypeName", + "src": "11483:12:84", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_RenewalFee_$64382_storage_$dyn_storage_ptr", + "typeString": "struct INSDomainPrice.RenewalFee[]" + } + }, + "visibility": "internal" + } + ], + "src": "11482:35:84" + }, + "returnParameters": { + "id": 60623, + "nodeType": "ParameterList", + "parameters": [], + "src": "11527:0:84" + }, + "scope": 60775, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "id": 60732, + "nodeType": "FunctionDefinition", + "src": "12305:296:84", + "nodes": [], + "body": { + "id": 60731, + "nodeType": "Block", + "src": "12407:194:84", + "nodes": [], + "statements": [ + { + "expression": { + "id": 60713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 60711, + "name": "_pyth", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59680, + "src": "12413:5:84", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPyth_$54460", + "typeString": "contract IPyth" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 60712, + "name": "pyth", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60704, + "src": "12421:4:84", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPyth_$54460", + "typeString": "contract IPyth" + } + }, + "src": "12413:12:84", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPyth_$54460", + "typeString": "contract IPyth" + } + }, + "id": 60714, + "nodeType": "ExpressionStatement", + "src": "12413:12:84" + }, + { + "expression": { + "id": 60717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 60715, + "name": "_maxAcceptableAge", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59693, + "src": "12431:17:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 60716, + "name": "maxAcceptableAge", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60706, + "src": "12451:16:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12431:36:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 60718, + "nodeType": "ExpressionStatement", + "src": "12431:36:84" + }, + { + "expression": { + "id": 60721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 60719, + "name": "_pythIdForRONUSD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59696, + "src": "12473:16:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 60720, + "name": "pythIdForRONUSD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60708, + "src": "12492:15:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "12473:34:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 60722, + "nodeType": "ExpressionStatement", + "src": "12473:34:84" + }, + { + "eventCall": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 60724, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51922, + "src": "12542:10:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 60725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12542:12:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 60726, + "name": "pyth", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60704, + "src": "12556:4:84", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPyth_$54460", + "typeString": "contract IPyth" + } + }, + { + "id": 60727, + "name": "maxAcceptableAge", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60706, + "src": "12562:16:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 60728, + "name": "pythIdForRONUSD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60708, + "src": "12580:15:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_contract$_IPyth_$54460", + "typeString": "contract IPyth" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 60723, + "name": "PythOracleConfigUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64453, + "src": "12518:23:84", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_contract$_IPyth_$54460_$_t_uint256_$_t_bytes32_$returns$__$", + "typeString": "function (address,contract IPyth,uint256,bytes32)" + } + }, + "id": 60729, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12518:78:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 60730, + "nodeType": "EmitStatement", + "src": "12513:83:84" + } + ] + }, + "documentation": { + "id": 60701, + "nodeType": "StructuredDocumentation", + "src": "12208:94:84", + "text": " @dev Sets Pyth Oracle config.\n Emits events {PythOracleConfigUpdated}." + }, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_setPythOracleConfig", + "nameLocation": "12314:20:84", + "parameters": { + "id": 60709, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 60704, + "mutability": "mutable", + "name": "pyth", + "nameLocation": "12341:4:84", + "nodeType": "VariableDeclaration", + "scope": 60732, + "src": "12335:10:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPyth_$54460", + "typeString": "contract IPyth" + }, + "typeName": { + "id": 60703, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 60702, + "name": "IPyth", + "nameLocations": [ + "12335:5:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 54460, + "src": "12335:5:84" + }, + "referencedDeclaration": 54460, + "src": "12335:5:84", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPyth_$54460", + "typeString": "contract IPyth" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 60706, + "mutability": "mutable", + "name": "maxAcceptableAge", + "nameLocation": "12355:16:84", + "nodeType": "VariableDeclaration", + "scope": 60732, + "src": "12347:24:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60705, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12347:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 60708, + "mutability": "mutable", + "name": "pythIdForRONUSD", + "nameLocation": "12381:15:84", + "nodeType": "VariableDeclaration", + "scope": 60732, + "src": "12373:23:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 60707, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12373:7:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "12334:63:84" + }, + "returnParameters": { + "id": 60710, + "nodeType": "ParameterList", + "parameters": [], + "src": "12407:0:84" + }, + "scope": 60775, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "id": 60774, + "nodeType": "FunctionDefinition", + "src": "12714:361:84", + "nodes": [], + "body": { + "id": 60773, + "nodeType": "Block", + "src": "12787:288:84", + "nodes": [], + "statements": [ + { + "assignments": [ + 60742 + ], + "declarations": [ + { + "constant": false, + "id": 60742, + "mutability": "mutable", + "name": "dp", + "nameLocation": "12818:2:84", + "nodeType": "VariableDeclaration", + "scope": 60773, + "src": "12793:27:84", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_TimestampWrapper_$66547_storage_ptr", + "typeString": "struct TimestampWrapper" + }, + "typeName": { + "id": 60741, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 60740, + "name": "TimestampWrapper", + "nameLocations": [ + "12793:16:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 66547, + "src": "12793:16:84" + }, + "referencedDeclaration": 66547, + "src": "12793:16:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_TimestampWrapper_$66547_storage_ptr", + "typeString": "struct TimestampWrapper" + } + }, + "visibility": "internal" + } + ], + "id": 60746, + "initialValue": { + "baseExpression": { + "id": 60743, + "name": "_dp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59711, + "src": "12823:3:84", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_TimestampWrapper_$66547_storage_$", + "typeString": "mapping(bytes32 => struct TimestampWrapper storage ref)" + } + }, + "id": 60745, + "indexExpression": { + "id": 60744, + "name": "lbHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60735, + "src": "12827:6:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12823:11:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_TimestampWrapper_$66547_storage", + "typeString": "struct TimestampWrapper storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12793:41:84" + }, + { + "assignments": [ + 60748 + ], + "declarations": [ + { + "constant": false, + "id": 60748, + "mutability": "mutable", + "name": "lastSyncedAt", + "nameLocation": "12848:12:84", + "nodeType": "VariableDeclaration", + "scope": 60773, + "src": "12840:20:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60747, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12840:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 60751, + "initialValue": { + "expression": { + "id": 60749, + "name": "dp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60742, + "src": "12863:2:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_TimestampWrapper_$66547_storage_ptr", + "typeString": "struct TimestampWrapper storage pointer" + } + }, + "id": 60750, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "12866:9:84", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": 66546, + "src": "12863:12:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12840:35:84" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 60754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 60752, + "name": "lastSyncedAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60748, + "src": "12885:12:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 60753, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12901:1:84", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "12885:17:84", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 60757, + "nodeType": "IfStatement", + "src": "12881:31:84", + "trueBody": { + "expression": { + "hexValue": "30", + "id": 60755, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12911:1:84", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 60739, + "id": 60756, + "nodeType": "Return", + "src": "12904:8:84" + } + }, + { + "assignments": [ + 60759 + ], + "declarations": [ + { + "constant": false, + "id": 60759, + "mutability": "mutable", + "name": "passedDuration", + "nameLocation": "12927:14:84", + "nodeType": "VariableDeclaration", + "scope": 60773, + "src": "12919:22:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60758, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12919:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 60764, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 60763, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 60760, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "12944:5:84", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 60761, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "12950:9:84", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "12944:15:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 60762, + "name": "lastSyncedAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60748, + "src": "12962:12:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12944:30:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12919:55:84" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 60767, + "name": "dp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60742, + "src": "13016:2:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_TimestampWrapper_$66547_storage_ptr", + "typeString": "struct TimestampWrapper storage pointer" + } + }, + "id": 60768, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "13019:5:84", + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": 66544, + "src": "13016:8:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 60769, + "name": "MAX_PERCENTAGE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59665, + "src": "13032:14:84", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 60770, + "name": "passedDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60759, + "src": "13053:14:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 60765, + "name": "_dpDownScaler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59700, + "src": "12987:13:84", + "typeDescriptions": { + "typeIdentifier": "t_struct$_PeriodScaler_$66624_storage", + "typeString": "struct PeriodScaler storage ref" + } + }, + "id": 60766, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "13001:9:84", + "memberName": "scaleDown", + "nodeType": "MemberAccess", + "referencedDeclaration": 66714, + "src": "12987:23:84", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_struct$_PeriodScaler_$66624_memory_ptr_$_t_uint256_$_t_uint64_$_t_uint256_$returns$_t_uint256_$attached_to$_t_struct$_PeriodScaler_$66624_memory_ptr_$", + "typeString": "function (struct PeriodScaler memory,uint256,uint64,uint256) pure returns (uint256)" + } + }, + "id": 60771, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [ + "13013:1:84", + "13026:4:84", + "13048:3:84" + ], + "names": [ + "v", + "maxR", + "dur" + ], + "nodeType": "FunctionCall", + "src": "12987:83:84", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 60739, + "id": 60772, + "nodeType": "Return", + "src": "12980:90:84" + } + ] + }, + "documentation": { + "id": 60733, + "nodeType": "StructuredDocumentation", + "src": "12605:106:84", + "text": " @dev Returns the current domain price applied the business rule: deduced x% each y seconds." + }, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getDomainPrice", + "nameLocation": "12723:15:84", + "parameters": { + "id": 60736, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 60735, + "mutability": "mutable", + "name": "lbHash", + "nameLocation": "12747:6:84", + "nodeType": "VariableDeclaration", + "scope": 60774, + "src": "12739:14:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 60734, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12739:7:84", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "12738:16:84" + }, + "returnParameters": { + "id": 60739, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 60738, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 60774, + "src": "12778:7:84", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60737, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12778:7:84", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12777:9:84" + }, + "scope": 60775, + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 59639, + "name": "Initializable", + "nameLocations": [ + "1005:13:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 49864, + "src": "1005:13:84" + }, + "id": 59640, + "nodeType": "InheritanceSpecifier", + "src": "1005:13:84" + }, + { + "baseName": { + "id": 59641, + "name": "AccessControlEnumerable", + "nameLocations": [ + "1020:23:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 48591, + "src": "1020:23:84" + }, + "id": 59642, + "nodeType": "InheritanceSpecifier", + "src": "1020:23:84" + }, + { + "baseName": { + "id": 59643, + "name": "INSDomainPrice", + "nameLocations": [ + "1045:14:84" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 64629, + "src": "1045:14:84" + }, + "id": 59644, + "nodeType": "InheritanceSpecifier", + "src": "1045:14:84" + } + ], + "canonicalName": "RNSDomainPrice", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "linearizedBaseContracts": [ + 60775, + 64629, + 48591, + 48466, + 52295, + 52307, + 48689, + 48664, + 51932, + 49864 + ], + "name": "RNSDomainPrice", + "nameLocation": "987:14:84", + "scope": 60776, + "usedErrors": [ + 64373, + 64375, + 64377, + 66631, + 67246, + 67254 + ], + "usedEvents": [ + 48603, + 48612, + 48621, + 49710, + 64394, + 64401, + 64410, + 64419, + 64432, + 64441, + 64453 + ] + } + ], + "license": "MIT" + }, + "blockNumber": 21444223, + "bytecode": "0x60806040526200000e62000014565b620000d5565b600054610100900460ff1615620000815760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811614620000d3576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6130fb80620000e56000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80635c68c83011610104578063ca15c873116100a2578063e229a67011610071578063e229a67014610480578063f4651f4914610493578063f5b541a6146104b4578063fe303ebf146104c957600080fd5b8063ca15c87314610434578063d40ed58c14610447578063d547741f1461045a578063dd28776d1461046d57600080fd5b80637174026e116100de5780637174026e146103db5780639010d07c146103ee57806391d1485414610419578063a217fddf1461042c57600080fd5b80635c68c830146103985780635ef32e2c146103ab578063713a69a7146103b357600080fd5b80632f6ee6951161017157806339e47da71161014b57806339e47da7146102ec5780634c255c971461034457806353faf90914610365578063599eaabf1461038557600080fd5b80632f6ee695146102ac57806335feb741146102c657806336568abe146102d957600080fd5b8063248a9ca3116101ad578063248a9ca31461023257806328dd3065146102565780632be09ecc1461026b5780632f2ff15d1461029957600080fd5b806301ffc9a7146101d4578063037f1769146101fc5780630a44f51f1461021d575b600080fd5b6101e76101e23660046122e1565b6104dc565b60405190151581526020015b60405180910390f35b61020f61020a36600461230b565b610507565b6040519081526020016101f3565b610225610599565b6040516101f39190612324565b61020f61024036600461230b565b6000908152600160208190526040909120015490565b61026961026436600461239b565b610676565b005b603554603954603a54604080516001600160a01b0390941684526020840192909252908201526060016101f3565b6102696102a73660046123d0565b610692565b6102b4601281565b60405160ff90911681526020016101f3565b6102696102d4366004612444565b6106bd565b6102696102e73660046123d0565b6106d2565b604080518082018252600080825260209182015281518083018352603b546001600160c01b0381168083526001600160401b03600160c01b9092048216928401928352845190815291511691810191909152016101f3565b61034d61271081565b6040516001600160401b0390911681526020016101f3565b6103786103733660046124c9565b610755565b6040516101f3919061258c565b6102696103933660046124c9565b61087c565b61020f6103a63660046125d2565b61093a565b60375461020f565b6103c66103c1366004612772565b6109b8565b604080519283526020830191909152016101f3565b61020f6103e936600461230b565b6109e4565b6104016103fc3660046127a6565b610a77565b6040516001600160a01b0390911681526020016101f3565b6101e76104273660046123d0565b610a96565b61020f600081565b61020f61044236600461230b565b610ac1565b6102696104553660046127e0565b610ad8565b6102696104683660046123d0565b610c8e565b61026961047b3660046128b9565b610cb4565b61026961048e366004612924565b610dc0565b6104a66104a1366004612940565b610dd4565b6040516101f3929190612984565b61020f6000805160206130a683398151915281565b6102696104d736600461230b565b61118a565b60006001600160e01b03198216635a05180f60e01b148061050157506105018261119e565b92915050565b603554603a5460395460405163052571af60e51b815260009361050193869360129384936001600160a01b03169263a4ae35e09261055092600401918252602082015260400190565b608060405180830381865afa15801561056d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059191906129bf565b9291906111d3565b603854606090806001600160401b038111156105b7576105b7612643565b6040519080825280602002602001820160405280156105fc57816020015b60408051808201909152600080825260208201528152602001906001900390816105d55790505b5091506000805b82811015610670578060010191508184828151811061062457610624612a2c565b60200260200101516000018181525050603c60008381526020019081526020016000205484828151811061065a5761065a612a2c565b6020908102919091018101510152600101610603565b50505090565b600061068181611214565b61068c848484611221565b50505050565b600082815260016020819052604090912001546106ae81611214565b6106b88383611293565b505050565b60006106c881611214565b6106b883836112b5565b6001600160a01b03811633146107475760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61075182826113ce565b5050565b60606000805160206130a683398151915261076f81611214565b60006107818b8b8b8b8b8b8b8b6113f0565b905033816001600160401b0381111561079c5761079c612643565b6040519080825280602002602001820160405280156107c5578160200160208202803683370190505b50935060005b8281101561086c57610842828e8e848181106107e9576107e9612a2c565b905060200201358d8d8581811061080257610802612a2c565b905060200201358c8c8681811061081b5761081b612a2c565b905060200201358b8b8781811061083457610834612a2c565b90506020020135600061143e565b85828151811061085457610854612a2c565b911515602092830291909101909101526001016107cb565b5050505098975050505050505050565b6000805160206130a683398151915261089481611214565b60006108a68a8a8a8a8a8a8a8a6113f0565b90503360005b8281101561092c57610923828d8d848181106108ca576108ca612a2c565b905060200201358c8c858181106108e3576108e3612a2c565b905060200201358b8b868181106108fc576108fc612a2c565b905060200201358a8a8781811061091557610915612a2c565b90506020020135600161143e565b506001016108ac565b505050505050505050505050565b6000603e600061097f85858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506114cd92505050565b8152602001908152602001600020549050806000036109b157604051635421761560e11b815260040160405180910390fd5b1992915050565b6000806109d26109cd84805160209091012090565b6114d8565b91506109dd826109e4565b9050915091565b603554603a5460395460405163052571af60e51b815260048101929092526024820152600091610501918491601291829161059191601119916001600160a01b03169063a4ae35e090604401608060405180830381865afa158015610a4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7191906129bf565b90611552565b6000828152600260205260408120610a8f90836116ac565b9392505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000818152600260205260408120610501906116b8565b600054610100900460ff1615808015610af85750600054600160ff909116105b80610b125750303b158015610b12575060005460ff166001145b610b755760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161073e565b6000805460ff191660011790558015610b98576000805461ff0019166101001790555b896000805160206130a683398151915260005b82811015610beb57610be3828f8f84818110610bc957610bc9612a2c565b9050602002016020810190610bde9190612a42565b6116c2565b600101610bab565b50603680546001600160a01b0319166001600160a01b038816179055610c1260008f6116c2565b610c1c8b8b6112b5565b610c25896116cc565b610c2e88611701565b610c39878686611221565b5050801561092c576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050505050505050505050565b60008281526001602081905260409091200154610caa81611214565b6106b883836113ce565b6000805160206130a6833981519152610ccc81611214565b83801580610cda5750808314155b15610cf857604051634ec4810560e11b815260040160405180910390fd5b600033815b83811015610db557868682818110610d1757610d17612a2c565b9050602002013519925082603e60008b8b85818110610d3857610d38612a2c565b90506020020135815260200190815260200160002081905550888882818110610d6357610d63612a2c565b90506020020135826001600160a01b03167fb52d278cb3ef3b003bdfb385ce2eb23a83eb6d713724abfba1acaa16ccf6621485604051610da591815260200190565b60405180910390a3600101610cfd565b505050505050505050565b6000610dcb81611214565b61075182611701565b604080518082019091526000808252602082015260408051808201909152600080825260208201526000610e078561177d565b855160208701209091506000906000818152603e60205260409020549091508015610e3e57610e37811987612a75565b855261115d565b6000603c6000610e508660385461186b565b81526020019081526020016000205490508087610e6d9190612a75565b86526000610eac7fba69923fa107dbf5a25a073a10b7c9216ae39fbadc95dc891d460d9ae315d6888a6000918252805160209182012090526040902090565b6036546040516329fc8caf60e11b8152600481018390529192506001600160a01b03169081906353f9195e90602401602060405180830381865afa158015610ef8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1c9190612a9c565b15611159576000816001600160a01b0316638c8433146040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f859190612ab7565b90506000611020826001600160a01b03166303e9e609866040518263ffffffff1660e01b8152600401610fba91815260200190565b600060405180830381865afa158015610fd7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610fff9190810190612b5e565b60200151604001516001600160401b03168c6001600160401b038016611881565b6040516378bd793560e01b8152600481018690529091506000906001600160a01b038516906378bd79359060240160e060405180830381865afa15801561106b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061108f9190612c65565b50604081015160600151909150801580159061111d5750846001600160a01b0316630afe1bb36040518163ffffffff1660e01b8152600401602060405180830381865afa1580156110e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111089190612d02565b6001600160401b031661111b8285612d1f565b115b1561113b57604051631bb03f9d60e01b815260040160405180910390fd5b61115260375461114a8b6114d8565b6127106118b7565b8b52505050505b5050505b8351611168906109e4565b60208501528451611178906109e4565b60208601525092959194509092505050565b600061119581611214565b610751826116cc565b60006001600160e01b03198216637965db0b60e01b148061050157506301ffc9a760e01b6001600160e01b0319831614610501565b6000611209846111f9876000015160070b8860400151866111f49190612d32565b6119a1565b6112046001876119a1565b6118b7565b90505b949350505050565b61121e81336119fb565b50565b603580546001600160a01b0319166001600160a01b0385169081179091556039839055603a8290558190336001600160a01b03167f671083457675651266070f50f1438ef8190b7da64d38f16f5117246236b7dd5b8560405161128691815260200190565b60405180910390a4505050565b61129d8282611a54565b60008281526002602052604090206106b89082611abf565b60408051808201909152600080825260208201523390603854839060005b82811015611380578686828181106112ed576112ed612a2c565b9050604002018036038101906113039190612d59565b9350611313828560000151611ad4565b6020808601805187516000908152603c90935260409283902055865190519151929450916001600160a01b038816917f85211e946be6d537cd1b22a183d04151d4e5d0818e1ce75d2e5ebaecba0a5a779161137091815260200190565b60405180910390a36001016112d3565b5060385481146113c657603881905560405181906001600160a01b038616907f7e7c3a4273ac1af351af63a82e91a8335bcb389ba681375a32dbe4455d0d474b90600090a35b505050505050565b6113d88282611ae3565b60008281526002602052604090206106b89082611b4a565b868015806113fe5750858114155b806114095750838114155b806114145750818114155b1561143257604051634ec4810560e11b815260040160405180910390fd5b98975050505050505050565b60008061144a86610507565b6000888152603d6020526040902090915083806114675750805482115b925082156114c157818155426001820155604080518381526020810187905287918a916001600160a01b038d16917f60d5fd6d2284807447aae62f93c05517a647b8e8479c3af2c27ee1d1c85b540f910160405180910390a45b50509695505050505050565b805160209091012090565b6000818152603d6020526040812060018101548083036114fc575060009392505050565b60006115088242612d1f565b835460408051808201909152603b546001600160c01b0381168252600160c01b90046001600160401b03166020820152919250611549919061271084611b5f565b95945050505050565b604080516080810182526000808252602082018190529181018290526060810191909152600061158b600185604001516111f490612d8b565b90506001600160ff1b038111156115c1576040808501519051633e87ca5d60e11b815260039190910b600482015260240161073e565b60006115d160016111f486612d8b565b90506001600160ff1b0381111561160157604051633e87ca5d60e11b8152600385900b600482015260240161073e565b845160009060070b6116138385612dae565b61161d9190612df4565b9050677fffffffffffffff81131561166957604086810151875191516329b2fb5560e11b8152600391820b60048201529087900b602482015260079190910b604482015260640161073e565b60405180608001604052808260070b815260200187602001516001600160401b031681526020018660030b81526020018760600151815250935050505092915050565b6000610a8f8383611c35565b6000610501825490565b6107518282611293565b6037819055604051819033907f1e97e29c863545fad1ce79512b4deb3f0b7d30c3356bc7bbbd6588c9e68cf07390600090a350565b80603b61170e8282612e37565b503390507fa7f38b74141f9a2ac1b02640ded2b98431ef77f8cf2e3ade85c71d6c8420dc646117406020840184612e79565b6117506040850160208601612e96565b604080516001600160c01b0390931683526001600160401b0390911660208301520160405180910390a250565b600080600080845190505b808310156118635760008584815181106117a4576117a4612a2c565b01602001516001600160f81b0319169050600160ff1b8110156117cc57600184019350611857565b600760fd1b6001600160f81b0319821610156117ed57600284019350611857565b600f60fc1b6001600160f81b03198216101561180e57600384019350611857565b601f60fb1b6001600160f81b03198216101561182f57600484019350611857565b603f60fa1b6001600160f81b03198216101561185057600584019350611857565b6006840193505b50600190910190611788565b509392505050565b600081831061187a5781610a8f565b5090919050565b60008184118061189057508183115b1561189c575080610a8f565b6118a68484611c5f565b905081811115610a8f575092915050565b60008080600019858709858702925082811083820303915050806000036118f1578382816118e7576118e7612dde565b0492505050610a8f565b8084116119385760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b604482015260640161073e565b60008486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091026000889003889004909101858311909403939093029303949094049190911702949350505050565b6000808260030b12156119d3576119b782612d8b565b6119c290600a612f97565b6119cc9084612fa9565b9050610501565b60008260030b13156119f4576119ea82600a612f97565b6119cc9084612a75565b5081610501565b611a058282610a96565b61075157611a1281611c73565b611a1d836020611c85565b604051602001611a2e929190612fbd565b60408051601f198184030181529082905262461bcd60e51b825261073e91600401613032565b611a5e8282610a96565b6107515760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b6000610a8f836001600160a01b038416611e20565b600081831161187a5781610a8f565b611aed8282610a96565b156107515760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610a8f836001600160a01b038416611e6f565b60008085602001516001600160401b031683611b7b9190612fa9565b9050801580611b92575085516001600160c01b0316155b15611ba0578491505061120c565b85516001600160c01b03166001600160401b03851603611bc457600091505061120c565b61ffff811115611bea57604051637359f25f60e01b81526004810182905260240161073e565b6000611c1a8760000151866001600160401b0316036001600160c01b0316612710876001600160401b03166118b7565b9050611c2a868261271085611f62565b979650505050505050565b6000826000018281548110611c4c57611c4c612a2c565b9060005260206000200154905092915050565b818101828110156105015750600019610501565b60606105016001600160a01b03831660145b60606000611c94836002612a75565b611c9f906002613065565b6001600160401b03811115611cb657611cb6612643565b6040519080825280601f01601f191660200182016040528015611ce0576020820181803683370190505b509050600360fc1b81600081518110611cfb57611cfb612a2c565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611d2a57611d2a612a2c565b60200101906001600160f81b031916908160001a9053506000611d4e846002612a75565b611d59906001613065565b90505b6001811115611dd1576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611d8d57611d8d612a2c565b1a60f81b828281518110611da357611da3612a2c565b60200101906001600160f81b031916908160001a90535060049490941c93611dca81613078565b9050611d5c565b508315610a8f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161073e565b6000818152600183016020526040812054611e6757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610501565b506000610501565b60008181526001830160205260408120548015611f58576000611e93600183612d1f565b8554909150600090611ea790600190612d1f565b9050818114611f0c576000866000018281548110611ec757611ec7612a2c565b9060005260206000200154905080876000018481548110611eea57611eea612a2c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611f1d57611f1d61308f565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610501565b6000915050610501565b600082841480611f74575061ffff8216155b15611f8057508361120c565b50836000808080611fa161ffff8716611f988a6120c5565b61ffff1661186b565b90505b61ffff811615611ff757611fbe8561ffff83168a0a612296565b90945092508315611fd757829450808603955080820191505b611ff0600261ffff83160461ffff168761ffff1661186b565b9050611fa4565b505b61ffff85161561206a5761200d8488612296565b9093509150821561202c57600019909401939092508290600101611ff9565b61ffff8116156120515785848161204557612045612dde565b04935060001901611ff9565b61205c8488886118b7565b600019909501949350611ff9565b6000612075876120c5565b90505b61ffff8216156120b95760006120968261ffff168461ffff1661186b565b90508061ffff16880a86816120ad576120ad612dde565b04955090910390612078565b50505050949350505050565b600060038210156120d8575060ff919050565b60048210156120e957506080919050565b60108210156120fa57506040919050565b61010082101561210c57506020919050565b611bdc82101561211e57506014919050565b612c7082101561213057506013919050565b614aa982101561214257506012919050565b61855482101561215457506011919050565b6201000082101561216757506010919050565b6202183782101561217a5750600f919050565b6204e04682101561218d5750600e919050565b620ced4c8210156121a05750600d919050565b622851468210156121b35750600c919050565b629aa2ad8210156121c65750600b919050565b6303080c018210156121da5750600a919050565b6315c5cbbd8210156121ee57506009919050565b64010000000082101561220357506008919050565b6417c6a1f29f82101561221857506007919050565b6506597fa94f5c82101561222e57506006919050565b66093088c35d733b82101561224557506005919050565b6801000000000000000082101561225e57506004919050565b6a285145f31ae515c447bb5782101561227957506003919050565b600160801b82101561228d57506002919050565b5060015b919050565b600080836000036122ad57506001905060006122da565b838302838582816122c0576122c0612dde565b04146122d35760008092509250506122da565b6001925090505b9250929050565b6000602082840312156122f357600080fd5b81356001600160e01b031981168114610a8f57600080fd5b60006020828403121561231d57600080fd5b5035919050565b602080825282518282018190526000919060409081850190868401855b8281101561236e5761235e84835180518252602090810151910152565b9284019290850190600101612341565b5091979650505050505050565b6001600160a01b038116811461121e57600080fd5b80356122918161237b565b6000806000606084860312156123b057600080fd5b83356123bb8161237b565b95602085013595506040909401359392505050565b600080604083850312156123e357600080fd5b8235915060208301356123f58161237b565b809150509250929050565b60008083601f84011261241257600080fd5b5081356001600160401b0381111561242957600080fd5b6020830191508360208260061b85010111156122da57600080fd5b6000806020838503121561245757600080fd5b82356001600160401b0381111561246d57600080fd5b61247985828601612400565b90969095509350505050565b60008083601f84011261249757600080fd5b5081356001600160401b038111156124ae57600080fd5b6020830191508360208260051b85010111156122da57600080fd5b6000806000806000806000806080898b0312156124e557600080fd5b88356001600160401b03808211156124fc57600080fd5b6125088c838d01612485565b909a50985060208b013591508082111561252157600080fd5b61252d8c838d01612485565b909850965060408b013591508082111561254657600080fd5b6125528c838d01612485565b909650945060608b013591508082111561256b57600080fd5b506125788b828c01612485565b999c989b5096995094979396929594505050565b6020808252825182820181905260009190848201906040850190845b818110156125c65783511515835292840192918401916001016125a8565b50909695505050505050565b600080602083850312156125e557600080fd5b82356001600160401b03808211156125fc57600080fd5b818501915085601f83011261261057600080fd5b81358181111561261f57600080fd5b86602082850101111561263157600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b038111828210171561267b5761267b612643565b60405290565b604080519081016001600160401b038111828210171561267b5761267b612643565b604051606081016001600160401b038111828210171561267b5761267b612643565b604051601f8201601f191681016001600160401b03811182821017156126ed576126ed612643565b604052919050565b60006001600160401b0382111561270e5761270e612643565b50601f01601f191660200190565b600082601f83011261272d57600080fd5b813561274061273b826126f5565b6126c5565b81815284602083860101111561275557600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561278457600080fd5b81356001600160401b0381111561279a57600080fd5b61120c8482850161271c565b600080604083850312156127b957600080fd5b50508035926020909101359150565b6000604082840312156127da57600080fd5b50919050565b60008060008060008060008060008060006101408c8e03121561280257600080fd5b61280c8c3561237b565b8b359a506001600160401b038060208e0135111561282957600080fd5b6128398e60208f01358f01612485565b909b50995060408d013581101561284f57600080fd5b506128608d60408e01358e01612400565b909850965060608c013595506128798d60808e016127c8565b945060c08c01356128898161237b565b935061289760e08d01612390565b92506101008c013591506101208c013590509295989b509295989b9093969950565b600080600080604085870312156128cf57600080fd5b84356001600160401b03808211156128e657600080fd5b6128f288838901612485565b9096509450602087013591508082111561290b57600080fd5b5061291887828801612485565b95989497509550505050565b60006040828403121561293657600080fd5b610a8f83836127c8565b6000806040838503121561295357600080fd5b82356001600160401b0381111561296957600080fd5b6129758582860161271c565b95602094909401359450505050565b825181526020808401518183015282516040830152820151606082015260808101610a8f565b6001600160401b038116811461121e57600080fd5b6000608082840312156129d157600080fd5b6129d9612659565b82518060070b81146129ea57600080fd5b815260208301516129fa816129aa565b60208201526040830151600381900b8114612a1457600080fd5b60408201526060928301519281019290925250919050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215612a5457600080fd5b8135610a8f8161237b565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761050157610501612a5f565b8051801515811461229157600080fd5b600060208284031215612aae57600080fd5b610a8f82612a8c565b600060208284031215612ac957600080fd5b8151610a8f8161237b565b60005b83811015612aef578181015183820152602001612ad7565b50506000910152565b600060808284031215612b0a57600080fd5b612b12612659565b90508151612b1f8161237b565b81526020820151612b2f8161237b565b60208201526040820151612b42816129aa565b6040820152612b5360608301612a8c565b606082015292915050565b60006020808385031215612b7157600080fd5b82516001600160401b0380821115612b8857600080fd5b9084019060a08287031215612b9c57600080fd5b612ba4612681565b825182811115612bb357600080fd5b830160608189031215612bc557600080fd5b612bcd6126a3565b815160ff81168114612bde57600080fd5b81528186015186820152604082015184811115612bfa57600080fd5b82019350601f84018913612c0d57600080fd5b83519150612c1d61273b836126f5565b8281528987848701011115612c3157600080fd5b612c4083888301898801612ad4565b6040820152825250612c5487848601612af8565b848201528094505050505092915050565b60008082840360e0811215612c7957600080fd5b60c0811215612c8757600080fd5b612c8f6126a3565b84518152602085015160208201526080603f1983011215612caf57600080fd5b612cb7612659565b91506040850151612cc78161237b565b80835250606085015160208301526080850151604083015260a08501516060830152816040820152809350505060c083015190509250929050565b600060208284031215612d1457600080fd5b8151610a8f816129aa565b8181038181111561050157610501612a5f565b600381810b9083900b01637fffffff8113637fffffff198212171561050157610501612a5f565b600060408284031215612d6b57600080fd5b612d73612681565b82358152602083013560208201528091505092915050565b60008160030b637fffffff198103612da557612da5612a5f565b60000392915050565b80820260008212600160ff1b84141615612dca57612dca612a5f565b818105831482151761050157610501612a5f565b634e487b7160e01b600052601260045260246000fd5b600082612e0357612e03612dde565b600160ff1b821460001984141615612e1d57612e1d612a5f565b500590565b6001600160c01b038116811461121e57600080fd5b8135612e4281612e22565b81546001600160c01b03199081166001600160c01b039290921691821783556020840135612e6f816129aa565b60c01b1617905550565b600060208284031215612e8b57600080fd5b8135610a8f81612e22565b600060208284031215612ea857600080fd5b8135610a8f816129aa565b600181815b80851115612eee578160001904821115612ed457612ed4612a5f565b80851615612ee157918102915b93841c9390800290612eb8565b509250929050565b600082612f0557506001610501565b81612f1257506000610501565b8160018114612f285760028114612f3257612f4e565b6001915050610501565b60ff841115612f4357612f43612a5f565b50506001821b610501565b5060208310610133831016604e8410600b8410161715612f71575081810a610501565b612f7b8383612eb3565b8060001904821115612f8f57612f8f612a5f565b029392505050565b6000610a8f63ffffffff841683612ef6565b600082612fb857612fb8612dde565b500490565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612ff5816017850160208801612ad4565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613026816028840160208801612ad4565b01602801949350505050565b6020815260008251806020840152613051816040850160208701612ad4565b601f01601f19169190910160400192915050565b8082018082111561050157610501612a5f565b60008161308757613087612a5f565b506000190190565b634e487b7160e01b600052603160045260246000fdfe97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929a2646970667358221220ba899357ff149897aea9e63c3a06e271fed944932d819738c722c1c923e6a3d464736f6c63430008150033", "chainId": 2021, "contractName": "RNSDomainPrice", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c80635c68c83011610104578063ca15c873116100a2578063e229a67011610071578063e229a67014610480578063f4651f4914610493578063f5b541a6146104b4578063fe303ebf146104c957600080fd5b8063ca15c87314610434578063d40ed58c14610447578063d547741f1461045a578063dd28776d1461046d57600080fd5b80637174026e116100de5780637174026e146103db5780639010d07c146103ee57806391d1485414610419578063a217fddf1461042c57600080fd5b80635c68c830146103985780635ef32e2c146103ab578063713a69a7146103b357600080fd5b80632f6ee6951161017157806339e47da71161014b57806339e47da7146102ec5780634c255c971461034457806353faf90914610365578063599eaabf1461038557600080fd5b80632f6ee695146102ac57806335feb741146102c657806336568abe146102d957600080fd5b8063248a9ca3116101ad578063248a9ca31461023257806328dd3065146102565780632be09ecc1461026b5780632f2ff15d1461029957600080fd5b806301ffc9a7146101d4578063037f1769146101fc5780630a44f51f1461021d575b600080fd5b6101e76101e2366004612074565b6104dc565b60405190151581526020015b60405180910390f35b61020f61020a36600461209e565b610507565b6040519081526020016101f3565b610225610599565b6040516101f391906120b7565b61020f61024036600461209e565b6000908152600160208190526040909120015490565b61026961026436600461212e565b610676565b005b603554603954603a54604080516001600160a01b0390941684526020840192909252908201526060016101f3565b6102696102a7366004612163565b610692565b6102b4601281565b60405160ff90911681526020016101f3565b6102696102d43660046121d7565b6106bd565b6102696102e7366004612163565b6106d2565b604080518082018252600080825260209182015281518083018352603b546001600160c01b0381168083526001600160401b03600160c01b9092048216928401928352845190815291511691810191909152016101f3565b61034d61271081565b6040516001600160401b0390911681526020016101f3565b61037861037336600461225c565b610755565b6040516101f3919061231f565b61026961039336600461225c565b61087c565b61020f6103a6366004612365565b61093a565b60375461020f565b6103c66103c1366004612478565b6109b8565b604080519283526020830191909152016101f3565b61020f6103e936600461209e565b6109e4565b6104016103fc3660046124ac565b610a77565b6040516001600160a01b0390911681526020016101f3565b6101e7610427366004612163565b610a96565b61020f600081565b61020f61044236600461209e565b610ac1565b6102696104553660046124e6565b610ad8565b610269610468366004612163565b610c8e565b61026961047b3660046125bf565b610cb4565b61026961048e36600461262a565b610dc0565b6104a66104a1366004612646565b610dd4565b6040516101f392919061268a565b61020f600080516020612b9983398151915281565b6102696104d736600461209e565b610f68565b60006001600160e01b03198216635a05180f60e01b1480610501575061050182610f7c565b92915050565b603554603a5460395460405163052571af60e51b815260009361050193869360129384936001600160a01b03169263a4ae35e09261055092600401918252602082015260400190565b608060405180830381865afa15801561056d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059191906126c5565b929190610fb1565b603854606090806001600160401b038111156105b7576105b76123d6565b6040519080825280602002602001820160405280156105fc57816020015b60408051808201909152600080825260208201528152602001906001900390816105d55790505b5091506000805b82811015610670578060010191508184828151811061062457610624612750565b60200260200101516000018181525050603c60008381526020019081526020016000205484828151811061065a5761065a612750565b6020908102919091018101510152600101610603565b50505090565b600061068181610ff2565b61068c848484610fff565b50505050565b600082815260016020819052604090912001546106ae81610ff2565b6106b88383611071565b505050565b60006106c881610ff2565b6106b88383611093565b6001600160a01b03811633146107475760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61075182826111ac565b5050565b6060600080516020612b9983398151915261076f81610ff2565b60006107818b8b8b8b8b8b8b8b6111ce565b905033816001600160401b0381111561079c5761079c6123d6565b6040519080825280602002602001820160405280156107c5578160200160208202803683370190505b50935060005b8281101561086c57610842828e8e848181106107e9576107e9612750565b905060200201358d8d8581811061080257610802612750565b905060200201358c8c8681811061081b5761081b612750565b905060200201358b8b8781811061083457610834612750565b90506020020135600061121c565b85828151811061085457610854612750565b911515602092830291909101909101526001016107cb565b5050505098975050505050505050565b600080516020612b9983398151915261089481610ff2565b60006108a68a8a8a8a8a8a8a8a6111ce565b90503360005b8281101561092c57610923828d8d848181106108ca576108ca612750565b905060200201358c8c858181106108e3576108e3612750565b905060200201358b8b868181106108fc576108fc612750565b905060200201358a8a8781811061091557610915612750565b90506020020135600161121c565b506001016108ac565b505050505050505050505050565b6000603e600061097f85858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506112ab92505050565b8152602001908152602001600020549050806000036109b157604051635421761560e11b815260040160405180910390fd5b1992915050565b6000806109d26109cd84805160209091012090565b6112b6565b91506109dd826109e4565b9050915091565b603554603a5460395460405163052571af60e51b815260048101929092526024820152600091610501918491601291829161059191601119916001600160a01b03169063a4ae35e090604401608060405180830381865afa158015610a4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7191906126c5565b90611330565b6000828152600260205260408120610a8f908361148a565b9392505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600081815260026020526040812061050190611496565b600054610100900460ff1615808015610af85750600054600160ff909116105b80610b125750303b158015610b12575060005460ff166001145b610b755760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161073e565b6000805460ff191660011790558015610b98576000805461ff0019166101001790555b89600080516020612b9983398151915260005b82811015610beb57610be3828f8f84818110610bc957610bc9612750565b9050602002016020810190610bde9190612766565b6114a0565b600101610bab565b50603680546001600160a01b0319166001600160a01b038816179055610c1260008f6114a0565b610c1c8b8b611093565b610c25896114aa565b610c2e886114df565b610c39878686610fff565b5050801561092c576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050505050505050505050565b60008281526001602081905260409091200154610caa81610ff2565b6106b883836111ac565b600080516020612b99833981519152610ccc81610ff2565b83801580610cda5750808314155b15610cf857604051634ec4810560e11b815260040160405180910390fd5b600033815b83811015610db557868682818110610d1757610d17612750565b9050602002013519925082603e60008b8b85818110610d3857610d38612750565b90506020020135815260200190815260200160002081905550888882818110610d6357610d63612750565b90506020020135826001600160a01b03167fb52d278cb3ef3b003bdfb385ce2eb23a83eb6d713724abfba1acaa16ccf6621485604051610da591815260200190565b60405180910390a3600101610cfd565b505050505050505050565b6000610dcb81610ff2565b610751826114df565b604080518082019091526000808252602082015260408051808201909152600080825260208201526000610e078561155b565b855160208701209091506000906000818152603e60205260409020549091508015610e3e57610e37811987612799565b8552610f3b565b6000603c6000610e5086603854611649565b81526020019081526020016000205490508087610e6d9190612799565b86526036546001600160a01b03166353f9195e610ebb7fba69923fa107dbf5a25a073a10b7c9216ae39fbadc95dc891d460d9ae315d6888b6000918252805160209182012090526040902090565b6040518263ffffffff1660e01b8152600401610ed991815260200190565b602060405180830381865afa158015610ef6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1a91906127b0565b15610f3957610f36603754610f2e856112b6565b61271061165f565b85525b505b8351610f46906109e4565b60208501528451610f56906109e4565b60208601525092959194509092505050565b6000610f7381610ff2565b610751826114aa565b60006001600160e01b03198216637965db0b60e01b148061050157506301ffc9a760e01b6001600160e01b0319831614610501565b6000610fe784610fd7876000015160070b886040015186610fd291906127d2565b611748565b610fe2600187611748565b61165f565b90505b949350505050565b610ffc81336117a2565b50565b603580546001600160a01b0319166001600160a01b0385169081179091556039839055603a8290558190336001600160a01b03167f671083457675651266070f50f1438ef8190b7da64d38f16f5117246236b7dd5b8560405161106491815260200190565b60405180910390a4505050565b61107b82826117fb565b60008281526002602052604090206106b89082611866565b60408051808201909152600080825260208201523390603854839060005b8281101561115e578686828181106110cb576110cb612750565b9050604002018036038101906110e191906127f9565b93506110f182856000015161187b565b6020808601805187516000908152603c90935260409283902055865190519151929450916001600160a01b038816917f85211e946be6d537cd1b22a183d04151d4e5d0818e1ce75d2e5ebaecba0a5a779161114e91815260200190565b60405180910390a36001016110b1565b5060385481146111a457603881905560405181906001600160a01b038616907f7e7c3a4273ac1af351af63a82e91a8335bcb389ba681375a32dbe4455d0d474b90600090a35b505050505050565b6111b6828261188a565b60008281526002602052604090206106b890826118f1565b868015806111dc5750858114155b806111e75750838114155b806111f25750818114155b1561121057604051634ec4810560e11b815260040160405180910390fd5b98975050505050505050565b60008061122886610507565b6000888152603d6020526040902090915083806112455750805482115b9250821561129f57818155426001820155604080518381526020810187905287918a916001600160a01b038d16917f60d5fd6d2284807447aae62f93c05517a647b8e8479c3af2c27ee1d1c85b540f910160405180910390a45b50509695505050505050565b805160209091012090565b6000818152603d6020526040812060018101548083036112da575060009392505050565b60006112e68242612847565b835460408051808201909152603b546001600160c01b0381168252600160c01b90046001600160401b03166020820152919250611327919061271084611906565b95945050505050565b604080516080810182526000808252602082018190529181018290526060810191909152600061136960018560400151610fd29061285a565b90506001600160ff1b0381111561139f576040808501519051633e87ca5d60e11b815260039190910b600482015260240161073e565b60006113af6001610fd28661285a565b90506001600160ff1b038111156113df57604051633e87ca5d60e11b8152600385900b600482015260240161073e565b845160009060070b6113f1838561287d565b6113fb91906128c3565b9050677fffffffffffffff81131561144757604086810151875191516329b2fb5560e11b8152600391820b60048201529087900b602482015260079190910b604482015260640161073e565b60405180608001604052808260070b815260200187602001516001600160401b031681526020018660030b81526020018760600151815250935050505092915050565b6000610a8f83836119dc565b6000610501825490565b6107518282611071565b6037819055604051819033907f1e97e29c863545fad1ce79512b4deb3f0b7d30c3356bc7bbbd6588c9e68cf07390600090a350565b80603b6114ec8282612906565b503390507fa7f38b74141f9a2ac1b02640ded2b98431ef77f8cf2e3ade85c71d6c8420dc6461151e6020840184612948565b61152e6040850160208601612965565b604080516001600160c01b0390931683526001600160401b0390911660208301520160405180910390a250565b600080600080845190505b8083101561164157600085848151811061158257611582612750565b01602001516001600160f81b0319169050600160ff1b8110156115aa57600184019350611635565b600760fd1b6001600160f81b0319821610156115cb57600284019350611635565b600f60fc1b6001600160f81b0319821610156115ec57600384019350611635565b601f60fb1b6001600160f81b03198216101561160d57600484019350611635565b603f60fa1b6001600160f81b03198216101561162e57600584019350611635565b6006840193505b50600190910190611566565b509392505050565b60008183106116585781610a8f565b5090919050565b60008080600019858709858702925082811083820303915050806000036116995783828161168f5761168f6128ad565b0492505050610a8f565b8084116116e05760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b604482015260640161073e565b600084868809600260036001881981018916988990049182028318808302840302808302840302808302840302808302840302808302840302918202909203026000889003889004909101858311909403939093029303949094049190911702949350505050565b6000808260030b121561177a5761175e8261285a565b61176990600a612a66565b6117739084612a78565b9050610501565b60008260030b131561179b5761179182600a612a66565b6117739084612799565b5081610501565b6117ac8282610a96565b610751576117b981611a06565b6117c4836020611a18565b6040516020016117d5929190612ab0565b60408051601f198184030181529082905262461bcd60e51b825261073e91600401612b25565b6118058282610a96565b6107515760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b6000610a8f836001600160a01b038416611bb3565b60008183116116585781610a8f565b6118948282610a96565b156107515760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610a8f836001600160a01b038416611c02565b60008085602001516001600160401b0316836119229190612a78565b9050801580611939575085516001600160c01b0316155b156119475784915050610fea565b85516001600160c01b03166001600160401b0385160361196b576000915050610fea565b61ffff81111561199157604051637359f25f60e01b81526004810182905260240161073e565b60006119c18760000151866001600160401b0316036001600160c01b0316612710876001600160401b031661165f565b90506119d1868261271085611cf5565b979650505050505050565b60008260000182815481106119f3576119f3612750565b9060005260206000200154905092915050565b60606105016001600160a01b03831660145b60606000611a27836002612799565b611a32906002612b58565b6001600160401b03811115611a4957611a496123d6565b6040519080825280601f01601f191660200182016040528015611a73576020820181803683370190505b509050600360fc1b81600081518110611a8e57611a8e612750565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611abd57611abd612750565b60200101906001600160f81b031916908160001a9053506000611ae1846002612799565b611aec906001612b58565b90505b6001811115611b64576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611b2057611b20612750565b1a60f81b828281518110611b3657611b36612750565b60200101906001600160f81b031916908160001a90535060049490941c93611b5d81612b6b565b9050611aef565b508315610a8f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161073e565b6000818152600183016020526040812054611bfa57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610501565b506000610501565b60008181526001830160205260408120548015611ceb576000611c26600183612847565b8554909150600090611c3a90600190612847565b9050818114611c9f576000866000018281548110611c5a57611c5a612750565b9060005260206000200154905080876000018481548110611c7d57611c7d612750565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611cb057611cb0612b82565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610501565b6000915050610501565b600082841480611d07575061ffff8216155b15611d13575083610fea565b50836000808080611d3461ffff8716611d2b8a611e58565b61ffff16611649565b90505b61ffff811615611d8a57611d518561ffff83168a0a612029565b90945092508315611d6a57829450808603955080820191505b611d83600261ffff83160461ffff168761ffff16611649565b9050611d37565b505b61ffff851615611dfd57611da08488612029565b90935091508215611dbf57600019909401939092508290600101611d8c565b61ffff811615611de457858481611dd857611dd86128ad565b04935060001901611d8c565b611def84888861165f565b600019909501949350611d8c565b6000611e0887611e58565b90505b61ffff821615611e4c576000611e298261ffff168461ffff16611649565b90508061ffff16880a8681611e4057611e406128ad565b04955090910390611e0b565b50505050949350505050565b60006003821015611e6b575060ff919050565b6004821015611e7c57506080919050565b6010821015611e8d57506040919050565b610100821015611e9f57506020919050565b611bdc821015611eb157506014919050565b612c70821015611ec357506013919050565b614aa9821015611ed557506012919050565b618554821015611ee757506011919050565b62010000821015611efa57506010919050565b62021837821015611f0d5750600f919050565b6204e046821015611f205750600e919050565b620ced4c821015611f335750600d919050565b62285146821015611f465750600c919050565b629aa2ad821015611f595750600b919050565b6303080c01821015611f6d5750600a919050565b6315c5cbbd821015611f8157506009919050565b640100000000821015611f9657506008919050565b6417c6a1f29f821015611fab57506007919050565b6506597fa94f5c821015611fc157506006919050565b66093088c35d733b821015611fd857506005919050565b68010000000000000000821015611ff157506004919050565b6a285145f31ae515c447bb5782101561200c57506003919050565b600160801b82101561202057506002919050565b5060015b919050565b60008083600003612040575060019050600061206d565b83830283858281612053576120536128ad565b041461206657600080925092505061206d565b6001925090505b9250929050565b60006020828403121561208657600080fd5b81356001600160e01b031981168114610a8f57600080fd5b6000602082840312156120b057600080fd5b5035919050565b602080825282518282018190526000919060409081850190868401855b82811015612101576120f184835180518252602090810151910152565b92840192908501906001016120d4565b5091979650505050505050565b6001600160a01b0381168114610ffc57600080fd5b80356120248161210e565b60008060006060848603121561214357600080fd5b833561214e8161210e565b95602085013595506040909401359392505050565b6000806040838503121561217657600080fd5b8235915060208301356121888161210e565b809150509250929050565b60008083601f8401126121a557600080fd5b5081356001600160401b038111156121bc57600080fd5b6020830191508360208260061b850101111561206d57600080fd5b600080602083850312156121ea57600080fd5b82356001600160401b0381111561220057600080fd5b61220c85828601612193565b90969095509350505050565b60008083601f84011261222a57600080fd5b5081356001600160401b0381111561224157600080fd5b6020830191508360208260051b850101111561206d57600080fd5b6000806000806000806000806080898b03121561227857600080fd5b88356001600160401b038082111561228f57600080fd5b61229b8c838d01612218565b909a50985060208b01359150808211156122b457600080fd5b6122c08c838d01612218565b909850965060408b01359150808211156122d957600080fd5b6122e58c838d01612218565b909650945060608b01359150808211156122fe57600080fd5b5061230b8b828c01612218565b999c989b5096995094979396929594505050565b6020808252825182820181905260009190848201906040850190845b8181101561235957835115158352928401929184019160010161233b565b50909695505050505050565b6000806020838503121561237857600080fd5b82356001600160401b038082111561238f57600080fd5b818501915085601f8301126123a357600080fd5b8135818111156123b257600080fd5b8660208285010111156123c457600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126123fd57600080fd5b81356001600160401b0380821115612417576124176123d6565b604051601f8301601f19908116603f0116810190828211818310171561243f5761243f6123d6565b8160405283815286602085880101111561245857600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121561248a57600080fd5b81356001600160401b038111156124a057600080fd5b610fea848285016123ec565b600080604083850312156124bf57600080fd5b50508035926020909101359150565b6000604082840312156124e057600080fd5b50919050565b60008060008060008060008060008060006101408c8e03121561250857600080fd5b6125128c3561210e565b8b359a506001600160401b038060208e0135111561252f57600080fd5b61253f8e60208f01358f01612218565b909b50995060408d013581101561255557600080fd5b506125668d60408e01358e01612193565b909850965060608c0135955061257f8d60808e016124ce565b945060c08c013561258f8161210e565b935061259d60e08d01612123565b92506101008c013591506101208c013590509295989b509295989b9093969950565b600080600080604085870312156125d557600080fd5b84356001600160401b03808211156125ec57600080fd5b6125f888838901612218565b9096509450602087013591508082111561261157600080fd5b5061261e87828801612218565b95989497509550505050565b60006040828403121561263c57600080fd5b610a8f83836124ce565b6000806040838503121561265957600080fd5b82356001600160401b0381111561266f57600080fd5b61267b858286016123ec565b95602094909401359450505050565b825181526020808401518183015282516040830152820151606082015260808101610a8f565b6001600160401b0381168114610ffc57600080fd5b6000608082840312156126d757600080fd5b604051608081018181106001600160401b03821117156126f9576126f96123d6565b6040528251600781900b811461270e57600080fd5b8152602083015161271e816126b0565b60208201526040830151600381900b811461273857600080fd5b60408201526060928301519281019290925250919050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561277857600080fd5b8135610a8f8161210e565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761050157610501612783565b6000602082840312156127c257600080fd5b81518015158114610a8f57600080fd5b600381810b9083900b01637fffffff8113637fffffff198212171561050157610501612783565b60006040828403121561280b57600080fd5b604051604081018181106001600160401b038211171561282d5761282d6123d6565b604052823581526020928301359281019290925250919050565b8181038181111561050157610501612783565b60008160030b637fffffff19810361287457612874612783565b60000392915050565b80820260008212600160ff1b8414161561289957612899612783565b818105831482151761050157610501612783565b634e487b7160e01b600052601260045260246000fd5b6000826128d2576128d26128ad565b600160ff1b8214600019841416156128ec576128ec612783565b500590565b6001600160c01b0381168114610ffc57600080fd5b8135612911816128f1565b81546001600160c01b03199081166001600160c01b03929092169182178355602084013561293e816126b0565b60c01b1617905550565b60006020828403121561295a57600080fd5b8135610a8f816128f1565b60006020828403121561297757600080fd5b8135610a8f816126b0565b600181815b808511156129bd5781600019048211156129a3576129a3612783565b808516156129b057918102915b93841c9390800290612987565b509250929050565b6000826129d457506001610501565b816129e157506000610501565b81600181146129f75760028114612a0157612a1d565b6001915050610501565b60ff841115612a1257612a12612783565b50506001821b610501565b5060208310610133831016604e8410600b8410161715612a40575081810a610501565b612a4a8383612982565b8060001904821115612a5e57612a5e612783565b029392505050565b6000610a8f63ffffffff8416836129c5565b600082612a8757612a876128ad565b500490565b60005b83811015612aa7578181015183820152602001612a8f565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612ae8816017850160208801612a8c565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612b19816028840160208801612a8c565b01602801949350505050565b6020815260008251806020840152612b44816040850160208701612a8c565b601f01601f19169190910160400192915050565b8082018082111561050157610501612783565b600081612b7a57612b7a612783565b506000190190565b634e487b7160e01b600052603160045260246000fdfe97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929a264697066735822122076690926c2db8bd93ce00d4367403bba09c400c1ff6d19c14bc2e66eb1b25abc64736f6c63430008150033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c80635c68c83011610104578063ca15c873116100a2578063e229a67011610071578063e229a67014610480578063f4651f4914610493578063f5b541a6146104b4578063fe303ebf146104c957600080fd5b8063ca15c87314610434578063d40ed58c14610447578063d547741f1461045a578063dd28776d1461046d57600080fd5b80637174026e116100de5780637174026e146103db5780639010d07c146103ee57806391d1485414610419578063a217fddf1461042c57600080fd5b80635c68c830146103985780635ef32e2c146103ab578063713a69a7146103b357600080fd5b80632f6ee6951161017157806339e47da71161014b57806339e47da7146102ec5780634c255c971461034457806353faf90914610365578063599eaabf1461038557600080fd5b80632f6ee695146102ac57806335feb741146102c657806336568abe146102d957600080fd5b8063248a9ca3116101ad578063248a9ca31461023257806328dd3065146102565780632be09ecc1461026b5780632f2ff15d1461029957600080fd5b806301ffc9a7146101d4578063037f1769146101fc5780630a44f51f1461021d575b600080fd5b6101e76101e23660046122e1565b6104dc565b60405190151581526020015b60405180910390f35b61020f61020a36600461230b565b610507565b6040519081526020016101f3565b610225610599565b6040516101f39190612324565b61020f61024036600461230b565b6000908152600160208190526040909120015490565b61026961026436600461239b565b610676565b005b603554603954603a54604080516001600160a01b0390941684526020840192909252908201526060016101f3565b6102696102a73660046123d0565b610692565b6102b4601281565b60405160ff90911681526020016101f3565b6102696102d4366004612444565b6106bd565b6102696102e73660046123d0565b6106d2565b604080518082018252600080825260209182015281518083018352603b546001600160c01b0381168083526001600160401b03600160c01b9092048216928401928352845190815291511691810191909152016101f3565b61034d61271081565b6040516001600160401b0390911681526020016101f3565b6103786103733660046124c9565b610755565b6040516101f3919061258c565b6102696103933660046124c9565b61087c565b61020f6103a63660046125d2565b61093a565b60375461020f565b6103c66103c1366004612772565b6109b8565b604080519283526020830191909152016101f3565b61020f6103e936600461230b565b6109e4565b6104016103fc3660046127a6565b610a77565b6040516001600160a01b0390911681526020016101f3565b6101e76104273660046123d0565b610a96565b61020f600081565b61020f61044236600461230b565b610ac1565b6102696104553660046127e0565b610ad8565b6102696104683660046123d0565b610c8e565b61026961047b3660046128b9565b610cb4565b61026961048e366004612924565b610dc0565b6104a66104a1366004612940565b610dd4565b6040516101f3929190612984565b61020f6000805160206130a683398151915281565b6102696104d736600461230b565b61118a565b60006001600160e01b03198216635a05180f60e01b148061050157506105018261119e565b92915050565b603554603a5460395460405163052571af60e51b815260009361050193869360129384936001600160a01b03169263a4ae35e09261055092600401918252602082015260400190565b608060405180830381865afa15801561056d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059191906129bf565b9291906111d3565b603854606090806001600160401b038111156105b7576105b7612643565b6040519080825280602002602001820160405280156105fc57816020015b60408051808201909152600080825260208201528152602001906001900390816105d55790505b5091506000805b82811015610670578060010191508184828151811061062457610624612a2c565b60200260200101516000018181525050603c60008381526020019081526020016000205484828151811061065a5761065a612a2c565b6020908102919091018101510152600101610603565b50505090565b600061068181611214565b61068c848484611221565b50505050565b600082815260016020819052604090912001546106ae81611214565b6106b88383611293565b505050565b60006106c881611214565b6106b883836112b5565b6001600160a01b03811633146107475760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61075182826113ce565b5050565b60606000805160206130a683398151915261076f81611214565b60006107818b8b8b8b8b8b8b8b6113f0565b905033816001600160401b0381111561079c5761079c612643565b6040519080825280602002602001820160405280156107c5578160200160208202803683370190505b50935060005b8281101561086c57610842828e8e848181106107e9576107e9612a2c565b905060200201358d8d8581811061080257610802612a2c565b905060200201358c8c8681811061081b5761081b612a2c565b905060200201358b8b8781811061083457610834612a2c565b90506020020135600061143e565b85828151811061085457610854612a2c565b911515602092830291909101909101526001016107cb565b5050505098975050505050505050565b6000805160206130a683398151915261089481611214565b60006108a68a8a8a8a8a8a8a8a6113f0565b90503360005b8281101561092c57610923828d8d848181106108ca576108ca612a2c565b905060200201358c8c858181106108e3576108e3612a2c565b905060200201358b8b868181106108fc576108fc612a2c565b905060200201358a8a8781811061091557610915612a2c565b90506020020135600161143e565b506001016108ac565b505050505050505050505050565b6000603e600061097f85858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506114cd92505050565b8152602001908152602001600020549050806000036109b157604051635421761560e11b815260040160405180910390fd5b1992915050565b6000806109d26109cd84805160209091012090565b6114d8565b91506109dd826109e4565b9050915091565b603554603a5460395460405163052571af60e51b815260048101929092526024820152600091610501918491601291829161059191601119916001600160a01b03169063a4ae35e090604401608060405180830381865afa158015610a4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7191906129bf565b90611552565b6000828152600260205260408120610a8f90836116ac565b9392505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000818152600260205260408120610501906116b8565b600054610100900460ff1615808015610af85750600054600160ff909116105b80610b125750303b158015610b12575060005460ff166001145b610b755760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161073e565b6000805460ff191660011790558015610b98576000805461ff0019166101001790555b896000805160206130a683398151915260005b82811015610beb57610be3828f8f84818110610bc957610bc9612a2c565b9050602002016020810190610bde9190612a42565b6116c2565b600101610bab565b50603680546001600160a01b0319166001600160a01b038816179055610c1260008f6116c2565b610c1c8b8b6112b5565b610c25896116cc565b610c2e88611701565b610c39878686611221565b5050801561092c576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050505050505050505050565b60008281526001602081905260409091200154610caa81611214565b6106b883836113ce565b6000805160206130a6833981519152610ccc81611214565b83801580610cda5750808314155b15610cf857604051634ec4810560e11b815260040160405180910390fd5b600033815b83811015610db557868682818110610d1757610d17612a2c565b9050602002013519925082603e60008b8b85818110610d3857610d38612a2c565b90506020020135815260200190815260200160002081905550888882818110610d6357610d63612a2c565b90506020020135826001600160a01b03167fb52d278cb3ef3b003bdfb385ce2eb23a83eb6d713724abfba1acaa16ccf6621485604051610da591815260200190565b60405180910390a3600101610cfd565b505050505050505050565b6000610dcb81611214565b61075182611701565b604080518082019091526000808252602082015260408051808201909152600080825260208201526000610e078561177d565b855160208701209091506000906000818152603e60205260409020549091508015610e3e57610e37811987612a75565b855261115d565b6000603c6000610e508660385461186b565b81526020019081526020016000205490508087610e6d9190612a75565b86526000610eac7fba69923fa107dbf5a25a073a10b7c9216ae39fbadc95dc891d460d9ae315d6888a6000918252805160209182012090526040902090565b6036546040516329fc8caf60e11b8152600481018390529192506001600160a01b03169081906353f9195e90602401602060405180830381865afa158015610ef8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1c9190612a9c565b15611159576000816001600160a01b0316638c8433146040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f859190612ab7565b90506000611020826001600160a01b03166303e9e609866040518263ffffffff1660e01b8152600401610fba91815260200190565b600060405180830381865afa158015610fd7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610fff9190810190612b5e565b60200151604001516001600160401b03168c6001600160401b038016611881565b6040516378bd793560e01b8152600481018690529091506000906001600160a01b038516906378bd79359060240160e060405180830381865afa15801561106b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061108f9190612c65565b50604081015160600151909150801580159061111d5750846001600160a01b0316630afe1bb36040518163ffffffff1660e01b8152600401602060405180830381865afa1580156110e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111089190612d02565b6001600160401b031661111b8285612d1f565b115b1561113b57604051631bb03f9d60e01b815260040160405180910390fd5b61115260375461114a8b6114d8565b6127106118b7565b8b52505050505b5050505b8351611168906109e4565b60208501528451611178906109e4565b60208601525092959194509092505050565b600061119581611214565b610751826116cc565b60006001600160e01b03198216637965db0b60e01b148061050157506301ffc9a760e01b6001600160e01b0319831614610501565b6000611209846111f9876000015160070b8860400151866111f49190612d32565b6119a1565b6112046001876119a1565b6118b7565b90505b949350505050565b61121e81336119fb565b50565b603580546001600160a01b0319166001600160a01b0385169081179091556039839055603a8290558190336001600160a01b03167f671083457675651266070f50f1438ef8190b7da64d38f16f5117246236b7dd5b8560405161128691815260200190565b60405180910390a4505050565b61129d8282611a54565b60008281526002602052604090206106b89082611abf565b60408051808201909152600080825260208201523390603854839060005b82811015611380578686828181106112ed576112ed612a2c565b9050604002018036038101906113039190612d59565b9350611313828560000151611ad4565b6020808601805187516000908152603c90935260409283902055865190519151929450916001600160a01b038816917f85211e946be6d537cd1b22a183d04151d4e5d0818e1ce75d2e5ebaecba0a5a779161137091815260200190565b60405180910390a36001016112d3565b5060385481146113c657603881905560405181906001600160a01b038616907f7e7c3a4273ac1af351af63a82e91a8335bcb389ba681375a32dbe4455d0d474b90600090a35b505050505050565b6113d88282611ae3565b60008281526002602052604090206106b89082611b4a565b868015806113fe5750858114155b806114095750838114155b806114145750818114155b1561143257604051634ec4810560e11b815260040160405180910390fd5b98975050505050505050565b60008061144a86610507565b6000888152603d6020526040902090915083806114675750805482115b925082156114c157818155426001820155604080518381526020810187905287918a916001600160a01b038d16917f60d5fd6d2284807447aae62f93c05517a647b8e8479c3af2c27ee1d1c85b540f910160405180910390a45b50509695505050505050565b805160209091012090565b6000818152603d6020526040812060018101548083036114fc575060009392505050565b60006115088242612d1f565b835460408051808201909152603b546001600160c01b0381168252600160c01b90046001600160401b03166020820152919250611549919061271084611b5f565b95945050505050565b604080516080810182526000808252602082018190529181018290526060810191909152600061158b600185604001516111f490612d8b565b90506001600160ff1b038111156115c1576040808501519051633e87ca5d60e11b815260039190910b600482015260240161073e565b60006115d160016111f486612d8b565b90506001600160ff1b0381111561160157604051633e87ca5d60e11b8152600385900b600482015260240161073e565b845160009060070b6116138385612dae565b61161d9190612df4565b9050677fffffffffffffff81131561166957604086810151875191516329b2fb5560e11b8152600391820b60048201529087900b602482015260079190910b604482015260640161073e565b60405180608001604052808260070b815260200187602001516001600160401b031681526020018660030b81526020018760600151815250935050505092915050565b6000610a8f8383611c35565b6000610501825490565b6107518282611293565b6037819055604051819033907f1e97e29c863545fad1ce79512b4deb3f0b7d30c3356bc7bbbd6588c9e68cf07390600090a350565b80603b61170e8282612e37565b503390507fa7f38b74141f9a2ac1b02640ded2b98431ef77f8cf2e3ade85c71d6c8420dc646117406020840184612e79565b6117506040850160208601612e96565b604080516001600160c01b0390931683526001600160401b0390911660208301520160405180910390a250565b600080600080845190505b808310156118635760008584815181106117a4576117a4612a2c565b01602001516001600160f81b0319169050600160ff1b8110156117cc57600184019350611857565b600760fd1b6001600160f81b0319821610156117ed57600284019350611857565b600f60fc1b6001600160f81b03198216101561180e57600384019350611857565b601f60fb1b6001600160f81b03198216101561182f57600484019350611857565b603f60fa1b6001600160f81b03198216101561185057600584019350611857565b6006840193505b50600190910190611788565b509392505050565b600081831061187a5781610a8f565b5090919050565b60008184118061189057508183115b1561189c575080610a8f565b6118a68484611c5f565b905081811115610a8f575092915050565b60008080600019858709858702925082811083820303915050806000036118f1578382816118e7576118e7612dde565b0492505050610a8f565b8084116119385760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b604482015260640161073e565b60008486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091026000889003889004909101858311909403939093029303949094049190911702949350505050565b6000808260030b12156119d3576119b782612d8b565b6119c290600a612f97565b6119cc9084612fa9565b9050610501565b60008260030b13156119f4576119ea82600a612f97565b6119cc9084612a75565b5081610501565b611a058282610a96565b61075157611a1281611c73565b611a1d836020611c85565b604051602001611a2e929190612fbd565b60408051601f198184030181529082905262461bcd60e51b825261073e91600401613032565b611a5e8282610a96565b6107515760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b6000610a8f836001600160a01b038416611e20565b600081831161187a5781610a8f565b611aed8282610a96565b156107515760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610a8f836001600160a01b038416611e6f565b60008085602001516001600160401b031683611b7b9190612fa9565b9050801580611b92575085516001600160c01b0316155b15611ba0578491505061120c565b85516001600160c01b03166001600160401b03851603611bc457600091505061120c565b61ffff811115611bea57604051637359f25f60e01b81526004810182905260240161073e565b6000611c1a8760000151866001600160401b0316036001600160c01b0316612710876001600160401b03166118b7565b9050611c2a868261271085611f62565b979650505050505050565b6000826000018281548110611c4c57611c4c612a2c565b9060005260206000200154905092915050565b818101828110156105015750600019610501565b60606105016001600160a01b03831660145b60606000611c94836002612a75565b611c9f906002613065565b6001600160401b03811115611cb657611cb6612643565b6040519080825280601f01601f191660200182016040528015611ce0576020820181803683370190505b509050600360fc1b81600081518110611cfb57611cfb612a2c565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611d2a57611d2a612a2c565b60200101906001600160f81b031916908160001a9053506000611d4e846002612a75565b611d59906001613065565b90505b6001811115611dd1576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611d8d57611d8d612a2c565b1a60f81b828281518110611da357611da3612a2c565b60200101906001600160f81b031916908160001a90535060049490941c93611dca81613078565b9050611d5c565b508315610a8f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161073e565b6000818152600183016020526040812054611e6757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610501565b506000610501565b60008181526001830160205260408120548015611f58576000611e93600183612d1f565b8554909150600090611ea790600190612d1f565b9050818114611f0c576000866000018281548110611ec757611ec7612a2c565b9060005260206000200154905080876000018481548110611eea57611eea612a2c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611f1d57611f1d61308f565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610501565b6000915050610501565b600082841480611f74575061ffff8216155b15611f8057508361120c565b50836000808080611fa161ffff8716611f988a6120c5565b61ffff1661186b565b90505b61ffff811615611ff757611fbe8561ffff83168a0a612296565b90945092508315611fd757829450808603955080820191505b611ff0600261ffff83160461ffff168761ffff1661186b565b9050611fa4565b505b61ffff85161561206a5761200d8488612296565b9093509150821561202c57600019909401939092508290600101611ff9565b61ffff8116156120515785848161204557612045612dde565b04935060001901611ff9565b61205c8488886118b7565b600019909501949350611ff9565b6000612075876120c5565b90505b61ffff8216156120b95760006120968261ffff168461ffff1661186b565b90508061ffff16880a86816120ad576120ad612dde565b04955090910390612078565b50505050949350505050565b600060038210156120d8575060ff919050565b60048210156120e957506080919050565b60108210156120fa57506040919050565b61010082101561210c57506020919050565b611bdc82101561211e57506014919050565b612c7082101561213057506013919050565b614aa982101561214257506012919050565b61855482101561215457506011919050565b6201000082101561216757506010919050565b6202183782101561217a5750600f919050565b6204e04682101561218d5750600e919050565b620ced4c8210156121a05750600d919050565b622851468210156121b35750600c919050565b629aa2ad8210156121c65750600b919050565b6303080c018210156121da5750600a919050565b6315c5cbbd8210156121ee57506009919050565b64010000000082101561220357506008919050565b6417c6a1f29f82101561221857506007919050565b6506597fa94f5c82101561222e57506006919050565b66093088c35d733b82101561224557506005919050565b6801000000000000000082101561225e57506004919050565b6a285145f31ae515c447bb5782101561227957506003919050565b600160801b82101561228d57506002919050565b5060015b919050565b600080836000036122ad57506001905060006122da565b838302838582816122c0576122c0612dde565b04146122d35760008092509250506122da565b6001925090505b9250929050565b6000602082840312156122f357600080fd5b81356001600160e01b031981168114610a8f57600080fd5b60006020828403121561231d57600080fd5b5035919050565b602080825282518282018190526000919060409081850190868401855b8281101561236e5761235e84835180518252602090810151910152565b9284019290850190600101612341565b5091979650505050505050565b6001600160a01b038116811461121e57600080fd5b80356122918161237b565b6000806000606084860312156123b057600080fd5b83356123bb8161237b565b95602085013595506040909401359392505050565b600080604083850312156123e357600080fd5b8235915060208301356123f58161237b565b809150509250929050565b60008083601f84011261241257600080fd5b5081356001600160401b0381111561242957600080fd5b6020830191508360208260061b85010111156122da57600080fd5b6000806020838503121561245757600080fd5b82356001600160401b0381111561246d57600080fd5b61247985828601612400565b90969095509350505050565b60008083601f84011261249757600080fd5b5081356001600160401b038111156124ae57600080fd5b6020830191508360208260051b85010111156122da57600080fd5b6000806000806000806000806080898b0312156124e557600080fd5b88356001600160401b03808211156124fc57600080fd5b6125088c838d01612485565b909a50985060208b013591508082111561252157600080fd5b61252d8c838d01612485565b909850965060408b013591508082111561254657600080fd5b6125528c838d01612485565b909650945060608b013591508082111561256b57600080fd5b506125788b828c01612485565b999c989b5096995094979396929594505050565b6020808252825182820181905260009190848201906040850190845b818110156125c65783511515835292840192918401916001016125a8565b50909695505050505050565b600080602083850312156125e557600080fd5b82356001600160401b03808211156125fc57600080fd5b818501915085601f83011261261057600080fd5b81358181111561261f57600080fd5b86602082850101111561263157600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b038111828210171561267b5761267b612643565b60405290565b604080519081016001600160401b038111828210171561267b5761267b612643565b604051606081016001600160401b038111828210171561267b5761267b612643565b604051601f8201601f191681016001600160401b03811182821017156126ed576126ed612643565b604052919050565b60006001600160401b0382111561270e5761270e612643565b50601f01601f191660200190565b600082601f83011261272d57600080fd5b813561274061273b826126f5565b6126c5565b81815284602083860101111561275557600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561278457600080fd5b81356001600160401b0381111561279a57600080fd5b61120c8482850161271c565b600080604083850312156127b957600080fd5b50508035926020909101359150565b6000604082840312156127da57600080fd5b50919050565b60008060008060008060008060008060006101408c8e03121561280257600080fd5b61280c8c3561237b565b8b359a506001600160401b038060208e0135111561282957600080fd5b6128398e60208f01358f01612485565b909b50995060408d013581101561284f57600080fd5b506128608d60408e01358e01612400565b909850965060608c013595506128798d60808e016127c8565b945060c08c01356128898161237b565b935061289760e08d01612390565b92506101008c013591506101208c013590509295989b509295989b9093969950565b600080600080604085870312156128cf57600080fd5b84356001600160401b03808211156128e657600080fd5b6128f288838901612485565b9096509450602087013591508082111561290b57600080fd5b5061291887828801612485565b95989497509550505050565b60006040828403121561293657600080fd5b610a8f83836127c8565b6000806040838503121561295357600080fd5b82356001600160401b0381111561296957600080fd5b6129758582860161271c565b95602094909401359450505050565b825181526020808401518183015282516040830152820151606082015260808101610a8f565b6001600160401b038116811461121e57600080fd5b6000608082840312156129d157600080fd5b6129d9612659565b82518060070b81146129ea57600080fd5b815260208301516129fa816129aa565b60208201526040830151600381900b8114612a1457600080fd5b60408201526060928301519281019290925250919050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215612a5457600080fd5b8135610a8f8161237b565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761050157610501612a5f565b8051801515811461229157600080fd5b600060208284031215612aae57600080fd5b610a8f82612a8c565b600060208284031215612ac957600080fd5b8151610a8f8161237b565b60005b83811015612aef578181015183820152602001612ad7565b50506000910152565b600060808284031215612b0a57600080fd5b612b12612659565b90508151612b1f8161237b565b81526020820151612b2f8161237b565b60208201526040820151612b42816129aa565b6040820152612b5360608301612a8c565b606082015292915050565b60006020808385031215612b7157600080fd5b82516001600160401b0380821115612b8857600080fd5b9084019060a08287031215612b9c57600080fd5b612ba4612681565b825182811115612bb357600080fd5b830160608189031215612bc557600080fd5b612bcd6126a3565b815160ff81168114612bde57600080fd5b81528186015186820152604082015184811115612bfa57600080fd5b82019350601f84018913612c0d57600080fd5b83519150612c1d61273b836126f5565b8281528987848701011115612c3157600080fd5b612c4083888301898801612ad4565b6040820152825250612c5487848601612af8565b848201528094505050505092915050565b60008082840360e0811215612c7957600080fd5b60c0811215612c8757600080fd5b612c8f6126a3565b84518152602085015160208201526080603f1983011215612caf57600080fd5b612cb7612659565b91506040850151612cc78161237b565b80835250606085015160208301526080850151604083015260a08501516060830152816040820152809350505060c083015190509250929050565b600060208284031215612d1457600080fd5b8151610a8f816129aa565b8181038181111561050157610501612a5f565b600381810b9083900b01637fffffff8113637fffffff198212171561050157610501612a5f565b600060408284031215612d6b57600080fd5b612d73612681565b82358152602083013560208201528091505092915050565b60008160030b637fffffff198103612da557612da5612a5f565b60000392915050565b80820260008212600160ff1b84141615612dca57612dca612a5f565b818105831482151761050157610501612a5f565b634e487b7160e01b600052601260045260246000fd5b600082612e0357612e03612dde565b600160ff1b821460001984141615612e1d57612e1d612a5f565b500590565b6001600160c01b038116811461121e57600080fd5b8135612e4281612e22565b81546001600160c01b03199081166001600160c01b039290921691821783556020840135612e6f816129aa565b60c01b1617905550565b600060208284031215612e8b57600080fd5b8135610a8f81612e22565b600060208284031215612ea857600080fd5b8135610a8f816129aa565b600181815b80851115612eee578160001904821115612ed457612ed4612a5f565b80851615612ee157918102915b93841c9390800290612eb8565b509250929050565b600082612f0557506001610501565b81612f1257506000610501565b8160018114612f285760028114612f3257612f4e565b6001915050610501565b60ff841115612f4357612f43612a5f565b50506001821b610501565b5060208310610133831016604e8410600b8410161715612f71575081810a610501565b612f7b8383612eb3565b8060001904821115612f8f57612f8f612a5f565b029392505050565b6000610a8f63ffffffff841683612ef6565b600082612fb857612fb8612dde565b500490565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612ff5816017850160208801612ad4565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613026816028840160208801612ad4565b01602801949350505050565b6020815260008251806020840152613051816040850160208701612ad4565b601f01601f19169190910160400192915050565b8082018082111561050157610501612a5f565b60008161308757613087612a5f565b506000190190565b634e487b7160e01b600052603160045260246000fdfe97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929a2646970667358221220ba899357ff149897aea9e63c3a06e271fed944932d819738c722c1c923e6a3d464736f6c63430008150033", "deployer": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", "devdoc": { "version": 1, @@ -1147,13 +15700,13 @@ } }, "isFoundry": true, - "metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"int32\",\"name\":\"expo1\",\"type\":\"int32\"},{\"internalType\":\"int32\",\"name\":\"expo2\",\"type\":\"int32\"},{\"internalType\":\"int64\",\"name\":\"price1\",\"type\":\"int64\"}],\"name\":\"ErrComputedPriceTooLarge\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int32\",\"name\":\"expo\",\"type\":\"int32\"}],\"name\":\"ErrExponentTooLarge\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidArrayLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"n\",\"type\":\"uint256\"}],\"name\":\"PeriodNumOverflowedUint16\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RenewalFeeIsNotOverriden\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint192\",\"name\":\"ratio\",\"type\":\"uint192\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"period\",\"type\":\"uint64\"}],\"name\":\"DomainPriceScaleRuleUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"labelHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proofHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"setType\",\"type\":\"uint256\"}],\"name\":\"DomainPriceUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maxLength\",\"type\":\"uint256\"}],\"name\":\"MaxRenewalFeeLengthUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IPyth\",\"name\":\"pyth\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maxAcceptableAge\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"pythIdForRONUSD\",\"type\":\"bytes32\"}],\"name\":\"PythOracleConfigUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"labelLength\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"renewalFee\",\"type\":\"uint256\"}],\"name\":\"RenewalFeeByLengthUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"labelHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inverseRenewalFee\",\"type\":\"uint256\"}],\"name\":\"RenewalFeeOverridingUpdated\",\"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\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"ratio\",\"type\":\"uint256\"}],\"name\":\"TaxRatioUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_PERCENTAGE\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OPERATOR_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"USD_DECIMALS\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"lbHashes\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"usdPrices\",\"type\":\"uint256[]\"}],\"name\":\"bulkOverrideRenewalFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"lbHashes\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"ronPrices\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"proofHashes\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"setTypes\",\"type\":\"uint256[]\"}],\"name\":\"bulkSetDomainPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"lbHashes\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"ronPrices\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"proofHashes\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"setTypes\",\"type\":\"uint256[]\"}],\"name\":\"bulkTrySetDomainPrice\",\"outputs\":[{\"internalType\":\"bool[]\",\"name\":\"updated\",\"type\":\"bool[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"ronWei\",\"type\":\"uint256\"}],\"name\":\"convertRONToUSD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"usdWei\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"usdWei\",\"type\":\"uint256\"}],\"name\":\"convertUSDToRON\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ronWei\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"label\",\"type\":\"string\"}],\"name\":\"getDomainPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"usdPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ronPrice\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"label\",\"type\":\"string\"}],\"name\":\"getOverriddenRenewalFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"usdFee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPythOracleConfig\",\"outputs\":[{\"internalType\":\"contract IPyth\",\"name\":\"pyth\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxAcceptableAge\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"pythIdForRONUSD\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"label\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"}],\"name\":\"getRenewalFee\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"usd\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ron\",\"type\":\"uint256\"}],\"internalType\":\"struct INSDomainPrice.UnitPrice\",\"name\":\"basePrice\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"usd\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ron\",\"type\":\"uint256\"}],\"internalType\":\"struct INSDomainPrice.UnitPrice\",\"name\":\"tax\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRenewalFeeByLengths\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"labelLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"internalType\":\"struct INSDomainPrice.RenewalFee[]\",\"name\":\"renewalFees\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getScaleDownRuleForDomainPrice\",\"outputs\":[{\"components\":[{\"internalType\":\"uint192\",\"name\":\"ratio\",\"type\":\"uint192\"},{\"internalType\":\"uint64\",\"name\":\"period\",\"type\":\"uint64\"}],\"internalType\":\"struct PeriodScaler\",\"name\":\"scaleRule\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTaxRatio\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ratio\",\"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\":\"admin\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"labelLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"internalType\":\"struct INSDomainPrice.RenewalFee[]\",\"name\":\"renewalFees\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"taxRatio\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint192\",\"name\":\"ratio\",\"type\":\"uint192\"},{\"internalType\":\"uint64\",\"name\":\"period\",\"type\":\"uint64\"}],\"internalType\":\"struct PeriodScaler\",\"name\":\"domainPriceScaleRule\",\"type\":\"tuple\"},{\"internalType\":\"contract IPyth\",\"name\":\"pyth\",\"type\":\"address\"},{\"internalType\":\"contract INSAuction\",\"name\":\"auction\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxAcceptableAge\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"pythIdForRONUSD\",\"type\":\"bytes32\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IPyth\",\"name\":\"pyth\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxAcceptableAge\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"pythIdForRONUSD\",\"type\":\"bytes32\"}],\"name\":\"setPythOracleConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"labelLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"internalType\":\"struct INSDomainPrice.RenewalFee[]\",\"name\":\"renewalFees\",\"type\":\"tuple[]\"}],\"name\":\"setRenewalFeeByLengths\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint192\",\"name\":\"ratio\",\"type\":\"uint192\"},{\"internalType\":\"uint64\",\"name\":\"period\",\"type\":\"uint64\"}],\"internalType\":\"struct PeriodScaler\",\"name\":\"scaleRule\",\"type\":\"tuple\"}],\"name\":\"setScaleDownRuleForDomainPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"ratio\",\"type\":\"uint256\"}],\"name\":\"setTaxRatio\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"DomainPriceScaleRuleUpdated(address,uint192,uint64)\":{\"details\":\"Emitted when the rule to rescale domain price is updated.\"},\"DomainPriceUpdated(address,bytes32,uint256,bytes32,uint256)\":{\"details\":\"Emitted when the domain price is updated.\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"MaxRenewalFeeLengthUpdated(address,uint256)\":{\"details\":\"Emitted when the maximum length of renewal fee is updated.\"},\"PythOracleConfigUpdated(address,address,uint256,bytes32)\":{\"details\":\"Emitted when the Pyth Oracle config is updated.\"},\"RenewalFeeByLengthUpdated(address,uint256,uint256)\":{\"details\":\"Emitted when the renew fee is updated.\"},\"RenewalFeeOverridingUpdated(address,bytes32,uint256)\":{\"details\":\"Emitted when the renew fee of a domain is overridden. Value of `inverseRenewalFee` is 0 when not overridden.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"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._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"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`)\"},\"TaxRatioUpdated(address,uint256)\":{\"details\":\"Emitted when the renewal reservation ratio is updated.\"}},\"kind\":\"dev\",\"methods\":{\"bulkOverrideRenewalFees(bytes32[],uint256[])\":{\"details\":\"Bulk override renewal fees. Requirements: - The method caller is operator. - The input array lengths must be larger than 0 and the same. Emits events {RenewalFeeOverridingUpdated}.\",\"params\":{\"lbHashes\":\"Array of label hashes. (Eg, ['foo'].map(keccak256) for 'foo.ron')\",\"usdPrices\":\"Array of prices in USD. Leave 2^256 - 1 to remove overriding.\"}},\"bulkSetDomainPrice(bytes32[],uint256[],bytes32[],uint256[])\":{\"details\":\"Bulk override domain prices. Requirements: - The method caller is operator. - The input array lengths must be larger than 0 and the same. Emits events {DomainPriceUpdated}.\",\"params\":{\"lbHashes\":\"Array of label hashes. (Eg, ['foo'].map(keccak256) for 'foo.ron')\",\"proofHashes\":\"Array of proof hashes.\",\"ronPrices\":\"Array of prices in (W)RON token.\",\"setTypes\":\"Array of update types from the operator service.\"}},\"bulkTrySetDomainPrice(bytes32[],uint256[],bytes32[],uint256[])\":{\"details\":\"Bulk try to set domain prices. Returns a boolean array indicating whether domain prices at the corresponding indexes if set or not. Requirements: - The method caller is operator. - The input array lengths must be larger than 0 and the same. - The price should be larger than current domain price or it will not be updated. Emits events {DomainPriceUpdated} optionally.\",\"params\":{\"lbHashes\":\"Array of label hashes. (Eg, ['foo'].map(keccak256) for 'foo.ron')\",\"proofHashes\":\"Array of proof hashes.\",\"ronPrices\":\"Array of prices in (W)RON token.\",\"setTypes\":\"Array of update types from the operator service.\"}},\"convertRONToUSD(uint256)\":{\"details\":\"Returns the converted amount from RON to USD.\"},\"convertUSDToRON(uint256)\":{\"details\":\"Returns the converted amount from USD to RON.\"},\"getDomainPrice(string)\":{\"details\":\"Return the domain price.\",\"params\":{\"label\":\"The domain label to register (Eg, 'foo' for 'foo.ron').\"}},\"getOverriddenRenewalFee(string)\":{\"details\":\"Returns the renewal fee of a label. Reverts if not overridden.\"},\"getPythOracleConfig()\":{\"details\":\"Returns the Pyth oracle config.\"},\"getRenewalFee(string,uint256)\":{\"details\":\"Returns the renewal fee in USD and RON.\",\"params\":{\"duration\":\"Amount of second(s).\",\"label\":\"The domain label to register (Eg, 'foo' for 'foo.ron').\"}},\"getRenewalFeeByLengths()\":{\"details\":\"Returns the renewal fee by lengths.\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"getScaleDownRuleForDomainPrice()\":{\"details\":\"Returns the percentage to scale from domain price each period.\"},\"getTaxRatio()\":{\"details\":\"Returns tax ratio.\"},\"grantRole(bytes32,address)\":{\"details\":\"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.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"renounceRole(bytes32,address)\":{\"details\":\"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.\"},\"revokeRole(bytes32,address)\":{\"details\":\"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.\"},\"setPythOracleConfig(address,uint256,bytes32)\":{\"details\":\"Sets the Pyth oracle config. Requirements: - The method caller is admin. Emits events {PythOracleConfigUpdated}.\"},\"setRenewalFeeByLengths((uint256,uint256)[])\":{\"details\":\"Sets the renewal fee by lengths Requirements: - The method caller is admin. Emits events {RenewalFeeByLengthUpdated}. Emits an event {MaxRenewalFeeLengthUpdated} optionally.\"},\"setScaleDownRuleForDomainPrice((uint192,uint64))\":{\"details\":\"Sets the percentage to scale from domain price each period. Requirements: - The method caller is admin. Emits events {DomainPriceScaleRuleUpdated}.\"},\"setTaxRatio(uint256)\":{\"details\":\"Sets renewal reservation ratio. Requirements: - The method caller is admin. Emits an event {TaxRatioUpdated}.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"stateVariables\":{\"MAX_PERCENTAGE\":{\"details\":\"Max percentage 100%. Values [0; 100_00] reflexes [0; 100%]\"},\"OPERATOR_ROLE\":{\"details\":\"Value equals to keccak256(\\\"OPERATOR_ROLE\\\").\"},\"USD_DECIMALS\":{\"details\":\"Decimal for USD.\"},\"____gap\":{\"details\":\"Gap for upgradeability.\"},\"_auction\":{\"details\":\"RNSAuction contract\"},\"_dp\":{\"details\":\"Mapping from name => domain price in USD\"},\"_dpDownScaler\":{\"details\":\"The percentage scale from domain price each period\"},\"_maxAcceptableAge\":{\"details\":\"Max acceptable age of the price oracle request\"},\"_pyth\":{\"details\":\"Pyth oracle contract\"},\"_pythIdForRONUSD\":{\"details\":\"Price feed ID on Pyth for RON/USD\"},\"_rnFee\":{\"details\":\"Mapping from domain length => renewal fee in USD\"},\"_rnFeeOverriding\":{\"details\":\"Mapping from name => inverse bitwise of renewal fee overriding.\"},\"_rnfMaxLength\":{\"details\":\"Max length of the renewal fee\"},\"_taxRatio\":{\"details\":\"Extra fee for renewals based on the current domain price.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"getOverriddenRenewalFee(string)\":{\"notice\":\"This method is to help developers check the domain renewal fee overriding. Consider using method {getRenewalFee} instead for full handling of renewal fees.\"},\"setScaleDownRuleForDomainPrice((uint192,uint64))\":{\"notice\":\"Applies for the business rule: -x% each y seconds.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/RNSDomainPrice.sol\":\"RNSDomainPrice\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@ensdomains/buffer/=lib/buffer/\",\":@ensdomains/ens-contracts/=lib/ens-contracts/contracts/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@pythnetwork/=lib/pyth-sdk-solidity/\",\":@rns-contracts/=src/\",\":buffer/=lib/buffer/contracts/\",\":contract-template/=lib/contract-template/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":ens-contracts/=lib/ens-contracts/contracts/\",\":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/script/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/openzeppelin-contracts/contracts/\",\":pyth-sdk-solidity/=lib/pyth-sdk-solidity/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Strings.sol\\\";\\nimport \\\"../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```solidity\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```solidity\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\\n * to enforce additional security measures for this role.\\n */\\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\\n struct RoleData {\\n mapping(address => bool) members;\\n bytes32 adminRole;\\n }\\n\\n mapping(bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(account),\\n \\\" is missing role \\\",\\n Strings.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * May emit a {RoleGranted} event.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n *\\n * NOTE: This function is deprecated in favor of {_grantRole}.\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0dd6e52cb394d7f5abe5dca2d4908a6be40417914720932de757de34a99ab87f\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerable.sol\\\";\\nimport \\\"./AccessControl.sol\\\";\\nimport \\\"../utils/structs/EnumerableSet.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {\\n return _roleMembers[role].at(index);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n}\\n\",\"keccak256\":\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerable is IAccessControl {\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x3d6069be9b4c01fb81840fb9c2c4dc58dd6a6a4aafaa2c6837de8699574d84c6\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x5bce51e11f7d194b79ea59fe00c9e8de9fa2c5530124960f29a24d4c740a3266\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Metadata is IERC721 {\\n /**\\n * @dev Returns the token collection name.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the token collection symbol.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\\n */\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x75b829ff2f26c14355d1cba20e16fe7b29ca58eb5fef665ede48bc0f9c6c74b9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x58b21219689909c4f8339af00813760337f7e2e7f169a97fe49e2896dcfb3b9a\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"lib/pyth-sdk-solidity/IPyth.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.0;\\n\\nimport \\\"./PythStructs.sol\\\";\\nimport \\\"./IPythEvents.sol\\\";\\n\\n/// @title Consume prices from the Pyth Network (https://pyth.network/).\\n/// @dev Please refer to the guidance at https://docs.pyth.network/consumers/best-practices for how to consume prices safely.\\n/// @author Pyth Data Association\\ninterface IPyth is IPythEvents {\\n /// @notice Returns the period (in seconds) that a price feed is considered valid since its publish time\\n function getValidTimePeriod() external view returns (uint validTimePeriod);\\n\\n /// @notice Returns the price and confidence interval.\\n /// @dev Reverts if the price has not been updated within the last `getValidTimePeriod()` seconds.\\n /// @param id The Pyth Price Feed ID of which to fetch the price and confidence interval.\\n /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely.\\n function getPrice(\\n bytes32 id\\n ) external view returns (PythStructs.Price memory price);\\n\\n /// @notice Returns the exponentially-weighted moving average price and confidence interval.\\n /// @dev Reverts if the EMA price is not available.\\n /// @param id The Pyth Price Feed ID of which to fetch the EMA price and confidence interval.\\n /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely.\\n function getEmaPrice(\\n bytes32 id\\n ) external view returns (PythStructs.Price memory price);\\n\\n /// @notice Returns the price of a price feed without any sanity checks.\\n /// @dev This function returns the most recent price update in this contract without any recency checks.\\n /// This function is unsafe as the returned price update may be arbitrarily far in the past.\\n ///\\n /// Users of this function should check the `publishTime` in the price to ensure that the returned price is\\n /// sufficiently recent for their application. If you are considering using this function, it may be\\n /// safer / easier to use either `getPrice` or `getPriceNoOlderThan`.\\n /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely.\\n function getPriceUnsafe(\\n bytes32 id\\n ) external view returns (PythStructs.Price memory price);\\n\\n /// @notice Returns the price that is no older than `age` seconds of the current time.\\n /// @dev This function is a sanity-checked version of `getPriceUnsafe` which is useful in\\n /// applications that require a sufficiently-recent price. Reverts if the price wasn't updated sufficiently\\n /// recently.\\n /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely.\\n function getPriceNoOlderThan(\\n bytes32 id,\\n uint age\\n ) external view returns (PythStructs.Price memory price);\\n\\n /// @notice Returns the exponentially-weighted moving average price of a price feed without any sanity checks.\\n /// @dev This function returns the same price as `getEmaPrice` in the case where the price is available.\\n /// However, if the price is not recent this function returns the latest available price.\\n ///\\n /// The returned price can be from arbitrarily far in the past; this function makes no guarantees that\\n /// the returned price is recent or useful for any particular application.\\n ///\\n /// Users of this function should check the `publishTime` in the price to ensure that the returned price is\\n /// sufficiently recent for their application. If you are considering using this function, it may be\\n /// safer / easier to use either `getEmaPrice` or `getEmaPriceNoOlderThan`.\\n /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely.\\n function getEmaPriceUnsafe(\\n bytes32 id\\n ) external view returns (PythStructs.Price memory price);\\n\\n /// @notice Returns the exponentially-weighted moving average price that is no older than `age` seconds\\n /// of the current time.\\n /// @dev This function is a sanity-checked version of `getEmaPriceUnsafe` which is useful in\\n /// applications that require a sufficiently-recent price. Reverts if the price wasn't updated sufficiently\\n /// recently.\\n /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely.\\n function getEmaPriceNoOlderThan(\\n bytes32 id,\\n uint age\\n ) external view returns (PythStructs.Price memory price);\\n\\n /// @notice Update price feeds with given update messages.\\n /// This method requires the caller to pay a fee in wei; the required fee can be computed by calling\\n /// `getUpdateFee` with the length of the `updateData` array.\\n /// Prices will be updated if they are more recent than the current stored prices.\\n /// The call will succeed even if the update is not the most recent.\\n /// @dev Reverts if the transferred fee is not sufficient or the updateData is invalid.\\n /// @param updateData Array of price update data.\\n function updatePriceFeeds(bytes[] calldata updateData) external payable;\\n\\n /// @notice Wrapper around updatePriceFeeds that rejects fast if a price update is not necessary. A price update is\\n /// necessary if the current on-chain publishTime is older than the given publishTime. It relies solely on the\\n /// given `publishTimes` for the price feeds and does not read the actual price update publish time within `updateData`.\\n ///\\n /// This method requires the caller to pay a fee in wei; the required fee can be computed by calling\\n /// `getUpdateFee` with the length of the `updateData` array.\\n ///\\n /// `priceIds` and `publishTimes` are two arrays with the same size that correspond to senders known publishTime\\n /// of each priceId when calling this method. If all of price feeds within `priceIds` have updated and have\\n /// a newer or equal publish time than the given publish time, it will reject the transaction to save gas.\\n /// Otherwise, it calls updatePriceFeeds method to update the prices.\\n ///\\n /// @dev Reverts if update is not needed or the transferred fee is not sufficient or the updateData is invalid.\\n /// @param updateData Array of price update data.\\n /// @param priceIds Array of price ids.\\n /// @param publishTimes Array of publishTimes. `publishTimes[i]` corresponds to known `publishTime` of `priceIds[i]`\\n function updatePriceFeedsIfNecessary(\\n bytes[] calldata updateData,\\n bytes32[] calldata priceIds,\\n uint64[] calldata publishTimes\\n ) external payable;\\n\\n /// @notice Returns the required fee to update an array of price updates.\\n /// @param updateData Array of price update data.\\n /// @return feeAmount The required fee in Wei.\\n function getUpdateFee(\\n bytes[] calldata updateData\\n ) external view returns (uint feeAmount);\\n\\n /// @notice Parse `updateData` and return price feeds of the given `priceIds` if they are all published\\n /// within `minPublishTime` and `maxPublishTime`.\\n ///\\n /// You can use this method if you want to use a Pyth price at a fixed time and not the most recent price;\\n /// otherwise, please consider using `updatePriceFeeds`. This method does not store the price updates on-chain.\\n ///\\n /// This method requires the caller to pay a fee in wei; the required fee can be computed by calling\\n /// `getUpdateFee` with the length of the `updateData` array.\\n ///\\n ///\\n /// @dev Reverts if the transferred fee is not sufficient or the updateData is invalid or there is\\n /// no update for any of the given `priceIds` within the given time range.\\n /// @param updateData Array of price update data.\\n /// @param priceIds Array of price ids.\\n /// @param minPublishTime minimum acceptable publishTime for the given `priceIds`.\\n /// @param maxPublishTime maximum acceptable publishTime for the given `priceIds`.\\n /// @return priceFeeds Array of the price feeds corresponding to the given `priceIds` (with the same order).\\n function parsePriceFeedUpdates(\\n bytes[] calldata updateData,\\n bytes32[] calldata priceIds,\\n uint64 minPublishTime,\\n uint64 maxPublishTime\\n ) external payable returns (PythStructs.PriceFeed[] memory priceFeeds);\\n}\\n\",\"keccak256\":\"0x949c65c65fea0578c09a6fc068e09ed1165adede2c835984cefcb25d76de1de2\",\"license\":\"Apache-2.0\"},\"lib/pyth-sdk-solidity/IPythEvents.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.0;\\n\\n/// @title IPythEvents contains the events that Pyth contract emits.\\n/// @dev This interface can be used for listening to the updates for off-chain and testing purposes.\\ninterface IPythEvents {\\n /// @dev Emitted when the price feed with `id` has received a fresh update.\\n /// @param id The Pyth Price Feed ID.\\n /// @param publishTime Publish time of the given price update.\\n /// @param price Price of the given price update.\\n /// @param conf Confidence interval of the given price update.\\n event PriceFeedUpdate(\\n bytes32 indexed id,\\n uint64 publishTime,\\n int64 price,\\n uint64 conf\\n );\\n\\n /// @dev Emitted when a batch price update is processed successfully.\\n /// @param chainId ID of the source chain that the batch price update comes from.\\n /// @param sequenceNumber Sequence number of the batch price update.\\n event BatchPriceFeedUpdate(uint16 chainId, uint64 sequenceNumber);\\n}\\n\",\"keccak256\":\"0x048a35526c2e77d107d43ba336f1dcf31f64cef25ba429ae1f7a0fbc11c23320\",\"license\":\"Apache-2.0\"},\"lib/pyth-sdk-solidity/PythStructs.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.0;\\n\\ncontract PythStructs {\\n // A price with a degree of uncertainty, represented as a price +- a confidence interval.\\n //\\n // The confidence interval roughly corresponds to the standard error of a normal distribution.\\n // Both the price and confidence are stored in a fixed-point numeric representation,\\n // `x * (10^expo)`, where `expo` is the exponent.\\n //\\n // Please refer to the documentation at https://docs.pyth.network/consumers/best-practices for how\\n // to how this price safely.\\n struct Price {\\n // Price\\n int64 price;\\n // Confidence interval around the price\\n uint64 conf;\\n // Price exponent\\n int32 expo;\\n // Unix timestamp describing when the price was published\\n uint publishTime;\\n }\\n\\n // PriceFeed represents a current aggregate price from pyth publisher feeds.\\n struct PriceFeed {\\n // The price ID.\\n bytes32 id;\\n // Latest available price\\n Price price;\\n // Latest available exponentially-weighted moving average price\\n Price emaPrice;\\n }\\n}\\n\",\"keccak256\":\"0x95ff0a6d64517348ef604b8bcf246b561a9445d7e607b8f48491c617cfda9b65\",\"license\":\"Apache-2.0\"},\"src/RNSDomainPrice.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport { AccessControlEnumerable } from \\\"@openzeppelin/contracts/access/AccessControlEnumerable.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { IPyth, PythStructs } from \\\"@pythnetwork/IPyth.sol\\\";\\nimport { INSAuction } from \\\"./interfaces/INSAuction.sol\\\";\\nimport { INSDomainPrice } from \\\"./interfaces/INSDomainPrice.sol\\\";\\nimport { PeriodScaler, LibPeriodScaler, Math } from \\\"./libraries/math/PeriodScalingUtils.sol\\\";\\nimport { TimestampWrapper } from \\\"./libraries/TimestampWrapperUtils.sol\\\";\\nimport { LibString } from \\\"./libraries/LibString.sol\\\";\\nimport { LibRNSDomain } from \\\"./libraries/LibRNSDomain.sol\\\";\\nimport { PythConverter } from \\\"./libraries/pyth/PythConverter.sol\\\";\\n\\ncontract RNSDomainPrice is Initializable, AccessControlEnumerable, INSDomainPrice {\\n using LibString for *;\\n using LibRNSDomain for string;\\n using LibPeriodScaler for PeriodScaler;\\n using PythConverter for PythStructs.Price;\\n\\n /// @inheritdoc INSDomainPrice\\n uint8 public constant USD_DECIMALS = 18;\\n /// @inheritdoc INSDomainPrice\\n uint64 public constant MAX_PERCENTAGE = 100_00;\\n /// @inheritdoc INSDomainPrice\\n bytes32 public constant OPERATOR_ROLE = keccak256(\\\"OPERATOR_ROLE\\\");\\n\\n /// @dev Gap for upgradeability.\\n uint256[50] private ____gap;\\n\\n /// @dev Pyth oracle contract\\n IPyth internal _pyth;\\n /// @dev RNSAuction contract\\n INSAuction internal _auction;\\n /// @dev Extra fee for renewals based on the current domain price.\\n uint256 internal _taxRatio;\\n /// @dev Max length of the renewal fee\\n uint256 internal _rnfMaxLength;\\n /// @dev Max acceptable age of the price oracle request\\n uint256 internal _maxAcceptableAge;\\n /// @dev Price feed ID on Pyth for RON/USD\\n bytes32 internal _pythIdForRONUSD;\\n /// @dev The percentage scale from domain price each period\\n PeriodScaler internal _dpDownScaler;\\n\\n /// @dev Mapping from domain length => renewal fee in USD\\n mapping(uint256 length => uint256 usdPrice) internal _rnFee;\\n /// @dev Mapping from name => domain price in USD\\n mapping(bytes32 lbHash => TimestampWrapper usdPrice) internal _dp;\\n /// @dev Mapping from name => inverse bitwise of renewal fee overriding.\\n mapping(bytes32 lbHash => uint256 usdPrice) internal _rnFeeOverriding;\\n\\n constructor() payable {\\n _disableInitializers();\\n }\\n\\n function initialize(\\n address admin,\\n address[] calldata operators,\\n RenewalFee[] calldata renewalFees,\\n uint256 taxRatio,\\n PeriodScaler calldata domainPriceScaleRule,\\n IPyth pyth,\\n INSAuction auction,\\n uint256 maxAcceptableAge,\\n bytes32 pythIdForRONUSD\\n ) external initializer {\\n uint256 length = operators.length;\\n bytes32 operatorRole = OPERATOR_ROLE;\\n\\n for (uint256 i; i < length;) {\\n _setupRole(operatorRole, operators[i]);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n _auction = auction;\\n _setupRole(DEFAULT_ADMIN_ROLE, admin);\\n _setRenewalFeeByLengths(renewalFees);\\n _setTaxRatio(taxRatio);\\n _setDomainPriceScaleRule(domainPriceScaleRule);\\n _setPythOracleConfig(pyth, maxAcceptableAge, pythIdForRONUSD);\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function getPythOracleConfig() external view returns (IPyth pyth, uint256 maxAcceptableAge, bytes32 pythIdForRONUSD) {\\n return (_pyth, _maxAcceptableAge, _pythIdForRONUSD);\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function setPythOracleConfig(IPyth pyth, uint256 maxAcceptableAge, bytes32 pythIdForRONUSD)\\n external\\n onlyRole(DEFAULT_ADMIN_ROLE)\\n {\\n _setPythOracleConfig(pyth, maxAcceptableAge, pythIdForRONUSD);\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function getRenewalFeeByLengths() external view returns (RenewalFee[] memory renewalFees) {\\n uint256 rnfMaxLength = _rnfMaxLength;\\n renewalFees = new RenewalFee[](rnfMaxLength);\\n uint256 len;\\n\\n for (uint256 i; i < rnfMaxLength;) {\\n unchecked {\\n len = i + 1;\\n renewalFees[i].labelLength = len;\\n renewalFees[i].fee = _rnFee[len];\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function setRenewalFeeByLengths(RenewalFee[] calldata renewalFees) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _setRenewalFeeByLengths(renewalFees);\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function getTaxRatio() external view returns (uint256 ratio) {\\n return _taxRatio;\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function setTaxRatio(uint256 ratio) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _setTaxRatio(ratio);\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function getScaleDownRuleForDomainPrice() external view returns (PeriodScaler memory scaleRule) {\\n return _dpDownScaler;\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function setScaleDownRuleForDomainPrice(PeriodScaler calldata scaleRule) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _setDomainPriceScaleRule(scaleRule);\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function getOverriddenRenewalFee(string calldata label) external view returns (uint256 usdFee) {\\n usdFee = _rnFeeOverriding[label.hashLabel()];\\n if (usdFee == 0) revert RenewalFeeIsNotOverriden();\\n return ~usdFee;\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function bulkOverrideRenewalFees(bytes32[] calldata lbHashes, uint256[] calldata usdPrices)\\n external\\n onlyRole(OPERATOR_ROLE)\\n {\\n uint256 length = lbHashes.length;\\n if (length == 0 || length != usdPrices.length) revert InvalidArrayLength();\\n uint256 inverseBitwise;\\n address operator = _msgSender();\\n\\n for (uint256 i; i < length;) {\\n inverseBitwise = ~usdPrices[i];\\n _rnFeeOverriding[lbHashes[i]] = inverseBitwise;\\n emit RenewalFeeOverridingUpdated(operator, lbHashes[i], inverseBitwise);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function bulkTrySetDomainPrice(\\n bytes32[] calldata lbHashes,\\n uint256[] calldata ronPrices,\\n bytes32[] calldata proofHashes,\\n uint256[] calldata setTypes\\n ) external onlyRole(OPERATOR_ROLE) returns (bool[] memory updated) {\\n uint256 length = _requireBulkSetDomainPriceArgumentsValid(lbHashes, ronPrices, proofHashes, setTypes);\\n address operator = _msgSender();\\n updated = new bool[](length);\\n\\n for (uint256 i; i < length;) {\\n updated[i] = _setDomainPrice(operator, lbHashes[i], ronPrices[i], proofHashes[i], setTypes[i], false);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function bulkSetDomainPrice(\\n bytes32[] calldata lbHashes,\\n uint256[] calldata ronPrices,\\n bytes32[] calldata proofHashes,\\n uint256[] calldata setTypes\\n ) external onlyRole(OPERATOR_ROLE) {\\n uint256 length = _requireBulkSetDomainPriceArgumentsValid(lbHashes, ronPrices, proofHashes, setTypes);\\n address operator = _msgSender();\\n\\n for (uint256 i; i < length;) {\\n _setDomainPrice(operator, lbHashes[i], ronPrices[i], proofHashes[i], setTypes[i], true);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function getDomainPrice(string memory label) public view returns (uint256 usdPrice, uint256 ronPrice) {\\n usdPrice = _getDomainPrice(label.hashLabel());\\n ronPrice = convertUSDToRON(usdPrice);\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function getRenewalFee(string memory label, uint256 duration)\\n public\\n view\\n returns (UnitPrice memory basePrice, UnitPrice memory tax)\\n {\\n uint256 nameLen = label.strlen();\\n bytes32 lbHash = label.hashLabel();\\n uint256 overriddenRenewalFee = _rnFeeOverriding[lbHash];\\n\\n if (overriddenRenewalFee != 0) {\\n basePrice.usd = duration * ~overriddenRenewalFee;\\n } else {\\n uint256 renewalFeeByLength = _rnFee[Math.min(nameLen, _rnfMaxLength)];\\n basePrice.usd = duration * renewalFeeByLength;\\n // tax is added of name is reserved for auction\\n if (_auction.reserved(LibRNSDomain.toId(LibRNSDomain.RON_ID, label))) {\\n tax.usd = Math.mulDiv(_taxRatio, _getDomainPrice(lbHash), MAX_PERCENTAGE);\\n }\\n }\\n\\n tax.ron = convertUSDToRON(tax.usd);\\n basePrice.ron = convertUSDToRON(basePrice.usd);\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function convertUSDToRON(uint256 usdWei) public view returns (uint256 ronWei) {\\n return _pyth.getPriceNoOlderThan(_pythIdForRONUSD, _maxAcceptableAge).inverse({ expo: -18 }).mul({\\n inpWei: usdWei,\\n inpDecimals: int32(uint32(USD_DECIMALS)),\\n outDecimals: 18\\n });\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function convertRONToUSD(uint256 ronWei) public view returns (uint256 usdWei) {\\n return _pyth.getPriceNoOlderThan(_pythIdForRONUSD, _maxAcceptableAge).mul({\\n inpWei: ronWei,\\n inpDecimals: 18,\\n outDecimals: int32(uint32(USD_DECIMALS))\\n });\\n }\\n\\n /**\\n * @dev Reverts if the arguments of the method {bulkSetDomainPrice} is invalid.\\n */\\n function _requireBulkSetDomainPriceArgumentsValid(\\n bytes32[] calldata lbHashes,\\n uint256[] calldata ronPrices,\\n bytes32[] calldata proofHashes,\\n uint256[] calldata setTypes\\n ) internal pure returns (uint256 length) {\\n length = lbHashes.length;\\n if (length == 0 || ronPrices.length != length || proofHashes.length != length || setTypes.length != length) {\\n revert InvalidArrayLength();\\n }\\n }\\n\\n /**\\n * @dev Helper method to set domain price.\\n *\\n * Emits an event {DomainPriceUpdated} optionally.\\n */\\n function _setDomainPrice(\\n address operator,\\n bytes32 lbHash,\\n uint256 ronPrice,\\n bytes32 proofHash,\\n uint256 setType,\\n bool forced\\n ) internal returns (bool updated) {\\n uint256 usdPrice = convertRONToUSD(ronPrice);\\n TimestampWrapper storage dp = _dp[lbHash];\\n updated = forced || dp.value < usdPrice;\\n\\n if (updated) {\\n dp.value = usdPrice;\\n dp.timestamp = block.timestamp;\\n emit DomainPriceUpdated(operator, lbHash, usdPrice, proofHash, setType);\\n }\\n }\\n\\n /**\\n * @dev Sets renewal reservation ratio.\\n *\\n * Emits an event {TaxRatioUpdated}.\\n */\\n function _setTaxRatio(uint256 ratio) internal {\\n _taxRatio = ratio;\\n emit TaxRatioUpdated(_msgSender(), ratio);\\n }\\n\\n /**\\n * @dev Sets domain price scale rule.\\n *\\n * Emits events {DomainPriceScaleRuleUpdated}.\\n */\\n function _setDomainPriceScaleRule(PeriodScaler calldata domainPriceScaleRule) internal {\\n _dpDownScaler = domainPriceScaleRule;\\n emit DomainPriceScaleRuleUpdated(_msgSender(), domainPriceScaleRule.ratio, domainPriceScaleRule.period);\\n }\\n\\n /**\\n * @dev Sets renewal fee.\\n *\\n * Emits events {RenewalFeeByLengthUpdated}.\\n * Emits an event {MaxRenewalFeeLengthUpdated} optionally.\\n */\\n function _setRenewalFeeByLengths(RenewalFee[] calldata renewalFees) internal {\\n address operator = _msgSender();\\n RenewalFee memory renewalFee;\\n uint256 length = renewalFees.length;\\n uint256 maxRenewalFeeLength = _rnfMaxLength;\\n\\n for (uint256 i; i < length;) {\\n renewalFee = renewalFees[i];\\n maxRenewalFeeLength = Math.max(maxRenewalFeeLength, renewalFee.labelLength);\\n _rnFee[renewalFee.labelLength] = renewalFee.fee;\\n emit RenewalFeeByLengthUpdated(operator, renewalFee.labelLength, renewalFee.fee);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n if (maxRenewalFeeLength != _rnfMaxLength) {\\n _rnfMaxLength = maxRenewalFeeLength;\\n emit MaxRenewalFeeLengthUpdated(operator, maxRenewalFeeLength);\\n }\\n }\\n\\n /**\\n * @dev Sets Pyth Oracle config.\\n *\\n * Emits events {PythOracleConfigUpdated}.\\n */\\n function _setPythOracleConfig(IPyth pyth, uint256 maxAcceptableAge, bytes32 pythIdForRONUSD) internal {\\n _pyth = pyth;\\n _maxAcceptableAge = maxAcceptableAge;\\n _pythIdForRONUSD = pythIdForRONUSD;\\n emit PythOracleConfigUpdated(_msgSender(), pyth, maxAcceptableAge, pythIdForRONUSD);\\n }\\n\\n /**\\n * @dev Returns the current domain price applied the business rule: deduced x% each y seconds.\\n */\\n function _getDomainPrice(bytes32 lbHash) internal view returns (uint256) {\\n TimestampWrapper storage dp = _dp[lbHash];\\n uint256 lastSyncedAt = dp.timestamp;\\n if (lastSyncedAt == 0) return 0;\\n\\n uint256 passedDuration = block.timestamp - lastSyncedAt;\\n return _dpDownScaler.scaleDown({ v: dp.value, maxR: MAX_PERCENTAGE, dur: passedDuration });\\n }\\n}\\n\",\"keccak256\":\"0x0730fa87a46a372743e4413b6177ad02c99761b3d47bf965e35034086a52e247\",\"license\":\"MIT\"},\"src/interfaces/INSAuction.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nimport { INSUnified } from \\\"./INSUnified.sol\\\";\\nimport { EventRange } from \\\"../libraries/LibEventRange.sol\\\";\\n\\ninterface INSAuction {\\n error NotYetEnded();\\n error NoOneBidded();\\n error NullAssignment();\\n error AlreadyBidding();\\n error RatioIsTooLarge();\\n error NameNotReserved();\\n error InvalidEventRange();\\n error QueryIsNotInPeriod();\\n error InsufficientAmount();\\n error InvalidArrayLength();\\n error BidderCannotReceiveRON();\\n error EventIsNotCreatedOrAlreadyStarted();\\n\\n struct Bid {\\n address payable bidder;\\n uint256 price;\\n uint256 timestamp;\\n bool claimed;\\n }\\n\\n struct DomainAuction {\\n bytes32 auctionId;\\n uint256 startingPrice;\\n Bid bid;\\n }\\n\\n /// @dev Emitted when an auction is set.\\n event AuctionEventSet(bytes32 indexed auctionId, EventRange range);\\n /// @dev Emitted when the labels are listed for auction.\\n event LabelsListed(bytes32 indexed auctionId, uint256[] ids, uint256[] startingPrices);\\n /// @dev Emitted when a bid is placed for a name.\\n event BidPlaced(\\n bytes32 indexed auctionId,\\n uint256 indexed id,\\n uint256 price,\\n address payable bidder,\\n uint256 previousPrice,\\n address previousBidder\\n );\\n /// @dev Emitted when the treasury is updated.\\n event TreasuryUpdated(address indexed addr);\\n /// @dev Emitted when bid gap ratio is updated.\\n event BidGapRatioUpdated(uint256 ratio);\\n\\n /**\\n * @dev The maximum expiry duration\\n */\\n function MAX_EXPIRY() external pure returns (uint64);\\n\\n /**\\n * @dev Returns the operator role.\\n */\\n function OPERATOR_ROLE() external pure returns (bytes32);\\n\\n /**\\n * @dev Max percentage 100%. Values [0; 100_00] reflexes [0; 100%]\\n */\\n function MAX_PERCENTAGE() external pure returns (uint256);\\n\\n /**\\n * @dev The expiry duration of a domain after transferring to bidder.\\n */\\n function DOMAIN_EXPIRY_DURATION() external pure returns (uint64);\\n\\n /**\\n * @dev Claims domain names for auction.\\n *\\n * Requirements:\\n * - The method caller must be contract operator.\\n *\\n * @param labels The domain names. Eg, ['foo'] for 'foo.ron'\\n * @return ids The id corresponding for namehash of domain names.\\n */\\n function bulkRegister(string[] calldata labels) external returns (uint256[] memory ids);\\n\\n /**\\n * @dev Checks whether a domain name is currently reserved for auction or not.\\n * @param id The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'\\n */\\n function reserved(uint256 id) external view returns (bool);\\n\\n /**\\n * @dev Creates a new auction to sale with a specific time period.\\n *\\n * Requirements:\\n * - The method caller must be admin.\\n *\\n * Emits an event {AuctionEventSet}.\\n *\\n * @return auctionId The auction id\\n * @notice Please use the method `setAuctionNames` to list all the reserved names.\\n */\\n function createAuctionEvent(EventRange calldata range) external returns (bytes32 auctionId);\\n\\n /**\\n * @dev Updates the auction details.\\n *\\n * Requirements:\\n * - The method caller must be admin.\\n *\\n * Emits an event {AuctionEventSet}.\\n */\\n function setAuctionEvent(bytes32 auctionId, EventRange calldata range) external;\\n\\n /**\\n * @dev Returns the event range of an auction.\\n */\\n function getAuctionEvent(bytes32 auctionId) external view returns (EventRange memory);\\n\\n /**\\n * @dev Lists reserved names to sale in a specified auction.\\n *\\n * Requirements:\\n * - The method caller must be contract operator.\\n * - Array length are matched and larger than 0.\\n * - Only allow to set when the domain is:\\n * + Not in any auction.\\n * + Or, in the current auction.\\n * + Or, this name is not bided.\\n *\\n * Emits an event {LabelsListed}.\\n *\\n * Note: If the name is already listed, this method replaces with a new input value.\\n *\\n * @param ids The namehashes id of domain names. Eg, namehash('foo.ron') for 'foo.ron'\\n */\\n function listNamesForAuction(bytes32 auctionId, uint256[] calldata ids, uint256[] calldata startingPrices) external;\\n\\n /**\\n * @dev Places a bid for a domain name.\\n *\\n * Requirements:\\n * - The name is listed, or the auction is happening.\\n * - The msg.value is larger than the current bid price or the auction starting price.\\n *\\n * Emits an event {BidPlaced}.\\n *\\n * @param id The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'\\n */\\n function placeBid(uint256 id) external payable;\\n\\n /**\\n * @dev Returns the highest bid and address of the bidder.\\n * @param id The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'\\n */\\n function getAuction(uint256 id) external view returns (DomainAuction memory, uint256 beatPrice);\\n\\n /**\\n * @dev Bulk claims the bid name.\\n *\\n * Requirements:\\n * - Must be called after ended time.\\n * - The method caller can be anyone.\\n *\\n * @param ids The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'\\n */\\n function bulkClaimBidNames(uint256[] calldata ids) external returns (bool[] memory claimeds);\\n\\n /**\\n * @dev Returns the treasury.\\n */\\n function getTreasury() external view returns (address);\\n\\n /**\\n * @dev Returns the gap ratio between 2 bids with the starting price. Value in range [0;100_00] is 0%-100%.\\n */\\n function getBidGapRatio() external view returns (uint256);\\n\\n /**\\n * @dev Sets the treasury.\\n *\\n * Requirements:\\n * - The method caller must be admin\\n *\\n * Emits an event {TreasuryUpdated}.\\n */\\n function setTreasury(address payable) external;\\n\\n /**\\n * @dev Sets commission ratio. Value in range [0;100_00] is 0%-100%.\\n *\\n * Requirements:\\n * - The method caller must be admin\\n *\\n * Emits an event {BidGapRatioUpdated}.\\n */\\n function setBidGapRatio(uint256) external;\\n\\n /**\\n * @dev Returns RNSUnified contract.\\n */\\n function getRNSUnified() external view returns (INSUnified);\\n}\\n\",\"keccak256\":\"0xb82e08a142b165c1e794a2c4207ba56154ffbfdaed0fd00bc0b858a6588ebe4f\",\"license\":\"MIT\"},\"src/interfaces/INSDomainPrice.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { PeriodScaler } from \\\"../libraries/math/PeriodScalingUtils.sol\\\";\\nimport { IPyth } from \\\"@pythnetwork/IPyth.sol\\\";\\n\\ninterface INSDomainPrice {\\n error InvalidArrayLength();\\n error RenewalFeeIsNotOverriden();\\n\\n struct RenewalFee {\\n uint256 labelLength;\\n uint256 fee;\\n }\\n\\n struct UnitPrice {\\n uint256 usd;\\n uint256 ron;\\n }\\n\\n /// @dev Emitted when the renewal reservation ratio is updated.\\n event TaxRatioUpdated(address indexed operator, uint256 indexed ratio);\\n /// @dev Emitted when the maximum length of renewal fee is updated.\\n event MaxRenewalFeeLengthUpdated(address indexed operator, uint256 indexed maxLength);\\n /// @dev Emitted when the renew fee is updated.\\n event RenewalFeeByLengthUpdated(address indexed operator, uint256 indexed labelLength, uint256 renewalFee);\\n /// @dev Emitted when the renew fee of a domain is overridden. Value of `inverseRenewalFee` is 0 when not overridden.\\n event RenewalFeeOverridingUpdated(address indexed operator, bytes32 indexed labelHash, uint256 inverseRenewalFee);\\n\\n /// @dev Emitted when the domain price is updated.\\n event DomainPriceUpdated(\\n address indexed operator, bytes32 indexed labelHash, uint256 price, bytes32 indexed proofHash, uint256 setType\\n );\\n /// @dev Emitted when the rule to rescale domain price is updated.\\n event DomainPriceScaleRuleUpdated(address indexed operator, uint192 ratio, uint64 period);\\n\\n /// @dev Emitted when the Pyth Oracle config is updated.\\n event PythOracleConfigUpdated(\\n address indexed operator, IPyth indexed pyth, uint256 maxAcceptableAge, bytes32 indexed pythIdForRONUSD\\n );\\n\\n /**\\n * @dev Returns the Pyth oracle config.\\n */\\n function getPythOracleConfig() external view returns (IPyth pyth, uint256 maxAcceptableAge, bytes32 pythIdForRONUSD);\\n\\n /**\\n * @dev Sets the Pyth oracle config.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits events {PythOracleConfigUpdated}.\\n */\\n function setPythOracleConfig(IPyth pyth, uint256 maxAcceptableAge, bytes32 pythIdForRONUSD) external;\\n\\n /**\\n * @dev Returns the percentage to scale from domain price each period.\\n */\\n function getScaleDownRuleForDomainPrice() external view returns (PeriodScaler memory dpScaleRule);\\n\\n /**\\n * @dev Sets the percentage to scale from domain price each period.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits events {DomainPriceScaleRuleUpdated}.\\n *\\n * @notice Applies for the business rule: -x% each y seconds.\\n */\\n function setScaleDownRuleForDomainPrice(PeriodScaler calldata scaleRule) external;\\n\\n /**\\n * @dev Returns the renewal fee by lengths.\\n */\\n function getRenewalFeeByLengths() external view returns (RenewalFee[] memory renewalFees);\\n\\n /**\\n * @dev Sets the renewal fee by lengths\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits events {RenewalFeeByLengthUpdated}.\\n * Emits an event {MaxRenewalFeeLengthUpdated} optionally.\\n */\\n function setRenewalFeeByLengths(RenewalFee[] calldata renewalFees) external;\\n\\n /**\\n * @dev Returns tax ratio.\\n */\\n function getTaxRatio() external view returns (uint256 taxRatio);\\n\\n /**\\n * @dev Sets renewal reservation ratio.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits an event {TaxRatioUpdated}.\\n */\\n function setTaxRatio(uint256 ratio) external;\\n\\n /**\\n * @dev Return the domain price.\\n * @param label The domain label to register (Eg, 'foo' for 'foo.ron').\\n */\\n function getDomainPrice(string memory label) external view returns (uint256 usdPrice, uint256 ronPrice);\\n\\n /**\\n * @dev Returns the renewal fee in USD and RON.\\n * @param label The domain label to register (Eg, 'foo' for 'foo.ron').\\n * @param duration Amount of second(s).\\n */\\n function getRenewalFee(string calldata label, uint256 duration)\\n external\\n view\\n returns (UnitPrice memory basePrice, UnitPrice memory tax);\\n\\n /**\\n * @dev Returns the renewal fee of a label. Reverts if not overridden.\\n * @notice This method is to help developers check the domain renewal fee overriding. Consider using method\\n * {getRenewalFee} instead for full handling of renewal fees.\\n */\\n function getOverriddenRenewalFee(string memory label) external view returns (uint256 usdFee);\\n\\n /**\\n * @dev Bulk override renewal fees.\\n *\\n * Requirements:\\n * - The method caller is operator.\\n * - The input array lengths must be larger than 0 and the same.\\n *\\n * Emits events {RenewalFeeOverridingUpdated}.\\n *\\n * @param lbHashes Array of label hashes. (Eg, ['foo'].map(keccak256) for 'foo.ron')\\n * @param usdPrices Array of prices in USD. Leave 2^256 - 1 to remove overriding.\\n */\\n function bulkOverrideRenewalFees(bytes32[] calldata lbHashes, uint256[] calldata usdPrices) external;\\n\\n /**\\n * @dev Bulk try to set domain prices. Returns a boolean array indicating whether domain prices at the corresponding\\n * indexes if set or not.\\n *\\n * Requirements:\\n * - The method caller is operator.\\n * - The input array lengths must be larger than 0 and the same.\\n * - The price should be larger than current domain price or it will not be updated.\\n *\\n * Emits events {DomainPriceUpdated} optionally.\\n *\\n * @param lbHashes Array of label hashes. (Eg, ['foo'].map(keccak256) for 'foo.ron')\\n * @param ronPrices Array of prices in (W)RON token.\\n * @param proofHashes Array of proof hashes.\\n * @param setTypes Array of update types from the operator service.\\n */\\n function bulkTrySetDomainPrice(\\n bytes32[] calldata lbHashes,\\n uint256[] calldata ronPrices,\\n bytes32[] calldata proofHashes,\\n uint256[] calldata setTypes\\n ) external returns (bool[] memory updated);\\n\\n /**\\n * @dev Bulk override domain prices.\\n *\\n * Requirements:\\n * - The method caller is operator.\\n * - The input array lengths must be larger than 0 and the same.\\n *\\n * Emits events {DomainPriceUpdated}.\\n *\\n * @param lbHashes Array of label hashes. (Eg, ['foo'].map(keccak256) for 'foo.ron')\\n * @param ronPrices Array of prices in (W)RON token.\\n * @param proofHashes Array of proof hashes.\\n * @param setTypes Array of update types from the operator service.\\n */\\n function bulkSetDomainPrice(\\n bytes32[] calldata lbHashes,\\n uint256[] calldata ronPrices,\\n bytes32[] calldata proofHashes,\\n uint256[] calldata setTypes\\n ) external;\\n\\n /**\\n * @dev Returns the converted amount from USD to RON.\\n */\\n function convertUSDToRON(uint256 usdAmount) external view returns (uint256 ronAmount);\\n\\n /**\\n * @dev Returns the converted amount from RON to USD.\\n */\\n function convertRONToUSD(uint256 ronAmount) external view returns (uint256 usdAmount);\\n\\n /**\\n * @dev Value equals to keccak256(\\\"OPERATOR_ROLE\\\").\\n */\\n function OPERATOR_ROLE() external pure returns (bytes32);\\n\\n /**\\n * @dev Max percentage 100%. Values [0; 100_00] reflexes [0; 100%]\\n */\\n function MAX_PERCENTAGE() external pure returns (uint64);\\n\\n /**\\n * @dev Decimal for USD.\\n */\\n function USD_DECIMALS() external pure returns (uint8);\\n}\\n\",\"keccak256\":\"0x79acf09e4570a955f5d78a4f9159c2dc20268d816e06e9b51b94bcac0738eb5a\",\"license\":\"MIT\"},\"src/interfaces/INSUnified.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nimport { IERC721Metadata } from \\\"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol\\\";\\nimport { IAccessControlEnumerable } from \\\"@openzeppelin/contracts/access/IAccessControlEnumerable.sol\\\";\\nimport { ModifyingIndicator } from \\\"../types/ModifyingIndicator.sol\\\";\\n\\ninterface INSUnified is IAccessControlEnumerable, IERC721Metadata {\\n /// @dev Error: The provided token id is expired.\\n error Expired();\\n /// @dev Error: The provided token id is unexists.\\n error Unexists();\\n /// @dev Error: The provided id expiry is greater than parent id expiry.\\n error ExceedParentExpiry();\\n /// @dev Error: The provided name is unavailable for registration.\\n error Unavailable();\\n /// @dev Error: The sender lacks the necessary permissions.\\n error Unauthorized();\\n /// @dev Error: Missing controller role required for modification.\\n error MissingControllerRole();\\n /// @dev Error: Attempting to set an immutable field, which cannot be modified.\\n error CannotSetImmutableField();\\n /// @dev Error: Missing protected settler role required for modification.\\n error MissingProtectedSettlerRole();\\n /// @dev Error: Attempting to set an expiry time that is not larger than the previous one.\\n error ExpiryTimeMustBeLargerThanTheOldOne();\\n /// @dev Error: The provided name must be registered or is in a grace period.\\n error NameMustBeRegisteredOrInGracePeriod();\\n\\n /**\\n * | Fields\\\\Idc | Modifying Indicator |\\n * | ---------- | ------------------- |\\n * | depth | 0b00000001 |\\n * | parentId | 0b00000010 |\\n * | label | 0b00000100 |\\n */\\n struct ImmutableRecord {\\n // The level-th of a domain.\\n uint8 depth;\\n // The node of parent token. Eg, parent node of vip.duke.ron equals to namehash('duke.ron')\\n uint256 parentId;\\n // The label of a domain. Eg, label is vip for domain vip.duke.ron\\n string label;\\n }\\n\\n /**\\n * | Fields\\\\Idc,Roles | Modifying Indicator | Controller | Protected setter | (Parent) Owner/Spender |\\n * | ---------------- | ------------------- | ---------- | ---------------- | ---------------------- |\\n * | resolver | 0b00001000 | x | | x |\\n * | owner | 0b00010000 | x | | x |\\n * | expiry | 0b00100000 | x | | |\\n * | protected | 0b01000000 | | x | |\\n * Note: (Parent) Owner/Spender means parent owner or current owner or current token spender.\\n */\\n struct MutableRecord {\\n // The resolver address.\\n address resolver;\\n // The record owner. This field must equal to the owner of token.\\n address owner;\\n // Expiry timestamp.\\n uint64 expiry;\\n // Flag indicating whether the token is protected or not.\\n bool protected;\\n }\\n\\n struct Record {\\n ImmutableRecord immut;\\n MutableRecord mut;\\n }\\n\\n /// @dev Emitted when a base URI is updated.\\n event BaseURIUpdated(address indexed operator, string newURI);\\n /// @dev Emitted when the grace period for all domain is updated.\\n event GracePeriodUpdated(address indexed operator, uint64 newGracePeriod);\\n\\n /**\\n * @dev Emitted when the record of node is updated.\\n * @param indicator The binary index of updated fields. Eg, 0b10101011 means fields at position 1, 2, 4, 6, 8 (right\\n * to left) needs to be updated.\\n * @param record The updated fields.\\n */\\n event RecordUpdated(uint256 indexed node, ModifyingIndicator indicator, Record record);\\n\\n /**\\n * @dev Returns the controller role.\\n * @notice Can set all fields {Record.mut} in token record, excepting {Record.mut.protected}.\\n */\\n function CONTROLLER_ROLE() external pure returns (bytes32);\\n\\n /**\\n * @dev Returns the protected setter role.\\n * @notice Can set field {Record.mut.protected} in token record by using method `bulkSetProtected`.\\n */\\n function PROTECTED_SETTLER_ROLE() external pure returns (bytes32);\\n\\n /**\\n * @dev Returns the reservation role.\\n * @notice Never expire for token owner has this role.\\n */\\n function RESERVATION_ROLE() external pure returns (bytes32);\\n\\n /**\\n * @dev Returns the max expiry value.\\n */\\n function MAX_EXPIRY() external pure returns (uint64);\\n\\n /**\\n * @dev Returns the name hash output of a domain.\\n */\\n function namehash(string memory domain) external pure returns (bytes32 node);\\n\\n /**\\n * @dev Returns true if the specified name is available for registration.\\n * Note: Only available after passing the grace period.\\n */\\n function available(uint256 id) external view returns (bool);\\n\\n /**\\n * @dev Returns the grace period in second(s).\\n * Note: This period affects the availability of the domain.\\n */\\n function getGracePeriod() external view returns (uint64);\\n\\n /**\\n * @dev Returns the total minted ids.\\n * Note: Burning id will not affect `totalMinted`.\\n */\\n function totalMinted() external view returns (uint256);\\n\\n /**\\n * @dev Sets the grace period in second(s).\\n *\\n * Requirements:\\n * - The method caller must have controller role.\\n *\\n * Note: This period affects the availability of the domain.\\n */\\n function setGracePeriod(uint64) external;\\n\\n /**\\n * @dev Sets the base uri.\\n *\\n * Requirements:\\n * - The method caller must be contract owner.\\n *\\n */\\n function setBaseURI(string calldata baseTokenURI) external;\\n\\n /**\\n * @dev Mints token for subnode.\\n *\\n * Requirements:\\n * - The token must be available.\\n * - The method caller must be (parent) owner or approved spender. See struct {MutableRecord}.\\n *\\n * Emits an event {RecordUpdated}.\\n *\\n * @param parentId The parent node to mint or create subnode.\\n * @param label The domain label. Eg, label is duke for domain duke.ron.\\n * @param resolver The resolver address.\\n * @param owner The token owner.\\n * @param duration Duration in second(s) to expire. Leave 0 to set as parent.\\n */\\n function mint(uint256 parentId, string calldata label, address resolver, address owner, uint64 duration)\\n external\\n returns (uint64 expiryTime, uint256 id);\\n\\n /**\\n * @dev Returns all record of a domain.\\n * Reverts if the token is non existent.\\n */\\n function getRecord(uint256 id) external view returns (Record memory record);\\n\\n /**\\n * @dev Returns the domain name of id.\\n */\\n function getDomain(uint256 id) external view returns (string memory domain);\\n\\n /**\\n * @dev Returns whether the requester is able to modify the record based on the updated index.\\n * Note: This method strictly follows the permission of struct {MutableRecord}.\\n */\\n function canSetRecord(address requester, uint256 id, ModifyingIndicator indicator)\\n external\\n view\\n returns (bool, bytes4 error);\\n\\n /**\\n * @dev Sets record of existing token. Update operation for {Record.mut}.\\n *\\n * Requirements:\\n * - The method caller must have role based on the corresponding `indicator`. See struct {MutableRecord}.\\n *\\n * Emits an event {RecordUpdated}.\\n */\\n function setRecord(uint256 id, ModifyingIndicator indicator, MutableRecord calldata record) external;\\n\\n /**\\n * @dev Reclaims ownership. Update operation for {Record.mut.owner}.\\n *\\n * Requirements:\\n * - The method caller should have controller role.\\n * - The method caller should be (parent) owner or approved spender. See struct {MutableRecord}.\\n *\\n * Emits an event {RecordUpdated}.\\n */\\n function reclaim(uint256 id, address owner) external;\\n\\n /**\\n * @dev Renews token. Update operation for {Record.mut.expiry}.\\n *\\n * Requirements:\\n * - The method caller should have controller role.\\n *\\n * Emits an event {RecordUpdated}.\\n */\\n function renew(uint256 id, uint64 duration) external returns (uint64 expiry);\\n\\n /**\\n * @dev Sets expiry time for a token. Update operation for {Record.mut.expiry}.\\n *\\n * Requirements:\\n * - The method caller must have controller role.\\n *\\n * Emits an event {RecordUpdated}.\\n */\\n function setExpiry(uint256 id, uint64 expiry) external;\\n\\n /**\\n * @dev Sets the protected status of a list of ids. Update operation for {Record.mut.protected}.\\n *\\n * Requirements:\\n * - The method caller must have protected setter role.\\n *\\n * Emits events {RecordUpdated}.\\n */\\n function bulkSetProtected(uint256[] calldata ids, bool protected) external;\\n}\\n\",\"keccak256\":\"0xaef1c58bb7c8688d6677a1c2739c0dc9e645ca5c64dd875be2f2b7a318a11406\",\"license\":\"MIT\"},\"src/libraries/LibEventRange.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nstruct EventRange {\\n uint256 startedAt;\\n uint256 endedAt;\\n}\\n\\nlibrary LibEventRange {\\n /**\\n * @dev Checks whether the event range is valid.\\n */\\n function valid(EventRange calldata range) internal pure returns (bool) {\\n return range.startedAt <= range.endedAt;\\n }\\n\\n /**\\n * @dev Returns whether the current range is not yet started.\\n */\\n function isNotYetStarted(EventRange memory range) internal view returns (bool) {\\n return block.timestamp < range.startedAt;\\n }\\n\\n /**\\n * @dev Returns whether the current range is ended or not.\\n */\\n function isEnded(EventRange memory range) internal view returns (bool) {\\n return range.endedAt <= block.timestamp;\\n }\\n\\n /**\\n * @dev Returns whether the current block is in period.\\n */\\n function isInPeriod(EventRange memory range) internal view returns (bool) {\\n return range.startedAt <= block.timestamp && block.timestamp < range.endedAt;\\n }\\n}\\n\",\"keccak256\":\"0x95bf015c4245919cbcbcd810dd597fdb23eb4e58b62df8ef74b1c8c60a969bea\",\"license\":\"MIT\"},\"src/libraries/LibRNSDomain.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nlibrary LibRNSDomain {\\n /// @dev Value equals to namehash('ron')\\n uint256 internal constant RON_ID = 0xba69923fa107dbf5a25a073a10b7c9216ae39fbadc95dc891d460d9ae315d688;\\n /// @dev Value equals to namehash('addr.reverse')\\n uint256 internal constant ADDR_REVERSE_ID = 0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2;\\n\\n /**\\n * @dev Calculate the corresponding id given parentId and label.\\n */\\n function toId(uint256 parentId, string memory label) internal pure returns (uint256 id) {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x0, parentId)\\n mstore(0x20, keccak256(add(label, 32), mload(label)))\\n id := keccak256(0x0, 64)\\n }\\n }\\n\\n /**\\n * @dev Calculates the hash of the label.\\n */\\n function hashLabel(string memory label) internal pure returns (bytes32 hashed) {\\n assembly (\\\"memory-safe\\\") {\\n hashed := keccak256(add(label, 32), mload(label))\\n }\\n }\\n\\n /**\\n * @dev Calculate the RNS namehash of a str.\\n */\\n function namehash(string memory str) internal pure returns (bytes32 hashed) {\\n // notice: this method is case-sensitive, ensure the string is lowercased before calling this method\\n assembly (\\\"memory-safe\\\") {\\n // load str length\\n let len := mload(str)\\n // returns bytes32(0x0) if length is zero\\n if iszero(iszero(len)) {\\n let hashedLen\\n // compute pointer to str[0]\\n let head := add(str, 32)\\n // compute pointer to str[length - 1]\\n let tail := add(head, sub(len, 1))\\n // cleanup dirty bytes if contains any\\n mstore(0x0, 0)\\n // loop backwards from `tail` to `head`\\n for { let i := tail } iszero(lt(i, head)) { i := sub(i, 1) } {\\n // check if `i` is `head`\\n let isHead := eq(i, head)\\n // check if `str[i-1]` is \\\".\\\"\\n // `0x2e` == bytes1(\\\".\\\")\\n let isDotNext := eq(shr(248, mload(sub(i, 1))), 0x2e)\\n if or(isHead, isDotNext) {\\n // size = distance(length, i) - hashedLength + 1\\n let size := add(sub(sub(tail, i), hashedLen), 1)\\n mstore(0x20, keccak256(i, size))\\n mstore(0x0, keccak256(0x0, 64))\\n // skip \\\".\\\" thereby + 1\\n hashedLen := add(hashedLen, add(size, 1))\\n }\\n }\\n }\\n hashed := mload(0x0)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x715029b2b420c6ec00bc1f939b837acf45d247fde8426089575b0e7b5e84518b\",\"license\":\"MIT\"},\"src/libraries/LibString.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nlibrary LibString {\\n error InvalidStringLength();\\n error InvalidCharacter(bytes1 char);\\n\\n /// @dev Lookup constant for method. See more detail at https://eips.ethereum.org/EIPS/eip-181\\n bytes32 private constant LOOKUP = 0x3031323334353637383961626364656600000000000000000000000000000000;\\n\\n /**\\n * @dev Returns the length of a given string\\n *\\n * @param s The string to measure the length of\\n * @return The length of the input string\\n */\\n function strlen(string memory s) internal pure returns (uint256) {\\n unchecked {\\n uint256 i;\\n uint256 len;\\n uint256 bytelength = bytes(s).length;\\n for (len; i < bytelength; len++) {\\n bytes1 b = bytes(s)[i];\\n if (b < 0x80) {\\n i += 1;\\n } else if (b < 0xE0) {\\n i += 2;\\n } else if (b < 0xF0) {\\n i += 3;\\n } else if (b < 0xF8) {\\n i += 4;\\n } else if (b < 0xFC) {\\n i += 5;\\n } else {\\n i += 6;\\n }\\n }\\n return len;\\n }\\n }\\n\\n /**\\n * @dev Converts an address to string.\\n */\\n function toString(address addr) internal pure returns (string memory stringifiedAddr) {\\n assembly (\\\"memory-safe\\\") {\\n mstore(stringifiedAddr, 40)\\n let ptr := add(stringifiedAddr, 0x20)\\n for { let i := 40 } gt(i, 0) { } {\\n i := sub(i, 1)\\n mstore8(add(i, ptr), byte(and(addr, 0xf), LOOKUP))\\n addr := div(addr, 0x10)\\n\\n i := sub(i, 1)\\n mstore8(add(i, ptr), byte(and(addr, 0xf), LOOKUP))\\n addr := div(addr, 0x10)\\n }\\n }\\n }\\n\\n /**\\n * @dev Converts string to address.\\n * Reverts if the string length is not equal to 40.\\n */\\n function parseAddr(string memory stringifiedAddr) internal pure returns (address) {\\n unchecked {\\n if (bytes(stringifiedAddr).length != 40) revert InvalidStringLength();\\n uint160 addr;\\n for (uint256 i = 0; i < 40; i += 2) {\\n addr *= 0x100;\\n addr += uint160(hexCharToDec(bytes(stringifiedAddr)[i])) * 0x10;\\n addr += hexCharToDec(bytes(stringifiedAddr)[i + 1]);\\n }\\n return address(addr);\\n }\\n }\\n\\n /**\\n * @dev Converts a hex char (0-9, a-f, A-F) to decimal number.\\n * Reverts if the char is invalid.\\n */\\n function hexCharToDec(bytes1 c) private pure returns (uint8 r) {\\n unchecked {\\n if ((bytes1(\\\"a\\\") <= c) && (c <= bytes1(\\\"f\\\"))) r = uint8(c) - 87;\\n else if ((bytes1(\\\"A\\\") <= c) && (c <= bytes1(\\\"F\\\"))) r = uint8(c) - 55;\\n else if ((bytes1(\\\"0\\\") <= c) && (c <= bytes1(\\\"9\\\"))) r = uint8(c) - 48;\\n else revert InvalidCharacter(c);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9d456b294f0e44ccaabded43a3d96db6270761a167535155a762fe41e968b905\",\"license\":\"MIT\"},\"src/libraries/TimestampWrapperUtils.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nstruct TimestampWrapper {\\n uint256 value;\\n uint256 timestamp;\\n}\\n\",\"keccak256\":\"0x18488d153ebc8579907a85cb7e0be828d0de7c571c9f3368a6d200574b012018\",\"license\":\"MIT\"},\"src/libraries/math/PeriodScalingUtils.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { PowMath } from \\\"./PowMath.sol\\\";\\n\\nstruct PeriodScaler {\\n uint192 ratio;\\n uint64 period;\\n}\\n\\nlibrary LibPeriodScaler {\\n using PowMath for uint256;\\n\\n error PeriodNumOverflowedUint16(uint256 n);\\n\\n /// @dev The precision number of calculation is 2\\n uint256 public constant MAX_PERCENTAGE = 100_00;\\n\\n /**\\n * @dev Scales down the input value `v` for a percentage of `self.ratio` each period `self.period`.\\n * Reverts if the passed period is larger than 2^16 - 1.\\n *\\n * @param self The period scaler with specific period and ratio\\n * @param v The original value to scale based on the rule `self`\\n * @param maxR The maximum value of 100%. Eg, if the `self.ratio` in range of [0;100_00] reflexes 0-100%, this param\\n * must be 100_00\\n * @param dur The passed duration in the same uint with `self.period`\\n */\\n function scaleDown(PeriodScaler memory self, uint256 v, uint64 maxR, uint256 dur) internal pure returns (uint256 rs) {\\n uint256 n = dur / uint256(self.period);\\n if (n == 0 || self.ratio == 0) return v;\\n if (maxR == self.ratio) return 0;\\n if (n > type(uint16).max) revert PeriodNumOverflowedUint16(n);\\n\\n unchecked {\\n // Normalizes the input ratios to be in range of [0;MAX_PERCENTAGE]\\n uint256 p = Math.mulDiv(maxR - self.ratio, MAX_PERCENTAGE, maxR);\\n return v.mulDiv({ y: p, d: MAX_PERCENTAGE, n: uint16(n) });\\n }\\n }\\n}\\n\",\"keccak256\":\"0x502d004fbd130a99f3f1e6685aebff9f47300565fbc5a65b4912824ea5eb5b78\",\"license\":\"MIT\"},\"src/libraries/math/PowMath.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { SafeMath } from \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nlibrary PowMath {\\n using Math for uint256;\\n using SafeMath for uint256;\\n\\n /**\\n * @dev Negative exponent n for x*10^n.\\n */\\n function exp10(uint256 x, int32 n) internal pure returns (uint256) {\\n if (n < 0) {\\n return x / 10 ** uint32(-n);\\n } else if (n > 0) {\\n return x * 10 ** uint32(n);\\n } else {\\n return x;\\n }\\n }\\n\\n /**\\n * @dev Calculates floor(x * (y / d)**n) with full precision.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 d, uint16 n) internal pure returns (uint256 r) {\\n unchecked {\\n if (y == d || n == 0) return x;\\n r = x;\\n\\n bool ok;\\n uint256 r_;\\n uint16 nd_;\\n\\n {\\n uint16 ye = uint16(Math.min(n, findMaxExponent(y)));\\n while (ye > 0) {\\n (ok, r_) = r.tryMul(y ** ye);\\n if (ok) {\\n r = r_;\\n n -= ye;\\n nd_ += ye;\\n }\\n ye = uint16(Math.min(ye / 2, n));\\n }\\n }\\n\\n while (n > 0) {\\n (ok, r_) = r.tryMul(y);\\n if (ok) {\\n r = r_;\\n n--;\\n nd_++;\\n } else if (nd_ > 0) {\\n r /= d;\\n nd_--;\\n } else {\\n r = r.mulDiv(y, d);\\n n--;\\n }\\n }\\n\\n uint16 de = findMaxExponent(d);\\n while (nd_ > 0) {\\n uint16 e = uint16(Math.min(de, nd_));\\n r /= d ** e;\\n nd_ -= e;\\n }\\n }\\n }\\n\\n /**\\n * @dev Calculates floor(x * (y / d)**n) with low precision.\\n */\\n function mulDivLowPrecision(uint256 x, uint256 y, uint256 d, uint16 n) internal pure returns (uint256) {\\n return uncheckedMulDiv(x, y, d, n, findMaxExponent(Math.max(y, d)));\\n }\\n\\n /**\\n * @dev Aggregated calculate multiplications.\\n * ```\\n * r = x*(y/d)^k\\n * = \\\\prod(x*(y/d)^{k_i}) \\\\ where \\\\ sum(k_i) = k\\n * ```\\n */\\n function uncheckedMulDiv(uint256 x, uint256 y, uint256 d, uint16 n, uint16 maxE) internal pure returns (uint256 r) {\\n unchecked {\\n r = x;\\n uint16 e;\\n while (n > 0) {\\n e = uint16(Math.min(n, maxE));\\n r = r.mulDiv(y ** e, d ** e);\\n n -= e;\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns the largest exponent `k` where, x^k <= 2^256-1\\n * Note: n = Surd[2^256-1,k]\\n * = 10^( log2(2^256-1) / k * log10(2) )\\n */\\n function findMaxExponent(uint256 x) internal pure returns (uint16 k) {\\n if (x < 3) k = 255;\\n else if (x < 4) k = 128;\\n else if (x < 16) k = 64;\\n else if (x < 256) k = 32;\\n else if (x < 7132) k = 20;\\n else if (x < 11376) k = 19;\\n else if (x < 19113) k = 18;\\n else if (x < 34132) k = 17;\\n else if (x < 65536) k = 16;\\n else if (x < 137271) k = 15;\\n else if (x < 319558) k = 14;\\n else if (x < 847180) k = 13;\\n else if (x < 2642246) k = 12;\\n else if (x < 10134189) k = 11;\\n else if (x < 50859009) k = 10;\\n else if (x < 365284285) k = 9;\\n else if (x < 4294967296) k = 8;\\n else if (x < 102116749983) k = 7;\\n else if (x < 6981463658332) k = 6;\\n else if (x < 2586638741762875) k = 5;\\n else if (x < 18446744073709551616) k = 4;\\n else if (x < 48740834812604276470692695) k = 3;\\n else if (x < 340282366920938463463374607431768211456) k = 2;\\n else k = 1;\\n }\\n}\\n\",\"keccak256\":\"0x29f943cf7c61149bc9a624244901720fc3a349adb418555db1db2a045fcdfb70\",\"license\":\"MIT\"},\"src/libraries/pyth/PythConverter.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { PythStructs } from \\\"@pythnetwork/PythStructs.sol\\\";\\nimport { PowMath } from \\\"../math/PowMath.sol\\\";\\n\\nlibrary PythConverter {\\n error ErrExponentTooLarge(int32 expo);\\n error ErrComputedPriceTooLarge(int32 expo1, int32 expo2, int64 price1);\\n\\n /**\\n * @dev Multiples and converts the price into token wei with decimals `outDecimals`.\\n */\\n function mul(PythStructs.Price memory self, uint256 inpWei, int32 inpDecimals, int32 outDecimals)\\n internal\\n pure\\n returns (uint256 outWei)\\n {\\n return Math.mulDiv(\\n inpWei, PowMath.exp10(uint256(int256(self.price)), outDecimals + self.expo), PowMath.exp10(1, inpDecimals)\\n );\\n }\\n\\n /**\\n * @dev Inverses token price of tokenA/tokenB to tokenB/tokenA.\\n */\\n function inverse(PythStructs.Price memory self, int32 expo) internal pure returns (PythStructs.Price memory outPrice) {\\n uint256 exp10p1 = PowMath.exp10(1, -self.expo);\\n if (exp10p1 > uint256(type(int256).max)) revert ErrExponentTooLarge(self.expo);\\n uint256 exp10p2 = PowMath.exp10(1, -expo);\\n if (exp10p2 > uint256(type(int256).max)) revert ErrExponentTooLarge(expo);\\n int256 price = (int256(exp10p1) * int256(exp10p2)) / self.price;\\n if (price > type(int64).max) revert ErrComputedPriceTooLarge(self.expo, expo, self.price);\\n\\n return PythStructs.Price({ price: int64(price), conf: self.conf, expo: expo, publishTime: self.publishTime });\\n }\\n}\\n\",\"keccak256\":\"0x87ade16f6e931f6a3ead7706b0e550ee2c2cdee0be2f218488df93588e787f06\",\"license\":\"MIT\"},\"src/types/ModifyingIndicator.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\ntype ModifyingIndicator is uint256;\\n\\nusing { hasAny } for ModifyingIndicator global;\\nusing { or as | } for ModifyingIndicator global;\\nusing { and as & } for ModifyingIndicator global;\\nusing { eq as == } for ModifyingIndicator global;\\nusing { not as ~ } for ModifyingIndicator global;\\nusing { neq as != } for ModifyingIndicator global;\\n\\n/// @dev Indicator for modifying immutable fields: Depth, ParentId, Label. See struct {INSUnified.ImmutableRecord}.\\nModifyingIndicator constant IMMUTABLE_FIELDS_INDICATOR = ModifyingIndicator.wrap(0x7);\\n\\n/// @dev Indicator for modifying user fields: Resolver, Owner. See struct {INSUnified.MutableRecord}.\\nModifyingIndicator constant USER_FIELDS_INDICATOR = ModifyingIndicator.wrap(0x18);\\n\\n/// @dev Indicator when modifying all of the fields in {ModifyingField}.\\nModifyingIndicator constant ALL_FIELDS_INDICATOR = ModifyingIndicator.wrap(type(uint256).max);\\n\\nfunction eq(ModifyingIndicator self, ModifyingIndicator other) pure returns (bool) {\\n return ModifyingIndicator.unwrap(self) == ModifyingIndicator.unwrap(other);\\n}\\n\\nfunction neq(ModifyingIndicator self, ModifyingIndicator other) pure returns (bool) {\\n return !eq(self, other);\\n}\\n\\nfunction not(ModifyingIndicator self) pure returns (ModifyingIndicator) {\\n return ModifyingIndicator.wrap(~ModifyingIndicator.unwrap(self));\\n}\\n\\nfunction or(ModifyingIndicator self, ModifyingIndicator other) pure returns (ModifyingIndicator) {\\n return ModifyingIndicator.wrap(ModifyingIndicator.unwrap(self) | ModifyingIndicator.unwrap(other));\\n}\\n\\nfunction and(ModifyingIndicator self, ModifyingIndicator other) pure returns (ModifyingIndicator) {\\n return ModifyingIndicator.wrap(ModifyingIndicator.unwrap(self) & ModifyingIndicator.unwrap(other));\\n}\\n\\nfunction hasAny(ModifyingIndicator self, ModifyingIndicator other) pure returns (bool) {\\n return self & other != ModifyingIndicator.wrap(0);\\n}\\n\",\"keccak256\":\"0xe364b4d2e480a7f3e392a40f792303c0febf79c1a623eb4c2278f652210e2e6c\",\"license\":\"MIT\"}},\"version\":1}", - "nonce": 182501, - "numDeployments": 1, + "metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"int32\",\"name\":\"expo1\",\"type\":\"int32\"},{\"internalType\":\"int32\",\"name\":\"expo2\",\"type\":\"int32\"},{\"internalType\":\"int64\",\"name\":\"price1\",\"type\":\"int64\"}],\"name\":\"ErrComputedPriceTooLarge\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int32\",\"name\":\"expo\",\"type\":\"int32\"}],\"name\":\"ErrExponentTooLarge\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ExceedAuctionDomainExpiry\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidArrayLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"n\",\"type\":\"uint256\"}],\"name\":\"PeriodNumOverflowedUint16\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RenewalFeeIsNotOverriden\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint192\",\"name\":\"ratio\",\"type\":\"uint192\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"period\",\"type\":\"uint64\"}],\"name\":\"DomainPriceScaleRuleUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"labelHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proofHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"setType\",\"type\":\"uint256\"}],\"name\":\"DomainPriceUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maxLength\",\"type\":\"uint256\"}],\"name\":\"MaxRenewalFeeLengthUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IPyth\",\"name\":\"pyth\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maxAcceptableAge\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"pythIdForRONUSD\",\"type\":\"bytes32\"}],\"name\":\"PythOracleConfigUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"labelLength\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"renewalFee\",\"type\":\"uint256\"}],\"name\":\"RenewalFeeByLengthUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"labelHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inverseRenewalFee\",\"type\":\"uint256\"}],\"name\":\"RenewalFeeOverridingUpdated\",\"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\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"ratio\",\"type\":\"uint256\"}],\"name\":\"TaxRatioUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_PERCENTAGE\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OPERATOR_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"USD_DECIMALS\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"lbHashes\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"usdPrices\",\"type\":\"uint256[]\"}],\"name\":\"bulkOverrideRenewalFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"lbHashes\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"ronPrices\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"proofHashes\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"setTypes\",\"type\":\"uint256[]\"}],\"name\":\"bulkSetDomainPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"lbHashes\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"ronPrices\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"proofHashes\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"setTypes\",\"type\":\"uint256[]\"}],\"name\":\"bulkTrySetDomainPrice\",\"outputs\":[{\"internalType\":\"bool[]\",\"name\":\"updated\",\"type\":\"bool[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"ronWei\",\"type\":\"uint256\"}],\"name\":\"convertRONToUSD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"usdWei\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"usdWei\",\"type\":\"uint256\"}],\"name\":\"convertUSDToRON\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ronWei\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"label\",\"type\":\"string\"}],\"name\":\"getDomainPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"usdPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ronPrice\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"label\",\"type\":\"string\"}],\"name\":\"getOverriddenRenewalFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"usdFee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPythOracleConfig\",\"outputs\":[{\"internalType\":\"contract IPyth\",\"name\":\"pyth\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxAcceptableAge\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"pythIdForRONUSD\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"label\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"}],\"name\":\"getRenewalFee\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"usd\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ron\",\"type\":\"uint256\"}],\"internalType\":\"struct INSDomainPrice.UnitPrice\",\"name\":\"basePrice\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"usd\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ron\",\"type\":\"uint256\"}],\"internalType\":\"struct INSDomainPrice.UnitPrice\",\"name\":\"tax\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRenewalFeeByLengths\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"labelLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"internalType\":\"struct INSDomainPrice.RenewalFee[]\",\"name\":\"renewalFees\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getScaleDownRuleForDomainPrice\",\"outputs\":[{\"components\":[{\"internalType\":\"uint192\",\"name\":\"ratio\",\"type\":\"uint192\"},{\"internalType\":\"uint64\",\"name\":\"period\",\"type\":\"uint64\"}],\"internalType\":\"struct PeriodScaler\",\"name\":\"scaleRule\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTaxRatio\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ratio\",\"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\":\"admin\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"labelLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"internalType\":\"struct INSDomainPrice.RenewalFee[]\",\"name\":\"renewalFees\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"taxRatio\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint192\",\"name\":\"ratio\",\"type\":\"uint192\"},{\"internalType\":\"uint64\",\"name\":\"period\",\"type\":\"uint64\"}],\"internalType\":\"struct PeriodScaler\",\"name\":\"domainPriceScaleRule\",\"type\":\"tuple\"},{\"internalType\":\"contract IPyth\",\"name\":\"pyth\",\"type\":\"address\"},{\"internalType\":\"contract INSAuction\",\"name\":\"auction\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxAcceptableAge\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"pythIdForRONUSD\",\"type\":\"bytes32\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IPyth\",\"name\":\"pyth\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxAcceptableAge\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"pythIdForRONUSD\",\"type\":\"bytes32\"}],\"name\":\"setPythOracleConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"labelLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"internalType\":\"struct INSDomainPrice.RenewalFee[]\",\"name\":\"renewalFees\",\"type\":\"tuple[]\"}],\"name\":\"setRenewalFeeByLengths\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint192\",\"name\":\"ratio\",\"type\":\"uint192\"},{\"internalType\":\"uint64\",\"name\":\"period\",\"type\":\"uint64\"}],\"internalType\":\"struct PeriodScaler\",\"name\":\"scaleRule\",\"type\":\"tuple\"}],\"name\":\"setScaleDownRuleForDomainPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"ratio\",\"type\":\"uint256\"}],\"name\":\"setTaxRatio\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"DomainPriceScaleRuleUpdated(address,uint192,uint64)\":{\"details\":\"Emitted when the rule to rescale domain price is updated.\"},\"DomainPriceUpdated(address,bytes32,uint256,bytes32,uint256)\":{\"details\":\"Emitted when the domain price is updated.\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"MaxRenewalFeeLengthUpdated(address,uint256)\":{\"details\":\"Emitted when the maximum length of renewal fee is updated.\"},\"PythOracleConfigUpdated(address,address,uint256,bytes32)\":{\"details\":\"Emitted when the Pyth Oracle config is updated.\"},\"RenewalFeeByLengthUpdated(address,uint256,uint256)\":{\"details\":\"Emitted when the renew fee is updated.\"},\"RenewalFeeOverridingUpdated(address,bytes32,uint256)\":{\"details\":\"Emitted when the renew fee of a domain is overridden. Value of `inverseRenewalFee` is 0 when not overridden.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"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._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"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`)\"},\"TaxRatioUpdated(address,uint256)\":{\"details\":\"Emitted when the renewal reservation ratio is updated.\"}},\"kind\":\"dev\",\"methods\":{\"bulkOverrideRenewalFees(bytes32[],uint256[])\":{\"details\":\"Bulk override renewal fees. Requirements: - The method caller is operator. - The input array lengths must be larger than 0 and the same. Emits events {RenewalFeeOverridingUpdated}.\",\"params\":{\"lbHashes\":\"Array of label hashes. (Eg, ['foo'].map(keccak256) for 'foo.ron')\",\"usdPrices\":\"Array of prices in USD. Leave 2^256 - 1 to remove overriding.\"}},\"bulkSetDomainPrice(bytes32[],uint256[],bytes32[],uint256[])\":{\"details\":\"Bulk override domain prices. Requirements: - The method caller is operator. - The input array lengths must be larger than 0 and the same. Emits events {DomainPriceUpdated}.\",\"params\":{\"lbHashes\":\"Array of label hashes. (Eg, ['foo'].map(keccak256) for 'foo.ron')\",\"proofHashes\":\"Array of proof hashes.\",\"ronPrices\":\"Array of prices in (W)RON token.\",\"setTypes\":\"Array of update types from the operator service.\"}},\"bulkTrySetDomainPrice(bytes32[],uint256[],bytes32[],uint256[])\":{\"details\":\"Bulk try to set domain prices. Returns a boolean array indicating whether domain prices at the corresponding indexes if set or not. Requirements: - The method caller is operator. - The input array lengths must be larger than 0 and the same. - The price should be larger than current domain price or it will not be updated. Emits events {DomainPriceUpdated} optionally.\",\"params\":{\"lbHashes\":\"Array of label hashes. (Eg, ['foo'].map(keccak256) for 'foo.ron')\",\"proofHashes\":\"Array of proof hashes.\",\"ronPrices\":\"Array of prices in (W)RON token.\",\"setTypes\":\"Array of update types from the operator service.\"}},\"convertRONToUSD(uint256)\":{\"details\":\"Returns the converted amount from RON to USD.\"},\"convertUSDToRON(uint256)\":{\"details\":\"Returns the converted amount from USD to RON.\"},\"getDomainPrice(string)\":{\"details\":\"Return the domain price.\",\"params\":{\"label\":\"The domain label to register (Eg, 'foo' for 'foo.ron').\"}},\"getOverriddenRenewalFee(string)\":{\"details\":\"Returns the renewal fee of a label. Reverts if not overridden.\"},\"getPythOracleConfig()\":{\"details\":\"Returns the Pyth oracle config.\"},\"getRenewalFee(string,uint256)\":{\"details\":\"Returns the renewal fee in USD and RON.\",\"params\":{\"duration\":\"Amount of second(s).\",\"label\":\"The domain label to register (Eg, 'foo' for 'foo.ron').\"}},\"getRenewalFeeByLengths()\":{\"details\":\"Returns the renewal fee by lengths.\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"getScaleDownRuleForDomainPrice()\":{\"details\":\"Returns the percentage to scale from domain price each period.\"},\"getTaxRatio()\":{\"details\":\"Returns tax ratio.\"},\"grantRole(bytes32,address)\":{\"details\":\"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.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"renounceRole(bytes32,address)\":{\"details\":\"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.\"},\"revokeRole(bytes32,address)\":{\"details\":\"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.\"},\"setPythOracleConfig(address,uint256,bytes32)\":{\"details\":\"Sets the Pyth oracle config. Requirements: - The method caller is admin. Emits events {PythOracleConfigUpdated}.\"},\"setRenewalFeeByLengths((uint256,uint256)[])\":{\"details\":\"Sets the renewal fee by lengths Requirements: - The method caller is admin. Emits events {RenewalFeeByLengthUpdated}. Emits an event {MaxRenewalFeeLengthUpdated} optionally.\"},\"setScaleDownRuleForDomainPrice((uint192,uint64))\":{\"details\":\"Sets the percentage to scale from domain price each period. Requirements: - The method caller is admin. Emits events {DomainPriceScaleRuleUpdated}.\"},\"setTaxRatio(uint256)\":{\"details\":\"Sets renewal reservation ratio. Requirements: - The method caller is admin. Emits an event {TaxRatioUpdated}.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"stateVariables\":{\"MAX_PERCENTAGE\":{\"details\":\"Max percentage 100%. Values [0; 100_00] reflexes [0; 100%]\"},\"OPERATOR_ROLE\":{\"details\":\"Value equals to keccak256(\\\"OPERATOR_ROLE\\\").\"},\"USD_DECIMALS\":{\"details\":\"Decimal for USD.\"},\"____gap\":{\"details\":\"Gap for upgradeability.\"},\"_auction\":{\"details\":\"RNSAuction contract\"},\"_dp\":{\"details\":\"Mapping from name => domain price in USD\"},\"_dpDownScaler\":{\"details\":\"The percentage scale from domain price each period\"},\"_maxAcceptableAge\":{\"details\":\"Max acceptable age of the price oracle request\"},\"_pyth\":{\"details\":\"Pyth oracle contract\"},\"_pythIdForRONUSD\":{\"details\":\"Price feed ID on Pyth for RON/USD\"},\"_rnFee\":{\"details\":\"Mapping from domain length => renewal fee in USD\"},\"_rnFeeOverriding\":{\"details\":\"Mapping from name => inverse bitwise of renewal fee overriding.\"},\"_rnfMaxLength\":{\"details\":\"Max length of the renewal fee\"},\"_taxRatio\":{\"details\":\"Extra fee for renewals based on the current domain price.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"getOverriddenRenewalFee(string)\":{\"notice\":\"This method is to help developers check the domain renewal fee overriding. Consider using method {getRenewalFee} instead for full handling of renewal fees.\"},\"setScaleDownRuleForDomainPrice((uint192,uint64))\":{\"notice\":\"Applies for the business rule: -x% each y seconds.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/RNSDomainPrice.sol\":\"RNSDomainPrice\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@ensdomains/buffer/=lib/buffer/\",\":@ensdomains/ens-contracts/=lib/ens-contracts/contracts/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@pythnetwork/=lib/pyth-sdk-solidity/\",\":@rns-contracts/=src/\",\":buffer/=lib/buffer/contracts/\",\":contract-template/=lib/contract-template/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":ens-contracts/=lib/ens-contracts/contracts/\",\":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/script/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/openzeppelin-contracts/contracts/\",\":pyth-sdk-solidity/=lib/pyth-sdk-solidity/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Strings.sol\\\";\\nimport \\\"../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```solidity\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```solidity\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\\n * to enforce additional security measures for this role.\\n */\\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\\n struct RoleData {\\n mapping(address => bool) members;\\n bytes32 adminRole;\\n }\\n\\n mapping(bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(account),\\n \\\" is missing role \\\",\\n Strings.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * May emit a {RoleGranted} event.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n *\\n * NOTE: This function is deprecated in favor of {_grantRole}.\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0dd6e52cb394d7f5abe5dca2d4908a6be40417914720932de757de34a99ab87f\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerable.sol\\\";\\nimport \\\"./AccessControl.sol\\\";\\nimport \\\"../utils/structs/EnumerableSet.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {\\n return _roleMembers[role].at(index);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n}\\n\",\"keccak256\":\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerable is IAccessControl {\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x3d6069be9b4c01fb81840fb9c2c4dc58dd6a6a4aafaa2c6837de8699574d84c6\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x5bce51e11f7d194b79ea59fe00c9e8de9fa2c5530124960f29a24d4c740a3266\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Metadata is IERC721 {\\n /**\\n * @dev Returns the token collection name.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the token collection symbol.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\\n */\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x75b829ff2f26c14355d1cba20e16fe7b29ca58eb5fef665ede48bc0f9c6c74b9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x58b21219689909c4f8339af00813760337f7e2e7f169a97fe49e2896dcfb3b9a\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"lib/pyth-sdk-solidity/IPyth.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.0;\\n\\nimport \\\"./PythStructs.sol\\\";\\nimport \\\"./IPythEvents.sol\\\";\\n\\n/// @title Consume prices from the Pyth Network (https://pyth.network/).\\n/// @dev Please refer to the guidance at https://docs.pyth.network/consumers/best-practices for how to consume prices safely.\\n/// @author Pyth Data Association\\ninterface IPyth is IPythEvents {\\n /// @notice Returns the period (in seconds) that a price feed is considered valid since its publish time\\n function getValidTimePeriod() external view returns (uint validTimePeriod);\\n\\n /// @notice Returns the price and confidence interval.\\n /// @dev Reverts if the price has not been updated within the last `getValidTimePeriod()` seconds.\\n /// @param id The Pyth Price Feed ID of which to fetch the price and confidence interval.\\n /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely.\\n function getPrice(\\n bytes32 id\\n ) external view returns (PythStructs.Price memory price);\\n\\n /// @notice Returns the exponentially-weighted moving average price and confidence interval.\\n /// @dev Reverts if the EMA price is not available.\\n /// @param id The Pyth Price Feed ID of which to fetch the EMA price and confidence interval.\\n /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely.\\n function getEmaPrice(\\n bytes32 id\\n ) external view returns (PythStructs.Price memory price);\\n\\n /// @notice Returns the price of a price feed without any sanity checks.\\n /// @dev This function returns the most recent price update in this contract without any recency checks.\\n /// This function is unsafe as the returned price update may be arbitrarily far in the past.\\n ///\\n /// Users of this function should check the `publishTime` in the price to ensure that the returned price is\\n /// sufficiently recent for their application. If you are considering using this function, it may be\\n /// safer / easier to use either `getPrice` or `getPriceNoOlderThan`.\\n /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely.\\n function getPriceUnsafe(\\n bytes32 id\\n ) external view returns (PythStructs.Price memory price);\\n\\n /// @notice Returns the price that is no older than `age` seconds of the current time.\\n /// @dev This function is a sanity-checked version of `getPriceUnsafe` which is useful in\\n /// applications that require a sufficiently-recent price. Reverts if the price wasn't updated sufficiently\\n /// recently.\\n /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely.\\n function getPriceNoOlderThan(\\n bytes32 id,\\n uint age\\n ) external view returns (PythStructs.Price memory price);\\n\\n /// @notice Returns the exponentially-weighted moving average price of a price feed without any sanity checks.\\n /// @dev This function returns the same price as `getEmaPrice` in the case where the price is available.\\n /// However, if the price is not recent this function returns the latest available price.\\n ///\\n /// The returned price can be from arbitrarily far in the past; this function makes no guarantees that\\n /// the returned price is recent or useful for any particular application.\\n ///\\n /// Users of this function should check the `publishTime` in the price to ensure that the returned price is\\n /// sufficiently recent for their application. If you are considering using this function, it may be\\n /// safer / easier to use either `getEmaPrice` or `getEmaPriceNoOlderThan`.\\n /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely.\\n function getEmaPriceUnsafe(\\n bytes32 id\\n ) external view returns (PythStructs.Price memory price);\\n\\n /// @notice Returns the exponentially-weighted moving average price that is no older than `age` seconds\\n /// of the current time.\\n /// @dev This function is a sanity-checked version of `getEmaPriceUnsafe` which is useful in\\n /// applications that require a sufficiently-recent price. Reverts if the price wasn't updated sufficiently\\n /// recently.\\n /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely.\\n function getEmaPriceNoOlderThan(\\n bytes32 id,\\n uint age\\n ) external view returns (PythStructs.Price memory price);\\n\\n /// @notice Update price feeds with given update messages.\\n /// This method requires the caller to pay a fee in wei; the required fee can be computed by calling\\n /// `getUpdateFee` with the length of the `updateData` array.\\n /// Prices will be updated if they are more recent than the current stored prices.\\n /// The call will succeed even if the update is not the most recent.\\n /// @dev Reverts if the transferred fee is not sufficient or the updateData is invalid.\\n /// @param updateData Array of price update data.\\n function updatePriceFeeds(bytes[] calldata updateData) external payable;\\n\\n /// @notice Wrapper around updatePriceFeeds that rejects fast if a price update is not necessary. A price update is\\n /// necessary if the current on-chain publishTime is older than the given publishTime. It relies solely on the\\n /// given `publishTimes` for the price feeds and does not read the actual price update publish time within `updateData`.\\n ///\\n /// This method requires the caller to pay a fee in wei; the required fee can be computed by calling\\n /// `getUpdateFee` with the length of the `updateData` array.\\n ///\\n /// `priceIds` and `publishTimes` are two arrays with the same size that correspond to senders known publishTime\\n /// of each priceId when calling this method. If all of price feeds within `priceIds` have updated and have\\n /// a newer or equal publish time than the given publish time, it will reject the transaction to save gas.\\n /// Otherwise, it calls updatePriceFeeds method to update the prices.\\n ///\\n /// @dev Reverts if update is not needed or the transferred fee is not sufficient or the updateData is invalid.\\n /// @param updateData Array of price update data.\\n /// @param priceIds Array of price ids.\\n /// @param publishTimes Array of publishTimes. `publishTimes[i]` corresponds to known `publishTime` of `priceIds[i]`\\n function updatePriceFeedsIfNecessary(\\n bytes[] calldata updateData,\\n bytes32[] calldata priceIds,\\n uint64[] calldata publishTimes\\n ) external payable;\\n\\n /// @notice Returns the required fee to update an array of price updates.\\n /// @param updateData Array of price update data.\\n /// @return feeAmount The required fee in Wei.\\n function getUpdateFee(\\n bytes[] calldata updateData\\n ) external view returns (uint feeAmount);\\n\\n /// @notice Parse `updateData` and return price feeds of the given `priceIds` if they are all published\\n /// within `minPublishTime` and `maxPublishTime`.\\n ///\\n /// You can use this method if you want to use a Pyth price at a fixed time and not the most recent price;\\n /// otherwise, please consider using `updatePriceFeeds`. This method does not store the price updates on-chain.\\n ///\\n /// This method requires the caller to pay a fee in wei; the required fee can be computed by calling\\n /// `getUpdateFee` with the length of the `updateData` array.\\n ///\\n ///\\n /// @dev Reverts if the transferred fee is not sufficient or the updateData is invalid or there is\\n /// no update for any of the given `priceIds` within the given time range.\\n /// @param updateData Array of price update data.\\n /// @param priceIds Array of price ids.\\n /// @param minPublishTime minimum acceptable publishTime for the given `priceIds`.\\n /// @param maxPublishTime maximum acceptable publishTime for the given `priceIds`.\\n /// @return priceFeeds Array of the price feeds corresponding to the given `priceIds` (with the same order).\\n function parsePriceFeedUpdates(\\n bytes[] calldata updateData,\\n bytes32[] calldata priceIds,\\n uint64 minPublishTime,\\n uint64 maxPublishTime\\n ) external payable returns (PythStructs.PriceFeed[] memory priceFeeds);\\n}\\n\",\"keccak256\":\"0x949c65c65fea0578c09a6fc068e09ed1165adede2c835984cefcb25d76de1de2\",\"license\":\"Apache-2.0\"},\"lib/pyth-sdk-solidity/IPythEvents.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.0;\\n\\n/// @title IPythEvents contains the events that Pyth contract emits.\\n/// @dev This interface can be used for listening to the updates for off-chain and testing purposes.\\ninterface IPythEvents {\\n /// @dev Emitted when the price feed with `id` has received a fresh update.\\n /// @param id The Pyth Price Feed ID.\\n /// @param publishTime Publish time of the given price update.\\n /// @param price Price of the given price update.\\n /// @param conf Confidence interval of the given price update.\\n event PriceFeedUpdate(\\n bytes32 indexed id,\\n uint64 publishTime,\\n int64 price,\\n uint64 conf\\n );\\n\\n /// @dev Emitted when a batch price update is processed successfully.\\n /// @param chainId ID of the source chain that the batch price update comes from.\\n /// @param sequenceNumber Sequence number of the batch price update.\\n event BatchPriceFeedUpdate(uint16 chainId, uint64 sequenceNumber);\\n}\\n\",\"keccak256\":\"0x048a35526c2e77d107d43ba336f1dcf31f64cef25ba429ae1f7a0fbc11c23320\",\"license\":\"Apache-2.0\"},\"lib/pyth-sdk-solidity/PythStructs.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.0;\\n\\ncontract PythStructs {\\n // A price with a degree of uncertainty, represented as a price +- a confidence interval.\\n //\\n // The confidence interval roughly corresponds to the standard error of a normal distribution.\\n // Both the price and confidence are stored in a fixed-point numeric representation,\\n // `x * (10^expo)`, where `expo` is the exponent.\\n //\\n // Please refer to the documentation at https://docs.pyth.network/consumers/best-practices for how\\n // to how this price safely.\\n struct Price {\\n // Price\\n int64 price;\\n // Confidence interval around the price\\n uint64 conf;\\n // Price exponent\\n int32 expo;\\n // Unix timestamp describing when the price was published\\n uint publishTime;\\n }\\n\\n // PriceFeed represents a current aggregate price from pyth publisher feeds.\\n struct PriceFeed {\\n // The price ID.\\n bytes32 id;\\n // Latest available price\\n Price price;\\n // Latest available exponentially-weighted moving average price\\n Price emaPrice;\\n }\\n}\\n\",\"keccak256\":\"0x95ff0a6d64517348ef604b8bcf246b561a9445d7e607b8f48491c617cfda9b65\",\"license\":\"Apache-2.0\"},\"src/RNSDomainPrice.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport { AccessControlEnumerable } from \\\"@openzeppelin/contracts/access/AccessControlEnumerable.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { IPyth, PythStructs } from \\\"@pythnetwork/IPyth.sol\\\";\\nimport { INSUnified } from \\\"./interfaces/INSUnified.sol\\\";\\nimport { INSAuction } from \\\"./interfaces/INSAuction.sol\\\";\\nimport { INSDomainPrice } from \\\"./interfaces/INSDomainPrice.sol\\\";\\nimport { PeriodScaler, LibPeriodScaler, Math } from \\\"./libraries/math/PeriodScalingUtils.sol\\\";\\nimport { TimestampWrapper } from \\\"./libraries/TimestampWrapperUtils.sol\\\";\\nimport { LibSafeRange } from \\\"./libraries/math/LibSafeRange.sol\\\";\\nimport { LibString } from \\\"./libraries/LibString.sol\\\";\\nimport { LibRNSDomain } from \\\"./libraries/LibRNSDomain.sol\\\";\\nimport { PythConverter } from \\\"./libraries/pyth/PythConverter.sol\\\";\\n\\ncontract RNSDomainPrice is Initializable, AccessControlEnumerable, INSDomainPrice {\\n using LibString for *;\\n using LibRNSDomain for string;\\n using LibPeriodScaler for PeriodScaler;\\n using PythConverter for PythStructs.Price;\\n\\n /// @inheritdoc INSDomainPrice\\n uint8 public constant USD_DECIMALS = 18;\\n /// @inheritdoc INSDomainPrice\\n uint64 public constant MAX_PERCENTAGE = 100_00;\\n /// @inheritdoc INSDomainPrice\\n bytes32 public constant OPERATOR_ROLE = keccak256(\\\"OPERATOR_ROLE\\\");\\n\\n /// @dev Gap for upgradeability.\\n uint256[50] private ____gap;\\n\\n /// @dev Pyth oracle contract\\n IPyth internal _pyth;\\n /// @dev RNSAuction contract\\n INSAuction internal _auction;\\n /// @dev Extra fee for renewals based on the current domain price.\\n uint256 internal _taxRatio;\\n /// @dev Max length of the renewal fee\\n uint256 internal _rnfMaxLength;\\n /// @dev Max acceptable age of the price oracle request\\n uint256 internal _maxAcceptableAge;\\n /// @dev Price feed ID on Pyth for RON/USD\\n bytes32 internal _pythIdForRONUSD;\\n /// @dev The percentage scale from domain price each period\\n PeriodScaler internal _dpDownScaler;\\n\\n /// @dev Mapping from domain length => renewal fee in USD\\n mapping(uint256 length => uint256 usdPrice) internal _rnFee;\\n /// @dev Mapping from name => domain price in USD\\n mapping(bytes32 lbHash => TimestampWrapper usdPrice) internal _dp;\\n /// @dev Mapping from name => inverse bitwise of renewal fee overriding.\\n mapping(bytes32 lbHash => uint256 usdPrice) internal _rnFeeOverriding;\\n\\n constructor() payable {\\n _disableInitializers();\\n }\\n\\n function initialize(\\n address admin,\\n address[] calldata operators,\\n RenewalFee[] calldata renewalFees,\\n uint256 taxRatio,\\n PeriodScaler calldata domainPriceScaleRule,\\n IPyth pyth,\\n INSAuction auction,\\n uint256 maxAcceptableAge,\\n bytes32 pythIdForRONUSD\\n ) external initializer {\\n uint256 length = operators.length;\\n bytes32 operatorRole = OPERATOR_ROLE;\\n\\n for (uint256 i; i < length;) {\\n _setupRole(operatorRole, operators[i]);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n _auction = auction;\\n _setupRole(DEFAULT_ADMIN_ROLE, admin);\\n _setRenewalFeeByLengths(renewalFees);\\n _setTaxRatio(taxRatio);\\n _setDomainPriceScaleRule(domainPriceScaleRule);\\n _setPythOracleConfig(pyth, maxAcceptableAge, pythIdForRONUSD);\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function getPythOracleConfig() external view returns (IPyth pyth, uint256 maxAcceptableAge, bytes32 pythIdForRONUSD) {\\n return (_pyth, _maxAcceptableAge, _pythIdForRONUSD);\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function setPythOracleConfig(IPyth pyth, uint256 maxAcceptableAge, bytes32 pythIdForRONUSD)\\n external\\n onlyRole(DEFAULT_ADMIN_ROLE)\\n {\\n _setPythOracleConfig(pyth, maxAcceptableAge, pythIdForRONUSD);\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function getRenewalFeeByLengths() external view returns (RenewalFee[] memory renewalFees) {\\n uint256 rnfMaxLength = _rnfMaxLength;\\n renewalFees = new RenewalFee[](rnfMaxLength);\\n uint256 len;\\n\\n for (uint256 i; i < rnfMaxLength;) {\\n unchecked {\\n len = i + 1;\\n renewalFees[i].labelLength = len;\\n renewalFees[i].fee = _rnFee[len];\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function setRenewalFeeByLengths(RenewalFee[] calldata renewalFees) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _setRenewalFeeByLengths(renewalFees);\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function getTaxRatio() external view returns (uint256 ratio) {\\n return _taxRatio;\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function setTaxRatio(uint256 ratio) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _setTaxRatio(ratio);\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function getScaleDownRuleForDomainPrice() external view returns (PeriodScaler memory scaleRule) {\\n return _dpDownScaler;\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function setScaleDownRuleForDomainPrice(PeriodScaler calldata scaleRule) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _setDomainPriceScaleRule(scaleRule);\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function getOverriddenRenewalFee(string calldata label) external view returns (uint256 usdFee) {\\n usdFee = _rnFeeOverriding[label.hashLabel()];\\n if (usdFee == 0) revert RenewalFeeIsNotOverriden();\\n return ~usdFee;\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function bulkOverrideRenewalFees(bytes32[] calldata lbHashes, uint256[] calldata usdPrices)\\n external\\n onlyRole(OPERATOR_ROLE)\\n {\\n uint256 length = lbHashes.length;\\n if (length == 0 || length != usdPrices.length) revert InvalidArrayLength();\\n uint256 inverseBitwise;\\n address operator = _msgSender();\\n\\n for (uint256 i; i < length;) {\\n inverseBitwise = ~usdPrices[i];\\n _rnFeeOverriding[lbHashes[i]] = inverseBitwise;\\n emit RenewalFeeOverridingUpdated(operator, lbHashes[i], inverseBitwise);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function bulkTrySetDomainPrice(\\n bytes32[] calldata lbHashes,\\n uint256[] calldata ronPrices,\\n bytes32[] calldata proofHashes,\\n uint256[] calldata setTypes\\n ) external onlyRole(OPERATOR_ROLE) returns (bool[] memory updated) {\\n uint256 length = _requireBulkSetDomainPriceArgumentsValid(lbHashes, ronPrices, proofHashes, setTypes);\\n address operator = _msgSender();\\n updated = new bool[](length);\\n\\n for (uint256 i; i < length;) {\\n updated[i] = _setDomainPrice(operator, lbHashes[i], ronPrices[i], proofHashes[i], setTypes[i], false);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function bulkSetDomainPrice(\\n bytes32[] calldata lbHashes,\\n uint256[] calldata ronPrices,\\n bytes32[] calldata proofHashes,\\n uint256[] calldata setTypes\\n ) external onlyRole(OPERATOR_ROLE) {\\n uint256 length = _requireBulkSetDomainPriceArgumentsValid(lbHashes, ronPrices, proofHashes, setTypes);\\n address operator = _msgSender();\\n\\n for (uint256 i; i < length;) {\\n _setDomainPrice(operator, lbHashes[i], ronPrices[i], proofHashes[i], setTypes[i], true);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function getDomainPrice(string memory label) public view returns (uint256 usdPrice, uint256 ronPrice) {\\n usdPrice = _getDomainPrice(label.hashLabel());\\n ronPrice = convertUSDToRON(usdPrice);\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function getRenewalFee(string memory label, uint256 duration)\\n public\\n view\\n returns (UnitPrice memory basePrice, UnitPrice memory tax)\\n {\\n uint256 nameLen = label.strlen();\\n bytes32 lbHash = label.hashLabel();\\n uint256 overriddenRenewalFee = _rnFeeOverriding[lbHash];\\n\\n if (overriddenRenewalFee != 0) {\\n basePrice.usd = duration * ~overriddenRenewalFee;\\n } else {\\n uint256 renewalFeeByLength = _rnFee[Math.min(nameLen, _rnfMaxLength)];\\n basePrice.usd = duration * renewalFeeByLength;\\n uint256 id = LibRNSDomain.toId(LibRNSDomain.RON_ID, label);\\n INSAuction auction = _auction;\\n if (auction.reserved(id)) {\\n INSUnified rns = auction.getRNSUnified();\\n uint256 expiry = LibSafeRange.addWithUpperbound(rns.getRecord(id).mut.expiry, duration, type(uint64).max);\\n (INSAuction.DomainAuction memory domainAuction,) = auction.getAuction(id);\\n uint256 claimedAt = domainAuction.bid.claimedAt;\\n if (claimedAt != 0 && expiry - claimedAt > auction.MAX_AUCTION_DOMAIN_EXPIRY()) {\\n revert ExceedAuctionDomainExpiry();\\n }\\n // Tax is added to the name reserved for the auction\\n tax.usd = Math.mulDiv(_taxRatio, _getDomainPrice(lbHash), MAX_PERCENTAGE);\\n }\\n }\\n\\n tax.ron = convertUSDToRON(tax.usd);\\n basePrice.ron = convertUSDToRON(basePrice.usd);\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function convertUSDToRON(uint256 usdWei) public view returns (uint256 ronWei) {\\n return _pyth.getPriceNoOlderThan(_pythIdForRONUSD, _maxAcceptableAge).inverse({ expo: -18 }).mul({\\n inpWei: usdWei,\\n inpDecimals: int32(uint32(USD_DECIMALS)),\\n outDecimals: 18\\n });\\n }\\n\\n /**\\n * @inheritdoc INSDomainPrice\\n */\\n function convertRONToUSD(uint256 ronWei) public view returns (uint256 usdWei) {\\n return _pyth.getPriceNoOlderThan(_pythIdForRONUSD, _maxAcceptableAge).mul({\\n inpWei: ronWei,\\n inpDecimals: 18,\\n outDecimals: int32(uint32(USD_DECIMALS))\\n });\\n }\\n\\n /**\\n * @dev Reverts if the arguments of the method {bulkSetDomainPrice} is invalid.\\n */\\n function _requireBulkSetDomainPriceArgumentsValid(\\n bytes32[] calldata lbHashes,\\n uint256[] calldata ronPrices,\\n bytes32[] calldata proofHashes,\\n uint256[] calldata setTypes\\n ) internal pure returns (uint256 length) {\\n length = lbHashes.length;\\n if (length == 0 || ronPrices.length != length || proofHashes.length != length || setTypes.length != length) {\\n revert InvalidArrayLength();\\n }\\n }\\n\\n /**\\n * @dev Helper method to set domain price.\\n *\\n * Emits an event {DomainPriceUpdated} optionally.\\n */\\n function _setDomainPrice(\\n address operator,\\n bytes32 lbHash,\\n uint256 ronPrice,\\n bytes32 proofHash,\\n uint256 setType,\\n bool forced\\n ) internal returns (bool updated) {\\n uint256 usdPrice = convertRONToUSD(ronPrice);\\n TimestampWrapper storage dp = _dp[lbHash];\\n updated = forced || dp.value < usdPrice;\\n\\n if (updated) {\\n dp.value = usdPrice;\\n dp.timestamp = block.timestamp;\\n emit DomainPriceUpdated(operator, lbHash, usdPrice, proofHash, setType);\\n }\\n }\\n\\n /**\\n * @dev Sets renewal reservation ratio.\\n *\\n * Emits an event {TaxRatioUpdated}.\\n */\\n function _setTaxRatio(uint256 ratio) internal {\\n _taxRatio = ratio;\\n emit TaxRatioUpdated(_msgSender(), ratio);\\n }\\n\\n /**\\n * @dev Sets domain price scale rule.\\n *\\n * Emits events {DomainPriceScaleRuleUpdated}.\\n */\\n function _setDomainPriceScaleRule(PeriodScaler calldata domainPriceScaleRule) internal {\\n _dpDownScaler = domainPriceScaleRule;\\n emit DomainPriceScaleRuleUpdated(_msgSender(), domainPriceScaleRule.ratio, domainPriceScaleRule.period);\\n }\\n\\n /**\\n * @dev Sets renewal fee.\\n *\\n * Emits events {RenewalFeeByLengthUpdated}.\\n * Emits an event {MaxRenewalFeeLengthUpdated} optionally.\\n */\\n function _setRenewalFeeByLengths(RenewalFee[] calldata renewalFees) internal {\\n address operator = _msgSender();\\n RenewalFee memory renewalFee;\\n uint256 length = renewalFees.length;\\n uint256 maxRenewalFeeLength = _rnfMaxLength;\\n\\n for (uint256 i; i < length;) {\\n renewalFee = renewalFees[i];\\n maxRenewalFeeLength = Math.max(maxRenewalFeeLength, renewalFee.labelLength);\\n _rnFee[renewalFee.labelLength] = renewalFee.fee;\\n emit RenewalFeeByLengthUpdated(operator, renewalFee.labelLength, renewalFee.fee);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n if (maxRenewalFeeLength != _rnfMaxLength) {\\n _rnfMaxLength = maxRenewalFeeLength;\\n emit MaxRenewalFeeLengthUpdated(operator, maxRenewalFeeLength);\\n }\\n }\\n\\n /**\\n * @dev Sets Pyth Oracle config.\\n *\\n * Emits events {PythOracleConfigUpdated}.\\n */\\n function _setPythOracleConfig(IPyth pyth, uint256 maxAcceptableAge, bytes32 pythIdForRONUSD) internal {\\n _pyth = pyth;\\n _maxAcceptableAge = maxAcceptableAge;\\n _pythIdForRONUSD = pythIdForRONUSD;\\n emit PythOracleConfigUpdated(_msgSender(), pyth, maxAcceptableAge, pythIdForRONUSD);\\n }\\n\\n /**\\n * @dev Returns the current domain price applied the business rule: deduced x% each y seconds.\\n */\\n function _getDomainPrice(bytes32 lbHash) internal view returns (uint256) {\\n TimestampWrapper storage dp = _dp[lbHash];\\n uint256 lastSyncedAt = dp.timestamp;\\n if (lastSyncedAt == 0) return 0;\\n\\n uint256 passedDuration = block.timestamp - lastSyncedAt;\\n return _dpDownScaler.scaleDown({ v: dp.value, maxR: MAX_PERCENTAGE, dur: passedDuration });\\n }\\n}\\n\",\"keccak256\":\"0x6a4ec25833bff6a8e330f5e423af96f01f3bc32050c451ea42e75d007493cf1c\",\"license\":\"MIT\"},\"src/interfaces/INSAuction.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nimport { INSUnified } from \\\"./INSUnified.sol\\\";\\nimport { EventRange } from \\\"../libraries/LibEventRange.sol\\\";\\n\\ninterface INSAuction {\\n error NotYetEnded();\\n error NoOneBidded();\\n error NullAssignment();\\n error AlreadyBidding();\\n error RatioIsTooLarge();\\n error NameNotReserved();\\n error InvalidEventRange();\\n error QueryIsNotInPeriod();\\n error InsufficientAmount();\\n error InvalidArrayLength();\\n error BidderCannotReceiveRON();\\n error EventIsNotCreatedOrAlreadyStarted();\\n\\n struct Bid {\\n address payable bidder;\\n uint256 price;\\n uint256 timestamp;\\n uint256 claimedAt;\\n }\\n\\n struct DomainAuction {\\n bytes32 auctionId;\\n uint256 startingPrice;\\n Bid bid;\\n }\\n\\n /// @dev Emitted when an auction is set.\\n event AuctionEventSet(bytes32 indexed auctionId, EventRange range);\\n /// @dev Emitted when the labels are listed for auction.\\n event LabelsListed(bytes32 indexed auctionId, uint256[] ids, uint256[] startingPrices);\\n /// @dev Emitted when a bid is placed for a name.\\n event BidPlaced(\\n bytes32 indexed auctionId,\\n uint256 indexed id,\\n uint256 price,\\n address payable bidder,\\n uint256 previousPrice,\\n address previousBidder\\n );\\n /// @dev Emitted when the treasury is updated.\\n event TreasuryUpdated(address indexed addr);\\n /// @dev Emitted when bid gap ratio is updated.\\n event BidGapRatioUpdated(uint256 ratio);\\n\\n /**\\n * @dev The maximum expiry duration\\n */\\n function MAX_EXPIRY() external pure returns (uint64);\\n\\n /**\\n * @dev The maximum expiry duration of a domain after transferring to bidder.\\n */\\n function MAX_AUCTION_DOMAIN_EXPIRY() external pure returns (uint64);\\n\\n /**\\n * @dev Returns the operator role.\\n */\\n function OPERATOR_ROLE() external pure returns (bytes32);\\n\\n /**\\n * @dev Max percentage 100%. Values [0; 100_00] reflexes [0; 100%]\\n */\\n function MAX_PERCENTAGE() external pure returns (uint256);\\n\\n /**\\n * @dev The expiry duration of a domain after transferring to bidder.\\n */\\n function DOMAIN_EXPIRY_DURATION() external pure returns (uint64);\\n\\n /**\\n * @dev Claims domain names for auction.\\n *\\n * Requirements:\\n * - The method caller must be contract operator.\\n *\\n * @param labels The domain names. Eg, ['foo'] for 'foo.ron'\\n * @return ids The id corresponding for namehash of domain names.\\n */\\n function bulkRegister(string[] calldata labels) external returns (uint256[] memory ids);\\n\\n /**\\n * @dev Checks whether a domain name is currently reserved for auction or not.\\n * @param id The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'\\n */\\n function reserved(uint256 id) external view returns (bool);\\n\\n /**\\n * @dev Creates a new auction to sale with a specific time period.\\n *\\n * Requirements:\\n * - The method caller must be admin.\\n *\\n * Emits an event {AuctionEventSet}.\\n *\\n * @return auctionId The auction id\\n * @notice Please use the method `setAuctionNames` to list all the reserved names.\\n */\\n function createAuctionEvent(EventRange calldata range) external returns (bytes32 auctionId);\\n\\n /**\\n * @dev Updates the auction details.\\n *\\n * Requirements:\\n * - The method caller must be admin.\\n *\\n * Emits an event {AuctionEventSet}.\\n */\\n function setAuctionEvent(bytes32 auctionId, EventRange calldata range) external;\\n\\n /**\\n * @dev Returns the event range of an auction.\\n */\\n function getAuctionEvent(bytes32 auctionId) external view returns (EventRange memory);\\n\\n /**\\n * @dev Lists reserved names to sale in a specified auction.\\n *\\n * Requirements:\\n * - The method caller must be contract operator.\\n * - Array length are matched and larger than 0.\\n * - Only allow to set when the domain is:\\n * + Not in any auction.\\n * + Or, in the current auction.\\n * + Or, this name is not bided.\\n *\\n * Emits an event {LabelsListed}.\\n *\\n * Note: If the name is already listed, this method replaces with a new input value.\\n *\\n * @param ids The namehashes id of domain names. Eg, namehash('foo.ron') for 'foo.ron'\\n */\\n function listNamesForAuction(bytes32 auctionId, uint256[] calldata ids, uint256[] calldata startingPrices) external;\\n\\n /**\\n * @dev Places a bid for a domain name.\\n *\\n * Requirements:\\n * - The name is listed, or the auction is happening.\\n * - The msg.value is larger than the current bid price or the auction starting price.\\n *\\n * Emits an event {BidPlaced}.\\n *\\n * @param id The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'\\n */\\n function placeBid(uint256 id) external payable;\\n\\n /**\\n * @dev Returns the highest bid and address of the bidder.\\n * @param id The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'\\n */\\n function getAuction(uint256 id) external view returns (DomainAuction memory, uint256 beatPrice);\\n\\n /**\\n * @dev Bulk claims the bid name.\\n *\\n * Requirements:\\n * - Must be called after ended time.\\n * - The method caller can be anyone.\\n *\\n * @param ids The namehash id of domain name. Eg, namehash('foo.ron') for 'foo.ron'\\n */\\n function bulkClaimBidNames(uint256[] calldata ids) external returns (uint256[] memory claimedAts);\\n\\n /**\\n * @dev Returns the treasury.\\n */\\n function getTreasury() external view returns (address);\\n\\n /**\\n * @dev Returns the gap ratio between 2 bids with the starting price. Value in range [0;100_00] is 0%-100%.\\n */\\n function getBidGapRatio() external view returns (uint256);\\n\\n /**\\n * @dev Sets the treasury.\\n *\\n * Requirements:\\n * - The method caller must be admin\\n *\\n * Emits an event {TreasuryUpdated}.\\n */\\n function setTreasury(address payable) external;\\n\\n /**\\n * @dev Sets commission ratio. Value in range [0;100_00] is 0%-100%.\\n *\\n * Requirements:\\n * - The method caller must be admin\\n *\\n * Emits an event {BidGapRatioUpdated}.\\n */\\n function setBidGapRatio(uint256) external;\\n\\n /**\\n * @dev Returns RNSUnified contract.\\n */\\n function getRNSUnified() external view returns (INSUnified);\\n}\\n\",\"keccak256\":\"0x135ec8837e89471cc437e90897896264b2bb4ba36ff332f7d30485c397888e03\",\"license\":\"MIT\"},\"src/interfaces/INSDomainPrice.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { PeriodScaler } from \\\"../libraries/math/PeriodScalingUtils.sol\\\";\\nimport { IPyth } from \\\"@pythnetwork/IPyth.sol\\\";\\n\\ninterface INSDomainPrice {\\n error InvalidArrayLength();\\n error RenewalFeeIsNotOverriden();\\n error ExceedAuctionDomainExpiry();\\n\\n struct RenewalFee {\\n uint256 labelLength;\\n uint256 fee;\\n }\\n\\n struct UnitPrice {\\n uint256 usd;\\n uint256 ron;\\n }\\n\\n /// @dev Emitted when the renewal reservation ratio is updated.\\n event TaxRatioUpdated(address indexed operator, uint256 indexed ratio);\\n /// @dev Emitted when the maximum length of renewal fee is updated.\\n event MaxRenewalFeeLengthUpdated(address indexed operator, uint256 indexed maxLength);\\n /// @dev Emitted when the renew fee is updated.\\n event RenewalFeeByLengthUpdated(address indexed operator, uint256 indexed labelLength, uint256 renewalFee);\\n /// @dev Emitted when the renew fee of a domain is overridden. Value of `inverseRenewalFee` is 0 when not overridden.\\n event RenewalFeeOverridingUpdated(address indexed operator, bytes32 indexed labelHash, uint256 inverseRenewalFee);\\n\\n /// @dev Emitted when the domain price is updated.\\n event DomainPriceUpdated(\\n address indexed operator, bytes32 indexed labelHash, uint256 price, bytes32 indexed proofHash, uint256 setType\\n );\\n /// @dev Emitted when the rule to rescale domain price is updated.\\n event DomainPriceScaleRuleUpdated(address indexed operator, uint192 ratio, uint64 period);\\n\\n /// @dev Emitted when the Pyth Oracle config is updated.\\n event PythOracleConfigUpdated(\\n address indexed operator, IPyth indexed pyth, uint256 maxAcceptableAge, bytes32 indexed pythIdForRONUSD\\n );\\n\\n /**\\n * @dev Returns the Pyth oracle config.\\n */\\n function getPythOracleConfig() external view returns (IPyth pyth, uint256 maxAcceptableAge, bytes32 pythIdForRONUSD);\\n\\n /**\\n * @dev Sets the Pyth oracle config.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits events {PythOracleConfigUpdated}.\\n */\\n function setPythOracleConfig(IPyth pyth, uint256 maxAcceptableAge, bytes32 pythIdForRONUSD) external;\\n\\n /**\\n * @dev Returns the percentage to scale from domain price each period.\\n */\\n function getScaleDownRuleForDomainPrice() external view returns (PeriodScaler memory dpScaleRule);\\n\\n /**\\n * @dev Sets the percentage to scale from domain price each period.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits events {DomainPriceScaleRuleUpdated}.\\n *\\n * @notice Applies for the business rule: -x% each y seconds.\\n */\\n function setScaleDownRuleForDomainPrice(PeriodScaler calldata scaleRule) external;\\n\\n /**\\n * @dev Returns the renewal fee by lengths.\\n */\\n function getRenewalFeeByLengths() external view returns (RenewalFee[] memory renewalFees);\\n\\n /**\\n * @dev Sets the renewal fee by lengths\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits events {RenewalFeeByLengthUpdated}.\\n * Emits an event {MaxRenewalFeeLengthUpdated} optionally.\\n */\\n function setRenewalFeeByLengths(RenewalFee[] calldata renewalFees) external;\\n\\n /**\\n * @dev Returns tax ratio.\\n */\\n function getTaxRatio() external view returns (uint256 taxRatio);\\n\\n /**\\n * @dev Sets renewal reservation ratio.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits an event {TaxRatioUpdated}.\\n */\\n function setTaxRatio(uint256 ratio) external;\\n\\n /**\\n * @dev Return the domain price.\\n * @param label The domain label to register (Eg, 'foo' for 'foo.ron').\\n */\\n function getDomainPrice(string memory label) external view returns (uint256 usdPrice, uint256 ronPrice);\\n\\n /**\\n * @dev Returns the renewal fee in USD and RON.\\n * @param label The domain label to register (Eg, 'foo' for 'foo.ron').\\n * @param duration Amount of second(s).\\n */\\n function getRenewalFee(string calldata label, uint256 duration)\\n external\\n view\\n returns (UnitPrice memory basePrice, UnitPrice memory tax);\\n\\n /**\\n * @dev Returns the renewal fee of a label. Reverts if not overridden.\\n * @notice This method is to help developers check the domain renewal fee overriding. Consider using method\\n * {getRenewalFee} instead for full handling of renewal fees.\\n */\\n function getOverriddenRenewalFee(string memory label) external view returns (uint256 usdFee);\\n\\n /**\\n * @dev Bulk override renewal fees.\\n *\\n * Requirements:\\n * - The method caller is operator.\\n * - The input array lengths must be larger than 0 and the same.\\n *\\n * Emits events {RenewalFeeOverridingUpdated}.\\n *\\n * @param lbHashes Array of label hashes. (Eg, ['foo'].map(keccak256) for 'foo.ron')\\n * @param usdPrices Array of prices in USD. Leave 2^256 - 1 to remove overriding.\\n */\\n function bulkOverrideRenewalFees(bytes32[] calldata lbHashes, uint256[] calldata usdPrices) external;\\n\\n /**\\n * @dev Bulk try to set domain prices. Returns a boolean array indicating whether domain prices at the corresponding\\n * indexes if set or not.\\n *\\n * Requirements:\\n * - The method caller is operator.\\n * - The input array lengths must be larger than 0 and the same.\\n * - The price should be larger than current domain price or it will not be updated.\\n *\\n * Emits events {DomainPriceUpdated} optionally.\\n *\\n * @param lbHashes Array of label hashes. (Eg, ['foo'].map(keccak256) for 'foo.ron')\\n * @param ronPrices Array of prices in (W)RON token.\\n * @param proofHashes Array of proof hashes.\\n * @param setTypes Array of update types from the operator service.\\n */\\n function bulkTrySetDomainPrice(\\n bytes32[] calldata lbHashes,\\n uint256[] calldata ronPrices,\\n bytes32[] calldata proofHashes,\\n uint256[] calldata setTypes\\n ) external returns (bool[] memory updated);\\n\\n /**\\n * @dev Bulk override domain prices.\\n *\\n * Requirements:\\n * - The method caller is operator.\\n * - The input array lengths must be larger than 0 and the same.\\n *\\n * Emits events {DomainPriceUpdated}.\\n *\\n * @param lbHashes Array of label hashes. (Eg, ['foo'].map(keccak256) for 'foo.ron')\\n * @param ronPrices Array of prices in (W)RON token.\\n * @param proofHashes Array of proof hashes.\\n * @param setTypes Array of update types from the operator service.\\n */\\n function bulkSetDomainPrice(\\n bytes32[] calldata lbHashes,\\n uint256[] calldata ronPrices,\\n bytes32[] calldata proofHashes,\\n uint256[] calldata setTypes\\n ) external;\\n\\n /**\\n * @dev Returns the converted amount from USD to RON.\\n */\\n function convertUSDToRON(uint256 usdAmount) external view returns (uint256 ronAmount);\\n\\n /**\\n * @dev Returns the converted amount from RON to USD.\\n */\\n function convertRONToUSD(uint256 ronAmount) external view returns (uint256 usdAmount);\\n\\n /**\\n * @dev Value equals to keccak256(\\\"OPERATOR_ROLE\\\").\\n */\\n function OPERATOR_ROLE() external pure returns (bytes32);\\n\\n /**\\n * @dev Max percentage 100%. Values [0; 100_00] reflexes [0; 100%]\\n */\\n function MAX_PERCENTAGE() external pure returns (uint64);\\n\\n /**\\n * @dev Decimal for USD.\\n */\\n function USD_DECIMALS() external pure returns (uint8);\\n}\\n\",\"keccak256\":\"0x90ce5213ccec7b4226e31f7f5093e09c7cbc8a4d2cd389928d5822e8796de6a7\",\"license\":\"MIT\"},\"src/interfaces/INSUnified.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nimport { IERC721Metadata } from \\\"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol\\\";\\nimport { IAccessControlEnumerable } from \\\"@openzeppelin/contracts/access/IAccessControlEnumerable.sol\\\";\\nimport { ModifyingIndicator } from \\\"../types/ModifyingIndicator.sol\\\";\\n\\ninterface INSUnified is IAccessControlEnumerable, IERC721Metadata {\\n /// @dev Error: The provided token id is expired.\\n error Expired();\\n /// @dev Error: The provided token id is unexists.\\n error Unexists();\\n /// @dev Error: The provided id expiry is greater than parent id expiry.\\n error ExceedParentExpiry();\\n /// @dev Error: The provided name is unavailable for registration.\\n error Unavailable();\\n /// @dev Error: The sender lacks the necessary permissions.\\n error Unauthorized();\\n /// @dev Error: Missing controller role required for modification.\\n error MissingControllerRole();\\n /// @dev Error: Attempting to set an immutable field, which cannot be modified.\\n error CannotSetImmutableField();\\n /// @dev Error: Missing protected settler role required for modification.\\n error MissingProtectedSettlerRole();\\n /// @dev Error: Attempting to set an expiry time that is not larger than the previous one.\\n error ExpiryTimeMustBeLargerThanTheOldOne();\\n /// @dev Error: The provided name must be registered or is in a grace period.\\n error NameMustBeRegisteredOrInGracePeriod();\\n\\n /**\\n * | Fields\\\\Idc | Modifying Indicator |\\n * | ---------- | ------------------- |\\n * | depth | 0b00000001 |\\n * | parentId | 0b00000010 |\\n * | label | 0b00000100 |\\n */\\n struct ImmutableRecord {\\n // The level-th of a domain.\\n uint8 depth;\\n // The node of parent token. Eg, parent node of vip.duke.ron equals to namehash('duke.ron')\\n uint256 parentId;\\n // The label of a domain. Eg, label is vip for domain vip.duke.ron\\n string label;\\n }\\n\\n /**\\n * | Fields\\\\Idc,Roles | Modifying Indicator | Controller | Protected setter | (Parent) Owner/Spender |\\n * | ---------------- | ------------------- | ---------- | ---------------- | ---------------------- |\\n * | resolver | 0b00001000 | x | | x |\\n * | owner | 0b00010000 | x | | x |\\n * | expiry | 0b00100000 | x | | |\\n * | protected | 0b01000000 | | x | |\\n * Note: (Parent) Owner/Spender means parent owner or current owner or current token spender.\\n */\\n struct MutableRecord {\\n // The resolver address.\\n address resolver;\\n // The record owner. This field must equal to the owner of token.\\n address owner;\\n // Expiry timestamp.\\n uint64 expiry;\\n // Flag indicating whether the token is protected or not.\\n bool protected;\\n }\\n\\n struct Record {\\n ImmutableRecord immut;\\n MutableRecord mut;\\n }\\n\\n /// @dev Emitted when a base URI is updated.\\n event BaseURIUpdated(address indexed operator, string newURI);\\n /// @dev Emitted when the grace period for all domain is updated.\\n event GracePeriodUpdated(address indexed operator, uint64 newGracePeriod);\\n\\n /**\\n * @dev Emitted when the record of node is updated.\\n * @param indicator The binary index of updated fields. Eg, 0b10101011 means fields at position 1, 2, 4, 6, 8 (right\\n * to left) needs to be updated.\\n * @param record The updated fields.\\n */\\n event RecordUpdated(uint256 indexed node, ModifyingIndicator indicator, Record record);\\n\\n /**\\n * @dev Returns the controller role.\\n * @notice Can set all fields {Record.mut} in token record, excepting {Record.mut.protected}.\\n */\\n function CONTROLLER_ROLE() external pure returns (bytes32);\\n\\n /**\\n * @dev Returns the protected setter role.\\n * @notice Can set field {Record.mut.protected} in token record by using method `bulkSetProtected`.\\n */\\n function PROTECTED_SETTLER_ROLE() external pure returns (bytes32);\\n\\n /**\\n * @dev Returns the reservation role.\\n * @notice Never expire for token owner has this role.\\n */\\n function RESERVATION_ROLE() external pure returns (bytes32);\\n\\n /**\\n * @dev Returns the max expiry value.\\n */\\n function MAX_EXPIRY() external pure returns (uint64);\\n\\n /**\\n * @dev Returns the name hash output of a domain.\\n */\\n function namehash(string memory domain) external pure returns (bytes32 node);\\n\\n /**\\n * @dev Returns true if the specified name is available for registration.\\n * Note: Only available after passing the grace period.\\n */\\n function available(uint256 id) external view returns (bool);\\n\\n /**\\n * @dev Returns the grace period in second(s).\\n * Note: This period affects the availability of the domain.\\n */\\n function getGracePeriod() external view returns (uint64);\\n\\n /**\\n * @dev Returns the total minted ids.\\n * Note: Burning id will not affect `totalMinted`.\\n */\\n function totalMinted() external view returns (uint256);\\n\\n /**\\n * @dev Sets the grace period in second(s).\\n *\\n * Requirements:\\n * - The method caller must have controller role.\\n *\\n * Note: This period affects the availability of the domain.\\n */\\n function setGracePeriod(uint64) external;\\n\\n /**\\n * @dev Sets the base uri.\\n *\\n * Requirements:\\n * - The method caller must be contract owner.\\n *\\n */\\n function setBaseURI(string calldata baseTokenURI) external;\\n\\n /**\\n * @dev Mints token for subnode.\\n *\\n * Requirements:\\n * - The token must be available.\\n * - The method caller must be (parent) owner or approved spender. See struct {MutableRecord}.\\n *\\n * Emits an event {RecordUpdated}.\\n *\\n * @param parentId The parent node to mint or create subnode.\\n * @param label The domain label. Eg, label is duke for domain duke.ron.\\n * @param resolver The resolver address.\\n * @param owner The token owner.\\n * @param duration Duration in second(s) to expire. Leave 0 to set as parent.\\n */\\n function mint(uint256 parentId, string calldata label, address resolver, address owner, uint64 duration)\\n external\\n returns (uint64 expiryTime, uint256 id);\\n\\n /**\\n * @dev Returns all record of a domain.\\n * Reverts if the token is non existent.\\n */\\n function getRecord(uint256 id) external view returns (Record memory record);\\n\\n /**\\n * @dev Returns the domain name of id.\\n */\\n function getDomain(uint256 id) external view returns (string memory domain);\\n\\n /**\\n * @dev Returns whether the requester is able to modify the record based on the updated index.\\n * Note: This method strictly follows the permission of struct {MutableRecord}.\\n */\\n function canSetRecord(address requester, uint256 id, ModifyingIndicator indicator)\\n external\\n view\\n returns (bool, bytes4 error);\\n\\n /**\\n * @dev Sets record of existing token. Update operation for {Record.mut}.\\n *\\n * Requirements:\\n * - The method caller must have role based on the corresponding `indicator`. See struct {MutableRecord}.\\n *\\n * Emits an event {RecordUpdated}.\\n */\\n function setRecord(uint256 id, ModifyingIndicator indicator, MutableRecord calldata record) external;\\n\\n /**\\n * @dev Reclaims ownership. Update operation for {Record.mut.owner}.\\n *\\n * Requirements:\\n * - The method caller should have controller role.\\n * - The method caller should be (parent) owner or approved spender. See struct {MutableRecord}.\\n *\\n * Emits an event {RecordUpdated}.\\n */\\n function reclaim(uint256 id, address owner) external;\\n\\n /**\\n * @dev Renews token. Update operation for {Record.mut.expiry}.\\n *\\n * Requirements:\\n * - The method caller should have controller role.\\n *\\n * Emits an event {RecordUpdated}.\\n */\\n function renew(uint256 id, uint64 duration) external returns (uint64 expiry);\\n\\n /**\\n * @dev Sets expiry time for a token. Update operation for {Record.mut.expiry}.\\n *\\n * Requirements:\\n * - The method caller must have controller role.\\n *\\n * Emits an event {RecordUpdated}.\\n */\\n function setExpiry(uint256 id, uint64 expiry) external;\\n\\n /**\\n * @dev Sets the protected status of a list of ids. Update operation for {Record.mut.protected}.\\n *\\n * Requirements:\\n * - The method caller must have protected setter role.\\n *\\n * Emits events {RecordUpdated}.\\n */\\n function bulkSetProtected(uint256[] calldata ids, bool protected) external;\\n}\\n\",\"keccak256\":\"0xaef1c58bb7c8688d6677a1c2739c0dc9e645ca5c64dd875be2f2b7a318a11406\",\"license\":\"MIT\"},\"src/libraries/LibEventRange.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nstruct EventRange {\\n uint256 startedAt;\\n uint256 endedAt;\\n}\\n\\nlibrary LibEventRange {\\n /**\\n * @dev Checks whether the event range is valid.\\n */\\n function valid(EventRange calldata range) internal pure returns (bool) {\\n return range.startedAt <= range.endedAt;\\n }\\n\\n /**\\n * @dev Returns whether the current range is not yet started.\\n */\\n function isNotYetStarted(EventRange memory range) internal view returns (bool) {\\n return block.timestamp < range.startedAt;\\n }\\n\\n /**\\n * @dev Returns whether the current range is ended or not.\\n */\\n function isEnded(EventRange memory range) internal view returns (bool) {\\n return range.endedAt <= block.timestamp;\\n }\\n\\n /**\\n * @dev Returns whether the current block is in period.\\n */\\n function isInPeriod(EventRange memory range) internal view returns (bool) {\\n return range.startedAt <= block.timestamp && block.timestamp < range.endedAt;\\n }\\n}\\n\",\"keccak256\":\"0x95bf015c4245919cbcbcd810dd597fdb23eb4e58b62df8ef74b1c8c60a969bea\",\"license\":\"MIT\"},\"src/libraries/LibRNSDomain.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nlibrary LibRNSDomain {\\n /// @dev Value equals to namehash('ron')\\n uint256 internal constant RON_ID = 0xba69923fa107dbf5a25a073a10b7c9216ae39fbadc95dc891d460d9ae315d688;\\n /// @dev Value equals to namehash('addr.reverse')\\n uint256 internal constant ADDR_REVERSE_ID = 0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2;\\n\\n /**\\n * @dev Calculate the corresponding id given parentId and label.\\n */\\n function toId(uint256 parentId, string memory label) internal pure returns (uint256 id) {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x0, parentId)\\n mstore(0x20, keccak256(add(label, 32), mload(label)))\\n id := keccak256(0x0, 64)\\n }\\n }\\n\\n /**\\n * @dev Calculates the hash of the label.\\n */\\n function hashLabel(string memory label) internal pure returns (bytes32 hashed) {\\n assembly (\\\"memory-safe\\\") {\\n hashed := keccak256(add(label, 32), mload(label))\\n }\\n }\\n\\n /**\\n * @dev Calculate the RNS namehash of a str.\\n */\\n function namehash(string memory str) internal pure returns (bytes32 hashed) {\\n // notice: this method is case-sensitive, ensure the string is lowercased before calling this method\\n assembly (\\\"memory-safe\\\") {\\n // load str length\\n let len := mload(str)\\n // returns bytes32(0x0) if length is zero\\n if iszero(iszero(len)) {\\n let hashedLen\\n // compute pointer to str[0]\\n let head := add(str, 32)\\n // compute pointer to str[length - 1]\\n let tail := add(head, sub(len, 1))\\n // cleanup dirty bytes if contains any\\n mstore(0x0, 0)\\n // loop backwards from `tail` to `head`\\n for { let i := tail } iszero(lt(i, head)) { i := sub(i, 1) } {\\n // check if `i` is `head`\\n let isHead := eq(i, head)\\n // check if `str[i-1]` is \\\".\\\"\\n // `0x2e` == bytes1(\\\".\\\")\\n let isDotNext := eq(shr(248, mload(sub(i, 1))), 0x2e)\\n if or(isHead, isDotNext) {\\n // size = distance(length, i) - hashedLength + 1\\n let size := add(sub(sub(tail, i), hashedLen), 1)\\n mstore(0x20, keccak256(i, size))\\n mstore(0x0, keccak256(0x0, 64))\\n // skip \\\".\\\" thereby + 1\\n hashedLen := add(hashedLen, add(size, 1))\\n }\\n }\\n }\\n hashed := mload(0x0)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x715029b2b420c6ec00bc1f939b837acf45d247fde8426089575b0e7b5e84518b\",\"license\":\"MIT\"},\"src/libraries/LibString.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nlibrary LibString {\\n error InvalidStringLength();\\n error InvalidCharacter(bytes1 char);\\n\\n /// @dev Lookup constant for method. See more detail at https://eips.ethereum.org/EIPS/eip-181\\n bytes32 private constant LOOKUP = 0x3031323334353637383961626364656600000000000000000000000000000000;\\n\\n /**\\n * @dev Returns the length of a given string\\n *\\n * @param s The string to measure the length of\\n * @return The length of the input string\\n */\\n function strlen(string memory s) internal pure returns (uint256) {\\n unchecked {\\n uint256 i;\\n uint256 len;\\n uint256 bytelength = bytes(s).length;\\n for (len; i < bytelength; len++) {\\n bytes1 b = bytes(s)[i];\\n if (b < 0x80) {\\n i += 1;\\n } else if (b < 0xE0) {\\n i += 2;\\n } else if (b < 0xF0) {\\n i += 3;\\n } else if (b < 0xF8) {\\n i += 4;\\n } else if (b < 0xFC) {\\n i += 5;\\n } else {\\n i += 6;\\n }\\n }\\n return len;\\n }\\n }\\n\\n /**\\n * @dev Converts an address to string.\\n */\\n function toString(address addr) internal pure returns (string memory stringifiedAddr) {\\n assembly (\\\"memory-safe\\\") {\\n mstore(stringifiedAddr, 40)\\n let ptr := add(stringifiedAddr, 0x20)\\n for { let i := 40 } gt(i, 0) { } {\\n i := sub(i, 1)\\n mstore8(add(i, ptr), byte(and(addr, 0xf), LOOKUP))\\n addr := div(addr, 0x10)\\n\\n i := sub(i, 1)\\n mstore8(add(i, ptr), byte(and(addr, 0xf), LOOKUP))\\n addr := div(addr, 0x10)\\n }\\n }\\n }\\n\\n /**\\n * @dev Converts string to address.\\n * Reverts if the string length is not equal to 40.\\n */\\n function parseAddr(string memory stringifiedAddr) internal pure returns (address) {\\n unchecked {\\n if (bytes(stringifiedAddr).length != 40) revert InvalidStringLength();\\n uint160 addr;\\n for (uint256 i = 0; i < 40; i += 2) {\\n addr *= 0x100;\\n addr += uint160(hexCharToDec(bytes(stringifiedAddr)[i])) * 0x10;\\n addr += hexCharToDec(bytes(stringifiedAddr)[i + 1]);\\n }\\n return address(addr);\\n }\\n }\\n\\n /**\\n * @dev Converts a hex char (0-9, a-f, A-F) to decimal number.\\n * Reverts if the char is invalid.\\n */\\n function hexCharToDec(bytes1 c) private pure returns (uint8 r) {\\n unchecked {\\n if ((bytes1(\\\"a\\\") <= c) && (c <= bytes1(\\\"f\\\"))) r = uint8(c) - 87;\\n else if ((bytes1(\\\"A\\\") <= c) && (c <= bytes1(\\\"F\\\"))) r = uint8(c) - 55;\\n else if ((bytes1(\\\"0\\\") <= c) && (c <= bytes1(\\\"9\\\"))) r = uint8(c) - 48;\\n else revert InvalidCharacter(c);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9d456b294f0e44ccaabded43a3d96db6270761a167535155a762fe41e968b905\",\"license\":\"MIT\"},\"src/libraries/TimestampWrapperUtils.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nstruct TimestampWrapper {\\n uint256 value;\\n uint256 timestamp;\\n}\\n\",\"keccak256\":\"0x18488d153ebc8579907a85cb7e0be828d0de7c571c9f3368a6d200574b012018\",\"license\":\"MIT\"},\"src/libraries/math/LibSafeRange.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nlibrary LibSafeRange {\\n function add(uint256 a, uint256 b) internal pure returns (uint256 c) {\\n unchecked {\\n c = a + b;\\n if (c < a) return type(uint256).max;\\n }\\n }\\n\\n /**\\n * @dev Returns value of a + b; in case result is larger than upperbound, upperbound is returned.\\n */\\n function addWithUpperbound(uint256 a, uint256 b, uint256 ceil) internal pure returns (uint256 c) {\\n if (a > ceil || b > ceil) return ceil;\\n c = add(a, b);\\n if (c > ceil) return ceil;\\n }\\n}\\n\",\"keccak256\":\"0x12cf5f592a2d80b9c1b0ea11b8fe2b3ed42fc6d62303ba667edc56464baa8810\",\"license\":\"MIT\"},\"src/libraries/math/PeriodScalingUtils.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { PowMath } from \\\"./PowMath.sol\\\";\\n\\nstruct PeriodScaler {\\n uint192 ratio;\\n uint64 period;\\n}\\n\\nlibrary LibPeriodScaler {\\n using PowMath for uint256;\\n\\n error PeriodNumOverflowedUint16(uint256 n);\\n\\n /// @dev The precision number of calculation is 2\\n uint256 public constant MAX_PERCENTAGE = 100_00;\\n\\n /**\\n * @dev Scales down the input value `v` for a percentage of `self.ratio` each period `self.period`.\\n * Reverts if the passed period is larger than 2^16 - 1.\\n *\\n * @param self The period scaler with specific period and ratio\\n * @param v The original value to scale based on the rule `self`\\n * @param maxR The maximum value of 100%. Eg, if the `self.ratio` in range of [0;100_00] reflexes 0-100%, this param\\n * must be 100_00\\n * @param dur The passed duration in the same uint with `self.period`\\n */\\n function scaleDown(PeriodScaler memory self, uint256 v, uint64 maxR, uint256 dur) internal pure returns (uint256 rs) {\\n uint256 n = dur / uint256(self.period);\\n if (n == 0 || self.ratio == 0) return v;\\n if (maxR == self.ratio) return 0;\\n if (n > type(uint16).max) revert PeriodNumOverflowedUint16(n);\\n\\n unchecked {\\n // Normalizes the input ratios to be in range of [0;MAX_PERCENTAGE]\\n uint256 p = Math.mulDiv(maxR - self.ratio, MAX_PERCENTAGE, maxR);\\n return v.mulDiv({ y: p, d: MAX_PERCENTAGE, n: uint16(n) });\\n }\\n }\\n}\\n\",\"keccak256\":\"0x502d004fbd130a99f3f1e6685aebff9f47300565fbc5a65b4912824ea5eb5b78\",\"license\":\"MIT\"},\"src/libraries/math/PowMath.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { SafeMath } from \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nlibrary PowMath {\\n using Math for uint256;\\n using SafeMath for uint256;\\n\\n /**\\n * @dev Negative exponent n for x*10^n.\\n */\\n function exp10(uint256 x, int32 n) internal pure returns (uint256) {\\n if (n < 0) {\\n return x / 10 ** uint32(-n);\\n } else if (n > 0) {\\n return x * 10 ** uint32(n);\\n } else {\\n return x;\\n }\\n }\\n\\n /**\\n * @dev Calculates floor(x * (y / d)**n) with full precision.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 d, uint16 n) internal pure returns (uint256 r) {\\n unchecked {\\n if (y == d || n == 0) return x;\\n r = x;\\n\\n bool ok;\\n uint256 r_;\\n uint16 nd_;\\n\\n {\\n uint16 ye = uint16(Math.min(n, findMaxExponent(y)));\\n while (ye > 0) {\\n (ok, r_) = r.tryMul(y ** ye);\\n if (ok) {\\n r = r_;\\n n -= ye;\\n nd_ += ye;\\n }\\n ye = uint16(Math.min(ye / 2, n));\\n }\\n }\\n\\n while (n > 0) {\\n (ok, r_) = r.tryMul(y);\\n if (ok) {\\n r = r_;\\n n--;\\n nd_++;\\n } else if (nd_ > 0) {\\n r /= d;\\n nd_--;\\n } else {\\n r = r.mulDiv(y, d);\\n n--;\\n }\\n }\\n\\n uint16 de = findMaxExponent(d);\\n while (nd_ > 0) {\\n uint16 e = uint16(Math.min(de, nd_));\\n r /= d ** e;\\n nd_ -= e;\\n }\\n }\\n }\\n\\n /**\\n * @dev Calculates floor(x * (y / d)**n) with low precision.\\n */\\n function mulDivLowPrecision(uint256 x, uint256 y, uint256 d, uint16 n) internal pure returns (uint256) {\\n return uncheckedMulDiv(x, y, d, n, findMaxExponent(Math.max(y, d)));\\n }\\n\\n /**\\n * @dev Aggregated calculate multiplications.\\n * ```\\n * r = x*(y/d)^k\\n * = \\\\prod(x*(y/d)^{k_i}) \\\\ where \\\\ sum(k_i) = k\\n * ```\\n */\\n function uncheckedMulDiv(uint256 x, uint256 y, uint256 d, uint16 n, uint16 maxE) internal pure returns (uint256 r) {\\n unchecked {\\n r = x;\\n uint16 e;\\n while (n > 0) {\\n e = uint16(Math.min(n, maxE));\\n r = r.mulDiv(y ** e, d ** e);\\n n -= e;\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns the largest exponent `k` where, x^k <= 2^256-1\\n * Note: n = Surd[2^256-1,k]\\n * = 10^( log2(2^256-1) / k * log10(2) )\\n */\\n function findMaxExponent(uint256 x) internal pure returns (uint16 k) {\\n if (x < 3) k = 255;\\n else if (x < 4) k = 128;\\n else if (x < 16) k = 64;\\n else if (x < 256) k = 32;\\n else if (x < 7132) k = 20;\\n else if (x < 11376) k = 19;\\n else if (x < 19113) k = 18;\\n else if (x < 34132) k = 17;\\n else if (x < 65536) k = 16;\\n else if (x < 137271) k = 15;\\n else if (x < 319558) k = 14;\\n else if (x < 847180) k = 13;\\n else if (x < 2642246) k = 12;\\n else if (x < 10134189) k = 11;\\n else if (x < 50859009) k = 10;\\n else if (x < 365284285) k = 9;\\n else if (x < 4294967296) k = 8;\\n else if (x < 102116749983) k = 7;\\n else if (x < 6981463658332) k = 6;\\n else if (x < 2586638741762875) k = 5;\\n else if (x < 18446744073709551616) k = 4;\\n else if (x < 48740834812604276470692695) k = 3;\\n else if (x < 340282366920938463463374607431768211456) k = 2;\\n else k = 1;\\n }\\n}\\n\",\"keccak256\":\"0x29f943cf7c61149bc9a624244901720fc3a349adb418555db1db2a045fcdfb70\",\"license\":\"MIT\"},\"src/libraries/pyth/PythConverter.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { PythStructs } from \\\"@pythnetwork/PythStructs.sol\\\";\\nimport { PowMath } from \\\"../math/PowMath.sol\\\";\\n\\nlibrary PythConverter {\\n error ErrExponentTooLarge(int32 expo);\\n error ErrComputedPriceTooLarge(int32 expo1, int32 expo2, int64 price1);\\n\\n /**\\n * @dev Multiples and converts the price into token wei with decimals `outDecimals`.\\n */\\n function mul(PythStructs.Price memory self, uint256 inpWei, int32 inpDecimals, int32 outDecimals)\\n internal\\n pure\\n returns (uint256 outWei)\\n {\\n return Math.mulDiv(\\n inpWei, PowMath.exp10(uint256(int256(self.price)), outDecimals + self.expo), PowMath.exp10(1, inpDecimals)\\n );\\n }\\n\\n /**\\n * @dev Inverses token price of tokenA/tokenB to tokenB/tokenA.\\n */\\n function inverse(PythStructs.Price memory self, int32 expo) internal pure returns (PythStructs.Price memory outPrice) {\\n uint256 exp10p1 = PowMath.exp10(1, -self.expo);\\n if (exp10p1 > uint256(type(int256).max)) revert ErrExponentTooLarge(self.expo);\\n uint256 exp10p2 = PowMath.exp10(1, -expo);\\n if (exp10p2 > uint256(type(int256).max)) revert ErrExponentTooLarge(expo);\\n int256 price = (int256(exp10p1) * int256(exp10p2)) / self.price;\\n if (price > type(int64).max) revert ErrComputedPriceTooLarge(self.expo, expo, self.price);\\n\\n return PythStructs.Price({ price: int64(price), conf: self.conf, expo: expo, publishTime: self.publishTime });\\n }\\n}\\n\",\"keccak256\":\"0x87ade16f6e931f6a3ead7706b0e550ee2c2cdee0be2f218488df93588e787f06\",\"license\":\"MIT\"},\"src/types/ModifyingIndicator.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\ntype ModifyingIndicator is uint256;\\n\\nusing { hasAny } for ModifyingIndicator global;\\nusing { or as | } for ModifyingIndicator global;\\nusing { and as & } for ModifyingIndicator global;\\nusing { eq as == } for ModifyingIndicator global;\\nusing { not as ~ } for ModifyingIndicator global;\\nusing { neq as != } for ModifyingIndicator global;\\n\\n/// @dev Indicator for modifying immutable fields: Depth, ParentId, Label. See struct {INSUnified.ImmutableRecord}.\\nModifyingIndicator constant IMMUTABLE_FIELDS_INDICATOR = ModifyingIndicator.wrap(0x7);\\n\\n/// @dev Indicator for modifying user fields: Resolver, Owner. See struct {INSUnified.MutableRecord}.\\nModifyingIndicator constant USER_FIELDS_INDICATOR = ModifyingIndicator.wrap(0x18);\\n\\n/// @dev Indicator when modifying all of the fields in {ModifyingField}.\\nModifyingIndicator constant ALL_FIELDS_INDICATOR = ModifyingIndicator.wrap(type(uint256).max);\\n\\nfunction eq(ModifyingIndicator self, ModifyingIndicator other) pure returns (bool) {\\n return ModifyingIndicator.unwrap(self) == ModifyingIndicator.unwrap(other);\\n}\\n\\nfunction neq(ModifyingIndicator self, ModifyingIndicator other) pure returns (bool) {\\n return !eq(self, other);\\n}\\n\\nfunction not(ModifyingIndicator self) pure returns (ModifyingIndicator) {\\n return ModifyingIndicator.wrap(~ModifyingIndicator.unwrap(self));\\n}\\n\\nfunction or(ModifyingIndicator self, ModifyingIndicator other) pure returns (ModifyingIndicator) {\\n return ModifyingIndicator.wrap(ModifyingIndicator.unwrap(self) | ModifyingIndicator.unwrap(other));\\n}\\n\\nfunction and(ModifyingIndicator self, ModifyingIndicator other) pure returns (ModifyingIndicator) {\\n return ModifyingIndicator.wrap(ModifyingIndicator.unwrap(self) & ModifyingIndicator.unwrap(other));\\n}\\n\\nfunction hasAny(ModifyingIndicator self, ModifyingIndicator other) pure returns (bool) {\\n return self & other != ModifyingIndicator.wrap(0);\\n}\\n\",\"keccak256\":\"0xe364b4d2e480a7f3e392a40f792303c0febf79c1a623eb4c2278f652210e2e6c\",\"license\":\"MIT\"}},\"version\":1}", + "nonce": 182568, + "numDeployments": 2, "storageLayout": { "storage": [ { - "astId": 50000, + "astId": 49702, "contract": "src/RNSDomainPrice.sol:RNSDomainPrice", "label": "_initialized", "offset": 0, @@ -1161,7 +15714,7 @@ "type": "t_uint8" }, { - "astId": 50003, + "astId": 49705, "contract": "src/RNSDomainPrice.sol:RNSDomainPrice", "label": "_initializing", "offset": 1, @@ -1169,23 +15722,23 @@ "type": "t_bool" }, { - "astId": 48473, + "astId": 48175, "contract": "src/RNSDomainPrice.sol:RNSDomainPrice", "label": "_roles", "offset": 0, "slot": "1", - "type": "t_mapping(t_bytes32,t_struct(RoleData)48468_storage)" + "type": "t_mapping(t_bytes32,t_struct(RoleData)48170_storage)" }, { - "astId": 48783, + "astId": 48485, "contract": "src/RNSDomainPrice.sol:RNSDomainPrice", "label": "_roleMembers", "offset": 0, "slot": "2", - "type": "t_mapping(t_bytes32,t_struct(AddressSet)54352_storage)" + "type": "t_mapping(t_bytes32,t_struct(AddressSet)54054_storage)" }, { - "astId": 59876, + "astId": 59676, "contract": "src/RNSDomainPrice.sol:RNSDomainPrice", "label": "____gap", "offset": 0, @@ -1193,23 +15746,23 @@ "type": "t_array(t_uint256)50_storage" }, { - "astId": 59880, + "astId": 59680, "contract": "src/RNSDomainPrice.sol:RNSDomainPrice", "label": "_pyth", "offset": 0, "slot": "53", - "type": "t_contract(IPyth)54758" + "type": "t_contract(IPyth)54460" }, { - "astId": 59884, + "astId": 59684, "contract": "src/RNSDomainPrice.sol:RNSDomainPrice", "label": "_auction", "offset": 0, "slot": "54", - "type": "t_contract(INSAuction)64493" + "type": "t_contract(INSAuction)64365" }, { - "astId": 59887, + "astId": 59687, "contract": "src/RNSDomainPrice.sol:RNSDomainPrice", "label": "_taxRatio", "offset": 0, @@ -1217,7 +15770,7 @@ "type": "t_uint256" }, { - "astId": 59890, + "astId": 59690, "contract": "src/RNSDomainPrice.sol:RNSDomainPrice", "label": "_rnfMaxLength", "offset": 0, @@ -1225,7 +15778,7 @@ "type": "t_uint256" }, { - "astId": 59893, + "astId": 59693, "contract": "src/RNSDomainPrice.sol:RNSDomainPrice", "label": "_maxAcceptableAge", "offset": 0, @@ -1233,7 +15786,7 @@ "type": "t_uint256" }, { - "astId": 59896, + "astId": 59696, "contract": "src/RNSDomainPrice.sol:RNSDomainPrice", "label": "_pythIdForRONUSD", "offset": 0, @@ -1241,15 +15794,15 @@ "type": "t_bytes32" }, { - "astId": 59900, + "astId": 59700, "contract": "src/RNSDomainPrice.sol:RNSDomainPrice", "label": "_dpDownScaler", "offset": 0, "slot": "59", - "type": "t_struct(PeriodScaler)66750_storage" + "type": "t_struct(PeriodScaler)66624_storage" }, { - "astId": 59905, + "astId": 59705, "contract": "src/RNSDomainPrice.sol:RNSDomainPrice", "label": "_rnFee", "offset": 0, @@ -1257,15 +15810,15 @@ "type": "t_mapping(t_uint256,t_uint256)" }, { - "astId": 59911, + "astId": 59711, "contract": "src/RNSDomainPrice.sol:RNSDomainPrice", "label": "_dp", "offset": 0, "slot": "61", - "type": "t_mapping(t_bytes32,t_struct(TimestampWrapper)66673_storage)" + "type": "t_mapping(t_bytes32,t_struct(TimestampWrapper)66547_storage)" }, { - "astId": 59916, + "astId": 59716, "contract": "src/RNSDomainPrice.sol:RNSDomainPrice", "label": "_rnFeeOverriding", "offset": 0, @@ -1301,12 +15854,12 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_contract(INSAuction)64493": { + "t_contract(INSAuction)64365": { "encoding": "inplace", "label": "contract INSAuction", "numberOfBytes": "20" }, - "t_contract(IPyth)54758": { + "t_contract(IPyth)54460": { "encoding": "inplace", "label": "contract IPyth", "numberOfBytes": "20" @@ -1318,26 +15871,26 @@ "numberOfBytes": "32", "value": "t_bool" }, - "t_mapping(t_bytes32,t_struct(AddressSet)54352_storage)": { + "t_mapping(t_bytes32,t_struct(AddressSet)54054_storage)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => struct EnumerableSet.AddressSet)", "numberOfBytes": "32", - "value": "t_struct(AddressSet)54352_storage" + "value": "t_struct(AddressSet)54054_storage" }, - "t_mapping(t_bytes32,t_struct(RoleData)48468_storage)": { + "t_mapping(t_bytes32,t_struct(RoleData)48170_storage)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => struct AccessControl.RoleData)", "numberOfBytes": "32", - "value": "t_struct(RoleData)48468_storage" + "value": "t_struct(RoleData)48170_storage" }, - "t_mapping(t_bytes32,t_struct(TimestampWrapper)66673_storage)": { + "t_mapping(t_bytes32,t_struct(TimestampWrapper)66547_storage)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => struct TimestampWrapper)", "numberOfBytes": "32", - "value": "t_struct(TimestampWrapper)66673_storage" + "value": "t_struct(TimestampWrapper)66547_storage" }, "t_mapping(t_bytes32,t_uint256)": { "encoding": "mapping", @@ -1353,28 +15906,28 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_struct(AddressSet)54352_storage": { + "t_struct(AddressSet)54054_storage": { "encoding": "inplace", "label": "struct EnumerableSet.AddressSet", "numberOfBytes": "64", "members": [ { - "astId": 54351, + "astId": 54053, "contract": "src/RNSDomainPrice.sol:RNSDomainPrice", "label": "_inner", "offset": 0, "slot": "0", - "type": "t_struct(Set)54037_storage" + "type": "t_struct(Set)53739_storage" } ] }, - "t_struct(PeriodScaler)66750_storage": { + "t_struct(PeriodScaler)66624_storage": { "encoding": "inplace", "label": "struct PeriodScaler", "numberOfBytes": "32", "members": [ { - "astId": 66747, + "astId": 66621, "contract": "src/RNSDomainPrice.sol:RNSDomainPrice", "label": "ratio", "offset": 0, @@ -1382,7 +15935,7 @@ "type": "t_uint192" }, { - "astId": 66749, + "astId": 66623, "contract": "src/RNSDomainPrice.sol:RNSDomainPrice", "label": "period", "offset": 24, @@ -1391,13 +15944,13 @@ } ] }, - "t_struct(RoleData)48468_storage": { + "t_struct(RoleData)48170_storage": { "encoding": "inplace", "label": "struct AccessControl.RoleData", "numberOfBytes": "64", "members": [ { - "astId": 48465, + "astId": 48167, "contract": "src/RNSDomainPrice.sol:RNSDomainPrice", "label": "members", "offset": 0, @@ -1405,7 +15958,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 48467, + "astId": 48169, "contract": "src/RNSDomainPrice.sol:RNSDomainPrice", "label": "adminRole", "offset": 0, @@ -1414,13 +15967,13 @@ } ] }, - "t_struct(Set)54037_storage": { + "t_struct(Set)53739_storage": { "encoding": "inplace", "label": "struct EnumerableSet.Set", "numberOfBytes": "64", "members": [ { - "astId": 54032, + "astId": 53734, "contract": "src/RNSDomainPrice.sol:RNSDomainPrice", "label": "_values", "offset": 0, @@ -1428,7 +15981,7 @@ "type": "t_array(t_bytes32)dyn_storage" }, { - "astId": 54036, + "astId": 53738, "contract": "src/RNSDomainPrice.sol:RNSDomainPrice", "label": "_indexes", "offset": 0, @@ -1437,13 +15990,13 @@ } ] }, - "t_struct(TimestampWrapper)66673_storage": { + "t_struct(TimestampWrapper)66547_storage": { "encoding": "inplace", "label": "struct TimestampWrapper", "numberOfBytes": "64", "members": [ { - "astId": 66670, + "astId": 66544, "contract": "src/RNSDomainPrice.sol:RNSDomainPrice", "label": "value", "offset": 0, @@ -1451,7 +16004,7 @@ "type": "t_uint256" }, { - "astId": 66672, + "astId": 66546, "contract": "src/RNSDomainPrice.sol:RNSDomainPrice", "label": "timestamp", "offset": 0, @@ -1482,7 +16035,7 @@ } } }, - "timestamp": 1697372891, + "timestamp": 1698032742, "userdoc": { "version": 1, "kind": "user", diff --git a/deployments/ronin-testnet/RNSUnifiedLogic.json b/deployments/ronin-testnet/RNSUnifiedLogic.json index d7e511e9..82638ff3 100644 --- a/deployments/ronin-testnet/RNSUnifiedLogic.json +++ b/deployments/ronin-testnet/RNSUnifiedLogic.json @@ -1403,13 +1403,16419 @@ "type": "function" } ], - "address": "0x713139B9F92d4f2BC54832a47200B7b8C6718158", + "address": "0x993Cab4b697f05BF5221EC78B491C08A148004Bf", "args": "0x", - "blockNumber": 21224275, - "bytecode": "0x6000608081815260c060405260a09182529060036200001f8382620001b1565b5060046200002e8282620001b1565b5050603c805460ff1916905550620000456200004b565b6200027d565b600054610100900460ff1615620000b85760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116146200010a576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200013757607f821691505b6020821081036200015857634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001ac57600081815260208120601f850160051c81016020861015620001875750805b601f850160051c820191505b81811015620001a85782815560010162000193565b5050505b505050565b81516001600160401b03811115620001cd57620001cd6200010c565b620001e581620001de845462000122565b846200015e565b602080601f8311600181146200021d5760008415620002045750858301515b600019600386901b1c1916600185901b178555620001a8565b600085815260208120601f198616915b828110156200024e578886015182559484019460019091019084016200022d565b50858210156200026d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6142b3806200028d6000396000f3fe608060405234801561001057600080fd5b50600436106102f15760003560e01c806355a5133b1161019d578063abfaf005116100e9578063dbd18388116100a2578063ec63b01f1161007c578063ec63b01f1461072b578063f1e379081461073e578063fc284d1114610765578063fd3fa9191461077857600080fd5b8063dbd18388146106c9578063e63ab1e9146106da578063e985e9c5146106ef57600080fd5b8063abfaf0051461065c578063b88d4fde1461066f578063b967169014610682578063c87b56dd14610690578063ca15c873146106a3578063d547741f146106b657600080fd5b80639010d07c1161015657806396e494e81161013057806396e494e814610626578063a217fddf14610639578063a22cb46514610641578063a2309ff81461065457600080fd5b80639010d07c146105e157806391d14854146105f457806395d89b411461060757600080fd5b806355a5133b1461058257806355f804b3146105955780635c975abb146105a85780636352211e146105b357806370a08231146105c65780638456cb59146105d957600080fd5b80631cfa6ec01161025c57806333855d9f1161021557806342842e0e116101ef57806342842e0e1461051e57806342966c68146105315780634f6ccce7146105445780635569f33d1461055757600080fd5b806333855d9f146104ee57806336568abe146105035780633f4ba83a1461051657600080fd5b80631cfa6ec01461046b57806323b872dd1461047e578063248a9ca31461049157806328ed4f6c146104b55780632f2ff15d146104c85780632f745c59146104db57600080fd5b8063095ea7b3116102ae578063095ea7b3146103f5578063098799621461040a578063131a7e241461041d578063141a468c1461043057806318160ddd146104505780631a7a98e21461045857600080fd5b806301ffc9a7146102f657806303e9e6091461031e5780630570891f1461033e57806306fdde0314610370578063081812fc146103a7578063092c5b3b146103d2575b600080fd5b61030961030436600461345a565b6107ab565b60405190151581526020015b60405180910390f35b61033161032c366004613477565b6107d7565b6040516103159190613564565b61035161034c3660046135f2565b61092d565b604080516001600160401b039093168352602083019190915201610315565b604080518082019091526012815271526f6e696e204e616d65205365727669636560701b60208201525b604051610315919061366f565b6103ba6103b5366004613477565b610bba565b6040516001600160a01b039091168152602001610315565b6103e760008051602061423e83398151915281565b604051908152602001610315565b610408610403366004613682565b610be1565b005b6103e7610418366004613737565b610cfb565b61039a61042b366004613477565b610d06565b6103e761043e366004613477565b60096020526000908152604090205481565b603f546103e7565b61039a610466366004613477565b610d53565b61040861047936600461377f565b610e5f565b61040861048c3660046137c0565b610ff4565b6103e761049f366004613477565b6000908152600160208190526040909120015490565b6104086104c33660046137fc565b611026565b6104086104d63660046137fc565b611080565b6103e76104e9366004613682565b6110a6565b6103e760008051602061421e83398151915281565b6104086105113660046137fc565b61113c565b6104086111ba565b61040861052c3660046137c0565b6111dd565b61040861053f366004613477565b6111f8565b6103e7610552366004613477565b611226565b61056a610565366004613828565b6112b9565b6040516001600160401b039091168152602001610315565b61040861059036600461384b565b61137e565b6104086105a3366004613866565b6113a7565b603c5460ff16610309565b6103ba6105c1366004613477565b6113bc565b6103e76105d43660046138a7565b6113dd565b610408611463565b6103ba6105ef3660046138c2565b611483565b6103096106023660046137fc565b6114a2565b604080518082019091526003815262524e5360e81b602082015261039a565b610309610634366004613477565b6114cd565b6103e7600081565b61040861064f3660046138f4565b6114f8565b6073546103e7565b61040861066a36600461391e565b611503565b61040861067d3660046139b4565b61171b565b61056a6001600160401b0381565b61039a61069e366004613477565b61174d565b6103e76106b1366004613477565b6117c0565b6104086106c43660046137fc565b6117d7565b60a7546001600160401b031661056a565b6103e760008051602061425e83398151915281565b6103096106fd366004613a2f565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b610408610739366004613a59565b6117fd565b6103e77f87a2b33e0b98030e29c3d23d732aa654f29b298e3891758d5f02a8b01c4840b281565b610408610773366004613828565b611907565b61078b610786366004613adc565b611988565b6040805192151583526001600160e01b0319909116602083015201610315565b60006107b682611aba565b806107d157506001600160e01b03198216630106c78f60e21b145b92915050565b6107df6133e8565b600082815260a8602052604090819020815160a081018352815460ff1692810192835260018201546060820152600282018054919384929091849160808501919061082990613b0f565b80601f016020809104026020016040519081016040528092919081815260200182805461085590613b0f565b80156108a25780601f10610877576101008083540402835291602001916108a2565b820191906000526020600020905b81548152906001019060200180831161088557829003601f168201915b5050509190925250505081526040805160808101825260038401546001600160a01b039081168252600490940154938416602080830191909152600160a01b85046001600160401b031692820192909252600160e01b90930460ff16151560608401520152905061091282611adf565b60208201516001600160401b03909116604090910152919050565b600080610938611b5b565b6109423389611ba3565b61095e576040516282b42960e81b815260040160405180910390fd5b61099e8888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611bbf92505050565b90506109a9816114cd565b6109c65760405163a3b8915f60e01b815260040160405180910390fd5b6109cf81611bd5565b156109dd576109dd81611bf2565b6109e78482611c2e565b6109fc426001600160401b0380861690611c41565b9150610a088883611c77565b610a106133e8565b604080516080810182526001600160a01b03808916825287166020808301919091526001600160401b038616828401526000606080840182905285830193909352835192830184528c815260a890915291909120548190610a759060ff166001613b59565b60ff1681526020018a815260200189898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509390945250509183525082815260a8602090815260409182902083518051825460ff191660ff909116178255918201516001820155918101518392919082906002820190610b039082613bc0565b50505060209182015180516003830180546001600160a01b039283166001600160a01b031990911617905592810151600490920180546040808401516060909401511515600160e01b0260ff60e01b196001600160401b03909516600160a01b026001600160e01b031990931695909616949094171791909116929092179091555182906000805160206141fe83398151915290610ba690600019908590613c7f565b60405180910390a250965096945050505050565b6000610bc582611cbd565b506000908152600760205260409020546001600160a01b031690565b6000610bec82611d0d565b9050806001600160a01b0316836001600160a01b031603610c5e5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b0382161480610c7a5750610c7a81336106fd565b610cec5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610c55565b610cf68383611d6d565b505050565b60006107d182611ddb565b606081610d1281611cbd565b600083815260a8602090815260408083206009835292819020549051610d3b9392879101613c98565b60405160208183030381529060405291505b50919050565b606081600003610d7157505060408051602081019091526000815290565b600082815260a860205260409020600281018054610d8e90613b0f565b80601f0160208091040260200160405190810160405280929190818152602001828054610dba90613b0f565b8015610e075780601f10610ddc57610100808354040283529160200191610e07565b820191906000526020600020905b815481529060010190602001808311610dea57829003601f168201915b50505050509150806001015492505b8215610d4d5750600082815260a860209081526040918290209151610e42918491600285019101613da6565b604051602081830303815290604052915080600101549250610e16565b610e67611b5b565b8282610e738282611e4e565b610e7b6133e8565b600086815260a860205260409020600301610ea0610e996006611e6f565b8790611e91565b15610ee157610eb56080860160608701613e58565b6020830151901515606090910181905260018201805460ff60e01b1916600160e01b9092029190911790555b610eee610e996005611e6f565b15610f2457610f2487610f07606088016040890161384b565b60208501516001600160401b039091166040909101819052611e9d565b610f31610e996003611e6f565b15610f6757610f4360208601866138a7565b60208301516001600160a01b039091169081905281546001600160a01b0319161781555b866000805160206141fe8339815191528784604051610f87929190613c7f565b60405180910390a2610f9c610e996004611e6f565b15610feb57600087815260a8602090815260409182902060040154610feb926001600160a01b0390911691610fd59189019089016138a7565b8960405180602001604052806000815250611f76565b50505050505050565b610fff335b82611fa9565b61101b5760405162461bcd60e51b8152600401610c5590613e73565b610cf6838383611fcb565b61102e611b5b565b816110396004611e6f565b6110438282611e4e565b600084815260a86020908152604080832060040154815192830190915291815261107a916001600160a01b03169085908790611f76565b50505050565b6000828152600160208190526040909120015461109c816120c7565b610cf683836120d1565b60006110b1836113dd565b82106111135760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610c55565b506001600160a01b03919091166000908152603d60209081526040808320938352929052205490565b6001600160a01b03811633146111ac5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c55565b6111b682826120f3565b5050565b60008051602061425e8339815191526111d2816120c7565b6111da612115565b50565b610cf68383836040518060200160405280600081525061171b565b61120133610ff9565b61121d5760405162461bcd60e51b8152600401610c5590613e73565b6111da81611bf2565b6000611231603f5490565b82106112945760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610c55565b603f82815481106112a7576112a7613ec0565b90600052602060002001549050919050565b60006112c3611b5b565b60008051602061423e8339815191526112db816120c7565b6112e36133e8565b600085815260a86020526040902060040154611315906001600160401b03600160a01b90910481169086811690611c41565b6020820180516001600160401b0390921660409283015251015161133a908690611e9d565b6020810151604001519250846000805160206141fe83398151915261135f6005611e6f565b8360405161136e929190613c7f565b60405180910390a2505092915050565b611386611b5b565b60008051602061423e83398151915261139e816120c7565b6111b682612167565b60006113b2816120c7565b610cf683836121bf565b60006113c782612214565b156113d457506000919050565b6107d182611d0d565b60006001600160a01b0382166114475760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610c55565b506001600160a01b031660009081526006602052604090205490565b60008051602061425e83398151915261147b816120c7565b6111da612230565b600082815260026020526040812061149b908361226d565b9392505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60006114f06114db83611adf565b60a7546001600160401b039182169116612279565b421192915050565b6111b633838361228d565b600054610100900460ff16158080156115235750600054600160ff909116105b8061153d5750303b15801561153d575060005460ff166001145b6115a05760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610c55565b6000805460ff1916600117905580156115c3576000805461ff0019166101001790555b6115ce6000896120d1565b6115e660008051602061425e833981519152886120d1565b6115fe60008051602061423e833981519152876120d1565b61161660008051602061421e833981519152866120d1565b61162083836121bf565b61162984612167565b611634886000611c2e565b61163c6133e8565b6020808201516001600160401b03604090910152600080805260a89091527f89f57ae4d64764caecd045b845cfc13a5b86ba807e4a61f32108661671e72867805467ffffffffffffffff60a01b191667ffffffffffffffff60a01b1790556000805160206141fe8339815191526116b36005611e6f565b836040516116c2929190613c7f565b60405180910390a2508015611711576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050565b6117253383611fa9565b6117415760405162461bcd60e51b8152600401610c5590613e73565b61107a84848484611f76565b60608161175981611cbd565b600061176361235b565b9050600081511161178357604051806020016040528060008152506117b8565b8061178d306123ed565b61179686612403565b6040516020016117a893929190613ed6565b6040516020818303038152906040525b949350505050565b60008181526002602052604081206107d190612495565b600082815260016020819052604090912001546117f3816120c7565b610cf683836120f3565b60008051602061421e833981519152611815816120c7565b60006118216006611e6f565b9050600061182d6133e8565b602081015185151560609091015260005b868110156117115787878281811061185857611858613ec0565b90506020020135925061186a83611bd5565b611887576040516304a3dbd560e51b815260040160405180910390fd5b600083815260a8602052604090206004015460ff600160e01b909104161515861515146118ff57600083815260a8602052604090819020600401805460ff60e01b1916600160e01b891515021790555183906000805160206141fe833981519152906118f69087908690613c7f565b60405180910390a25b60010161183e565b61190f611b5b565b60008051602061423e833981519152611927816120c7565b61192f6133e8565b60208101516001600160401b0384166040909101819052611951908590611e9d565b836000805160206141fe83398151915261196b6005611e6f565b8360405161197a929190613c7f565b60405180910390a250505050565b600080611996836007611e91565b156119ad57506000905063da698a4d60e01b611ab2565b6119b684611bd5565b6119cc5750600090506304a3dbd560e51b611ab2565b6119e06119d96006611e6f565b8490611e91565b8015611a0157506119ff60008051602061421e833981519152866114a2565b155b15611a1857506000905063c24b0f3f60e01b611ab2565b6000611a3260008051602061423e833981519152876114a2565b9050611a48611a416005611e6f565b8590611e91565b8015611a52575080155b15611a6b57506000915063ed4b948760e01b9050611ab2565b611a76846018611e91565b8015611a9057508080611a8e5750611a8e8686611ba3565b155b15611aa85750600091506282b42960e81b9050611ab2565b5060019150600090505b935093915050565b60006001600160e01b0319821663780e9d6360e01b14806107d157506107d18261249f565b600081815260056020526040812054611b22907f87a2b33e0b98030e29c3d23d732aa654f29b298e3891758d5f02a8b01c4840b2906001600160a01b03166114a2565b15611b3557506001600160401b03919050565b50600090815260a86020526040902060040154600160a01b90046001600160401b031690565b603c5460ff1615611ba15760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c55565b565b6000611baf8383611fa9565b8061149b575061149b83836124df565b6000918252805160209182012090526040902090565b6000908152600560205260409020546001600160a01b0316151590565b611bfb8161253d565b600090815260a8602052604090206003810180546001600160a01b031916905560040180546001600160e81b0319169055565b6073805460010190556111b682826125e0565b600081841180611c5057508183115b15611c5c57508061149b565b611c668484612279565b90508181111561149b575092915050565b600082815260a860205260409020600401546001600160401b03600160a01b909104811690821611156111b65760405163da87d84960e01b815260040160405180910390fd5b611cc681611bd5565b6111da5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610c55565b6000818152600560205260408120546001600160a01b0316806107d15760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610c55565b600081815260076020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611da282611d0d565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600081518015611e445760006020840160018303810160008052805b828110611e3f57828114602e600183035160f81c1480821715611e3457600186848603030180842060205260406000206000526001810187019650505b505060001901611df7565b505050505b5050600051919050565b600080611e5c338585611988565b915091508161107a578060005260046000fd5b6000816006811115611e8357611e83613e42565b60ff166001901b9050919050565b6000828216151561149b565b600082815260a86020526040902060010154611eb99082611c77565b611ec2826114cd565b15611ee057604051631395a92360e01b815260040160405180910390fd5b600082815260a860205260409020600401546001600160401b03600160a01b909104811690821611611f2557604051631c21962760e11b815260040160405180910390fd5b611f2d6133e8565b6020908101516001600160401b03929092166040928301819052600093845260a89091529120600401805467ffffffffffffffff60a01b1916600160a01b909202919091179055565b611f81848484611fcb565b611f8d8484848461275b565b61107a5760405162461bcd60e51b8152600401610c5590613f26565b6000611fb482612214565b15611fc1575060006107d1565b61149b838361285c565b611fd68383836128da565b611fde6133e8565b6000611fea6004611e6f565b6020838101516001600160a01b038716908201819052600086815260a8909252604090912060040180546001600160a01b0319169091179055905061203d60008051602061421e833981519152336114a2565b1580156120625750600083815260a86020526040902060040154600160e01b900460ff165b1561209857600083815260a860205260409020600401805460ff60e01b19169055612095816120916006611e6f565b1790565b90505b826000805160206141fe83398151915282846040516120b8929190613c7f565b60405180910390a25050505050565b6111da8133612a4b565b6120db8282612aa4565b6000828152600260205260409020610cf69082612b0f565b6120fd8282612b24565b6000828152600260205260409020610cf69082612b8b565b61211d612ba0565b603c805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60a780546001600160401b03831667ffffffffffffffff199091168117909155604080519182525133917f2f8e6689e76cebc7cf99a782594bd18a73b8d1a0fe640c99fc580dcd4de7cd1d919081900360200190a250565b60746121cc828483613f78565b50336001600160a01b03167ff765b68b6ff897de964353a0eb194e46ecea8772879eb880b4b0fd277124922c8383604051612208929190614037565b60405180910390a25050565b600061221f82611adf565b6001600160401b0316421192915050565b612238611b5b565b603c805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861214a3390565b600061149b8383612be9565b818101828110156107d157506000196107d1565b816001600160a01b0316836001600160a01b0316036122ee5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610c55565b6001600160a01b03838116600081815260086020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60606074805461236a90613b0f565b80601f016020809104026020016040519081016040528092919081815260200182805461239690613b0f565b80156123e35780601f106123b8576101008083540402835291602001916123e3565b820191906000526020600020905b8154815290600101906020018083116123c657829003601f168201915b5050505050905090565b60606107d16001600160a01b0383166014612c13565b6060600061241083612dae565b60010190506000816001600160401b0381111561242f5761242f6136ac565b6040519080825280601f01601f191660200182016040528015612459576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461246357509392505050565b60006107d1825490565b60006001600160e01b031982166380ac58cd60e01b14806124d057506001600160e01b03198216635b5e139f60e01b145b806107d157506107d182612e86565b6000805b82156125335750600082815260a860205260409020600401546001600160a01b03908116908416810361251a5760019150506107d1565b600092835260a8602052604090922060010154916124e3565b5060009392505050565b600061254882611d0d565b9050612558816000846001612eab565b61256182611d0d565b600083815260076020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526006845282852080546000190190558785526005909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0382166126365760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610c55565b61263f81611bd5565b1561268c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c55565b61269a600083836001612eab565b6126a381611bd5565b156126f05760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c55565b6001600160a01b038216600081815260066020908152604080832080546001019055848352600590915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b1561285157604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061279f903390899088908890600401614066565b6020604051808303816000875af19250505080156127da575060408051601f3d908101601f191682019092526127d7918101906140a3565b60015b612837573d808015612808576040519150601f19603f3d011682016040523d82523d6000602084013e61280d565b606091505b50805160000361282f5760405162461bcd60e51b8152600401610c5590613f26565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506117b8565b506001949350505050565b60008061286883611d0d565b9050806001600160a01b0316846001600160a01b031614806128af57506001600160a01b0380821660009081526008602090815260408083209388168352929052205460ff165b806117b85750836001600160a01b03166128c884610bba565b6001600160a01b031614949350505050565b826001600160a01b03166128ed82611d0d565b6001600160a01b0316146129135760405162461bcd60e51b8152600401610c55906140c0565b6001600160a01b0382166129755760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610c55565b6129828383836001612eab565b826001600160a01b031661299582611d0d565b6001600160a01b0316146129bb5760405162461bcd60e51b8152600401610c55906140c0565b600081815260076020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260068552838620805460001901905590871680865283862080546001019055868652600590945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b612a5582826114a2565b6111b657612a62816123ed565b612a6d836020612c13565b604051602001612a7e929190614105565b60408051601f198184030181529082905262461bcd60e51b8252610c559160040161366f565b612aae82826114a2565b6111b65760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b600061149b836001600160a01b038416612eb7565b612b2e82826114a2565b156111b65760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061149b836001600160a01b038416612f06565b603c5460ff16611ba15760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c55565b6000826000018281548110612c0057612c00613ec0565b9060005260206000200154905092915050565b60606000612c2283600261417a565b612c2d906002614191565b6001600160401b03811115612c4457612c446136ac565b6040519080825280601f01601f191660200182016040528015612c6e576020820181803683370190505b509050600360fc1b81600081518110612c8957612c89613ec0565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612cb857612cb8613ec0565b60200101906001600160f81b031916908160001a9053506000612cdc84600261417a565b612ce7906001614191565b90505b6001811115612d5f576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612d1b57612d1b613ec0565b1a60f81b828281518110612d3157612d31613ec0565b60200101906001600160f81b031916908160001a90535060049490941c93612d58816141a4565b9050612cea565b50831561149b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c55565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310612ded5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612e19576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612e3757662386f26fc10000830492506010015b6305f5e1008310612e4f576305f5e100830492506008015b6127108310612e6357612710830492506004015b60648310612e75576064830492506002015b600a83106107d15760010192915050565b60006001600160e01b03198216635a05180f60e01b14806107d157506107d182612ff9565b61107a8484848461302e565b6000818152600183016020526040812054612efe575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556107d1565b5060006107d1565b60008181526001830160205260408120548015612fef576000612f2a6001836141bb565b8554909150600090612f3e906001906141bb565b9050818114612fa3576000866000018281548110612f5e57612f5e613ec0565b9060005260206000200154905080876000018481548110612f8157612f81613ec0565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612fb457612fb46141ce565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506107d1565b60009150506107d1565b60006001600160e01b03198216637965db0b60e01b14806107d157506301ffc9a760e01b6001600160e01b03198316146107d1565b61303a8484848461316e565b60018111156130a95760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b6064820152608401610c55565b816001600160a01b0385166131055761310081603f80546000838152604060208190528120829055600182018355919091527fc03004e3ce0784bf68186394306849f9b7b1200073105cd9aeb554a1802b58fd0155565b613128565b836001600160a01b0316856001600160a01b0316146131285761312885826131e1565b6001600160a01b0384166131445761313f8161327e565b613167565b846001600160a01b0316846001600160a01b03161461316757613167848261332d565b5050505050565b61317a84848484613371565b603c5460ff161561107a5760405162461bcd60e51b815260206004820152602b60248201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760448201526a1a1a5b19481c185d5cd95960aa1b6064820152608401610c55565b600060016131ee846113dd565b6131f891906141bb565b6000838152603e602052604090205490915080821461324b576001600160a01b0384166000908152603d602090815260408083208584528252808320548484528184208190558352603e90915290208190555b506000918252603e602090815260408084208490556001600160a01b039094168352603d81528383209183525290812055565b603f54600090613290906001906141bb565b600083815260406020819052812054603f80549394509092849081106132b8576132b8613ec0565b9060005260206000200154905080603f83815481106132d9576132d9613ec0565b600091825260208083209091019290925582815260409182905281812084905585815290812055603f805480613311576133116141ce565b6001900381819060005260206000200160009055905550505050565b6000613338836113dd565b6001600160a01b039093166000908152603d602090815260408083208684528252808320859055938252603e9052919091209190915550565b815b61337d8284614191565b8110156133e257600081815260096020526040812080549091906133a0906141e4565b918290555060405182907fcc2c68164f9f7f0c063ba98bcf89498c0f3f5e3acc32bf4ab46195ecb489c13b90600090a3806133da816141e4565b915050613373565b5061107a565b604051806040016040528061341a6040518060600160405280600060ff16815260200160008152602001606081525090565b81526040805160808101825260008082526020828101829052928201819052606082015291015290565b6001600160e01b0319811681146111da57600080fd5b60006020828403121561346c57600080fd5b813561149b81613444565b60006020828403121561348957600080fd5b5035919050565b60005b838110156134ab578181015183820152602001613493565b50506000910152565b600081518084526134cc816020860160208601613490565b601f01601f19169290920160200192915050565b805160a0808452815160ff1690840152602081015160c084015260400151606060e08401526000906135166101008501826134b4565b9050602083015160018060a01b03808251166020870152806020830151166040870152506001600160401b036040820151166060860152606081015115156080860152508091505092915050565b60208152600061149b60208301846134e0565b60008083601f84011261358957600080fd5b5081356001600160401b038111156135a057600080fd5b6020830191508360208285010111156135b857600080fd5b9250929050565b80356001600160a01b03811681146135d657600080fd5b919050565b80356001600160401b03811681146135d657600080fd5b60008060008060008060a0878903121561360b57600080fd5b8635955060208701356001600160401b0381111561362857600080fd5b61363489828a01613577565b90965094506136479050604088016135bf565b9250613655606088016135bf565b9150613663608088016135db565b90509295509295509295565b60208152600061149b60208301846134b4565b6000806040838503121561369557600080fd5b61369e836135bf565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b03808411156136dc576136dc6136ac565b604051601f8501601f19908116603f01168101908282118183101715613704576137046136ac565b8160405280935085815286868601111561371d57600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561374957600080fd5b81356001600160401b0381111561375f57600080fd5b8201601f8101841361377057600080fd5b6117b8848235602084016136c2565b600080600083850360c081121561379557600080fd5b84359350602085013592506080603f19820112156137b257600080fd5b506040840190509250925092565b6000806000606084860312156137d557600080fd5b6137de846135bf565b92506137ec602085016135bf565b9150604084013590509250925092565b6000806040838503121561380f57600080fd5b8235915061381f602084016135bf565b90509250929050565b6000806040838503121561383b57600080fd5b8235915061381f602084016135db565b60006020828403121561385d57600080fd5b61149b826135db565b6000806020838503121561387957600080fd5b82356001600160401b0381111561388f57600080fd5b61389b85828601613577565b90969095509350505050565b6000602082840312156138b957600080fd5b61149b826135bf565b600080604083850312156138d557600080fd5b50508035926020909101359150565b803580151581146135d657600080fd5b6000806040838503121561390757600080fd5b613910836135bf565b915061381f602084016138e4565b600080600080600080600060c0888a03121561393957600080fd5b613942886135bf565b9650613950602089016135bf565b955061395e604089016135bf565b945061396c606089016135bf565b935061397a608089016135db565b925060a08801356001600160401b0381111561399557600080fd5b6139a18a828b01613577565b989b979a50959850939692959293505050565b600080600080608085870312156139ca57600080fd5b6139d3856135bf565b93506139e1602086016135bf565b92506040850135915060608501356001600160401b03811115613a0357600080fd5b8501601f81018713613a1457600080fd5b613a23878235602084016136c2565b91505092959194509250565b60008060408385031215613a4257600080fd5b613a4b836135bf565b915061381f602084016135bf565b600080600060408486031215613a6e57600080fd5b83356001600160401b0380821115613a8557600080fd5b818601915086601f830112613a9957600080fd5b813581811115613aa857600080fd5b8760208260051b8501011115613abd57600080fd5b602092830195509350613ad391860190506138e4565b90509250925092565b600080600060608486031215613af157600080fd5b613afa846135bf565b95602085013595506040909401359392505050565b600181811c90821680613b2357607f821691505b602082108103610d4d57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60ff81811683821601908111156107d1576107d1613b43565b601f821115610cf657600081815260208120601f850160051c81016020861015613b995750805b601f850160051c820191505b81811015613bb857828155600101613ba5565b505050505050565b81516001600160401b03811115613bd957613bd96136ac565b613bed81613be78454613b0f565b84613b72565b602080601f831160018114613c225760008415613c0a5750858301515b600019600386901b1c1916600185901b178555613bb8565b600085815260208120601f198616915b82811015613c5157888601518255948401946001909101908401613c32565b5085821015613c6f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8281526040602082015260006117b860408301846134e0565b6060815260a0606082015260ff845416610100820152600060018086015461012084015260028601606061014085015260008154613cd581613b0f565b8061016088015261018085831660008114613cf75760018114613d1157613d42565b60ff1984168983015282151560051b890182019450613d42565b8560005260208060002060005b85811015613d395781548c8201860152908901908201613d1e565b8b018401965050505b50505050613d926080860160038a0180546001600160a01b03908116835260019190910154908116602083015260a081901c6001600160401b0316604083015260e01c60ff161515606090910152565b602085019690965250505060400152919050565b600083516020613db98285838901613490565b8184019150601760f91b8252600160008654613dd481613b0f565b8184168015613dea5760018114613e0357613e33565b60ff198316878601528115158202870185019350613e33565b896000528560002060005b83811015613e29578154898201880152908601908701613e0e565b5050848288010193505b50919998505050505050505050565b634e487b7160e01b600052602160045260246000fd5b600060208284031215613e6a57600080fd5b61149b826138e4565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60008451613ee8818460208901613490565b845190830190613efc818360208901613490565b602f60f81b91019081528351613f19816001840160208801613490565b0160010195945050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160401b03831115613f8f57613f8f6136ac565b613fa383613f9d8354613b0f565b83613b72565b6000601f841160018114613fd75760008515613fbf5750838201355b600019600387901b1c1916600186901b178355613167565b600083815260209020601f19861690835b828110156140085786850135825560209485019460019092019101613fe8565b50868210156140255760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614099908301846134b4565b9695505050505050565b6000602082840312156140b557600080fd5b815161149b81613444565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161413d816017850160208801613490565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161416e816028840160208801613490565b01602801949350505050565b80820281158282048414176107d1576107d1613b43565b808201808211156107d1576107d1613b43565b6000816141b3576141b3613b43565b506000190190565b818103818111156107d1576107d1613b43565b634e487b7160e01b600052603160045260246000fd5b6000600182016141f6576141f6613b43565b506001019056fe1c440effe366cd7c439a4890f8be2342fcaca9b4a192ce8cf2b0e76511b36eba9e4a939112df4627ab5078e49dd57d2c45b4cffd9ae0b912f9fc355e5b1080387b765e0e932d348852a6f810bfa1ab891e259123f02db8cdcde614c57022335765d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862aa2646970667358221220301f6572af699c777a4ce459646815492b8048541c5752ac22e91ffe87e5b23064736f6c63430008150033", + "ast": { + "absolutePath": "src/RNSUnified.sol", + "id": 63147, + "exportedSymbols": { + "ALL_FIELDS_INDICATOR": [ + 69760 + ], + "ERC721": [ + 51340 + ], + "IERC721": [ + 51456 + ], + "IERC721State": [ + 501 + ], + "IMMUTABLE_FIELDS_INDICATOR": [ + 69740 + ], + "INSUnified": [ + 65321 + ], + "Initializable": [ + 50240 + ], + "LibModifyingField": [ + 66345 + ], + "LibRNSDomain": [ + 66388 + ], + "LibSafeRange": [ + 66932 + ], + "ModifyingField": [ + 66324 + ], + "ModifyingIndicator": [ + 69704 + ], + "RNSToken": [ + 61873 + ], + "RNSUnified": [ + 63146 + ], + "USER_FIELDS_INDICATOR": [ + 69748 + ] + }, + "nodeType": "SourceUnit", + "src": "32:11798:89", + "nodes": [ + { + "id": 61875, + "nodeType": "PragmaDirective", + "src": "32:24:89", + "nodes": [], + "literals": [ + "solidity", + "^", + "0.8", + ".19" + ] + }, + { + "id": 61877, + "nodeType": "ImportDirective", + "src": "58:86:89", + "nodes": [], + "absolutePath": "lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol", + "file": "@openzeppelin/contracts/proxy/utils/Initializable.sol", + "nameLocation": "-1:-1:-1", + "scope": 63147, + "sourceUnit": 50241, + "symbolAliases": [ + { + "foreign": { + "id": 61876, + "name": "Initializable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50240, + "src": "67:13:89", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 61883, + "nodeType": "ImportDirective", + "src": "145:85:89", + "nodes": [], + "absolutePath": "src/RNSToken.sol", + "file": "./RNSToken.sol", + "nameLocation": "-1:-1:-1", + "scope": 63147, + "sourceUnit": 61874, + "symbolAliases": [ + { + "foreign": { + "id": 61878, + "name": "IERC721State", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 501, + "src": "154:12:89", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + }, + { + "foreign": { + "id": 61879, + "name": "IERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51456, + "src": "168:7:89", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + }, + { + "foreign": { + "id": 61880, + "name": "ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51340, + "src": "177:6:89", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + }, + { + "foreign": { + "id": 61881, + "name": "INSUnified", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65321, + "src": "185:10:89", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + }, + { + "foreign": { + "id": 61882, + "name": "RNSToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61873, + "src": "197:8:89", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 61885, + "nodeType": "ImportDirective", + "src": "231:60:89", + "nodes": [], + "absolutePath": "src/libraries/LibRNSDomain.sol", + "file": "./libraries/LibRNSDomain.sol", + "nameLocation": "-1:-1:-1", + "scope": 63147, + "sourceUnit": 66389, + "symbolAliases": [ + { + "foreign": { + "id": 61884, + "name": "LibRNSDomain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66388, + "src": "240:12:89", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 61887, + "nodeType": "ImportDirective", + "src": "292:65:89", + "nodes": [], + "absolutePath": "src/libraries/math/LibSafeRange.sol", + "file": "./libraries/math/LibSafeRange.sol", + "nameLocation": "-1:-1:-1", + "scope": 63147, + "sourceUnit": 66933, + "symbolAliases": [ + { + "foreign": { + "id": 61886, + "name": "LibSafeRange", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66932, + "src": "301:12:89", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 61890, + "nodeType": "ImportDirective", + "src": "358:86:89", + "nodes": [], + "absolutePath": "src/libraries/LibModifyingField.sol", + "file": "./libraries/LibModifyingField.sol", + "nameLocation": "-1:-1:-1", + "scope": 63147, + "sourceUnit": 66346, + "symbolAliases": [ + { + "foreign": { + "id": 61888, + "name": "ModifyingField", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66324, + "src": "367:14:89", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + }, + { + "foreign": { + "id": 61889, + "name": "LibModifyingField", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66345, + "src": "383:17:89", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 61895, + "nodeType": "ImportDirective", + "src": "445:149:89", + "nodes": [], + "absolutePath": "src/types/ModifyingIndicator.sol", + "file": "./types/ModifyingIndicator.sol", + "nameLocation": "-1:-1:-1", + "scope": 63147, + "sourceUnit": 69919, + "symbolAliases": [ + { + "foreign": { + "id": 61891, + "name": "ALL_FIELDS_INDICATOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 69760, + "src": "456:20:89", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + }, + { + "foreign": { + "id": 61892, + "name": "IMMUTABLE_FIELDS_INDICATOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 69740, + "src": "480:26:89", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + }, + { + "foreign": { + "id": 61893, + "name": "USER_FIELDS_INDICATOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 69748, + "src": "510:21:89", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + }, + { + "foreign": { + "id": 61894, + "name": "ModifyingIndicator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 69704, + "src": "535:18:89", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 63146, + "nodeType": "ContractDefinition", + "src": "596:11233:89", + "nodes": [ + { + "id": 61902, + "nodeType": "UsingForDirective", + "src": "647:30:89", + "nodes": [], + "global": false, + "libraryName": { + "id": 61900, + "name": "LibRNSDomain", + "nameLocations": [ + "653:12:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 66388, + "src": "653:12:89" + }, + "typeName": { + "id": 61901, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "670:6:89", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + } + }, + { + "id": 61906, + "nodeType": "UsingForDirective", + "src": "680:43:89", + "nodes": [], + "global": false, + "libraryName": { + "id": 61903, + "name": "LibModifyingField", + "nameLocations": [ + "686:17:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 66345, + "src": "686:17:89" + }, + "typeName": { + "id": 61905, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 61904, + "name": "ModifyingField", + "nameLocations": [ + "708:14:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 66324, + "src": "708:14:89" + }, + "referencedDeclaration": 66324, + "src": "708:14:89", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ModifyingField_$66324", + "typeString": "enum ModifyingField" + } + } + }, + { + "id": 61911, + "nodeType": "VariableDeclaration", + "src": "727:70:89", + "nodes": [], + "baseFunctions": [ + 65165 + ], + "constant": true, + "functionSelector": "092c5b3b", + "mutability": "constant", + "name": "CONTROLLER_ROLE", + "nameLocation": "751:15:89", + "scope": 63146, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 61907, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "727:7:89", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "arguments": [ + { + "hexValue": "434f4e54524f4c4c45525f524f4c45", + "id": 61909, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "779:17:89", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7b765e0e932d348852a6f810bfa1ab891e259123f02db8cdcde614c570223357", + "typeString": "literal_string \"CONTROLLER_ROLE\"" + }, + "value": "CONTROLLER_ROLE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_7b765e0e932d348852a6f810bfa1ab891e259123f02db8cdcde614c570223357", + "typeString": "literal_string \"CONTROLLER_ROLE\"" + } + ], + "id": 61908, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "769:9:89", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 61910, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "769:28:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "public" + }, + { + "id": 61916, + "nodeType": "VariableDeclaration", + "src": "801:72:89", + "nodes": [], + "baseFunctions": [ + 65177 + ], + "constant": true, + "functionSelector": "f1e37908", + "mutability": "constant", + "name": "RESERVATION_ROLE", + "nameLocation": "825:16:89", + "scope": 63146, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 61912, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "801:7:89", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "arguments": [ + { + "hexValue": "5245534552564154494f4e5f524f4c45", + "id": 61914, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "854:18:89", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_87a2b33e0b98030e29c3d23d732aa654f29b298e3891758d5f02a8b01c4840b2", + "typeString": "literal_string \"RESERVATION_ROLE\"" + }, + "value": "RESERVATION_ROLE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_87a2b33e0b98030e29c3d23d732aa654f29b298e3891758d5f02a8b01c4840b2", + "typeString": "literal_string \"RESERVATION_ROLE\"" + } + ], + "id": 61913, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "844:9:89", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 61915, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "844:29:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "public" + }, + { + "id": 61921, + "nodeType": "VariableDeclaration", + "src": "877:84:89", + "nodes": [], + "baseFunctions": [ + 65171 + ], + "constant": true, + "functionSelector": "33855d9f", + "mutability": "constant", + "name": "PROTECTED_SETTLER_ROLE", + "nameLocation": "901:22:89", + "scope": 63146, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 61917, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "877:7:89", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "arguments": [ + { + "hexValue": "50524f5445435445445f534554544c45525f524f4c45", + "id": 61919, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "936:24:89", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9e4a939112df4627ab5078e49dd57d2c45b4cffd9ae0b912f9fc355e5b108038", + "typeString": "literal_string \"PROTECTED_SETTLER_ROLE\"" + }, + "value": "PROTECTED_SETTLER_ROLE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_9e4a939112df4627ab5078e49dd57d2c45b4cffd9ae0b912f9fc355e5b108038", + "typeString": "literal_string \"PROTECTED_SETTLER_ROLE\"" + } + ], + "id": 61918, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "926:9:89", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 61920, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "926:35:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "public" + }, + { + "id": 61928, + "nodeType": "VariableDeclaration", + "src": "965:52:89", + "nodes": [], + "baseFunctions": [ + 65183 + ], + "constant": true, + "functionSelector": "b9671690", + "mutability": "constant", + "name": "MAX_EXPIRY", + "nameLocation": "988:10:89", + "scope": 63146, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 61922, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "965:6:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "value": { + "expression": { + "arguments": [ + { + "id": 61925, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1006:6:89", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + }, + "typeName": { + "id": 61924, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1006:6:89", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + } + ], + "id": 61923, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "1001:4:89", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 61926, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1001:12:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint64", + "typeString": "type(uint64)" + } + }, + "id": 61927, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "1014:3:89", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "1001:16:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "public" + }, + { + "id": 61933, + "nodeType": "VariableDeclaration", + "src": "1057:27:89", + "nodes": [], + "constant": false, + "documentation": { + "id": 61929, + "nodeType": "StructuredDocumentation", + "src": "1022:32:89", + "text": "@dev Gap for upgradeability." + }, + "mutability": "mutable", + "name": "____gap", + "nameLocation": "1077:7:89", + "scope": 63146, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$50_storage", + "typeString": "uint256[50]" + }, + "typeName": { + "baseType": { + "id": 61930, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1057:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 61932, + "length": { + "hexValue": "3530", + "id": 61931, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1065:2:89", + "typeDescriptions": { + "typeIdentifier": "t_rational_50_by_1", + "typeString": "int_const 50" + }, + "value": "50" + }, + "nodeType": "ArrayTypeName", + "src": "1057:11:89", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$50_storage_ptr", + "typeString": "uint256[50]" + } + }, + "visibility": "private" + }, + { + "id": 61935, + "nodeType": "VariableDeclaration", + "src": "1089:28:89", + "nodes": [], + "constant": false, + "mutability": "mutable", + "name": "_gracePeriod", + "nameLocation": "1105:12:89", + "scope": 63146, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 61934, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1089:6:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "id": 61941, + "nodeType": "VariableDeclaration", + "src": "1164:45:89", + "nodes": [], + "constant": false, + "documentation": { + "id": 61936, + "nodeType": "StructuredDocumentation", + "src": "1121:40:89", + "text": "@dev Mapping from token id => record" + }, + "mutability": "mutable", + "name": "_recordOf", + "nameLocation": "1200:9:89", + "scope": 63146, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Record_$65134_storage_$", + "typeString": "mapping(uint256 => struct INSUnified.Record)" + }, + "typeName": { + "id": 61940, + "keyName": "", + "keyNameLocation": "-1:-1:-1", + "keyType": { + "id": 61937, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1172:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "1164:26:89", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Record_$65134_storage_$", + "typeString": "mapping(uint256 => struct INSUnified.Record)" + }, + "valueName": "", + "valueNameLocation": "-1:-1:-1", + "valueType": { + "id": 61939, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 61938, + "name": "Record", + "nameLocations": [ + "1183:6:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65134, + "src": "1183:6:89" + }, + "referencedDeclaration": 65134, + "src": "1183:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage_ptr", + "typeString": "struct INSUnified.Record" + } + } + }, + "visibility": "internal" + }, + { + "id": 61955, + "nodeType": "ModifierDefinition", + "src": "1214:117:89", + "nodes": [], + "body": { + "id": 61954, + "nodeType": "Block", + "src": "1280:51:89", + "nodes": [], + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 61949, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61943, + "src": "1305:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 61950, + "name": "indicator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61946, + "src": "1309:9:89", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + ], + "id": 61948, + "name": "_requireAuthorized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62945, + "src": "1286:18:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_userDefinedValueType$_ModifyingIndicator_$69704_$returns$__$", + "typeString": "function (uint256,ModifyingIndicator) view" + } + }, + "id": 61951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1286:33:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 61952, + "nodeType": "ExpressionStatement", + "src": "1286:33:89" + }, + { + "id": 61953, + "nodeType": "PlaceholderStatement", + "src": "1325:1:89" + } + ] + }, + "name": "onlyAuthorized", + "nameLocation": "1223:14:89", + "parameters": { + "id": 61947, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 61943, + "mutability": "mutable", + "name": "id", + "nameLocation": "1246:2:89", + "nodeType": "VariableDeclaration", + "scope": 61955, + "src": "1238:10:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 61942, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1238:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 61946, + "mutability": "mutable", + "name": "indicator", + "nameLocation": "1269:9:89", + "nodeType": "VariableDeclaration", + "scope": 61955, + "src": "1250:28:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + }, + "typeName": { + "id": 61945, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 61944, + "name": "ModifyingIndicator", + "nameLocations": [ + "1250:18:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69704, + "src": "1250:18:89" + }, + "referencedDeclaration": 69704, + "src": "1250:18:89", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + }, + "visibility": "internal" + } + ], + "src": "1237:42:89" + }, + "virtual": false, + "visibility": "internal" + }, + { + "id": 61966, + "nodeType": "FunctionDefinition", + "src": "1335:70:89", + "nodes": [], + "body": { + "id": 61965, + "nodeType": "Block", + "src": "1372:33:89", + "nodes": [], + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 61962, + "name": "_disableInitializers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50221, + "src": "1378:20:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 61963, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1378:22:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 61964, + "nodeType": "ExpressionStatement", + "src": "1378:22:89" + } + ] + }, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "hexValue": "", + "id": 61958, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1364:2:89", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + { + "hexValue": "", + "id": 61959, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1368:2:89", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "id": 61960, + "kind": "baseConstructorSpecifier", + "modifierName": { + "id": 61957, + "name": "ERC721", + "nameLocations": [ + "1357:6:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 51340, + "src": "1357:6:89" + }, + "nodeType": "ModifierInvocation", + "src": "1357:14:89" + } + ], + "name": "", + "nameLocation": "-1:-1:-1", + "parameters": { + "id": 61956, + "nodeType": "ParameterList", + "parameters": [], + "src": "1346:2:89" + }, + "returnParameters": { + "id": 61961, + "nodeType": "ParameterList", + "parameters": [], + "src": "1372:0:89" + }, + "scope": 63146, + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "id": 62042, + "nodeType": "FunctionDefinition", + "src": "1409:636:89", + "nodes": [], + "body": { + "id": 62041, + "nodeType": "Block", + "src": "1605:440:89", + "nodes": [], + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 61984, + "name": "DEFAULT_ADMIN_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48554, + "src": "1622:18:89", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 61985, + "name": "admin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61968, + "src": "1642:5:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 61983, + "name": "_grantRole", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 48942 + ], + "referencedDeclaration": 48942, + "src": "1611:10:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 61986, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1611:37:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 61987, + "nodeType": "ExpressionStatement", + "src": "1611:37:89" + }, + { + "expression": { + "arguments": [ + { + "id": 61989, + "name": "PAUSER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61638, + "src": "1665:11:89", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 61990, + "name": "pauser", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61970, + "src": "1678:6:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 61988, + "name": "_grantRole", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 48942 + ], + "referencedDeclaration": 48942, + "src": "1654:10:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 61991, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1654:31:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 61992, + "nodeType": "ExpressionStatement", + "src": "1654:31:89" + }, + { + "expression": { + "arguments": [ + { + "id": 61994, + "name": "CONTROLLER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61911, + "src": "1702:15:89", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 61995, + "name": "controller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61972, + "src": "1719:10:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 61993, + "name": "_grantRole", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 48942 + ], + "referencedDeclaration": 48942, + "src": "1691:10:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 61996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1691:39:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 61997, + "nodeType": "ExpressionStatement", + "src": "1691:39:89" + }, + { + "expression": { + "arguments": [ + { + "id": 61999, + "name": "PROTECTED_SETTLER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61921, + "src": "1747:22:89", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 62000, + "name": "protectedSettler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61974, + "src": "1771:16:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 61998, + "name": "_grantRole", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 48942 + ], + "referencedDeclaration": 48942, + "src": "1736:10:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 62001, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1736:52:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 62002, + "nodeType": "ExpressionStatement", + "src": "1736:52:89" + }, + { + "expression": { + "arguments": [ + { + "id": 62004, + "name": "baseTokenURI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61978, + "src": "1807:12:89", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + ], + "id": 62003, + "name": "_setBaseURI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61835, + "src": "1795:11:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_string_calldata_ptr_$returns$__$", + "typeString": "function (string calldata)" + } + }, + "id": 62005, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1795:25:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 62006, + "nodeType": "ExpressionStatement", + "src": "1795:25:89" + }, + { + "expression": { + "arguments": [ + { + "id": 62008, + "name": "gracePeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61976, + "src": "1842:11:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 62007, + "name": "_setGracePeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63034, + "src": "1826:15:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint64_$returns$__$", + "typeString": "function (uint64)" + } + }, + "id": 62009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1826:28:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 62010, + "nodeType": "ExpressionStatement", + "src": "1826:28:89" + }, + { + "expression": { + "arguments": [ + { + "id": 62012, + "name": "admin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61968, + "src": "1867:5:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "307830", + "id": 62013, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1874:3:89", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 62011, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 61818 + ], + "referencedDeclaration": 61818, + "src": "1861:5:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 62014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1861:17:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 62015, + "nodeType": "ExpressionStatement", + "src": "1861:17:89" + }, + { + "assignments": [ + 62018 + ], + "declarations": [ + { + "constant": false, + "id": 62018, + "mutability": "mutable", + "name": "record", + "nameLocation": "1898:6:89", + "nodeType": "VariableDeclaration", + "scope": 62041, + "src": "1884:20:89", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record" + }, + "typeName": { + "id": 62017, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 62016, + "name": "Record", + "nameLocations": [ + "1884:6:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65134, + "src": "1884:6:89" + }, + "referencedDeclaration": 65134, + "src": "1884:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage_ptr", + "typeString": "struct INSUnified.Record" + } + }, + "visibility": "internal" + } + ], + "id": 62019, + "nodeType": "VariableDeclarationStatement", + "src": "1884:20:89" + }, + { + "expression": { + "id": 62030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "expression": { + "baseExpression": { + "id": 62020, + "name": "_recordOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61941, + "src": "1910:9:89", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Record_$65134_storage_$", + "typeString": "mapping(uint256 => struct INSUnified.Record storage ref)" + } + }, + "id": 62022, + "indexExpression": { + "hexValue": "307830", + "id": 62021, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1920:3:89", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1910:14:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage", + "typeString": "struct INSUnified.Record storage ref" + } + }, + "id": 62023, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1925:3:89", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65133, + "src": "1910:18:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_storage", + "typeString": "struct INSUnified.MutableRecord storage ref" + } + }, + "id": 62024, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "1929:6:89", + "memberName": "expiry", + "nodeType": "MemberAccess", + "referencedDeclaration": 65124, + "src": "1910:25:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 62029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "expression": { + "id": 62025, + "name": "record", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62018, + "src": "1938:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + }, + "id": 62026, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1945:3:89", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65133, + "src": "1938:10:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_memory_ptr", + "typeString": "struct INSUnified.MutableRecord memory" + } + }, + "id": 62027, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "1949:6:89", + "memberName": "expiry", + "nodeType": "MemberAccess", + "referencedDeclaration": 65124, + "src": "1938:17:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 62028, + "name": "MAX_EXPIRY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61928, + "src": "1958:10:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "1938:30:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "1910:58:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 62031, + "nodeType": "ExpressionStatement", + "src": "1910:58:89" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "307830", + "id": 62033, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1993:3:89", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 62034, + "name": "ModifyingField", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66324, + "src": "1998:14:89", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ModifyingField_$66324_$", + "typeString": "type(enum ModifyingField)" + } + }, + "id": 62035, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "2013:6:89", + "memberName": "Expiry", + "nodeType": "MemberAccess", + "referencedDeclaration": 66322, + "src": "1998:21:89", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ModifyingField_$66324", + "typeString": "enum ModifyingField" + } + }, + "id": 62036, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2020:9:89", + "memberName": "indicator", + "nodeType": "MemberAccess", + "referencedDeclaration": 66344, + "src": "1998:31:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_ModifyingField_$66324_$returns$_t_userDefinedValueType$_ModifyingIndicator_$69704_$attached_to$_t_enum$_ModifyingField_$66324_$", + "typeString": "function (enum ModifyingField) pure returns (ModifyingIndicator)" + } + }, + "id": 62037, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1998:33:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + }, + { + "id": 62038, + "name": "record", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62018, + "src": "2033:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + }, + { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + ], + "id": 62032, + "name": "RecordUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65159, + "src": "1979:13:89", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_userDefinedValueType$_ModifyingIndicator_$69704_$_t_struct$_Record_$65134_memory_ptr_$returns$__$", + "typeString": "function (uint256,ModifyingIndicator,struct INSUnified.Record memory)" + } + }, + "id": 62039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1979:61:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 62040, + "nodeType": "EmitStatement", + "src": "1974:66:89" + } + ] + }, + "functionSelector": "abfaf005", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 61981, + "kind": "modifierInvocation", + "modifierName": { + "id": 61980, + "name": "initializer", + "nameLocations": [ + "1593:11:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 50142, + "src": "1593:11:89" + }, + "nodeType": "ModifierInvocation", + "src": "1593:11:89" + } + ], + "name": "initialize", + "nameLocation": "1418:10:89", + "parameters": { + "id": 61979, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 61968, + "mutability": "mutable", + "name": "admin", + "nameLocation": "1442:5:89", + "nodeType": "VariableDeclaration", + "scope": 62042, + "src": "1434:13:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 61967, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1434:7:89", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 61970, + "mutability": "mutable", + "name": "pauser", + "nameLocation": "1461:6:89", + "nodeType": "VariableDeclaration", + "scope": 62042, + "src": "1453:14:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 61969, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1453:7:89", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 61972, + "mutability": "mutable", + "name": "controller", + "nameLocation": "1481:10:89", + "nodeType": "VariableDeclaration", + "scope": 62042, + "src": "1473:18:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 61971, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1473:7:89", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 61974, + "mutability": "mutable", + "name": "protectedSettler", + "nameLocation": "1505:16:89", + "nodeType": "VariableDeclaration", + "scope": 62042, + "src": "1497:24:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 61973, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1497:7:89", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 61976, + "mutability": "mutable", + "name": "gracePeriod", + "nameLocation": "1534:11:89", + "nodeType": "VariableDeclaration", + "scope": 62042, + "src": "1527:18:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 61975, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1527:6:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 61978, + "mutability": "mutable", + "name": "baseTokenURI", + "nameLocation": "1567:12:89", + "nodeType": "VariableDeclaration", + "scope": 62042, + "src": "1551:28:89", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 61977, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1551:6:89", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "1428:155:89" + }, + "returnParameters": { + "id": 61982, + "nodeType": "ParameterList", + "parameters": [], + "src": "1605:0:89" + }, + "scope": 63146, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 62062, + "nodeType": "FunctionDefinition", + "src": "2078:137:89", + "nodes": [], + "body": { + "id": 62061, + "nodeType": "Block", + "src": "2136:79:89", + "nodes": [], + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 62059, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 62050, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "2149:5:89", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 62051, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2155:9:89", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "2149:15:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 62055, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62045, + "src": "2192:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 62054, + "name": "_expiry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62855, + "src": "2184:7:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint64_$", + "typeString": "function (uint256) view returns (uint64)" + } + }, + "id": 62056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2184:11:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 62057, + "name": "_gracePeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61935, + "src": "2197:12:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "expression": { + "id": 62052, + "name": "LibSafeRange", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66932, + "src": "2167:12:89", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_LibSafeRange_$66932_$", + "typeString": "type(library LibSafeRange)" + } + }, + "id": 62053, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2180:3:89", + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 66895, + "src": "2167:16:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 62058, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2167:43:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2149:61:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 62049, + "id": 62060, + "nodeType": "Return", + "src": "2142:68:89" + } + ] + }, + "baseFunctions": [ + 65199 + ], + "documentation": { + "id": 62043, + "nodeType": "StructuredDocumentation", + "src": "2049:26:89", + "text": "@inheritdoc INSUnified" + }, + "functionSelector": "96e494e8", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "available", + "nameLocation": "2087:9:89", + "parameters": { + "id": 62046, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62045, + "mutability": "mutable", + "name": "id", + "nameLocation": "2105:2:89", + "nodeType": "VariableDeclaration", + "scope": 62062, + "src": "2097:10:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62044, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2097:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2096:12:89" + }, + "returnParameters": { + "id": 62049, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62048, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 62062, + "src": "2130:4:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 62047, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2130:4:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2129:6:89" + }, + "scope": 63146, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "id": 62071, + "nodeType": "FunctionDefinition", + "src": "2248:87:89", + "nodes": [], + "body": { + "id": 62070, + "nodeType": "Block", + "src": "2305:30:89", + "nodes": [], + "statements": [ + { + "expression": { + "id": 62068, + "name": "_gracePeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61935, + "src": "2318:12:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 62067, + "id": 62069, + "nodeType": "Return", + "src": "2311:19:89" + } + ] + }, + "baseFunctions": [ + 65205 + ], + "documentation": { + "id": 62063, + "nodeType": "StructuredDocumentation", + "src": "2219:26:89", + "text": "@inheritdoc INSUnified" + }, + "functionSelector": "dbd18388", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getGracePeriod", + "nameLocation": "2257:14:89", + "parameters": { + "id": 62064, + "nodeType": "ParameterList", + "parameters": [], + "src": "2271:2:89" + }, + "returnParameters": { + "id": 62067, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62066, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 62071, + "src": "2297:6:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 62065, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2297:6:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "2296:8:89" + }, + "scope": 63146, + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "id": 62087, + "nodeType": "FunctionDefinition", + "src": "2368:132:89", + "nodes": [], + "body": { + "id": 62086, + "nodeType": "Block", + "src": "2461:39:89", + "nodes": [], + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 62083, + "name": "gracePeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62074, + "src": "2483:11:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 62082, + "name": "_setGracePeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63034, + "src": "2467:15:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint64_$returns$__$", + "typeString": "function (uint64)" + } + }, + "id": 62084, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2467:28:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 62085, + "nodeType": "ExpressionStatement", + "src": "2467:28:89" + } + ] + }, + "baseFunctions": [ + 65217 + ], + "documentation": { + "id": 62072, + "nodeType": "StructuredDocumentation", + "src": "2339:26:89", + "text": "@inheritdoc INSUnified" + }, + "functionSelector": "55a5133b", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 62077, + "kind": "modifierInvocation", + "modifierName": { + "id": 62076, + "name": "whenNotPaused", + "nameLocations": [ + "2421:13:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 50275, + "src": "2421:13:89" + }, + "nodeType": "ModifierInvocation", + "src": "2421:13:89" + }, + { + "arguments": [ + { + "id": 62079, + "name": "CONTROLLER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61911, + "src": "2444:15:89", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 62080, + "kind": "modifierInvocation", + "modifierName": { + "id": 62078, + "name": "onlyRole", + "nameLocations": [ + "2435:8:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 48565, + "src": "2435:8:89" + }, + "nodeType": "ModifierInvocation", + "src": "2435:25:89" + } + ], + "name": "setGracePeriod", + "nameLocation": "2377:14:89", + "parameters": { + "id": 62075, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62074, + "mutability": "mutable", + "name": "gracePeriod", + "nameLocation": "2399:11:89", + "nodeType": "VariableDeclaration", + "scope": 62087, + "src": "2392:18:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 62073, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2392:6:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "2391:20:89" + }, + "returnParameters": { + "id": 62081, + "nodeType": "ParameterList", + "parameters": [], + "src": "2461:0:89" + }, + "scope": 63146, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 62212, + "nodeType": "FunctionDefinition", + "src": "2533:972:89", + "nodes": [], + "body": { + "id": 62211, + "nodeType": "Block", + "src": "2715:790:89", + "nodes": [], + "statements": [ + { + "condition": { + "id": 62112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2725:41:89", + "subExpression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 62108, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 52298, + "src": "2743:10:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 62109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2743:12:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 62110, + "name": "parentId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62090, + "src": "2757:8:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 62107, + "name": "_checkOwnerRules", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62919, + "src": "2726:16:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) view returns (bool)" + } + }, + "id": 62111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2726:40:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 62116, + "nodeType": "IfStatement", + "src": "2721:68:89", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 62113, + "name": "Unauthorized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65094, + "src": "2775:12:89", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 62114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2775:14:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 62115, + "nodeType": "RevertStatement", + "src": "2768:21:89" + } + }, + { + "expression": { + "id": 62123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 62117, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62105, + "src": "2795:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 62120, + "name": "parentId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62090, + "src": "2818:8:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 62121, + "name": "label", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62092, + "src": "2828:5:89", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + ], + "expression": { + "id": 62118, + "name": "LibRNSDomain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66388, + "src": "2800:12:89", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_LibRNSDomain_$66388_$", + "typeString": "type(library LibRNSDomain)" + } + }, + "id": 62119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2813:4:89", + "memberName": "toId", + "nodeType": "MemberAccess", + "referencedDeclaration": 66367, + "src": "2800:17:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (uint256,string memory) pure returns (uint256)" + } + }, + "id": 62122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2800:34:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2795:39:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 62124, + "nodeType": "ExpressionStatement", + "src": "2795:39:89" + }, + { + "condition": { + "id": 62128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2844:14:89", + "subExpression": { + "arguments": [ + { + "id": 62126, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62105, + "src": "2855:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 62125, + "name": "available", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62062, + "src": "2845:9:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 62127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2845:13:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 62132, + "nodeType": "IfStatement", + "src": "2840:40:89", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 62129, + "name": "Unavailable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65091, + "src": "2867:11:89", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 62130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2867:13:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 62131, + "nodeType": "RevertStatement", + "src": "2860:20:89" + } + }, + { + "condition": { + "arguments": [ + { + "id": 62134, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62105, + "src": "2899:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 62133, + "name": "_exists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50859, + "src": "2891:7:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 62135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2891:11:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 62140, + "nodeType": "IfStatement", + "src": "2887:26:89", + "trueBody": { + "expression": { + "arguments": [ + { + "id": 62137, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62105, + "src": "2910:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 62136, + "name": "_burn", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 63145 + ], + "referencedDeclaration": 63145, + "src": "2904:5:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 62138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2904:9:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 62139, + "nodeType": "ExpressionStatement", + "src": "2904:9:89" + } + }, + { + "expression": { + "arguments": [ + { + "id": 62142, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62096, + "src": "2925:5:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 62143, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62105, + "src": "2932:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 62141, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 61818 + ], + "referencedDeclaration": 61818, + "src": "2919:5:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 62144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2919:16:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 62145, + "nodeType": "ExpressionStatement", + "src": "2919:16:89" + }, + { + "expression": { + "id": 62157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 62146, + "name": "expiryTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62103, + "src": "2942:10:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "id": 62151, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "2993:5:89", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 62152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2999:9:89", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "2993:15:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 62153, + "name": "duration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62098, + "src": "3010:8:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 62154, + "name": "MAX_EXPIRY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61928, + "src": "3020:10:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "expression": { + "id": 62149, + "name": "LibSafeRange", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66932, + "src": "2962:12:89", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_LibSafeRange_$66932_$", + "typeString": "type(library LibSafeRange)" + } + }, + "id": 62150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2975:17:89", + "memberName": "addWithUpperbound", + "nodeType": "MemberAccess", + "referencedDeclaration": 66931, + "src": "2962:30:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" + } + }, + "id": 62155, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2962:69:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 62148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2955:6:89", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + }, + "typeName": { + "id": 62147, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2955:6:89", + "typeDescriptions": {} + } + }, + "id": 62156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2955:77:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "2942:90:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 62158, + "nodeType": "ExpressionStatement", + "src": "2942:90:89" + }, + { + "expression": { + "arguments": [ + { + "id": 62160, + "name": "parentId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62090, + "src": "3058:8:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 62161, + "name": "expiryTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62103, + "src": "3068:10:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 62159, + "name": "_requireValidExpiry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62965, + "src": "3038:19:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint64_$returns$__$", + "typeString": "function (uint256,uint64) view" + } + }, + "id": 62162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3038:41:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 62163, + "nodeType": "ExpressionStatement", + "src": "3038:41:89" + }, + { + "assignments": [ + 62166 + ], + "declarations": [ + { + "constant": false, + "id": 62166, + "mutability": "mutable", + "name": "record", + "nameLocation": "3099:6:89", + "nodeType": "VariableDeclaration", + "scope": 62211, + "src": "3085:20:89", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record" + }, + "typeName": { + "id": 62165, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 62164, + "name": "Record", + "nameLocations": [ + "3085:6:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65134, + "src": "3085:6:89" + }, + "referencedDeclaration": 65134, + "src": "3085:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage_ptr", + "typeString": "struct INSUnified.Record" + } + }, + "visibility": "internal" + } + ], + "id": 62167, + "nodeType": "VariableDeclarationStatement", + "src": "3085:20:89" + }, + { + "expression": { + "id": 62181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 62168, + "name": "record", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62166, + "src": "3165:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + }, + "id": 62170, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "3172:3:89", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65133, + "src": "3165:10:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_memory_ptr", + "typeString": "struct INSUnified.MutableRecord memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 62172, + "name": "resolver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62094, + "src": "3210:8:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 62173, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62096, + "src": "3227:5:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 62174, + "name": "expiryTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62103, + "src": "3242:10:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "expression": { + "expression": { + "baseExpression": { + "id": 62175, + "name": "_recordOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61941, + "src": "3265:9:89", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Record_$65134_storage_$", + "typeString": "mapping(uint256 => struct INSUnified.Record storage ref)" + } + }, + "id": 62177, + "indexExpression": { + "id": 62176, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62105, + "src": "3275:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3265:13:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage", + "typeString": "struct INSUnified.Record storage ref" + } + }, + "id": 62178, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3279:3:89", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65133, + "src": "3265:17:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_storage", + "typeString": "struct INSUnified.MutableRecord storage ref" + } + }, + "id": 62179, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3283:9:89", + "memberName": "protected", + "nodeType": "MemberAccess", + "referencedDeclaration": 65126, + "src": "3265:27:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 62171, + "name": "MutableRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65127, + "src": "3184:13:89", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_MutableRecord_$65127_storage_ptr_$", + "typeString": "type(struct INSUnified.MutableRecord storage pointer)" + } + }, + "id": 62180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "nameLocations": [ + "3200:8:89", + "3220:5:89", + "3234:6:89", + "3254:9:89" + ], + "names": [ + "resolver", + "owner", + "expiry", + "protected" + ], + "nodeType": "FunctionCall", + "src": "3184:111:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_memory_ptr", + "typeString": "struct INSUnified.MutableRecord memory" + } + }, + "src": "3165:130:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_memory_ptr", + "typeString": "struct INSUnified.MutableRecord memory" + } + }, + "id": 62182, + "nodeType": "ExpressionStatement", + "src": "3165:130:89" + }, + { + "expression": { + "id": 62197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 62183, + "name": "record", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62166, + "src": "3301:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + }, + "id": 62185, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "3308:5:89", + "memberName": "immut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65130, + "src": "3301:12:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ImmutableRecord_$65117_memory_ptr", + "typeString": "struct INSUnified.ImmutableRecord memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 62193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "baseExpression": { + "id": 62187, + "name": "_recordOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61941, + "src": "3341:9:89", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Record_$65134_storage_$", + "typeString": "mapping(uint256 => struct INSUnified.Record storage ref)" + } + }, + "id": 62189, + "indexExpression": { + "id": 62188, + "name": "parentId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62090, + "src": "3351:8:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3341:19:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage", + "typeString": "struct INSUnified.Record storage ref" + } + }, + "id": 62190, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3361:5:89", + "memberName": "immut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65130, + "src": "3341:25:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ImmutableRecord_$65117_storage", + "typeString": "struct INSUnified.ImmutableRecord storage ref" + } + }, + "id": 62191, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3367:5:89", + "memberName": "depth", + "nodeType": "MemberAccess", + "referencedDeclaration": 65112, + "src": "3341:31:89", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "31", + "id": 62192, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3375:1:89", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3341:35:89", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 62194, + "name": "parentId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62090, + "src": "3388:8:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 62195, + "name": "label", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62092, + "src": "3405:5:89", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + ], + "id": 62186, + "name": "ImmutableRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65117, + "src": "3316:15:89", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_ImmutableRecord_$65117_storage_ptr_$", + "typeString": "type(struct INSUnified.ImmutableRecord storage pointer)" + } + }, + "id": 62196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "nameLocations": [ + "3334:5:89", + "3378:8:89", + "3398:5:89" + ], + "names": [ + "depth", + "parentId", + "label" + ], + "nodeType": "FunctionCall", + "src": "3316:97:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ImmutableRecord_$65117_memory_ptr", + "typeString": "struct INSUnified.ImmutableRecord memory" + } + }, + "src": "3301:112:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ImmutableRecord_$65117_memory_ptr", + "typeString": "struct INSUnified.ImmutableRecord memory" + } + }, + "id": 62198, + "nodeType": "ExpressionStatement", + "src": "3301:112:89" + }, + { + "expression": { + "id": 62203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 62199, + "name": "_recordOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61941, + "src": "3420:9:89", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Record_$65134_storage_$", + "typeString": "mapping(uint256 => struct INSUnified.Record storage ref)" + } + }, + "id": 62201, + "indexExpression": { + "id": 62200, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62105, + "src": "3430:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3420:13:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage", + "typeString": "struct INSUnified.Record storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 62202, + "name": "record", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62166, + "src": "3436:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + }, + "src": "3420:22:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage", + "typeString": "struct INSUnified.Record storage ref" + } + }, + "id": 62204, + "nodeType": "ExpressionStatement", + "src": "3420:22:89" + }, + { + "eventCall": { + "arguments": [ + { + "id": 62206, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62105, + "src": "3467:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 62207, + "name": "ALL_FIELDS_INDICATOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 69760, + "src": "3471:20:89", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + }, + { + "id": 62208, + "name": "record", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62166, + "src": "3493:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + }, + { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + ], + "id": 62205, + "name": "RecordUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65159, + "src": "3453:13:89", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_userDefinedValueType$_ModifyingIndicator_$69704_$_t_struct$_Record_$65134_memory_ptr_$returns$__$", + "typeString": "function (uint256,ModifyingIndicator,struct INSUnified.Record memory)" + } + }, + "id": 62209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3453:47:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 62210, + "nodeType": "EmitStatement", + "src": "3448:52:89" + } + ] + }, + "baseFunctions": [ + 65241 + ], + "documentation": { + "id": 62088, + "nodeType": "StructuredDocumentation", + "src": "2504:26:89", + "text": "@inheritdoc INSUnified" + }, + "functionSelector": "0570891f", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 62101, + "kind": "modifierInvocation", + "modifierName": { + "id": 62100, + "name": "whenNotPaused", + "nameLocations": [ + "2655:13:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 50275, + "src": "2655:13:89" + }, + "nodeType": "ModifierInvocation", + "src": "2655:13:89" + } + ], + "name": "mint", + "nameLocation": "2542:4:89", + "parameters": { + "id": 62099, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62090, + "mutability": "mutable", + "name": "parentId", + "nameLocation": "2555:8:89", + "nodeType": "VariableDeclaration", + "scope": 62212, + "src": "2547:16:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62089, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2547:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 62092, + "mutability": "mutable", + "name": "label", + "nameLocation": "2581:5:89", + "nodeType": "VariableDeclaration", + "scope": 62212, + "src": "2565:21:89", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 62091, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2565:6:89", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 62094, + "mutability": "mutable", + "name": "resolver", + "nameLocation": "2596:8:89", + "nodeType": "VariableDeclaration", + "scope": 62212, + "src": "2588:16:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 62093, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2588:7:89", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 62096, + "mutability": "mutable", + "name": "owner", + "nameLocation": "2614:5:89", + "nodeType": "VariableDeclaration", + "scope": 62212, + "src": "2606:13:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 62095, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2606:7:89", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 62098, + "mutability": "mutable", + "name": "duration", + "nameLocation": "2628:8:89", + "nodeType": "VariableDeclaration", + "scope": 62212, + "src": "2621:15:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 62097, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2621:6:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "2546:91:89" + }, + "returnParameters": { + "id": 62106, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62103, + "mutability": "mutable", + "name": "expiryTime", + "nameLocation": "2689:10:89", + "nodeType": "VariableDeclaration", + "scope": 62212, + "src": "2682:17:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 62102, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2682:6:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 62105, + "mutability": "mutable", + "name": "id", + "nameLocation": "2709:2:89", + "nodeType": "VariableDeclaration", + "scope": 62212, + "src": "2701:10:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62104, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2701:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2681:31:89" + }, + "scope": 63146, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 62227, + "nodeType": "FunctionDefinition", + "src": "3538:108:89", + "nodes": [], + "body": { + "id": 62226, + "nodeType": "Block", + "src": "3612:34:89", + "nodes": [], + "statements": [ + { + "expression": { + "id": 62224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 62220, + "name": "hashed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62218, + "src": "3618:6:89", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 62221, + "name": "str", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62215, + "src": "3627:3:89", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "id": 62222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3631:8:89", + "memberName": "namehash", + "nodeType": "MemberAccess", + "referencedDeclaration": 66387, + "src": "3627:12:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_bytes32_$attached_to$_t_string_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes32)" + } + }, + "id": 62223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3627:14:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "3618:23:89", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 62225, + "nodeType": "ExpressionStatement", + "src": "3618:23:89" + } + ] + }, + "baseFunctions": [ + 65191 + ], + "documentation": { + "id": 62213, + "nodeType": "StructuredDocumentation", + "src": "3509:26:89", + "text": "@inheritdoc INSUnified" + }, + "functionSelector": "09879962", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "namehash", + "nameLocation": "3547:8:89", + "parameters": { + "id": 62216, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62215, + "mutability": "mutable", + "name": "str", + "nameLocation": "3570:3:89", + "nodeType": "VariableDeclaration", + "scope": 62227, + "src": "3556:17:89", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 62214, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3556:6:89", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "3555:19:89" + }, + "returnParameters": { + "id": 62219, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62218, + "mutability": "mutable", + "name": "hashed", + "nameLocation": "3604:6:89", + "nodeType": "VariableDeclaration", + "scope": 62227, + "src": "3596:14:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 62217, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3596:7:89", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3595:16:89" + }, + "scope": 63146, + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "id": 62253, + "nodeType": "FunctionDefinition", + "src": "3679:146:89", + "nodes": [], + "body": { + "id": 62252, + "nodeType": "Block", + "src": "3755:70:89", + "nodes": [], + "statements": [ + { + "expression": { + "id": 62240, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 62236, + "name": "record", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62234, + "src": "3761:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "baseExpression": { + "id": 62237, + "name": "_recordOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61941, + "src": "3770:9:89", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Record_$65134_storage_$", + "typeString": "mapping(uint256 => struct INSUnified.Record storage ref)" + } + }, + "id": 62239, + "indexExpression": { + "id": 62238, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62230, + "src": "3780:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3770:13:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage", + "typeString": "struct INSUnified.Record storage ref" + } + }, + "src": "3761:22:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + }, + "id": 62241, + "nodeType": "ExpressionStatement", + "src": "3761:22:89" + }, + { + "expression": { + "id": 62250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "expression": { + "id": 62242, + "name": "record", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62234, + "src": "3789:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + }, + "id": 62245, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3796:3:89", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65133, + "src": "3789:10:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_memory_ptr", + "typeString": "struct INSUnified.MutableRecord memory" + } + }, + "id": 62246, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "3800:6:89", + "memberName": "expiry", + "nodeType": "MemberAccess", + "referencedDeclaration": 65124, + "src": "3789:17:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 62248, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62230, + "src": "3817:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 62247, + "name": "_expiry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62855, + "src": "3809:7:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint64_$", + "typeString": "function (uint256) view returns (uint64)" + } + }, + "id": 62249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3809:11:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "3789:31:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 62251, + "nodeType": "ExpressionStatement", + "src": "3789:31:89" + } + ] + }, + "baseFunctions": [ + 65250 + ], + "documentation": { + "id": 62228, + "nodeType": "StructuredDocumentation", + "src": "3650:26:89", + "text": "@inheritdoc INSUnified" + }, + "functionSelector": "03e9e609", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getRecord", + "nameLocation": "3688:9:89", + "parameters": { + "id": 62231, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62230, + "mutability": "mutable", + "name": "id", + "nameLocation": "3706:2:89", + "nodeType": "VariableDeclaration", + "scope": 62253, + "src": "3698:10:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62229, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3698:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3697:12:89" + }, + "returnParameters": { + "id": 62235, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62234, + "mutability": "mutable", + "name": "record", + "nameLocation": "3747:6:89", + "nodeType": "VariableDeclaration", + "scope": 62253, + "src": "3733:20:89", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record" + }, + "typeName": { + "id": 62233, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 62232, + "name": "Record", + "nameLocations": [ + "3733:6:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65134, + "src": "3733:6:89" + }, + "referencedDeclaration": 65134, + "src": "3733:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage_ptr", + "typeString": "struct INSUnified.Record" + } + }, + "visibility": "internal" + } + ], + "src": "3732:22:89" + }, + "scope": 63146, + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "id": 62314, + "nodeType": "FunctionDefinition", + "src": "3858:376:89", + "nodes": [], + "body": { + "id": 62313, + "nodeType": "Block", + "src": "3934:300:89", + "nodes": [], + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 62263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 62261, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62256, + "src": "3944:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 62262, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3950:1:89", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3944:7:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 62266, + "nodeType": "IfStatement", + "src": "3940:22:89", + "trueBody": { + "expression": { + "hexValue": "", + "id": 62264, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3960:2:89", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + "functionReturnParameters": 62260, + "id": 62265, + "nodeType": "Return", + "src": "3953:9:89" + } + }, + { + "assignments": [ + 62269 + ], + "declarations": [ + { + "constant": false, + "id": 62269, + "mutability": "mutable", + "name": "sRecord", + "nameLocation": "3993:7:89", + "nodeType": "VariableDeclaration", + "scope": 62313, + "src": "3969:31:89", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ImmutableRecord_$65117_storage_ptr", + "typeString": "struct INSUnified.ImmutableRecord" + }, + "typeName": { + "id": 62268, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 62267, + "name": "ImmutableRecord", + "nameLocations": [ + "3969:15:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65117, + "src": "3969:15:89" + }, + "referencedDeclaration": 65117, + "src": "3969:15:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ImmutableRecord_$65117_storage_ptr", + "typeString": "struct INSUnified.ImmutableRecord" + } + }, + "visibility": "internal" + } + ], + "id": 62274, + "initialValue": { + "expression": { + "baseExpression": { + "id": 62270, + "name": "_recordOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61941, + "src": "4003:9:89", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Record_$65134_storage_$", + "typeString": "mapping(uint256 => struct INSUnified.Record storage ref)" + } + }, + "id": 62272, + "indexExpression": { + "id": 62271, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62256, + "src": "4013:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4003:13:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage", + "typeString": "struct INSUnified.Record storage ref" + } + }, + "id": 62273, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4017:5:89", + "memberName": "immut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65130, + "src": "4003:19:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ImmutableRecord_$65117_storage", + "typeString": "struct INSUnified.ImmutableRecord storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3969:53:89" + }, + { + "expression": { + "id": 62278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 62275, + "name": "domain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62259, + "src": "4028:6:89", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 62276, + "name": "sRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62269, + "src": "4037:7:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ImmutableRecord_$65117_storage_ptr", + "typeString": "struct INSUnified.ImmutableRecord storage pointer" + } + }, + "id": 62277, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4045:5:89", + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 65116, + "src": "4037:13:89", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "src": "4028:22:89", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "id": 62279, + "nodeType": "ExpressionStatement", + "src": "4028:22:89" + }, + { + "expression": { + "id": 62283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 62280, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62256, + "src": "4056:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 62281, + "name": "sRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62269, + "src": "4061:7:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ImmutableRecord_$65117_storage_ptr", + "typeString": "struct INSUnified.ImmutableRecord storage pointer" + } + }, + "id": 62282, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4069:8:89", + "memberName": "parentId", + "nodeType": "MemberAccess", + "referencedDeclaration": 65114, + "src": "4061:16:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4056:21:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 62284, + "nodeType": "ExpressionStatement", + "src": "4056:21:89" + }, + { + "body": { + "id": 62311, + "nodeType": "Block", + "src": "4099:131:89", + "statements": [ + { + "expression": { + "id": 62293, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 62288, + "name": "sRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62269, + "src": "4107:7:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ImmutableRecord_$65117_storage_ptr", + "typeString": "struct INSUnified.ImmutableRecord storage pointer" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "baseExpression": { + "id": 62289, + "name": "_recordOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61941, + "src": "4117:9:89", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Record_$65134_storage_$", + "typeString": "mapping(uint256 => struct INSUnified.Record storage ref)" + } + }, + "id": 62291, + "indexExpression": { + "id": 62290, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62256, + "src": "4127:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4117:13:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage", + "typeString": "struct INSUnified.Record storage ref" + } + }, + "id": 62292, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4131:5:89", + "memberName": "immut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65130, + "src": "4117:19:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ImmutableRecord_$65117_storage", + "typeString": "struct INSUnified.ImmutableRecord storage ref" + } + }, + "src": "4107:29:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ImmutableRecord_$65117_storage_ptr", + "typeString": "struct INSUnified.ImmutableRecord storage pointer" + } + }, + "id": 62294, + "nodeType": "ExpressionStatement", + "src": "4107:29:89" + }, + { + "expression": { + "id": 62304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 62295, + "name": "domain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62259, + "src": "4144:6:89", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 62299, + "name": "domain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62259, + "src": "4167:6:89", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "hexValue": "2e", + "id": 62300, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4175:3:89", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6f010af653ebe3cb07d297a4ef13366103d392ceffa68dd48232e6e9ff2187bf", + "typeString": "literal_string \".\"" + }, + "value": "." + }, + { + "expression": { + "id": 62301, + "name": "sRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62269, + "src": "4180:7:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ImmutableRecord_$65117_storage_ptr", + "typeString": "struct INSUnified.ImmutableRecord storage pointer" + } + }, + "id": 62302, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4188:5:89", + "memberName": "label", + "nodeType": "MemberAccess", + "referencedDeclaration": 65116, + "src": "4180:13:89", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_stringliteral_6f010af653ebe3cb07d297a4ef13366103d392ceffa68dd48232e6e9ff2187bf", + "typeString": "literal_string \".\"" + }, + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "expression": { + "id": 62297, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4153:6:89", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 62296, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4153:6:89", + "typeDescriptions": {} + } + }, + "id": 62298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4160:6:89", + "memberName": "concat", + "nodeType": "MemberAccess", + "src": "4153:13:89", + "typeDescriptions": { + "typeIdentifier": "t_function_stringconcat_pure$__$returns$_t_string_memory_ptr_$", + "typeString": "function () pure returns (string memory)" + } + }, + "id": 62303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4153:41:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "4144:50:89", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "id": 62305, + "nodeType": "ExpressionStatement", + "src": "4144:50:89" + }, + { + "expression": { + "id": 62309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 62306, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62256, + "src": "4202:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 62307, + "name": "sRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62269, + "src": "4207:7:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ImmutableRecord_$65117_storage_ptr", + "typeString": "struct INSUnified.ImmutableRecord storage pointer" + } + }, + "id": 62308, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4215:8:89", + "memberName": "parentId", + "nodeType": "MemberAccess", + "referencedDeclaration": 65114, + "src": "4207:16:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4202:21:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 62310, + "nodeType": "ExpressionStatement", + "src": "4202:21:89" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 62287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 62285, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62256, + "src": "4090:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 62286, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4096:1:89", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4090:7:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 62312, + "nodeType": "WhileStatement", + "src": "4083:147:89" + } + ] + }, + "baseFunctions": [ + 65258 + ], + "documentation": { + "id": 62254, + "nodeType": "StructuredDocumentation", + "src": "3829:26:89", + "text": "@inheritdoc INSUnified" + }, + "functionSelector": "1a7a98e2", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDomain", + "nameLocation": "3867:9:89", + "parameters": { + "id": 62257, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62256, + "mutability": "mutable", + "name": "id", + "nameLocation": "3885:2:89", + "nodeType": "VariableDeclaration", + "scope": 62314, + "src": "3877:10:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62255, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3877:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3876:12:89" + }, + "returnParameters": { + "id": 62260, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62259, + "mutability": "mutable", + "name": "domain", + "nameLocation": "3926:6:89", + "nodeType": "VariableDeclaration", + "scope": 62314, + "src": "3912:20:89", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 62258, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3912:6:89", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "3911:22:89" + }, + "scope": 63146, + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "id": 62343, + "nodeType": "FunctionDefinition", + "src": "4267:198:89", + "nodes": [], + "body": { + "id": 62342, + "nodeType": "Block", + "src": "4401:64:89", + "nodes": [], + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 62332, + "name": "_recordOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61941, + "src": "4421:9:89", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Record_$65134_storage_$", + "typeString": "mapping(uint256 => struct INSUnified.Record storage ref)" + } + }, + "id": 62334, + "indexExpression": { + "id": 62333, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62317, + "src": "4431:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4421:13:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage", + "typeString": "struct INSUnified.Record storage ref" + } + }, + "id": 62335, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4435:3:89", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65133, + "src": "4421:17:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_storage", + "typeString": "struct INSUnified.MutableRecord storage ref" + } + }, + "id": 62336, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4439:5:89", + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 65122, + "src": "4421:23:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 62337, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62319, + "src": "4446:5:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 62338, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62317, + "src": "4453:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "", + "id": 62339, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4457:2:89", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "id": 62331, + "name": "_safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50828, + "src": "4407:13:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,address,uint256,bytes memory)" + } + }, + "id": 62340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4407:53:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 62341, + "nodeType": "ExpressionStatement", + "src": "4407:53:89" + } + ] + }, + "baseFunctions": [ + 65293 + ], + "documentation": { + "id": 62315, + "nodeType": "StructuredDocumentation", + "src": "4238:26:89", + "text": "@inheritdoc INSUnified" + }, + "functionSelector": "28ed4f6c", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 62322, + "kind": "modifierInvocation", + "modifierName": { + "id": 62321, + "name": "whenNotPaused", + "nameLocations": [ + "4328:13:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 50275, + "src": "4328:13:89" + }, + "nodeType": "ModifierInvocation", + "src": "4328:13:89" + }, + { + "arguments": [ + { + "id": 62324, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62317, + "src": "4361:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 62325, + "name": "ModifyingField", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66324, + "src": "4365:14:89", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ModifyingField_$66324_$", + "typeString": "type(enum ModifyingField)" + } + }, + "id": 62326, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "4380:5:89", + "memberName": "Owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 66321, + "src": "4365:20:89", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ModifyingField_$66324", + "typeString": "enum ModifyingField" + } + }, + "id": 62327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4386:9:89", + "memberName": "indicator", + "nodeType": "MemberAccess", + "referencedDeclaration": 66344, + "src": "4365:30:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_ModifyingField_$66324_$returns$_t_userDefinedValueType$_ModifyingIndicator_$69704_$attached_to$_t_enum$_ModifyingField_$66324_$", + "typeString": "function (enum ModifyingField) pure returns (ModifyingIndicator)" + } + }, + "id": 62328, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4365:32:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + } + ], + "id": 62329, + "kind": "modifierInvocation", + "modifierName": { + "id": 62323, + "name": "onlyAuthorized", + "nameLocations": [ + "4346:14:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 61955, + "src": "4346:14:89" + }, + "nodeType": "ModifierInvocation", + "src": "4346:52:89" + } + ], + "name": "reclaim", + "nameLocation": "4276:7:89", + "parameters": { + "id": 62320, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62317, + "mutability": "mutable", + "name": "id", + "nameLocation": "4292:2:89", + "nodeType": "VariableDeclaration", + "scope": 62343, + "src": "4284:10:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62316, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4284:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 62319, + "mutability": "mutable", + "name": "owner", + "nameLocation": "4304:5:89", + "nodeType": "VariableDeclaration", + "scope": 62343, + "src": "4296:13:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 62318, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4296:7:89", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "4283:27:89" + }, + "returnParameters": { + "id": 62330, + "nodeType": "ParameterList", + "parameters": [], + "src": "4401:0:89" + }, + "scope": 63146, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 62405, + "nodeType": "FunctionDefinition", + "src": "4498:402:89", + "nodes": [], + "body": { + "id": 62404, + "nodeType": "Block", + "src": "4615:285:89", + "nodes": [], + "statements": [ + { + "assignments": [ + 62360 + ], + "declarations": [ + { + "constant": false, + "id": 62360, + "mutability": "mutable", + "name": "record", + "nameLocation": "4635:6:89", + "nodeType": "VariableDeclaration", + "scope": 62404, + "src": "4621:20:89", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record" + }, + "typeName": { + "id": 62359, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 62358, + "name": "Record", + "nameLocations": [ + "4621:6:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65134, + "src": "4621:6:89" + }, + "referencedDeclaration": 65134, + "src": "4621:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage_ptr", + "typeString": "struct INSUnified.Record" + } + }, + "visibility": "internal" + } + ], + "id": 62361, + "nodeType": "VariableDeclarationStatement", + "src": "4621:20:89" + }, + { + "expression": { + "id": 62380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "expression": { + "id": 62362, + "name": "record", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62360, + "src": "4647:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + }, + "id": 62365, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4654:3:89", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65133, + "src": "4647:10:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_memory_ptr", + "typeString": "struct INSUnified.MutableRecord memory" + } + }, + "id": 62366, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "4658:6:89", + "memberName": "expiry", + "nodeType": "MemberAccess", + "referencedDeclaration": 65124, + "src": "4647:17:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 62371, + "name": "_recordOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61941, + "src": "4705:9:89", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Record_$65134_storage_$", + "typeString": "mapping(uint256 => struct INSUnified.Record storage ref)" + } + }, + "id": 62373, + "indexExpression": { + "id": 62372, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62346, + "src": "4715:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4705:13:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage", + "typeString": "struct INSUnified.Record storage ref" + } + }, + "id": 62374, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4719:3:89", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65133, + "src": "4705:17:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_storage", + "typeString": "struct INSUnified.MutableRecord storage ref" + } + }, + "id": 62375, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4723:6:89", + "memberName": "expiry", + "nodeType": "MemberAccess", + "referencedDeclaration": 65124, + "src": "4705:24:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 62376, + "name": "duration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62348, + "src": "4731:8:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 62377, + "name": "MAX_EXPIRY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61928, + "src": "4741:10:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "expression": { + "id": 62369, + "name": "LibSafeRange", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66932, + "src": "4674:12:89", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_LibSafeRange_$66932_$", + "typeString": "type(library LibSafeRange)" + } + }, + "id": 62370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4687:17:89", + "memberName": "addWithUpperbound", + "nodeType": "MemberAccess", + "referencedDeclaration": 66931, + "src": "4674:30:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" + } + }, + "id": 62378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4674:78:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 62368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4667:6:89", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + }, + "typeName": { + "id": 62367, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4667:6:89", + "typeDescriptions": {} + } + }, + "id": 62379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4667:86:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "4647:106:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 62381, + "nodeType": "ExpressionStatement", + "src": "4647:106:89" + }, + { + "expression": { + "arguments": [ + { + "id": 62383, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62346, + "src": "4770:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "expression": { + "id": 62384, + "name": "record", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62360, + "src": "4774:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + }, + "id": 62385, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4781:3:89", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65133, + "src": "4774:10:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_memory_ptr", + "typeString": "struct INSUnified.MutableRecord memory" + } + }, + "id": 62386, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4785:6:89", + "memberName": "expiry", + "nodeType": "MemberAccess", + "referencedDeclaration": 65124, + "src": "4774:17:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 62382, + "name": "_setExpiry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63017, + "src": "4759:10:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint64_$returns$__$", + "typeString": "function (uint256,uint64)" + } + }, + "id": 62387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4759:33:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 62388, + "nodeType": "ExpressionStatement", + "src": "4759:33:89" + }, + { + "expression": { + "id": 62393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 62389, + "name": "expiry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62356, + "src": "4798:6:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "expression": { + "id": 62390, + "name": "record", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62360, + "src": "4807:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + }, + "id": 62391, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4814:3:89", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65133, + "src": "4807:10:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_memory_ptr", + "typeString": "struct INSUnified.MutableRecord memory" + } + }, + "id": 62392, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4818:6:89", + "memberName": "expiry", + "nodeType": "MemberAccess", + "referencedDeclaration": 65124, + "src": "4807:17:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "4798:26:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 62394, + "nodeType": "ExpressionStatement", + "src": "4798:26:89" + }, + { + "eventCall": { + "arguments": [ + { + "id": 62396, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62346, + "src": "4849:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 62397, + "name": "ModifyingField", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66324, + "src": "4853:14:89", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ModifyingField_$66324_$", + "typeString": "type(enum ModifyingField)" + } + }, + "id": 62398, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "4868:6:89", + "memberName": "Expiry", + "nodeType": "MemberAccess", + "referencedDeclaration": 66322, + "src": "4853:21:89", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ModifyingField_$66324", + "typeString": "enum ModifyingField" + } + }, + "id": 62399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4875:9:89", + "memberName": "indicator", + "nodeType": "MemberAccess", + "referencedDeclaration": 66344, + "src": "4853:31:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_ModifyingField_$66324_$returns$_t_userDefinedValueType$_ModifyingIndicator_$69704_$attached_to$_t_enum$_ModifyingField_$66324_$", + "typeString": "function (enum ModifyingField) pure returns (ModifyingIndicator)" + } + }, + "id": 62400, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4853:33:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + }, + { + "id": 62401, + "name": "record", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62360, + "src": "4888:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + }, + { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + ], + "id": 62395, + "name": "RecordUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65159, + "src": "4835:13:89", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_userDefinedValueType$_ModifyingIndicator_$69704_$_t_struct$_Record_$65134_memory_ptr_$returns$__$", + "typeString": "function (uint256,ModifyingIndicator,struct INSUnified.Record memory)" + } + }, + "id": 62402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4835:60:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 62403, + "nodeType": "EmitStatement", + "src": "4830:65:89" + } + ] + }, + "baseFunctions": [ + 65303 + ], + "documentation": { + "id": 62344, + "nodeType": "StructuredDocumentation", + "src": "4469:26:89", + "text": "@inheritdoc INSUnified" + }, + "functionSelector": "5569f33d", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 62351, + "kind": "modifierInvocation", + "modifierName": { + "id": 62350, + "name": "whenNotPaused", + "nameLocations": [ + "4551:13:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 50275, + "src": "4551:13:89" + }, + "nodeType": "ModifierInvocation", + "src": "4551:13:89" + }, + { + "arguments": [ + { + "id": 62353, + "name": "CONTROLLER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61911, + "src": "4574:15:89", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 62354, + "kind": "modifierInvocation", + "modifierName": { + "id": 62352, + "name": "onlyRole", + "nameLocations": [ + "4565:8:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 48565, + "src": "4565:8:89" + }, + "nodeType": "ModifierInvocation", + "src": "4565:25:89" + } + ], + "name": "renew", + "nameLocation": "4507:5:89", + "parameters": { + "id": 62349, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62346, + "mutability": "mutable", + "name": "id", + "nameLocation": "4521:2:89", + "nodeType": "VariableDeclaration", + "scope": 62405, + "src": "4513:10:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62345, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4513:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 62348, + "mutability": "mutable", + "name": "duration", + "nameLocation": "4532:8:89", + "nodeType": "VariableDeclaration", + "scope": 62405, + "src": "4525:15:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 62347, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4525:6:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "4512:29:89" + }, + "returnParameters": { + "id": 62357, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62356, + "mutability": "mutable", + "name": "expiry", + "nameLocation": "4607:6:89", + "nodeType": "VariableDeclaration", + "scope": 62405, + "src": "4600:13:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 62355, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4600:6:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "4599:15:89" + }, + "scope": 63146, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 62441, + "nodeType": "FunctionDefinition", + "src": "4933:245:89", + "nodes": [], + "body": { + "id": 62440, + "nodeType": "Block", + "src": "5028:150:89", + "nodes": [], + "statements": [ + { + "assignments": [ + 62420 + ], + "declarations": [ + { + "constant": false, + "id": 62420, + "mutability": "mutable", + "name": "record", + "nameLocation": "5048:6:89", + "nodeType": "VariableDeclaration", + "scope": 62440, + "src": "5034:20:89", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record" + }, + "typeName": { + "id": 62419, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 62418, + "name": "Record", + "nameLocations": [ + "5034:6:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65134, + "src": "5034:6:89" + }, + "referencedDeclaration": 65134, + "src": "5034:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage_ptr", + "typeString": "struct INSUnified.Record" + } + }, + "visibility": "internal" + } + ], + "id": 62421, + "nodeType": "VariableDeclarationStatement", + "src": "5034:20:89" + }, + { + "expression": { + "arguments": [ + { + "id": 62423, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62408, + "src": "5071:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 62428, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "expression": { + "id": 62424, + "name": "record", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62420, + "src": "5075:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + }, + "id": 62425, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5082:3:89", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65133, + "src": "5075:10:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_memory_ptr", + "typeString": "struct INSUnified.MutableRecord memory" + } + }, + "id": 62426, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "5086:6:89", + "memberName": "expiry", + "nodeType": "MemberAccess", + "referencedDeclaration": 65124, + "src": "5075:17:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 62427, + "name": "expiry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62410, + "src": "5095:6:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "5075:26:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 62422, + "name": "_setExpiry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63017, + "src": "5060:10:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint64_$returns$__$", + "typeString": "function (uint256,uint64)" + } + }, + "id": 62429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5060:42:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 62430, + "nodeType": "ExpressionStatement", + "src": "5060:42:89" + }, + { + "eventCall": { + "arguments": [ + { + "id": 62432, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62408, + "src": "5127:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 62433, + "name": "ModifyingField", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66324, + "src": "5131:14:89", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ModifyingField_$66324_$", + "typeString": "type(enum ModifyingField)" + } + }, + "id": 62434, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "5146:6:89", + "memberName": "Expiry", + "nodeType": "MemberAccess", + "referencedDeclaration": 66322, + "src": "5131:21:89", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ModifyingField_$66324", + "typeString": "enum ModifyingField" + } + }, + "id": 62435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5153:9:89", + "memberName": "indicator", + "nodeType": "MemberAccess", + "referencedDeclaration": 66344, + "src": "5131:31:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_ModifyingField_$66324_$returns$_t_userDefinedValueType$_ModifyingIndicator_$69704_$attached_to$_t_enum$_ModifyingField_$66324_$", + "typeString": "function (enum ModifyingField) pure returns (ModifyingIndicator)" + } + }, + "id": 62436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5131:33:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + }, + { + "id": 62437, + "name": "record", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62420, + "src": "5166:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + }, + { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + ], + "id": 62431, + "name": "RecordUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65159, + "src": "5113:13:89", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_userDefinedValueType$_ModifyingIndicator_$69704_$_t_struct$_Record_$65134_memory_ptr_$returns$__$", + "typeString": "function (uint256,ModifyingIndicator,struct INSUnified.Record memory)" + } + }, + "id": 62438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5113:60:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 62439, + "nodeType": "EmitStatement", + "src": "5108:65:89" + } + ] + }, + "baseFunctions": [ + 65311 + ], + "documentation": { + "id": 62406, + "nodeType": "StructuredDocumentation", + "src": "4904:26:89", + "text": "@inheritdoc INSUnified" + }, + "functionSelector": "fc284d11", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 62413, + "kind": "modifierInvocation", + "modifierName": { + "id": 62412, + "name": "whenNotPaused", + "nameLocations": [ + "4988:13:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 50275, + "src": "4988:13:89" + }, + "nodeType": "ModifierInvocation", + "src": "4988:13:89" + }, + { + "arguments": [ + { + "id": 62415, + "name": "CONTROLLER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61911, + "src": "5011:15:89", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 62416, + "kind": "modifierInvocation", + "modifierName": { + "id": 62414, + "name": "onlyRole", + "nameLocations": [ + "5002:8:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 48565, + "src": "5002:8:89" + }, + "nodeType": "ModifierInvocation", + "src": "5002:25:89" + } + ], + "name": "setExpiry", + "nameLocation": "4942:9:89", + "parameters": { + "id": 62411, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62408, + "mutability": "mutable", + "name": "id", + "nameLocation": "4960:2:89", + "nodeType": "VariableDeclaration", + "scope": 62441, + "src": "4952:10:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62407, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4952:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 62410, + "mutability": "mutable", + "name": "expiry", + "nameLocation": "4971:6:89", + "nodeType": "VariableDeclaration", + "scope": 62441, + "src": "4964:13:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 62409, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4964:6:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "4951:27:89" + }, + "returnParameters": { + "id": 62417, + "nodeType": "ParameterList", + "parameters": [], + "src": "5028:0:89" + }, + "scope": 63146, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 62519, + "nodeType": "FunctionDefinition", + "src": "5211:533:89", + "nodes": [], + "body": { + "id": 62518, + "nodeType": "Block", + "src": "5319:425:89", + "nodes": [], + "statements": [ + { + "assignments": [ + 62455 + ], + "declarations": [ + { + "constant": false, + "id": 62455, + "mutability": "mutable", + "name": "indicator", + "nameLocation": "5344:9:89", + "nodeType": "VariableDeclaration", + "scope": 62518, + "src": "5325:28:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + }, + "typeName": { + "id": 62454, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 62453, + "name": "ModifyingIndicator", + "nameLocations": [ + "5325:18:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69704, + "src": "5325:18:89" + }, + "referencedDeclaration": 69704, + "src": "5325:18:89", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + }, + "visibility": "internal" + } + ], + "id": 62460, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 62456, + "name": "ModifyingField", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66324, + "src": "5356:14:89", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ModifyingField_$66324_$", + "typeString": "type(enum ModifyingField)" + } + }, + "id": 62457, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "5371:9:89", + "memberName": "Protected", + "nodeType": "MemberAccess", + "referencedDeclaration": 66323, + "src": "5356:24:89", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ModifyingField_$66324", + "typeString": "enum ModifyingField" + } + }, + "id": 62458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5381:9:89", + "memberName": "indicator", + "nodeType": "MemberAccess", + "referencedDeclaration": 66344, + "src": "5356:34:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_ModifyingField_$66324_$returns$_t_userDefinedValueType$_ModifyingIndicator_$69704_$attached_to$_t_enum$_ModifyingField_$66324_$", + "typeString": "function (enum ModifyingField) pure returns (ModifyingIndicator)" + } + }, + "id": 62459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5356:36:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5325:67:89" + }, + { + "assignments": [ + 62462 + ], + "declarations": [ + { + "constant": false, + "id": 62462, + "mutability": "mutable", + "name": "id", + "nameLocation": "5406:2:89", + "nodeType": "VariableDeclaration", + "scope": 62518, + "src": "5398:10:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62461, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5398:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 62463, + "nodeType": "VariableDeclarationStatement", + "src": "5398:10:89" + }, + { + "assignments": [ + 62466 + ], + "declarations": [ + { + "constant": false, + "id": 62466, + "mutability": "mutable", + "name": "record", + "nameLocation": "5428:6:89", + "nodeType": "VariableDeclaration", + "scope": 62518, + "src": "5414:20:89", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record" + }, + "typeName": { + "id": 62465, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 62464, + "name": "Record", + "nameLocations": [ + "5414:6:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65134, + "src": "5414:6:89" + }, + "referencedDeclaration": 65134, + "src": "5414:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage_ptr", + "typeString": "struct INSUnified.Record" + } + }, + "visibility": "internal" + } + ], + "id": 62467, + "nodeType": "VariableDeclarationStatement", + "src": "5414:20:89" + }, + { + "expression": { + "id": 62474, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "expression": { + "id": 62468, + "name": "record", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62466, + "src": "5440:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + }, + "id": 62471, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5447:3:89", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65133, + "src": "5440:10:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_memory_ptr", + "typeString": "struct INSUnified.MutableRecord memory" + } + }, + "id": 62472, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "5451:9:89", + "memberName": "protected", + "nodeType": "MemberAccess", + "referencedDeclaration": 65126, + "src": "5440:20:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 62473, + "name": "protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62447, + "src": "5463:9:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5440:32:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 62475, + "nodeType": "ExpressionStatement", + "src": "5440:32:89" + }, + { + "body": { + "id": 62516, + "nodeType": "Block", + "src": "5512:228:89", + "statements": [ + { + "expression": { + "id": 62487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 62483, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62462, + "src": "5520:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "baseExpression": { + "id": 62484, + "name": "ids", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62445, + "src": "5525:3:89", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 62486, + "indexExpression": { + "id": 62485, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62477, + "src": "5529:1:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5525:6:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5520:11:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 62488, + "nodeType": "ExpressionStatement", + "src": "5520:11:89" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 62495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "baseExpression": { + "id": 62489, + "name": "_recordOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61941, + "src": "5543:9:89", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Record_$65134_storage_$", + "typeString": "mapping(uint256 => struct INSUnified.Record storage ref)" + } + }, + "id": 62491, + "indexExpression": { + "id": 62490, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62462, + "src": "5553:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5543:13:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage", + "typeString": "struct INSUnified.Record storage ref" + } + }, + "id": 62492, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5557:3:89", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65133, + "src": "5543:17:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_storage", + "typeString": "struct INSUnified.MutableRecord storage ref" + } + }, + "id": 62493, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5561:9:89", + "memberName": "protected", + "nodeType": "MemberAccess", + "referencedDeclaration": 65126, + "src": "5543:27:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 62494, + "name": "protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62447, + "src": "5574:9:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5543:40:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 62511, + "nodeType": "IfStatement", + "src": "5539:155:89", + "trueBody": { + "id": 62510, + "nodeType": "Block", + "src": "5585:109:89", + "statements": [ + { + "expression": { + "id": 62502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "expression": { + "baseExpression": { + "id": 62496, + "name": "_recordOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61941, + "src": "5595:9:89", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Record_$65134_storage_$", + "typeString": "mapping(uint256 => struct INSUnified.Record storage ref)" + } + }, + "id": 62498, + "indexExpression": { + "id": 62497, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62462, + "src": "5605:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5595:13:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage", + "typeString": "struct INSUnified.Record storage ref" + } + }, + "id": 62499, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5609:3:89", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65133, + "src": "5595:17:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_storage", + "typeString": "struct INSUnified.MutableRecord storage ref" + } + }, + "id": 62500, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "5613:9:89", + "memberName": "protected", + "nodeType": "MemberAccess", + "referencedDeclaration": 65126, + "src": "5595:27:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 62501, + "name": "protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62447, + "src": "5625:9:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5595:39:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 62503, + "nodeType": "ExpressionStatement", + "src": "5595:39:89" + }, + { + "eventCall": { + "arguments": [ + { + "id": 62505, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62462, + "src": "5663:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 62506, + "name": "indicator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62455, + "src": "5667:9:89", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + }, + { + "id": 62507, + "name": "record", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62466, + "src": "5678:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + }, + { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + ], + "id": 62504, + "name": "RecordUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65159, + "src": "5649:13:89", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_userDefinedValueType$_ModifyingIndicator_$69704_$_t_struct$_Record_$65134_memory_ptr_$returns$__$", + "typeString": "function (uint256,ModifyingIndicator,struct INSUnified.Record memory)" + } + }, + "id": 62508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5649:36:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 62509, + "nodeType": "EmitStatement", + "src": "5644:41:89" + } + ] + } + }, + { + "id": 62515, + "nodeType": "UncheckedBlock", + "src": "5702:32:89", + "statements": [ + { + "expression": { + "id": 62513, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "5722:3:89", + "subExpression": { + "id": 62512, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62477, + "src": "5724:1:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 62514, + "nodeType": "ExpressionStatement", + "src": "5722:3:89" + } + ] + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 62482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 62479, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62477, + "src": "5495:1:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 62480, + "name": "ids", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62445, + "src": "5499:3:89", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 62481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5503:6:89", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "5499:10:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5495:14:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 62517, + "initializationExpression": { + "assignments": [ + 62477 + ], + "declarations": [ + { + "constant": false, + "id": 62477, + "mutability": "mutable", + "name": "i", + "nameLocation": "5492:1:89", + "nodeType": "VariableDeclaration", + "scope": 62517, + "src": "5484:9:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62476, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5484:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 62478, + "nodeType": "VariableDeclarationStatement", + "src": "5484:9:89" + }, + "nodeType": "ForStatement", + "src": "5479:261:89" + } + ] + }, + "baseFunctions": [ + 65320 + ], + "documentation": { + "id": 62442, + "nodeType": "StructuredDocumentation", + "src": "5182:26:89", + "text": "@inheritdoc INSUnified" + }, + "functionSelector": "ec63b01f", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "id": 62450, + "name": "PROTECTED_SETTLER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61921, + "src": "5295:22:89", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 62451, + "kind": "modifierInvocation", + "modifierName": { + "id": 62449, + "name": "onlyRole", + "nameLocations": [ + "5286:8:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 48565, + "src": "5286:8:89" + }, + "nodeType": "ModifierInvocation", + "src": "5286:32:89" + } + ], + "name": "bulkSetProtected", + "nameLocation": "5220:16:89", + "parameters": { + "id": 62448, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62445, + "mutability": "mutable", + "name": "ids", + "nameLocation": "5256:3:89", + "nodeType": "VariableDeclaration", + "scope": 62519, + "src": "5237:22:89", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 62443, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5237:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 62444, + "nodeType": "ArrayTypeName", + "src": "5237:9:89", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 62447, + "mutability": "mutable", + "name": "protected", + "nameLocation": "5266:9:89", + "nodeType": "VariableDeclaration", + "scope": 62519, + "src": "5261:14:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 62446, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5261:4:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "5236:40:89" + }, + "returnParameters": { + "id": 62452, + "nodeType": "ParameterList", + "parameters": [], + "src": "5319:0:89" + }, + "scope": 63146, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 62636, + "nodeType": "FunctionDefinition", + "src": "5777:940:89", + "nodes": [], + "body": { + "id": 62635, + "nodeType": "Block", + "src": "5939:778:89", + "nodes": [], + "statements": [ + { + "assignments": [ + 62539 + ], + "declarations": [ + { + "constant": false, + "id": 62539, + "mutability": "mutable", + "name": "record", + "nameLocation": "5959:6:89", + "nodeType": "VariableDeclaration", + "scope": 62635, + "src": "5945:20:89", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record" + }, + "typeName": { + "id": 62538, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 62537, + "name": "Record", + "nameLocations": [ + "5945:6:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65134, + "src": "5945:6:89" + }, + "referencedDeclaration": 65134, + "src": "5945:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage_ptr", + "typeString": "struct INSUnified.Record" + } + }, + "visibility": "internal" + } + ], + "id": 62540, + "nodeType": "VariableDeclarationStatement", + "src": "5945:20:89" + }, + { + "assignments": [ + 62543 + ], + "declarations": [ + { + "constant": false, + "id": 62543, + "mutability": "mutable", + "name": "sMutRecord", + "nameLocation": "5993:10:89", + "nodeType": "VariableDeclaration", + "scope": 62635, + "src": "5971:32:89", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_storage_ptr", + "typeString": "struct INSUnified.MutableRecord" + }, + "typeName": { + "id": 62542, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 62541, + "name": "MutableRecord", + "nameLocations": [ + "5971:13:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65127, + "src": "5971:13:89" + }, + "referencedDeclaration": 65127, + "src": "5971:13:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_storage_ptr", + "typeString": "struct INSUnified.MutableRecord" + } + }, + "visibility": "internal" + } + ], + "id": 62548, + "initialValue": { + "expression": { + "baseExpression": { + "id": 62544, + "name": "_recordOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61941, + "src": "6006:9:89", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Record_$65134_storage_$", + "typeString": "mapping(uint256 => struct INSUnified.Record storage ref)" + } + }, + "id": 62546, + "indexExpression": { + "id": 62545, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62522, + "src": "6016:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6006:13:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage", + "typeString": "struct INSUnified.Record storage ref" + } + }, + "id": 62547, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6020:3:89", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65133, + "src": "6006:17:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_storage", + "typeString": "struct INSUnified.MutableRecord storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5971:52:89" + }, + { + "condition": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 62551, + "name": "ModifyingField", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66324, + "src": "6051:14:89", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ModifyingField_$66324_$", + "typeString": "type(enum ModifyingField)" + } + }, + "id": 62552, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "6066:9:89", + "memberName": "Protected", + "nodeType": "MemberAccess", + "referencedDeclaration": 66323, + "src": "6051:24:89", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ModifyingField_$66324", + "typeString": "enum ModifyingField" + } + }, + "id": 62553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6076:9:89", + "memberName": "indicator", + "nodeType": "MemberAccess", + "referencedDeclaration": 66344, + "src": "6051:34:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_ModifyingField_$66324_$returns$_t_userDefinedValueType$_ModifyingIndicator_$69704_$attached_to$_t_enum$_ModifyingField_$66324_$", + "typeString": "function (enum ModifyingField) pure returns (ModifyingIndicator)" + } + }, + "id": 62554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6051:36:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + ], + "expression": { + "id": 62549, + "name": "indicator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62525, + "src": "6034:9:89", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + }, + "id": 62550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6044:6:89", + "memberName": "hasAny", + "nodeType": "MemberAccess", + "referencedDeclaration": 69918, + "src": "6034:16:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_userDefinedValueType$_ModifyingIndicator_$69704_$_t_userDefinedValueType$_ModifyingIndicator_$69704_$returns$_t_bool_$attached_to$_t_userDefinedValueType$_ModifyingIndicator_$69704_$", + "typeString": "function (ModifyingIndicator,ModifyingIndicator) pure returns (bool)" + } + }, + "id": 62555, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6034:54:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 62568, + "nodeType": "IfStatement", + "src": "6030:140:89", + "trueBody": { + "id": 62567, + "nodeType": "Block", + "src": "6090:80:89", + "statements": [ + { + "expression": { + "id": 62565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 62556, + "name": "sMutRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62543, + "src": "6098:10:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_storage_ptr", + "typeString": "struct INSUnified.MutableRecord storage pointer" + } + }, + "id": 62558, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "6109:9:89", + "memberName": "protected", + "nodeType": "MemberAccess", + "referencedDeclaration": 65126, + "src": "6098:20:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 62564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "expression": { + "id": 62559, + "name": "record", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62539, + "src": "6121:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + }, + "id": 62560, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6128:3:89", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65133, + "src": "6121:10:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_memory_ptr", + "typeString": "struct INSUnified.MutableRecord memory" + } + }, + "id": 62561, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "6132:9:89", + "memberName": "protected", + "nodeType": "MemberAccess", + "referencedDeclaration": 65126, + "src": "6121:20:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 62562, + "name": "mutRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62528, + "src": "6144:9:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_calldata_ptr", + "typeString": "struct INSUnified.MutableRecord calldata" + } + }, + "id": 62563, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6154:9:89", + "memberName": "protected", + "nodeType": "MemberAccess", + "referencedDeclaration": 65126, + "src": "6144:19:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6121:42:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6098:65:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 62566, + "nodeType": "ExpressionStatement", + "src": "6098:65:89" + } + ] + } + }, + { + "condition": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 62571, + "name": "ModifyingField", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66324, + "src": "6196:14:89", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ModifyingField_$66324_$", + "typeString": "type(enum ModifyingField)" + } + }, + "id": 62572, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "6211:6:89", + "memberName": "Expiry", + "nodeType": "MemberAccess", + "referencedDeclaration": 66322, + "src": "6196:21:89", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ModifyingField_$66324", + "typeString": "enum ModifyingField" + } + }, + "id": 62573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6218:9:89", + "memberName": "indicator", + "nodeType": "MemberAccess", + "referencedDeclaration": 66344, + "src": "6196:31:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_ModifyingField_$66324_$returns$_t_userDefinedValueType$_ModifyingIndicator_$69704_$attached_to$_t_enum$_ModifyingField_$66324_$", + "typeString": "function (enum ModifyingField) pure returns (ModifyingIndicator)" + } + }, + "id": 62574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6196:33:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + ], + "expression": { + "id": 62569, + "name": "indicator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62525, + "src": "6179:9:89", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + }, + "id": 62570, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6189:6:89", + "memberName": "hasAny", + "nodeType": "MemberAccess", + "referencedDeclaration": 69918, + "src": "6179:16:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_userDefinedValueType$_ModifyingIndicator_$69704_$_t_userDefinedValueType$_ModifyingIndicator_$69704_$returns$_t_bool_$attached_to$_t_userDefinedValueType$_ModifyingIndicator_$69704_$", + "typeString": "function (ModifyingIndicator,ModifyingIndicator) pure returns (bool)" + } + }, + "id": 62575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6179:51:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 62587, + "nodeType": "IfStatement", + "src": "6175:124:89", + "trueBody": { + "id": 62586, + "nodeType": "Block", + "src": "6232:67:89", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 62577, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62522, + "src": "6251:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 62583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "expression": { + "id": 62578, + "name": "record", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62539, + "src": "6255:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + }, + "id": 62579, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6262:3:89", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65133, + "src": "6255:10:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_memory_ptr", + "typeString": "struct INSUnified.MutableRecord memory" + } + }, + "id": 62580, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "6266:6:89", + "memberName": "expiry", + "nodeType": "MemberAccess", + "referencedDeclaration": 65124, + "src": "6255:17:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 62581, + "name": "mutRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62528, + "src": "6275:9:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_calldata_ptr", + "typeString": "struct INSUnified.MutableRecord calldata" + } + }, + "id": 62582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6285:6:89", + "memberName": "expiry", + "nodeType": "MemberAccess", + "referencedDeclaration": 65124, + "src": "6275:16:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "6255:36:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 62576, + "name": "_setExpiry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63017, + "src": "6240:10:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint64_$returns$__$", + "typeString": "function (uint256,uint64)" + } + }, + "id": 62584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6240:52:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 62585, + "nodeType": "ExpressionStatement", + "src": "6240:52:89" + } + ] + } + }, + { + "condition": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 62590, + "name": "ModifyingField", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66324, + "src": "6325:14:89", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ModifyingField_$66324_$", + "typeString": "type(enum ModifyingField)" + } + }, + "id": 62591, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "6340:8:89", + "memberName": "Resolver", + "nodeType": "MemberAccess", + "referencedDeclaration": 66320, + "src": "6325:23:89", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ModifyingField_$66324", + "typeString": "enum ModifyingField" + } + }, + "id": 62592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6349:9:89", + "memberName": "indicator", + "nodeType": "MemberAccess", + "referencedDeclaration": 66344, + "src": "6325:33:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_ModifyingField_$66324_$returns$_t_userDefinedValueType$_ModifyingIndicator_$69704_$attached_to$_t_enum$_ModifyingField_$66324_$", + "typeString": "function (enum ModifyingField) pure returns (ModifyingIndicator)" + } + }, + "id": 62593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6325:35:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + ], + "expression": { + "id": 62588, + "name": "indicator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62525, + "src": "6308:9:89", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + }, + "id": 62589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6318:6:89", + "memberName": "hasAny", + "nodeType": "MemberAccess", + "referencedDeclaration": 69918, + "src": "6308:16:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_userDefinedValueType$_ModifyingIndicator_$69704_$_t_userDefinedValueType$_ModifyingIndicator_$69704_$returns$_t_bool_$attached_to$_t_userDefinedValueType$_ModifyingIndicator_$69704_$", + "typeString": "function (ModifyingIndicator,ModifyingIndicator) pure returns (bool)" + } + }, + "id": 62594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6308:53:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 62607, + "nodeType": "IfStatement", + "src": "6304:136:89", + "trueBody": { + "id": 62606, + "nodeType": "Block", + "src": "6363:77:89", + "statements": [ + { + "expression": { + "id": 62604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 62595, + "name": "sMutRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62543, + "src": "6371:10:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_storage_ptr", + "typeString": "struct INSUnified.MutableRecord storage pointer" + } + }, + "id": 62597, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "6382:8:89", + "memberName": "resolver", + "nodeType": "MemberAccess", + "referencedDeclaration": 65120, + "src": "6371:19:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 62603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "expression": { + "id": 62598, + "name": "record", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62539, + "src": "6393:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + }, + "id": 62599, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6400:3:89", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65133, + "src": "6393:10:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_memory_ptr", + "typeString": "struct INSUnified.MutableRecord memory" + } + }, + "id": 62600, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "6404:8:89", + "memberName": "resolver", + "nodeType": "MemberAccess", + "referencedDeclaration": 65120, + "src": "6393:19:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 62601, + "name": "mutRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62528, + "src": "6415:9:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_calldata_ptr", + "typeString": "struct INSUnified.MutableRecord calldata" + } + }, + "id": 62602, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6425:8:89", + "memberName": "resolver", + "nodeType": "MemberAccess", + "referencedDeclaration": 65120, + "src": "6415:18:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6393:40:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6371:62:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 62605, + "nodeType": "ExpressionStatement", + "src": "6371:62:89" + } + ] + } + }, + { + "eventCall": { + "arguments": [ + { + "id": 62609, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62522, + "src": "6464:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 62610, + "name": "indicator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62525, + "src": "6468:9:89", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + }, + { + "id": 62611, + "name": "record", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62539, + "src": "6479:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + }, + { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + ], + "id": 62608, + "name": "RecordUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65159, + "src": "6450:13:89", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_userDefinedValueType$_ModifyingIndicator_$69704_$_t_struct$_Record_$65134_memory_ptr_$returns$__$", + "typeString": "function (uint256,ModifyingIndicator,struct INSUnified.Record memory)" + } + }, + "id": 62612, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6450:36:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 62613, + "nodeType": "EmitStatement", + "src": "6445:41:89" + }, + { + "condition": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 62616, + "name": "ModifyingField", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66324, + "src": "6600:14:89", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ModifyingField_$66324_$", + "typeString": "type(enum ModifyingField)" + } + }, + "id": 62617, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "6615:5:89", + "memberName": "Owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 66321, + "src": "6600:20:89", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ModifyingField_$66324", + "typeString": "enum ModifyingField" + } + }, + "id": 62618, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6621:9:89", + "memberName": "indicator", + "nodeType": "MemberAccess", + "referencedDeclaration": 66344, + "src": "6600:30:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_ModifyingField_$66324_$returns$_t_userDefinedValueType$_ModifyingIndicator_$69704_$attached_to$_t_enum$_ModifyingField_$66324_$", + "typeString": "function (enum ModifyingField) pure returns (ModifyingIndicator)" + } + }, + "id": 62619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6600:32:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + ], + "expression": { + "id": 62614, + "name": "indicator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62525, + "src": "6583:9:89", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + }, + "id": 62615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6593:6:89", + "memberName": "hasAny", + "nodeType": "MemberAccess", + "referencedDeclaration": 69918, + "src": "6583:16:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_userDefinedValueType$_ModifyingIndicator_$69704_$_t_userDefinedValueType$_ModifyingIndicator_$69704_$returns$_t_bool_$attached_to$_t_userDefinedValueType$_ModifyingIndicator_$69704_$", + "typeString": "function (ModifyingIndicator,ModifyingIndicator) pure returns (bool)" + } + }, + "id": 62620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6583:50:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 62634, + "nodeType": "IfStatement", + "src": "6579:134:89", + "trueBody": { + "id": 62633, + "nodeType": "Block", + "src": "6635:78:89", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 62622, + "name": "_recordOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61941, + "src": "6657:9:89", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Record_$65134_storage_$", + "typeString": "mapping(uint256 => struct INSUnified.Record storage ref)" + } + }, + "id": 62624, + "indexExpression": { + "id": 62623, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62522, + "src": "6667:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6657:13:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage", + "typeString": "struct INSUnified.Record storage ref" + } + }, + "id": 62625, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6671:3:89", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65133, + "src": "6657:17:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_storage", + "typeString": "struct INSUnified.MutableRecord storage ref" + } + }, + "id": 62626, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6675:5:89", + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 65122, + "src": "6657:23:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 62627, + "name": "mutRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62528, + "src": "6682:9:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_calldata_ptr", + "typeString": "struct INSUnified.MutableRecord calldata" + } + }, + "id": 62628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6692:5:89", + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 65122, + "src": "6682:15:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 62629, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62522, + "src": "6699:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "", + "id": 62630, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6703:2:89", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "id": 62621, + "name": "_safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50828, + "src": "6643:13:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,address,uint256,bytes memory)" + } + }, + "id": 62631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6643:63:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 62632, + "nodeType": "ExpressionStatement", + "src": "6643:63:89" + } + ] + } + } + ] + }, + "baseFunctions": [ + 65285 + ], + "documentation": { + "id": 62520, + "nodeType": "StructuredDocumentation", + "src": "5748:26:89", + "text": "@inheritdoc INSUnified" + }, + "functionSelector": "1cfa6ec0", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 62531, + "kind": "modifierInvocation", + "modifierName": { + "id": 62530, + "name": "whenNotPaused", + "nameLocations": [ + "5889:13:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 50275, + "src": "5889:13:89" + }, + "nodeType": "ModifierInvocation", + "src": "5889:13:89" + }, + { + "arguments": [ + { + "id": 62533, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62522, + "src": "5922:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 62534, + "name": "indicator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62525, + "src": "5926:9:89", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + } + ], + "id": 62535, + "kind": "modifierInvocation", + "modifierName": { + "id": 62532, + "name": "onlyAuthorized", + "nameLocations": [ + "5907:14:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 61955, + "src": "5907:14:89" + }, + "nodeType": "ModifierInvocation", + "src": "5907:29:89" + } + ], + "name": "setRecord", + "nameLocation": "5786:9:89", + "parameters": { + "id": 62529, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62522, + "mutability": "mutable", + "name": "id", + "nameLocation": "5804:2:89", + "nodeType": "VariableDeclaration", + "scope": 62636, + "src": "5796:10:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62521, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5796:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 62525, + "mutability": "mutable", + "name": "indicator", + "nameLocation": "5827:9:89", + "nodeType": "VariableDeclaration", + "scope": 62636, + "src": "5808:28:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + }, + "typeName": { + "id": 62524, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 62523, + "name": "ModifyingIndicator", + "nameLocations": [ + "5808:18:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69704, + "src": "5808:18:89" + }, + "referencedDeclaration": 69704, + "src": "5808:18:89", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 62528, + "mutability": "mutable", + "name": "mutRecord", + "nameLocation": "5861:9:89", + "nodeType": "VariableDeclaration", + "scope": 62636, + "src": "5838:32:89", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_calldata_ptr", + "typeString": "struct INSUnified.MutableRecord" + }, + "typeName": { + "id": 62527, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 62526, + "name": "MutableRecord", + "nameLocations": [ + "5838:13:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65127, + "src": "5838:13:89" + }, + "referencedDeclaration": 65127, + "src": "5838:13:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_storage_ptr", + "typeString": "struct INSUnified.MutableRecord" + } + }, + "visibility": "internal" + } + ], + "src": "5795:76:89" + }, + "returnParameters": { + "id": 62536, + "nodeType": "ParameterList", + "parameters": [], + "src": "5939:0:89" + }, + "scope": 63146, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 62660, + "nodeType": "FunctionDefinition", + "src": "6763:182:89", + "nodes": [], + "body": { + "id": 62659, + "nodeType": "Block", + "src": "6871:74:89", + "nodes": [], + "statements": [ + { + "expression": { + "arguments": [ + { + "baseExpression": { + "id": 62650, + "name": "_recordOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61941, + "src": "6895:9:89", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Record_$65134_storage_$", + "typeString": "mapping(uint256 => struct INSUnified.Record storage ref)" + } + }, + "id": 62652, + "indexExpression": { + "id": 62651, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62639, + "src": "6905:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6895:18:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage", + "typeString": "struct INSUnified.Record storage ref" + } + }, + { + "baseExpression": { + "id": 62653, + "name": "nonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 439, + "src": "6915:6:89", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 62655, + "indexExpression": { + "id": 62654, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62639, + "src": "6922:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6915:15:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 62656, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62639, + "src": "6932:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Record_$65134_storage", + "typeString": "struct INSUnified.Record storage ref" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 62648, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "6884:3:89", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 62649, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "6888:6:89", + "memberName": "encode", + "nodeType": "MemberAccess", + "src": "6884:10:89", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 62657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6884:56:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "functionReturnParameters": 62647, + "id": 62658, + "nodeType": "Return", + "src": "6877:63:89" + } + ] + }, + "baseFunctions": [ + 500 + ], + "documentation": { + "id": 62637, + "nodeType": "StructuredDocumentation", + "src": "6721:39:89", + "text": " @inheritdoc IERC721State" + }, + "functionSelector": "131a7e24", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "id": 62643, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62639, + "src": "6839:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 62644, + "kind": "modifierInvocation", + "modifierName": { + "id": 62642, + "name": "onlyMinted", + "nameLocations": [ + "6828:10:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 61657, + "src": "6828:10:89" + }, + "nodeType": "ModifierInvocation", + "src": "6828:19:89" + } + ], + "name": "stateOf", + "nameLocation": "6772:7:89", + "overrides": { + "id": 62641, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6819:8:89" + }, + "parameters": { + "id": 62640, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62639, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "6788:7:89", + "nodeType": "VariableDeclaration", + "scope": 62660, + "src": "6780:15:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62638, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6780:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6779:17:89" + }, + "returnParameters": { + "id": 62647, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62646, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 62660, + "src": "6857:12:89", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 62645, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "6857:5:89", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "6856:14:89" + }, + "scope": 63146, + "stateMutability": "view", + "virtual": true, + "visibility": "external" + }, + { + "id": 62765, + "nodeType": "FunctionDefinition", + "src": "6978:896:89", + "nodes": [], + "body": { + "id": 62764, + "nodeType": "Block", + "src": "7118:756:89", + "nodes": [], + "statements": [ + { + "condition": { + "arguments": [ + { + "id": 62677, + "name": "IMMUTABLE_FIELDS_INDICATOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 69740, + "src": "7145:26:89", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + ], + "expression": { + "id": 62675, + "name": "indicator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62668, + "src": "7128:9:89", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + }, + "id": 62676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7138:6:89", + "memberName": "hasAny", + "nodeType": "MemberAccess", + "referencedDeclaration": 69918, + "src": "7128:16:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_userDefinedValueType$_ModifyingIndicator_$69704_$_t_userDefinedValueType$_ModifyingIndicator_$69704_$returns$_t_bool_$attached_to$_t_userDefinedValueType$_ModifyingIndicator_$69704_$", + "typeString": "function (ModifyingIndicator,ModifyingIndicator) pure returns (bool)" + } + }, + "id": 62678, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7128:44:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 62685, + "nodeType": "IfStatement", + "src": "7124:113:89", + "trueBody": { + "id": 62684, + "nodeType": "Block", + "src": "7174:63:89", + "statements": [ + { + "expression": { + "components": [ + { + "hexValue": "66616c7365", + "id": 62679, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7190:5:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "expression": { + "id": 62680, + "name": "CannotSetImmutableField", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65100, + "src": "7197:23:89", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 62681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7221:8:89", + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "7197:32:89", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "id": 62682, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "7189:41:89", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes4_$", + "typeString": "tuple(bool,bytes4)" + } + }, + "functionReturnParameters": 62674, + "id": 62683, + "nodeType": "Return", + "src": "7182:48:89" + } + ] + } + }, + { + "condition": { + "id": 62689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "7246:12:89", + "subExpression": { + "arguments": [ + { + "id": 62687, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62665, + "src": "7255:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 62686, + "name": "_exists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50859, + "src": "7247:7:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 62688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7247:11:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 62695, + "nodeType": "IfStatement", + "src": "7242:51:89", + "trueBody": { + "expression": { + "components": [ + { + "hexValue": "66616c7365", + "id": 62690, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7268:5:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "expression": { + "id": 62691, + "name": "Unexists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65085, + "src": "7275:8:89", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 62692, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7284:8:89", + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "7275:17:89", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "id": 62693, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "7267:26:89", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes4_$", + "typeString": "tuple(bool,bytes4)" + } + }, + "functionReturnParameters": 62674, + "id": 62694, + "nodeType": "Return", + "src": "7260:33:89" + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 62708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 62698, + "name": "ModifyingField", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66324, + "src": "7320:14:89", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ModifyingField_$66324_$", + "typeString": "type(enum ModifyingField)" + } + }, + "id": 62699, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "7335:9:89", + "memberName": "Protected", + "nodeType": "MemberAccess", + "referencedDeclaration": 66323, + "src": "7320:24:89", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ModifyingField_$66324", + "typeString": "enum ModifyingField" + } + }, + "id": 62700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7345:9:89", + "memberName": "indicator", + "nodeType": "MemberAccess", + "referencedDeclaration": 66344, + "src": "7320:34:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_ModifyingField_$66324_$returns$_t_userDefinedValueType$_ModifyingIndicator_$69704_$attached_to$_t_enum$_ModifyingField_$66324_$", + "typeString": "function (enum ModifyingField) pure returns (ModifyingIndicator)" + } + }, + "id": 62701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7320:36:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + ], + "expression": { + "id": 62696, + "name": "indicator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62668, + "src": "7303:9:89", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + }, + "id": 62697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7313:6:89", + "memberName": "hasAny", + "nodeType": "MemberAccess", + "referencedDeclaration": 69918, + "src": "7303:16:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_userDefinedValueType$_ModifyingIndicator_$69704_$_t_userDefinedValueType$_ModifyingIndicator_$69704_$returns$_t_bool_$attached_to$_t_userDefinedValueType$_ModifyingIndicator_$69704_$", + "typeString": "function (ModifyingIndicator,ModifyingIndicator) pure returns (bool)" + } + }, + "id": 62702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7303:54:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "id": 62707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "7361:43:89", + "subExpression": { + "arguments": [ + { + "id": 62704, + "name": "PROTECTED_SETTLER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61921, + "src": "7370:22:89", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 62705, + "name": "requester", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62663, + "src": "7394:9:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 62703, + "name": "hasRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48606, + "src": "7362:7:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) view returns (bool)" + } + }, + "id": 62706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7362:42:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7303:101:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 62715, + "nodeType": "IfStatement", + "src": "7299:174:89", + "trueBody": { + "id": 62714, + "nodeType": "Block", + "src": "7406:67:89", + "statements": [ + { + "expression": { + "components": [ + { + "hexValue": "66616c7365", + "id": 62709, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7422:5:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "expression": { + "id": 62710, + "name": "MissingProtectedSettlerRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65103, + "src": "7429:27:89", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 62711, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7457:8:89", + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "7429:36:89", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "id": 62712, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "7421:45:89", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes4_$", + "typeString": "tuple(bool,bytes4)" + } + }, + "functionReturnParameters": 62674, + "id": 62713, + "nodeType": "Return", + "src": "7414:52:89" + } + ] + } + }, + { + "assignments": [ + 62717 + ], + "declarations": [ + { + "constant": false, + "id": 62717, + "mutability": "mutable", + "name": "hasControllerRole", + "nameLocation": "7483:17:89", + "nodeType": "VariableDeclaration", + "scope": 62764, + "src": "7478:22:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 62716, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7478:4:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "id": 62722, + "initialValue": { + "arguments": [ + { + "id": 62719, + "name": "CONTROLLER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61911, + "src": "7511:15:89", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 62720, + "name": "requester", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62663, + "src": "7528:9:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 62718, + "name": "hasRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48606, + "src": "7503:7:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) view returns (bool)" + } + }, + "id": 62721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7503:35:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7478:60:89" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 62732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 62725, + "name": "ModifyingField", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66324, + "src": "7565:14:89", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ModifyingField_$66324_$", + "typeString": "type(enum ModifyingField)" + } + }, + "id": 62726, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "7580:6:89", + "memberName": "Expiry", + "nodeType": "MemberAccess", + "referencedDeclaration": 66322, + "src": "7565:21:89", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ModifyingField_$66324", + "typeString": "enum ModifyingField" + } + }, + "id": 62727, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7587:9:89", + "memberName": "indicator", + "nodeType": "MemberAccess", + "referencedDeclaration": 66344, + "src": "7565:31:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_ModifyingField_$66324_$returns$_t_userDefinedValueType$_ModifyingIndicator_$69704_$attached_to$_t_enum$_ModifyingField_$66324_$", + "typeString": "function (enum ModifyingField) pure returns (ModifyingIndicator)" + } + }, + "id": 62728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7565:33:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + ], + "expression": { + "id": 62723, + "name": "indicator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62668, + "src": "7548:9:89", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + }, + "id": 62724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7558:6:89", + "memberName": "hasAny", + "nodeType": "MemberAccess", + "referencedDeclaration": 69918, + "src": "7548:16:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_userDefinedValueType$_ModifyingIndicator_$69704_$_t_userDefinedValueType$_ModifyingIndicator_$69704_$returns$_t_bool_$attached_to$_t_userDefinedValueType$_ModifyingIndicator_$69704_$", + "typeString": "function (ModifyingIndicator,ModifyingIndicator) pure returns (bool)" + } + }, + "id": 62729, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7548:51:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "id": 62731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "7603:18:89", + "subExpression": { + "id": 62730, + "name": "hasControllerRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62717, + "src": "7604:17:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7548:73:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 62739, + "nodeType": "IfStatement", + "src": "7544:140:89", + "trueBody": { + "id": 62738, + "nodeType": "Block", + "src": "7623:61:89", + "statements": [ + { + "expression": { + "components": [ + { + "hexValue": "66616c7365", + "id": 62733, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7639:5:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "expression": { + "id": 62734, + "name": "MissingControllerRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65097, + "src": "7646:21:89", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 62735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7668:8:89", + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "7646:30:89", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "id": 62736, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "7638:39:89", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes4_$", + "typeString": "tuple(bool,bytes4)" + } + }, + "functionReturnParameters": 62674, + "id": 62737, + "nodeType": "Return", + "src": "7631:46:89" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 62752, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 62742, + "name": "USER_FIELDS_INDICATOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 69748, + "src": "7710:21:89", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + ], + "expression": { + "id": 62740, + "name": "indicator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62668, + "src": "7693:9:89", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + }, + "id": 62741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7703:6:89", + "memberName": "hasAny", + "nodeType": "MemberAccess", + "referencedDeclaration": 69918, + "src": "7693:16:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_userDefinedValueType$_ModifyingIndicator_$69704_$_t_userDefinedValueType$_ModifyingIndicator_$69704_$returns$_t_bool_$attached_to$_t_userDefinedValueType$_ModifyingIndicator_$69704_$", + "typeString": "function (ModifyingIndicator,ModifyingIndicator) pure returns (bool)" + } + }, + "id": 62743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7693:39:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "id": 62751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "7736:55:89", + "subExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 62749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 62744, + "name": "hasControllerRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62717, + "src": "7738:17:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "id": 62746, + "name": "requester", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62663, + "src": "7776:9:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 62747, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62665, + "src": "7787:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 62745, + "name": "_checkOwnerRules", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62919, + "src": "7759:16:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) view returns (bool)" + } + }, + "id": 62748, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7759:31:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7738:52:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 62750, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "7737:54:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7693:98:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 62759, + "nodeType": "IfStatement", + "src": "7689:156:89", + "trueBody": { + "id": 62758, + "nodeType": "Block", + "src": "7793:52:89", + "statements": [ + { + "expression": { + "components": [ + { + "hexValue": "66616c7365", + "id": 62753, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7809:5:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "expression": { + "id": 62754, + "name": "Unauthorized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65094, + "src": "7816:12:89", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 62755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7829:8:89", + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "7816:21:89", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "id": 62756, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "7808:30:89", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes4_$", + "typeString": "tuple(bool,bytes4)" + } + }, + "functionReturnParameters": 62674, + "id": 62757, + "nodeType": "Return", + "src": "7801:37:89" + } + ] + } + }, + { + "expression": { + "components": [ + { + "hexValue": "74727565", + "id": 62760, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7859:4:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "hexValue": "307830", + "id": 62761, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7865:3:89", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + } + ], + "id": 62762, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "7858:11:89", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$", + "typeString": "tuple(bool,int_const 0)" + } + }, + "functionReturnParameters": 62674, + "id": 62763, + "nodeType": "Return", + "src": "7851:18:89" + } + ] + }, + "baseFunctions": [ + 65273 + ], + "documentation": { + "id": 62661, + "nodeType": "StructuredDocumentation", + "src": "6949:26:89", + "text": "@inheritdoc INSUnified" + }, + "functionSelector": "fd3fa919", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "canSetRecord", + "nameLocation": "6987:12:89", + "parameters": { + "id": 62669, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62663, + "mutability": "mutable", + "name": "requester", + "nameLocation": "7008:9:89", + "nodeType": "VariableDeclaration", + "scope": 62765, + "src": "7000:17:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 62662, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7000:7:89", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 62665, + "mutability": "mutable", + "name": "id", + "nameLocation": "7027:2:89", + "nodeType": "VariableDeclaration", + "scope": 62765, + "src": "7019:10:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62664, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7019:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 62668, + "mutability": "mutable", + "name": "indicator", + "nameLocation": "7050:9:89", + "nodeType": "VariableDeclaration", + "scope": 62765, + "src": "7031:28:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + }, + "typeName": { + "id": 62667, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 62666, + "name": "ModifyingIndicator", + "nameLocations": [ + "7031:18:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69704, + "src": "7031:18:89" + }, + "referencedDeclaration": 69704, + "src": "7031:18:89", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + }, + "visibility": "internal" + } + ], + "src": "6999:61:89" + }, + "returnParameters": { + "id": 62674, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62671, + "mutability": "mutable", + "name": "allowed", + "nameLocation": "7099:7:89", + "nodeType": "VariableDeclaration", + "scope": 62765, + "src": "7094:12:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 62670, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7094:4:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 62673, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 62765, + "src": "7108:6:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 62672, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "7108:6:89", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "src": "7093:22:89" + }, + "scope": 63146, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "id": 62791, + "nodeType": "FunctionDefinition", + "src": "7916:180:89", + "nodes": [], + "body": { + "id": 62790, + "nodeType": "Block", + "src": "8006:90:89", + "nodes": [], + "statements": [ + { + "condition": { + "arguments": [ + { + "id": 62777, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62768, + "src": "8027:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 62776, + "name": "_isExpired", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62831, + "src": "8016:10:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 62778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8016:19:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 62784, + "nodeType": "IfStatement", + "src": "8012:44:89", + "trueBody": { + "expression": { + "arguments": [ + { + "hexValue": "307830", + "id": 62781, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8052:3:89", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 62780, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8044:7:89", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 62779, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8044:7:89", + "typeDescriptions": {} + } + }, + "id": 62782, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8044:12:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 62775, + "id": 62783, + "nodeType": "Return", + "src": "8037:19:89" + } + }, + { + "expression": { + "arguments": [ + { + "id": 62787, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62768, + "src": "8083:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 62785, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "8069:5:89", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_super$_RNSUnified_$63146_$", + "typeString": "type(contract super RNSUnified)" + } + }, + "id": 62786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8075:7:89", + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 50559, + "src": "8069:13:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 62788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8069:22:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 62775, + "id": 62789, + "nodeType": "Return", + "src": "8062:29:89" + } + ] + }, + "baseFunctions": [ + 50559, + 51389 + ], + "documentation": { + "id": 62766, + "nodeType": "StructuredDocumentation", + "src": "7878:35:89", + "text": "@dev Override {ERC721-ownerOf}." + }, + "functionSelector": "6352211e", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "ownerOf", + "nameLocation": "7925:7:89", + "overrides": { + "id": 62772, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 62770, + "name": "ERC721", + "nameLocations": [ + "7971:6:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 51340, + "src": "7971:6:89" + }, + { + "id": 62771, + "name": "IERC721", + "nameLocations": [ + "7979:7:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 51456, + "src": "7979:7:89" + } + ], + "src": "7962:25:89" + }, + "parameters": { + "id": 62769, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62768, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "7941:7:89", + "nodeType": "VariableDeclaration", + "scope": 62791, + "src": "7933:15:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62767, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7933:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7932:17:89" + }, + "returnParameters": { + "id": 62775, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62774, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 62791, + "src": "7997:7:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 62773, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7997:7:89", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "7996:9:89" + }, + "scope": 63146, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "id": 62815, + "nodeType": "FunctionDefinition", + "src": "8149:211:89", + "nodes": [], + "body": { + "id": 62814, + "nodeType": "Block", + "src": "8257:103:89", + "nodes": [], + "statements": [ + { + "condition": { + "arguments": [ + { + "id": 62803, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62796, + "src": "8278:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 62802, + "name": "_isExpired", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62831, + "src": "8267:10:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 62804, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8267:19:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 62807, + "nodeType": "IfStatement", + "src": "8263:37:89", + "trueBody": { + "expression": { + "hexValue": "66616c7365", + "id": 62805, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8295:5:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "functionReturnParameters": 62801, + "id": 62806, + "nodeType": "Return", + "src": "8288:12:89" + } + }, + { + "expression": { + "arguments": [ + { + "id": 62810, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62794, + "src": "8338:7:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 62811, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62796, + "src": "8347:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 62808, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "8313:5:89", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_super$_RNSUnified_$63146_$", + "typeString": "type(contract super RNSUnified)" + } + }, + "id": 62809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8319:18:89", + "memberName": "_isApprovedOrOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 50893, + "src": "8313:24:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) view returns (bool)" + } + }, + "id": 62812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8313:42:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 62801, + "id": 62813, + "nodeType": "Return", + "src": "8306:49:89" + } + ] + }, + "baseFunctions": [ + 50893 + ], + "documentation": { + "id": 62792, + "nodeType": "StructuredDocumentation", + "src": "8100:46:89", + "text": "@dev Override {ERC721-_isApprovedOrOwner}." + }, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_isApprovedOrOwner", + "nameLocation": "8158:18:89", + "overrides": { + "id": 62798, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8233:8:89" + }, + "parameters": { + "id": 62797, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62794, + "mutability": "mutable", + "name": "spender", + "nameLocation": "8185:7:89", + "nodeType": "VariableDeclaration", + "scope": 62815, + "src": "8177:15:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 62793, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8177:7:89", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 62796, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "8202:7:89", + "nodeType": "VariableDeclaration", + "scope": 62815, + "src": "8194:15:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62795, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8194:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8176:34:89" + }, + "returnParameters": { + "id": 62801, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62800, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 62815, + "src": "8251:4:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 62799, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8251:4:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "8250:6:89" + }, + "scope": 63146, + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + }, + { + "id": 62831, + "nodeType": "FunctionDefinition", + "src": "8436:108:89", + "nodes": [], + "body": { + "id": 62830, + "nodeType": "Block", + "src": "8497:47:89", + "nodes": [], + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 62828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 62823, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "8510:5:89", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 62824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8516:9:89", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "8510:15:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "arguments": [ + { + "id": 62826, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62818, + "src": "8536:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 62825, + "name": "_expiry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62855, + "src": "8528:7:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint64_$", + "typeString": "function (uint256) view returns (uint64)" + } + }, + "id": 62827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8528:11:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "8510:29:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 62822, + "id": 62829, + "nodeType": "Return", + "src": "8503:36:89" + } + ] + }, + "documentation": { + "id": 62816, + "nodeType": "StructuredDocumentation", + "src": "8364:69:89", + "text": " @dev Helper method to check whether the id is expired." + }, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_isExpired", + "nameLocation": "8445:10:89", + "parameters": { + "id": 62819, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62818, + "mutability": "mutable", + "name": "id", + "nameLocation": "8464:2:89", + "nodeType": "VariableDeclaration", + "scope": 62831, + "src": "8456:10:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62817, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8456:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8455:12:89" + }, + "returnParameters": { + "id": 62822, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62821, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 62831, + "src": "8491:4:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 62820, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8491:4:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "8490:6:89" + }, + "scope": 63146, + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "id": 62855, + "nodeType": "FunctionDefinition", + "src": "8626:170:89", + "nodes": [], + "body": { + "id": 62854, + "nodeType": "Block", + "src": "8686:110:89", + "nodes": [], + "statements": [ + { + "condition": { + "arguments": [ + { + "id": 62840, + "name": "RESERVATION_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61916, + "src": "8704:16:89", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "arguments": [ + { + "id": 62842, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62834, + "src": "8731:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 62841, + "name": "_ownerOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50841, + "src": "8722:8:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 62843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8722:12:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 62839, + "name": "hasRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48606, + "src": "8696:7:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) view returns (bool)" + } + }, + "id": 62844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8696:39:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 62847, + "nodeType": "IfStatement", + "src": "8692:62:89", + "trueBody": { + "expression": { + "id": 62845, + "name": "MAX_EXPIRY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61928, + "src": "8744:10:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 62838, + "id": 62846, + "nodeType": "Return", + "src": "8737:17:89" + } + }, + { + "expression": { + "expression": { + "expression": { + "baseExpression": { + "id": 62848, + "name": "_recordOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61941, + "src": "8767:9:89", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Record_$65134_storage_$", + "typeString": "mapping(uint256 => struct INSUnified.Record storage ref)" + } + }, + "id": 62850, + "indexExpression": { + "id": 62849, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62834, + "src": "8777:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8767:13:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage", + "typeString": "struct INSUnified.Record storage ref" + } + }, + "id": 62851, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8781:3:89", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65133, + "src": "8767:17:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_storage", + "typeString": "struct INSUnified.MutableRecord storage ref" + } + }, + "id": 62852, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8785:6:89", + "memberName": "expiry", + "nodeType": "MemberAccess", + "referencedDeclaration": 65124, + "src": "8767:24:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 62838, + "id": 62853, + "nodeType": "Return", + "src": "8760:31:89" + } + ] + }, + "documentation": { + "id": 62832, + "nodeType": "StructuredDocumentation", + "src": "8548:75:89", + "text": " @dev Helper method to calculate expiry time for specific id." + }, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_expiry", + "nameLocation": "8635:7:89", + "parameters": { + "id": 62835, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62834, + "mutability": "mutable", + "name": "id", + "nameLocation": "8651:2:89", + "nodeType": "VariableDeclaration", + "scope": 62855, + "src": "8643:10:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62833, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8643:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8642:12:89" + }, + "returnParameters": { + "id": 62838, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62837, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 62855, + "src": "8678:6:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 62836, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "8678:6:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "8677:8:89" + }, + "scope": 63146, + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "id": 62898, + "nodeType": "FunctionDefinition", + "src": "8891:278:89", + "nodes": [], + "body": { + "id": 62897, + "nodeType": "Block", + "src": "8976:193:89", + "nodes": [], + "statements": [ + { + "assignments": [ + 62866 + ], + "declarations": [ + { + "constant": false, + "id": 62866, + "mutability": "mutable", + "name": "owner", + "nameLocation": "8990:5:89", + "nodeType": "VariableDeclaration", + "scope": 62897, + "src": "8982:13:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 62865, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8982:7:89", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 62867, + "nodeType": "VariableDeclarationStatement", + "src": "8982:13:89" + }, + { + "body": { + "id": 62893, + "nodeType": "Block", + "src": "9018:128:89", + "statements": [ + { + "expression": { + "id": 62877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 62871, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62866, + "src": "9026:5:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "expression": { + "baseExpression": { + "id": 62872, + "name": "_recordOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61941, + "src": "9034:9:89", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Record_$65134_storage_$", + "typeString": "mapping(uint256 => struct INSUnified.Record storage ref)" + } + }, + "id": 62874, + "indexExpression": { + "id": 62873, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62860, + "src": "9044:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9034:13:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage", + "typeString": "struct INSUnified.Record storage ref" + } + }, + "id": 62875, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9048:3:89", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65133, + "src": "9034:17:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_storage", + "typeString": "struct INSUnified.MutableRecord storage ref" + } + }, + "id": 62876, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9052:5:89", + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 65122, + "src": "9034:23:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "9026:31:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 62878, + "nodeType": "ExpressionStatement", + "src": "9026:31:89" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 62881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 62879, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62866, + "src": "9069:5:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 62880, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62858, + "src": "9078:7:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "9069:16:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 62884, + "nodeType": "IfStatement", + "src": "9065:33:89", + "trueBody": { + "expression": { + "hexValue": "74727565", + "id": 62882, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9094:4:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 62864, + "id": 62883, + "nodeType": "Return", + "src": "9087:11:89" + } + }, + { + "expression": { + "id": 62891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 62885, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62860, + "src": "9106:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "expression": { + "baseExpression": { + "id": 62886, + "name": "_recordOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61941, + "src": "9111:9:89", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Record_$65134_storage_$", + "typeString": "mapping(uint256 => struct INSUnified.Record storage ref)" + } + }, + "id": 62888, + "indexExpression": { + "id": 62887, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62860, + "src": "9121:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9111:13:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage", + "typeString": "struct INSUnified.Record storage ref" + } + }, + "id": 62889, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9125:5:89", + "memberName": "immut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65130, + "src": "9111:19:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ImmutableRecord_$65117_storage", + "typeString": "struct INSUnified.ImmutableRecord storage ref" + } + }, + "id": 62890, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9131:8:89", + "memberName": "parentId", + "nodeType": "MemberAccess", + "referencedDeclaration": 65114, + "src": "9111:28:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9106:33:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 62892, + "nodeType": "ExpressionStatement", + "src": "9106:33:89" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 62870, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 62868, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62860, + "src": "9009:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 62869, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9015:1:89", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "9009:7:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 62894, + "nodeType": "WhileStatement", + "src": "9002:144:89" + }, + { + "expression": { + "hexValue": "66616c7365", + "id": 62895, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9159:5:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "functionReturnParameters": 62864, + "id": 62896, + "nodeType": "Return", + "src": "9152:12:89" + } + ] + }, + "documentation": { + "id": 62856, + "nodeType": "StructuredDocumentation", + "src": "8800:88:89", + "text": " @dev Helper method to check whether the address is owner of parent token." + }, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_isHierarchyOwner", + "nameLocation": "8900:17:89", + "parameters": { + "id": 62861, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62858, + "mutability": "mutable", + "name": "spender", + "nameLocation": "8926:7:89", + "nodeType": "VariableDeclaration", + "scope": 62898, + "src": "8918:15:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 62857, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8918:7:89", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 62860, + "mutability": "mutable", + "name": "id", + "nameLocation": "8943:2:89", + "nodeType": "VariableDeclaration", + "scope": 62898, + "src": "8935:10:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62859, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8935:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8917:29:89" + }, + "returnParameters": { + "id": 62864, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62863, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 62898, + "src": "8970:4:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 62862, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8970:4:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "8969:6:89" + }, + "scope": 63146, + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "id": 62919, + "nodeType": "FunctionDefinition", + "src": "9336:167:89", + "nodes": [], + "body": { + "id": 62918, + "nodeType": "Block", + "src": "9420:83:89", + "nodes": [], + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 62916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 62909, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62901, + "src": "9452:7:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 62910, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62903, + "src": "9461:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 62908, + "name": "_isApprovedOrOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 62815 + ], + "referencedDeclaration": 62815, + "src": "9433:18:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) view returns (bool)" + } + }, + "id": 62911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9433:31:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "id": 62913, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62901, + "src": "9486:7:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 62914, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62903, + "src": "9495:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 62912, + "name": "_isHierarchyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62898, + "src": "9468:17:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) view returns (bool)" + } + }, + "id": 62915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9468:30:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "9433:65:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 62907, + "id": 62917, + "nodeType": "Return", + "src": "9426:72:89" + } + ] + }, + "documentation": { + "id": 62899, + "nodeType": "StructuredDocumentation", + "src": "9173:160:89", + "text": " @dev Returns whether the owner rules is satisfied.\n Returns true only if the spender is owner, or approved spender, or owner of parent token." + }, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_checkOwnerRules", + "nameLocation": "9345:16:89", + "parameters": { + "id": 62904, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62901, + "mutability": "mutable", + "name": "spender", + "nameLocation": "9370:7:89", + "nodeType": "VariableDeclaration", + "scope": 62919, + "src": "9362:15:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 62900, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9362:7:89", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 62903, + "mutability": "mutable", + "name": "id", + "nameLocation": "9387:2:89", + "nodeType": "VariableDeclaration", + "scope": 62919, + "src": "9379:10:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62902, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9379:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "9361:29:89" + }, + "returnParameters": { + "id": 62907, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62906, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 62919, + "src": "9414:4:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 62905, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "9414:4:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "9413:6:89" + }, + "scope": 63146, + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "id": 62945, + "nodeType": "FunctionDefinition", + "src": "9612:295:89", + "nodes": [], + "body": { + "id": 62944, + "nodeType": "Block", + "src": "9696:211:89", + "nodes": [], + "statements": [ + { + "assignments": [ + 62929, + 62931 + ], + "declarations": [ + { + "constant": false, + "id": 62929, + "mutability": "mutable", + "name": "allowed", + "nameLocation": "9708:7:89", + "nodeType": "VariableDeclaration", + "scope": 62944, + "src": "9703:12:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 62928, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "9703:4:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 62931, + "mutability": "mutable", + "name": "errorCode", + "nameLocation": "9724:9:89", + "nodeType": "VariableDeclaration", + "scope": 62944, + "src": "9717:16:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 62930, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "9717:6:89", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "id": 62938, + "initialValue": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 62933, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 52298, + "src": "9750:10:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 62934, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9750:12:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 62935, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62922, + "src": "9764:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 62936, + "name": "indicator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62925, + "src": "9768:9:89", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + ], + "id": 62932, + "name": "canSetRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62765, + "src": "9737:12:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$_t_userDefinedValueType$_ModifyingIndicator_$69704_$returns$_t_bool_$_t_bytes4_$", + "typeString": "function (address,uint256,ModifyingIndicator) view returns (bool,bytes4)" + } + }, + "id": 62937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9737:41:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes4_$", + "typeString": "tuple(bool,bytes4)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9702:76:89" + }, + { + "condition": { + "id": 62940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "9788:8:89", + "subExpression": { + "id": 62939, + "name": "allowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62929, + "src": "9789:7:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 62943, + "nodeType": "IfStatement", + "src": "9784:119:89", + "trueBody": { + "id": 62942, + "nodeType": "Block", + "src": "9798:105:89", + "statements": [ + { + "AST": { + "nativeSrc": "9831:66:89", + "nodeType": "YulBlock", + "src": "9831:66:89", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9848:3:89", + "nodeType": "YulLiteral", + "src": "9848:3:89", + "type": "", + "value": "0x0" + }, + { + "name": "errorCode", + "nativeSrc": "9853:9:89", + "nodeType": "YulIdentifier", + "src": "9853:9:89" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "9841:6:89", + "nodeType": "YulIdentifier", + "src": "9841:6:89" + }, + "nativeSrc": "9841:22:89", + "nodeType": "YulFunctionCall", + "src": "9841:22:89" + }, + "nativeSrc": "9841:22:89", + "nodeType": "YulExpressionStatement", + "src": "9841:22:89" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9879:3:89", + "nodeType": "YulLiteral", + "src": "9879:3:89", + "type": "", + "value": "0x0" + }, + { + "kind": "number", + "nativeSrc": "9884:4:89", + "nodeType": "YulLiteral", + "src": "9884:4:89", + "type": "", + "value": "0x04" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "9872:6:89", + "nodeType": "YulIdentifier", + "src": "9872:6:89" + }, + "nativeSrc": "9872:17:89", + "nodeType": "YulFunctionCall", + "src": "9872:17:89" + }, + "nativeSrc": "9872:17:89", + "nodeType": "YulExpressionStatement", + "src": "9872:17:89" + } + ] + }, + "evmVersion": "istanbul", + "externalReferences": [ + { + "declaration": 62931, + "isOffset": false, + "isSlot": false, + "src": "9853:9:89", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 62941, + "nodeType": "InlineAssembly", + "src": "9806:91:89" + } + ] + } + } + ] + }, + "documentation": { + "id": 62920, + "nodeType": "StructuredDocumentation", + "src": "9507:102:89", + "text": " @dev Helper method to ensure msg.sender is authorized to modify record of the token id." + }, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_requireAuthorized", + "nameLocation": "9621:18:89", + "parameters": { + "id": 62926, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62922, + "mutability": "mutable", + "name": "id", + "nameLocation": "9648:2:89", + "nodeType": "VariableDeclaration", + "scope": 62945, + "src": "9640:10:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62921, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9640:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 62925, + "mutability": "mutable", + "name": "indicator", + "nameLocation": "9671:9:89", + "nodeType": "VariableDeclaration", + "scope": 62945, + "src": "9652:28:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + }, + "typeName": { + "id": 62924, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 62923, + "name": "ModifyingIndicator", + "nameLocations": [ + "9652:18:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69704, + "src": "9652:18:89" + }, + "referencedDeclaration": 69704, + "src": "9652:18:89", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + }, + "visibility": "internal" + } + ], + "src": "9639:42:89" + }, + "returnParameters": { + "id": 62927, + "nodeType": "ParameterList", + "parameters": [], + "src": "9696:0:89" + }, + "scope": 63146, + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "id": 62965, + "nodeType": "FunctionDefinition", + "src": "10012:159:89", + "nodes": [], + "body": { + "id": 62964, + "nodeType": "Block", + "src": "10088:83:89", + "nodes": [], + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 62959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 62953, + "name": "expiry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62950, + "src": "10098:6:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "expression": { + "baseExpression": { + "id": 62954, + "name": "_recordOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61941, + "src": "10107:9:89", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Record_$65134_storage_$", + "typeString": "mapping(uint256 => struct INSUnified.Record storage ref)" + } + }, + "id": 62956, + "indexExpression": { + "id": 62955, + "name": "parentId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62948, + "src": "10117:8:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10107:19:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage", + "typeString": "struct INSUnified.Record storage ref" + } + }, + "id": 62957, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10127:3:89", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65133, + "src": "10107:23:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_storage", + "typeString": "struct INSUnified.MutableRecord storage ref" + } + }, + "id": 62958, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10131:6:89", + "memberName": "expiry", + "nodeType": "MemberAccess", + "referencedDeclaration": 65124, + "src": "10107:30:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "10098:39:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 62963, + "nodeType": "IfStatement", + "src": "10094:72:89", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 62960, + "name": "ExceedParentExpiry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65088, + "src": "10146:18:89", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 62961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10146:20:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 62962, + "nodeType": "RevertStatement", + "src": "10139:27:89" + } + } + ] + }, + "documentation": { + "id": 62946, + "nodeType": "StructuredDocumentation", + "src": "9911:98:89", + "text": " @dev Helper method to ensure expiry of an id is lower or equal expiry of parent id." + }, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_requireValidExpiry", + "nameLocation": "10021:19:89", + "parameters": { + "id": 62951, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62948, + "mutability": "mutable", + "name": "parentId", + "nameLocation": "10049:8:89", + "nodeType": "VariableDeclaration", + "scope": 62965, + "src": "10041:16:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62947, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10041:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 62950, + "mutability": "mutable", + "name": "expiry", + "nameLocation": "10066:6:89", + "nodeType": "VariableDeclaration", + "scope": 62965, + "src": "10059:13:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 62949, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "10059:6:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "10040:33:89" + }, + "returnParameters": { + "id": 62952, + "nodeType": "ParameterList", + "parameters": [], + "src": "10088:0:89" + }, + "scope": 63146, + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "id": 63017, + "nodeType": "FunctionDefinition", + "src": "10415:369:89", + "nodes": [], + "body": { + "id": 63016, + "nodeType": "Block", + "src": "10471:313:89", + "nodes": [], + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 62974, + "name": "_recordOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61941, + "src": "10497:9:89", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Record_$65134_storage_$", + "typeString": "mapping(uint256 => struct INSUnified.Record storage ref)" + } + }, + "id": 62976, + "indexExpression": { + "id": 62975, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62968, + "src": "10507:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10497:13:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage", + "typeString": "struct INSUnified.Record storage ref" + } + }, + "id": 62977, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10511:5:89", + "memberName": "immut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65130, + "src": "10497:19:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ImmutableRecord_$65117_storage", + "typeString": "struct INSUnified.ImmutableRecord storage ref" + } + }, + "id": 62978, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10517:8:89", + "memberName": "parentId", + "nodeType": "MemberAccess", + "referencedDeclaration": 65114, + "src": "10497:28:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 62979, + "name": "expiry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62970, + "src": "10527:6:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 62973, + "name": "_requireValidExpiry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62965, + "src": "10477:19:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint64_$returns$__$", + "typeString": "function (uint256,uint64) view" + } + }, + "id": 62980, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10477:57:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 62981, + "nodeType": "ExpressionStatement", + "src": "10477:57:89" + }, + { + "condition": { + "arguments": [ + { + "id": 62983, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62968, + "src": "10554:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 62982, + "name": "available", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62062, + "src": "10544:9:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 62984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10544:13:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 62988, + "nodeType": "IfStatement", + "src": "10540:63:89", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 62985, + "name": "NameMustBeRegisteredOrInGracePeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65109, + "src": "10566:35:89", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 62986, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10566:37:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 62987, + "nodeType": "RevertStatement", + "src": "10559:44:89" + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 62995, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 62989, + "name": "expiry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62970, + "src": "10613:6:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "expression": { + "expression": { + "baseExpression": { + "id": 62990, + "name": "_recordOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61941, + "src": "10623:9:89", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Record_$65134_storage_$", + "typeString": "mapping(uint256 => struct INSUnified.Record storage ref)" + } + }, + "id": 62992, + "indexExpression": { + "id": 62991, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62968, + "src": "10633:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10623:13:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage", + "typeString": "struct INSUnified.Record storage ref" + } + }, + "id": 62993, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10637:3:89", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65133, + "src": "10623:17:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_storage", + "typeString": "struct INSUnified.MutableRecord storage ref" + } + }, + "id": 62994, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10641:6:89", + "memberName": "expiry", + "nodeType": "MemberAccess", + "referencedDeclaration": 65124, + "src": "10623:24:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "10613:34:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 62999, + "nodeType": "IfStatement", + "src": "10609:84:89", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 62996, + "name": "ExpiryTimeMustBeLargerThanTheOldOne", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65106, + "src": "10656:35:89", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 62997, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10656:37:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 62998, + "nodeType": "RevertStatement", + "src": "10649:44:89" + } + }, + { + "assignments": [ + 63002 + ], + "declarations": [ + { + "constant": false, + "id": 63002, + "mutability": "mutable", + "name": "record", + "nameLocation": "10714:6:89", + "nodeType": "VariableDeclaration", + "scope": 63016, + "src": "10700:20:89", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record" + }, + "typeName": { + "id": 63001, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 63000, + "name": "Record", + "nameLocations": [ + "10700:6:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65134, + "src": "10700:6:89" + }, + "referencedDeclaration": 65134, + "src": "10700:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage_ptr", + "typeString": "struct INSUnified.Record" + } + }, + "visibility": "internal" + } + ], + "id": 63003, + "nodeType": "VariableDeclarationStatement", + "src": "10700:20:89" + }, + { + "expression": { + "id": 63014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "expression": { + "baseExpression": { + "id": 63004, + "name": "_recordOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61941, + "src": "10726:9:89", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Record_$65134_storage_$", + "typeString": "mapping(uint256 => struct INSUnified.Record storage ref)" + } + }, + "id": 63006, + "indexExpression": { + "id": 63005, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62968, + "src": "10736:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10726:13:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage", + "typeString": "struct INSUnified.Record storage ref" + } + }, + "id": 63007, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10740:3:89", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65133, + "src": "10726:17:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_storage", + "typeString": "struct INSUnified.MutableRecord storage ref" + } + }, + "id": 63008, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "10744:6:89", + "memberName": "expiry", + "nodeType": "MemberAccess", + "referencedDeclaration": 65124, + "src": "10726:24:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 63013, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "expression": { + "id": 63009, + "name": "record", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63002, + "src": "10753:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + }, + "id": 63010, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10760:3:89", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65133, + "src": "10753:10:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_memory_ptr", + "typeString": "struct INSUnified.MutableRecord memory" + } + }, + "id": 63011, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "10764:6:89", + "memberName": "expiry", + "nodeType": "MemberAccess", + "referencedDeclaration": 65124, + "src": "10753:17:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 63012, + "name": "expiry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62970, + "src": "10773:6:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "10753:26:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "10726:53:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 63015, + "nodeType": "ExpressionStatement", + "src": "10726:53:89" + } + ] + }, + "documentation": { + "id": 62966, + "nodeType": "StructuredDocumentation", + "src": "10175:237:89", + "text": " @dev Helper method to set expiry time of a token.\n Requirement:\n - The token must be registered or in grace period.\n - Expiry time must be larger than the old one.\n Emits an event {RecordUpdated}." + }, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_setExpiry", + "nameLocation": "10424:10:89", + "parameters": { + "id": 62971, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62968, + "mutability": "mutable", + "name": "id", + "nameLocation": "10443:2:89", + "nodeType": "VariableDeclaration", + "scope": 63017, + "src": "10435:10:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62967, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10435:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 62970, + "mutability": "mutable", + "name": "expiry", + "nameLocation": "10454:6:89", + "nodeType": "VariableDeclaration", + "scope": 63017, + "src": "10447:13:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 62969, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "10447:6:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "10434:27:89" + }, + "returnParameters": { + "id": 62972, + "nodeType": "ParameterList", + "parameters": [], + "src": "10471:0:89" + }, + "scope": 63146, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "id": 63034, + "nodeType": "FunctionDefinition", + "src": "10892:147:89", + "nodes": [], + "body": { + "id": 63033, + "nodeType": "Block", + "src": "10946:93:89", + "nodes": [], + "statements": [ + { + "expression": { + "id": 63025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 63023, + "name": "_gracePeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61935, + "src": "10952:12:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 63024, + "name": "gracePeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63020, + "src": "10967:11:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "10952:26:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 63026, + "nodeType": "ExpressionStatement", + "src": "10952:26:89" + }, + { + "eventCall": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 63028, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 52298, + "src": "11008:10:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 63029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11008:12:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 63030, + "name": "gracePeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63020, + "src": "11022:11:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 63027, + "name": "GracePeriodUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65148, + "src": "10989:18:89", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint64_$returns$__$", + "typeString": "function (address,uint64)" + } + }, + "id": 63031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10989:45:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 63032, + "nodeType": "EmitStatement", + "src": "10984:50:89" + } + ] + }, + "documentation": { + "id": 63018, + "nodeType": "StructuredDocumentation", + "src": "10788:101:89", + "text": " @dev Helper method to set grace period.\n Emits an event {GracePeriodUpdated}." + }, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_setGracePeriod", + "nameLocation": "10901:15:89", + "parameters": { + "id": 63021, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 63020, + "mutability": "mutable", + "name": "gracePeriod", + "nameLocation": "10924:11:89", + "nodeType": "VariableDeclaration", + "scope": 63034, + "src": "10917:18:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 63019, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "10917:6:89", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "10916:20:89" + }, + "returnParameters": { + "id": 63022, + "nodeType": "ParameterList", + "parameters": [], + "src": "10946:0:89" + }, + "scope": 63146, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "id": 63115, + "nodeType": "FunctionDefinition", + "src": "11083:518:89", + "nodes": [], + "body": { + "id": 63114, + "nodeType": "Block", + "src": "11158:443:89", + "nodes": [], + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 63048, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63037, + "src": "11180:4:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 63049, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63039, + "src": "11186:2:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 63050, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63041, + "src": "11190:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 63045, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "11164:5:89", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_super$_RNSUnified_$63146_$", + "typeString": "type(contract super RNSUnified)" + } + }, + "id": 63047, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11170:9:89", + "memberName": "_transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 51166, + "src": "11164:15:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 63051, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11164:29:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 63052, + "nodeType": "ExpressionStatement", + "src": "11164:29:89" + }, + { + "assignments": [ + 63055 + ], + "declarations": [ + { + "constant": false, + "id": 63055, + "mutability": "mutable", + "name": "record", + "nameLocation": "11214:6:89", + "nodeType": "VariableDeclaration", + "scope": 63114, + "src": "11200:20:89", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record" + }, + "typeName": { + "id": 63054, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 63053, + "name": "Record", + "nameLocations": [ + "11200:6:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65134, + "src": "11200:6:89" + }, + "referencedDeclaration": 65134, + "src": "11200:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage_ptr", + "typeString": "struct INSUnified.Record" + } + }, + "visibility": "internal" + } + ], + "id": 63056, + "nodeType": "VariableDeclarationStatement", + "src": "11200:20:89" + }, + { + "assignments": [ + 63059 + ], + "declarations": [ + { + "constant": false, + "id": 63059, + "mutability": "mutable", + "name": "indicator", + "nameLocation": "11245:9:89", + "nodeType": "VariableDeclaration", + "scope": 63114, + "src": "11226:28:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + }, + "typeName": { + "id": 63058, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 63057, + "name": "ModifyingIndicator", + "nameLocations": [ + "11226:18:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 69704, + "src": "11226:18:89" + }, + "referencedDeclaration": 69704, + "src": "11226:18:89", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + }, + "visibility": "internal" + } + ], + "id": 63064, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 63060, + "name": "ModifyingField", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66324, + "src": "11257:14:89", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ModifyingField_$66324_$", + "typeString": "type(enum ModifyingField)" + } + }, + "id": 63061, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "11272:5:89", + "memberName": "Owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 66321, + "src": "11257:20:89", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ModifyingField_$66324", + "typeString": "enum ModifyingField" + } + }, + "id": 63062, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11278:9:89", + "memberName": "indicator", + "nodeType": "MemberAccess", + "referencedDeclaration": 66344, + "src": "11257:30:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_ModifyingField_$66324_$returns$_t_userDefinedValueType$_ModifyingIndicator_$69704_$attached_to$_t_enum$_ModifyingField_$66324_$", + "typeString": "function (enum ModifyingField) pure returns (ModifyingIndicator)" + } + }, + "id": 63063, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11257:32:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11226:63:89" + }, + { + "expression": { + "id": 63075, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "expression": { + "baseExpression": { + "id": 63065, + "name": "_recordOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61941, + "src": "11296:9:89", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Record_$65134_storage_$", + "typeString": "mapping(uint256 => struct INSUnified.Record storage ref)" + } + }, + "id": 63067, + "indexExpression": { + "id": 63066, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63041, + "src": "11306:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11296:13:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage", + "typeString": "struct INSUnified.Record storage ref" + } + }, + "id": 63068, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11310:3:89", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65133, + "src": "11296:17:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_storage", + "typeString": "struct INSUnified.MutableRecord storage ref" + } + }, + "id": 63069, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "11314:5:89", + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 65122, + "src": "11296:23:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 63074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "expression": { + "id": 63070, + "name": "record", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63055, + "src": "11322:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + }, + "id": 63071, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11329:3:89", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65133, + "src": "11322:10:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_memory_ptr", + "typeString": "struct INSUnified.MutableRecord memory" + } + }, + "id": 63072, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "11333:5:89", + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 65122, + "src": "11322:16:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 63073, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63039, + "src": "11341:2:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "11322:21:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "11296:47:89", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 63076, + "nodeType": "ExpressionStatement", + "src": "11296:47:89" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 63088, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 63082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "11353:46:89", + "subExpression": { + "arguments": [ + { + "id": 63078, + "name": "PROTECTED_SETTLER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61921, + "src": "11362:22:89", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 63079, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 52298, + "src": "11386:10:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 63080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11386:12:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 63077, + "name": "hasRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48606, + "src": "11354:7:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) view returns (bool)" + } + }, + "id": 63081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11354:45:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "expression": { + "expression": { + "baseExpression": { + "id": 63083, + "name": "_recordOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61941, + "src": "11403:9:89", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Record_$65134_storage_$", + "typeString": "mapping(uint256 => struct INSUnified.Record storage ref)" + } + }, + "id": 63085, + "indexExpression": { + "id": 63084, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63041, + "src": "11413:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11403:13:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage", + "typeString": "struct INSUnified.Record storage ref" + } + }, + "id": 63086, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11417:3:89", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65133, + "src": "11403:17:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_storage", + "typeString": "struct INSUnified.MutableRecord storage ref" + } + }, + "id": 63087, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11421:9:89", + "memberName": "protected", + "nodeType": "MemberAccess", + "referencedDeclaration": 65126, + "src": "11403:27:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "11353:77:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 63107, + "nodeType": "IfStatement", + "src": "11349:201:89", + "trueBody": { + "id": 63106, + "nodeType": "Block", + "src": "11432:118:89", + "statements": [ + { + "expression": { + "id": 63095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "expression": { + "baseExpression": { + "id": 63089, + "name": "_recordOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61941, + "src": "11440:9:89", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Record_$65134_storage_$", + "typeString": "mapping(uint256 => struct INSUnified.Record storage ref)" + } + }, + "id": 63091, + "indexExpression": { + "id": 63090, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63041, + "src": "11450:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11440:13:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage", + "typeString": "struct INSUnified.Record storage ref" + } + }, + "id": 63092, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11454:3:89", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65133, + "src": "11440:17:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_storage", + "typeString": "struct INSUnified.MutableRecord storage ref" + } + }, + "id": 63093, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "11458:9:89", + "memberName": "protected", + "nodeType": "MemberAccess", + "referencedDeclaration": 65126, + "src": "11440:27:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 63094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11470:5:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "11440:35:89", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 63096, + "nodeType": "ExpressionStatement", + "src": "11440:35:89" + }, + { + "expression": { + "id": 63104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 63097, + "name": "indicator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63059, + "src": "11483:9:89", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + }, + "function": 69871, + "id": 63103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 63098, + "name": "indicator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63059, + "src": "11495:9:89", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 63099, + "name": "ModifyingField", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66324, + "src": "11507:14:89", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ModifyingField_$66324_$", + "typeString": "type(enum ModifyingField)" + } + }, + "id": 63100, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "11522:9:89", + "memberName": "Protected", + "nodeType": "MemberAccess", + "referencedDeclaration": 66323, + "src": "11507:24:89", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ModifyingField_$66324", + "typeString": "enum ModifyingField" + } + }, + "id": 63101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11532:9:89", + "memberName": "indicator", + "nodeType": "MemberAccess", + "referencedDeclaration": 66344, + "src": "11507:34:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_ModifyingField_$66324_$returns$_t_userDefinedValueType$_ModifyingIndicator_$69704_$attached_to$_t_enum$_ModifyingField_$66324_$", + "typeString": "function (enum ModifyingField) pure returns (ModifyingIndicator)" + } + }, + "id": 63102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11507:36:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + }, + "src": "11495:48:89", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + }, + "src": "11483:60:89", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + }, + "id": 63105, + "nodeType": "ExpressionStatement", + "src": "11483:60:89" + } + ] + } + }, + { + "eventCall": { + "arguments": [ + { + "id": 63109, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63041, + "src": "11574:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 63110, + "name": "indicator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63059, + "src": "11578:9:89", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + }, + { + "id": 63111, + "name": "record", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63055, + "src": "11589:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + }, + { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + ], + "id": 63108, + "name": "RecordUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65159, + "src": "11560:13:89", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_userDefinedValueType$_ModifyingIndicator_$69704_$_t_struct$_Record_$65134_memory_ptr_$returns$__$", + "typeString": "function (uint256,ModifyingIndicator,struct INSUnified.Record memory)" + } + }, + "id": 63112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11560:36:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 63113, + "nodeType": "EmitStatement", + "src": "11555:41:89" + } + ] + }, + "baseFunctions": [ + 51166 + ], + "documentation": { + "id": 63035, + "nodeType": "StructuredDocumentation", + "src": "11043:37:89", + "text": "@dev Override {ERC721-_transfer}." + }, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_transfer", + "nameLocation": "11092:9:89", + "overrides": { + "id": 63043, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11149:8:89" + }, + "parameters": { + "id": 63042, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 63037, + "mutability": "mutable", + "name": "from", + "nameLocation": "11110:4:89", + "nodeType": "VariableDeclaration", + "scope": 63115, + "src": "11102:12:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 63036, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11102:7:89", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 63039, + "mutability": "mutable", + "name": "to", + "nameLocation": "11124:2:89", + "nodeType": "VariableDeclaration", + "scope": 63115, + "src": "11116:10:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 63038, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11116:7:89", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 63041, + "mutability": "mutable", + "name": "id", + "nameLocation": "11136:2:89", + "nodeType": "VariableDeclaration", + "scope": 63115, + "src": "11128:10:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 63040, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11128:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11101:38:89" + }, + "returnParameters": { + "id": 63044, + "nodeType": "ParameterList", + "parameters": [], + "src": "11158:0:89" + }, + "scope": 63146, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "id": 63145, + "nodeType": "FunctionDefinition", + "src": "11641:186:89", + "nodes": [], + "body": { + "id": 63144, + "nodeType": "Block", + "src": "11686:141:89", + "nodes": [], + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 63125, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63118, + "src": "11704:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 63122, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "11692:5:89", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_super$_RNSUnified_$63146_$", + "typeString": "type(contract super RNSUnified)" + } + }, + "id": 63124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11698:5:89", + "memberName": "_burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 51081, + "src": "11692:11:89", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 63126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11692:15:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 63127, + "nodeType": "ExpressionStatement", + "src": "11692:15:89" + }, + { + "expression": { + "id": 63132, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "11713:24:89", + "subExpression": { + "expression": { + "baseExpression": { + "id": 63128, + "name": "_recordOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61941, + "src": "11720:9:89", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Record_$65134_storage_$", + "typeString": "mapping(uint256 => struct INSUnified.Record storage ref)" + } + }, + "id": 63130, + "indexExpression": { + "id": 63129, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63118, + "src": "11730:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11720:13:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage", + "typeString": "struct INSUnified.Record storage ref" + } + }, + "id": 63131, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "11734:3:89", + "memberName": "mut", + "nodeType": "MemberAccess", + "referencedDeclaration": 65133, + "src": "11720:17:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_MutableRecord_$65127_storage", + "typeString": "struct INSUnified.MutableRecord storage ref" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 63133, + "nodeType": "ExpressionStatement", + "src": "11713:24:89" + }, + { + "assignments": [ + 63136 + ], + "declarations": [ + { + "constant": false, + "id": 63136, + "mutability": "mutable", + "name": "record", + "nameLocation": "11757:6:89", + "nodeType": "VariableDeclaration", + "scope": 63144, + "src": "11743:20:89", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record" + }, + "typeName": { + "id": 63135, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 63134, + "name": "Record", + "nameLocations": [ + "11743:6:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 65134, + "src": "11743:6:89" + }, + "referencedDeclaration": 65134, + "src": "11743:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_storage_ptr", + "typeString": "struct INSUnified.Record" + } + }, + "visibility": "internal" + } + ], + "id": 63137, + "nodeType": "VariableDeclarationStatement", + "src": "11743:20:89" + }, + { + "eventCall": { + "arguments": [ + { + "id": 63139, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63118, + "src": "11788:2:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 63140, + "name": "USER_FIELDS_INDICATOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 69748, + "src": "11792:21:89", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + } + }, + { + "id": 63141, + "name": "record", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63136, + "src": "11815:6:89", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_userDefinedValueType$_ModifyingIndicator_$69704", + "typeString": "ModifyingIndicator" + }, + { + "typeIdentifier": "t_struct$_Record_$65134_memory_ptr", + "typeString": "struct INSUnified.Record memory" + } + ], + "id": 63138, + "name": "RecordUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 65159, + "src": "11774:13:89", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_userDefinedValueType$_ModifyingIndicator_$69704_$_t_struct$_Record_$65134_memory_ptr_$returns$__$", + "typeString": "function (uint256,ModifyingIndicator,struct INSUnified.Record memory)" + } + }, + "id": 63142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11774:48:89", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 63143, + "nodeType": "EmitStatement", + "src": "11769:53:89" + } + ] + }, + "baseFunctions": [ + 51081 + ], + "documentation": { + "id": 63116, + "nodeType": "StructuredDocumentation", + "src": "11605:33:89", + "text": "@dev Override {ERC721-_burn}." + }, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_burn", + "nameLocation": "11650:5:89", + "overrides": { + "id": 63120, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11677:8:89" + }, + "parameters": { + "id": 63119, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 63118, + "mutability": "mutable", + "name": "id", + "nameLocation": "11664:2:89", + "nodeType": "VariableDeclaration", + "scope": 63145, + "src": "11656:10:89", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 63117, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11656:7:89", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11655:12:89" + }, + "returnParameters": { + "id": 63121, + "nodeType": "ParameterList", + "parameters": [], + "src": "11686:0:89" + }, + "scope": 63146, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 61896, + "name": "Initializable", + "nameLocations": [ + "619:13:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 50240, + "src": "619:13:89" + }, + "id": 61897, + "nodeType": "InheritanceSpecifier", + "src": "619:13:89" + }, + { + "baseName": { + "id": 61898, + "name": "RNSToken", + "nameLocations": [ + "634:8:89" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 61873, + "src": "634:8:89" + }, + "id": 61899, + "nodeType": "InheritanceSpecifier", + "src": "634:8:89" + } + ], + "canonicalName": "RNSUnified", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "linearizedBaseContracts": [ + 63146, + 61873, + 65321, + 501, + 51858, + 51929, + 51898, + 50348, + 51504, + 490, + 51340, + 51956, + 51456, + 48967, + 48842, + 52671, + 52683, + 49065, + 49040, + 52308, + 50240 + ], + "name": "RNSUnified", + "nameLocation": "605:10:89", + "scope": 63147, + "usedErrors": [ + 65082, + 65085, + 65088, + 65091, + 65094, + 65097, + 65100, + 65103, + 65106, + 65109 + ], + "usedEvents": [ + 434, + 48979, + 48988, + 48997, + 50086, + 50251, + 50256, + 51355, + 51364, + 51373, + 65141, + 65148, + 65159 + ] + } + ], + "license": "MIT" + }, + "blockNumber": 21361518, + "bytecode": "0x6000608081815260c060405260a09182529060036200001f8382620001b1565b5060046200002e8282620001b1565b5050603c805460ff1916905550620000456200004b565b6200027d565b600054610100900460ff1615620000b85760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116146200010a576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200013757607f821691505b6020821081036200015857634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001ac57600081815260208120601f850160051c81016020861015620001875750805b601f850160051c820191505b81811015620001a85782815560010162000193565b5050505b505050565b81516001600160401b03811115620001cd57620001cd6200010c565b620001e581620001de845462000122565b846200015e565b602080601f8311600181146200021d5760008415620002045750858301515b600019600386901b1c1916600185901b178555620001a8565b600085815260208120601f198616915b828110156200024e578886015182559484019460019091019084016200022d565b50858210156200026d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b614303806200028d6000396000f3fe608060405234801561001057600080fd5b50600436106102f15760003560e01c806355a5133b1161019d578063abfaf005116100e9578063dbd18388116100a2578063ec63b01f1161007c578063ec63b01f1461072b578063f1e379081461073e578063fc284d1114610765578063fd3fa9191461077857600080fd5b8063dbd18388146106c9578063e63ab1e9146106da578063e985e9c5146106ef57600080fd5b8063abfaf0051461065c578063b88d4fde1461066f578063b967169014610682578063c87b56dd14610690578063ca15c873146106a3578063d547741f146106b657600080fd5b80639010d07c1161015657806396e494e81161013057806396e494e814610626578063a217fddf14610639578063a22cb46514610641578063a2309ff81461065457600080fd5b80639010d07c146105e157806391d14854146105f457806395d89b411461060757600080fd5b806355a5133b1461058257806355f804b3146105955780635c975abb146105a85780636352211e146105b357806370a08231146105c65780638456cb59146105d957600080fd5b80631cfa6ec01161025c57806333855d9f1161021557806342842e0e116101ef57806342842e0e1461051e57806342966c68146105315780634f6ccce7146105445780635569f33d1461055757600080fd5b806333855d9f146104ee57806336568abe146105035780633f4ba83a1461051657600080fd5b80631cfa6ec01461046b57806323b872dd1461047e578063248a9ca31461049157806328ed4f6c146104b55780632f2ff15d146104c85780632f745c59146104db57600080fd5b8063095ea7b3116102ae578063095ea7b3146103f5578063098799621461040a578063131a7e241461041d578063141a468c1461043057806318160ddd146104505780631a7a98e21461045857600080fd5b806301ffc9a7146102f657806303e9e6091461031e5780630570891f1461033e57806306fdde0314610370578063081812fc146103a7578063092c5b3b146103d2575b600080fd5b6103096103043660046134aa565b6107ab565b60405190151581526020015b60405180910390f35b61033161032c3660046134c7565b6107d7565b60405161031591906135b4565b61035161034c366004613642565b61092d565b604080516001600160401b039093168352602083019190915201610315565b604080518082019091526012815271526f6e696e204e616d65205365727669636560701b60208201525b60405161031591906136bf565b6103ba6103b53660046134c7565b610be4565b6040516001600160a01b039091168152602001610315565b6103e760008051602061428e83398151915281565b604051908152602001610315565b6104086104033660046136d2565b610c0b565b005b6103e7610418366004613787565b610d25565b61039a61042b3660046134c7565b610d30565b6103e761043e3660046134c7565b60096020526000908152604090205481565b603f546103e7565b61039a6104663660046134c7565b610d7d565b6104086104793660046137cf565b610e89565b61040861048c366004613810565b61101e565b6103e761049f3660046134c7565b6000908152600160208190526040909120015490565b6104086104c336600461384c565b611050565b6104086104d636600461384c565b6110aa565b6103e76104e93660046136d2565b6110d0565b6103e760008051602061426e83398151915281565b61040861051136600461384c565b611166565b6104086111e4565b61040861052c366004613810565b611207565b61040861053f3660046134c7565b611222565b6103e76105523660046134c7565b611250565b61056a610565366004613878565b6112e3565b6040516001600160401b039091168152602001610315565b61040861059036600461389b565b6113a8565b6104086105a33660046138b6565b6113d1565b603c5460ff16610309565b6103ba6105c13660046134c7565b6113e6565b6103e76105d43660046138f7565b611407565b61040861148d565b6103ba6105ef366004613912565b6114ad565b61030961060236600461384c565b6114cc565b604080518082019091526003815262524e5360e81b602082015261039a565b6103096106343660046134c7565b6114f7565b6103e7600081565b61040861064f366004613944565b611522565b6073546103e7565b61040861066a36600461396e565b61152d565b61040861067d366004613a04565b611745565b61056a6001600160401b0381565b61039a61069e3660046134c7565b611777565b6103e76106b13660046134c7565b6117ea565b6104086106c436600461384c565b611801565b60a7546001600160401b031661056a565b6103e76000805160206142ae83398151915281565b6103096106fd366004613a7f565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b610408610739366004613aa9565b611827565b6103e77f87a2b33e0b98030e29c3d23d732aa654f29b298e3891758d5f02a8b01c4840b281565b610408610773366004613878565b611911565b61078b610786366004613b2c565b611992565b6040805192151583526001600160e01b0319909116602083015201610315565b60006107b682611ad3565b806107d157506001600160e01b03198216630106c78f60e21b145b92915050565b6107df613438565b600082815260a8602052604090819020815160a081018352815460ff1692810192835260018201546060820152600282018054919384929091849160808501919061082990613b5f565b80601f016020809104026020016040519081016040528092919081815260200182805461085590613b5f565b80156108a25780601f10610877576101008083540402835291602001916108a2565b820191906000526020600020905b81548152906001019060200180831161088557829003601f168201915b5050509190925250505081526040805160808101825260038401546001600160a01b039081168252600490940154938416602080830191909152600160a01b85046001600160401b031692820192909252600160e01b90930460ff16151560608401520152905061091282611af8565b60208201516001600160401b03909116604090910152919050565b600080610938611b74565b6109423389611bbc565b61095e576040516282b42960e81b815260040160405180910390fd5b61099e8888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611bd892505050565b90506109a9816114f7565b6109c65760405163a3b8915f60e01b815260040160405180910390fd5b6000818152600560205260409020546001600160a01b0316156109ec576109ec81611bee565b6109f68482611c5d565b610a0b426001600160401b0380861690611c70565b9150610a178883611ca6565b610a1f613438565b604080516080810182526001600160a01b03808916825287166020808301919091526001600160401b03861682840152600085815260a88083528482206004015460ff600160e01b9091048116151560608087019190915287850195909552855194850186528e83529252929092205490918291610a9f91166001613ba9565b60ff1681526020018a815260200189898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509390945250509183525082815260a8602090815260409182902083518051825460ff191660ff909116178255918201516001820155918101518392919082906002820190610b2d9082613c10565b50505060209182015180516003830180546001600160a01b039283166001600160a01b031990911617905592810151600490920180546040808401516060909401511515600160e01b0260ff60e01b196001600160401b03909516600160a01b026001600160e01b0319909316959096169490941717919091169290921790915551829060008051602061424e83398151915290610bd090600019908590613ccf565b60405180910390a250965096945050505050565b6000610bef82611cec565b506000908152600760205260409020546001600160a01b031690565b6000610c1682611d4b565b9050806001600160a01b0316836001600160a01b031603610c885760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b0382161480610ca45750610ca481336106fd565b610d165760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610c7f565b610d208383611dab565b505050565b60006107d182611e19565b606081610d3c81611cec565b600083815260a8602090815260408083206009835292819020549051610d659392879101613ce8565b60405160208183030381529060405291505b50919050565b606081600003610d9b57505060408051602081019091526000815290565b600082815260a860205260409020600281018054610db890613b5f565b80601f0160208091040260200160405190810160405280929190818152602001828054610de490613b5f565b8015610e315780601f10610e0657610100808354040283529160200191610e31565b820191906000526020600020905b815481529060010190602001808311610e1457829003601f168201915b50505050509150806001015492505b8215610d775750600082815260a860209081526040918290209151610e6c918491600285019101613df6565b604051602081830303815290604052915080600101549250610e40565b610e91611b74565b8282610e9d8282611e8c565b610ea5613438565b600086815260a860205260409020600301610eca610ec36006611ead565b8790611ecf565b15610f0b57610edf6080860160608701613ea8565b6020830151901515606090910181905260018201805460ff60e01b1916600160e01b9092029190911790555b610f18610ec36005611ead565b15610f4e57610f4e87610f31606088016040890161389b565b60208501516001600160401b039091166040909101819052611edb565b610f5b610ec36003611ead565b15610f9157610f6d60208601866138f7565b60208301516001600160a01b039091169081905281546001600160a01b0319161781555b8660008051602061424e8339815191528784604051610fb1929190613ccf565b60405180910390a2610fc6610ec36004611ead565b1561101557600087815260a8602090815260409182902060040154611015926001600160a01b0390911691610fff9189019089016138f7565b8960405180602001604052806000815250611fb4565b50505050505050565b611029335b82611fe7565b6110455760405162461bcd60e51b8152600401610c7f90613ec3565b610d20838383612009565b611058611b74565b816110636004611ead565b61106d8282611e8c565b600084815260a8602090815260408083206004015481519283019091529181526110a4916001600160a01b03169085908790611fb4565b50505050565b600082815260016020819052604090912001546110c681612105565b610d20838361210f565b60006110db83611407565b821061113d5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610c7f565b506001600160a01b03919091166000908152603d60209081526040808320938352929052205490565b6001600160a01b03811633146111d65760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c7f565b6111e08282612131565b5050565b6000805160206142ae8339815191526111fc81612105565b611204612153565b50565b610d2083838360405180602001604052806000815250611745565b61122b33611023565b6112475760405162461bcd60e51b8152600401610c7f90613ec3565b61120481611bee565b600061125b603f5490565b82106112be5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610c7f565b603f82815481106112d1576112d1613f10565b90600052602060002001549050919050565b60006112ed611b74565b60008051602061428e83398151915261130581612105565b61130d613438565b600085815260a8602052604090206004015461133f906001600160401b03600160a01b90910481169086811690611c70565b6020820180516001600160401b03909216604092830152510151611364908690611edb565b60208101516040015192508460008051602061424e8339815191526113896005611ead565b83604051611398929190613ccf565b60405180910390a2505092915050565b6113b0611b74565b60008051602061428e8339815191526113c881612105565b6111e0826121a5565b60006113dc81612105565b610d2083836121fd565b60006113f182612246565b156113fe57506000919050565b6107d182611d4b565b60006001600160a01b0382166114715760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610c7f565b506001600160a01b031660009081526006602052604090205490565b6000805160206142ae8339815191526114a581612105565b611204612262565b60008281526002602052604081206114c5908361229f565b9392505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600061151a61150583611af8565b60a7546001600160401b0391821691166122ab565b421192915050565b6111e03383836122bf565b600054610100900460ff161580801561154d5750600054600160ff909116105b806115675750303b158015611567575060005460ff166001145b6115ca5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610c7f565b6000805460ff1916600117905580156115ed576000805461ff0019166101001790555b6115f860008961210f565b6116106000805160206142ae8339815191528861210f565b61162860008051602061428e8339815191528761210f565b61164060008051602061426e8339815191528661210f565b61164a83836121fd565b611653846121a5565b61165e886000611c5d565b611666613438565b6020808201516001600160401b03604090910152600080805260a89091527f89f57ae4d64764caecd045b845cfc13a5b86ba807e4a61f32108661671e72867805467ffffffffffffffff60a01b191667ffffffffffffffff60a01b17905560008051602061424e8339815191526116dd6005611ead565b836040516116ec929190613ccf565b60405180910390a250801561173b576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050565b61174f3383611fe7565b61176b5760405162461bcd60e51b8152600401610c7f90613ec3565b6110a484848484611fb4565b60608161178381611cec565b600061178d61238d565b905060008151116117ad57604051806020016040528060008152506117e2565b806117b73061241f565b6117c086612435565b6040516020016117d293929190613f26565b6040516020818303038152906040525b949350505050565b60008181526002602052604081206107d1906124c7565b6000828152600160208190526040909120015461181d81612105565b610d208383612131565b60008051602061426e83398151915261183f81612105565b600061184b6006611ead565b90506000611857613438565b602081015185151560609091015260005b8681101561173b5787878281811061188257611882613f10565b60209081029290920135600081815260a89093526040909220600401549194505060ff600160e01b9091041615158615151461190957600083815260a8602052604090819020600401805460ff60e01b1916600160e01b8915150217905551839060008051602061424e833981519152906119009087908690613ccf565b60405180910390a25b600101611868565b611919611b74565b60008051602061428e83398151915261193181612105565b611939613438565b60208101516001600160401b038416604090910181905261195b908590611edb565b8360008051602061424e8339815191526119756005611ead565b83604051611984929190613ccf565b60405180910390a250505050565b6000806119a0836007611ecf565b156119b757506000905063da698a4d60e01b611acb565b6000848152600560205260409020546001600160a01b03166119e55750600090506304a3dbd560e51b611acb565b6119f96119f26006611ead565b8490611ecf565b8015611a1a5750611a1860008051602061426e833981519152866114cc565b155b15611a3157506000905063c24b0f3f60e01b611acb565b6000611a4b60008051602061428e833981519152876114cc565b9050611a61611a5a6005611ead565b8590611ecf565b8015611a6b575080155b15611a8457506000915063ed4b948760e01b9050611acb565b611a8f846018611ecf565b8015611aa957508080611aa75750611aa78686611bbc565b155b15611ac15750600091506282b42960e81b9050611acb565b5060019150600090505b935093915050565b60006001600160e01b0319821663780e9d6360e01b14806107d157506107d1826124d1565b600081815260056020526040812054611b3b907f87a2b33e0b98030e29c3d23d732aa654f29b298e3891758d5f02a8b01c4840b2906001600160a01b03166114cc565b15611b4e57506001600160401b03919050565b50600090815260a86020526040902060040154600160a01b90046001600160401b031690565b603c5460ff1615611bba5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c7f565b565b6000611bc88383611fe7565b806114c557506114c58383612511565b6000918252805160209182012090526040902090565b611bf78161256f565b600081815260a8602052604090206003810180546001600160a01b031916905560040180546001600160e81b0319169055611c30613438565b8160008051602061424e833981519152601883604051611c51929190613ccf565b60405180910390a25050565b6073805460010190556111e08282612612565b600081841180611c7f57508183115b15611c8b5750806114c5565b611c9584846122ab565b9050818111156114c5575092915050565b600082815260a860205260409020600401546001600160401b03600160a01b909104811690821611156111e05760405163da87d84960e01b815260040160405180910390fd5b6000818152600560205260409020546001600160a01b03166112045760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610c7f565b6000818152600560205260408120546001600160a01b0316806107d15760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610c7f565b600081815260076020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611de082611d4b565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600081518015611e825760006020840160018303810160008052805b828110611e7d57828114602e600183035160f81c1480821715611e7257600186848603030180842060205260406000206000526001810187019650505b505060001901611e35565b505050505b5050600051919050565b600080611e9a338585611992565b91509150816110a4578060005260046000fd5b6000816006811115611ec157611ec1613e92565b60ff166001901b9050919050565b600082821615156114c5565b600082815260a86020526040902060010154611ef79082611ca6565b611f00826114f7565b15611f1e57604051631395a92360e01b815260040160405180910390fd5b600082815260a860205260409020600401546001600160401b03600160a01b909104811690821611611f6357604051631c21962760e11b815260040160405180910390fd5b611f6b613438565b6020908101516001600160401b03929092166040928301819052600093845260a89091529120600401805467ffffffffffffffff60a01b1916600160a01b909202919091179055565b611fbf848484612009565b611fcb848484846127ab565b6110a45760405162461bcd60e51b8152600401610c7f90613f76565b6000611ff282612246565b15611fff575060006107d1565b6114c583836128ac565b61201483838361292a565b61201c613438565b60006120286004611ead565b6020838101516001600160a01b038716908201819052600086815260a8909252604090912060040180546001600160a01b0319169091179055905061207b60008051602061426e833981519152336114cc565b1580156120a05750600083815260a86020526040902060040154600160e01b900460ff165b156120d657600083815260a860205260409020600401805460ff60e01b191690556120d3816120cf6006611ead565b1790565b90505b8260008051602061424e83398151915282846040516120f6929190613ccf565b60405180910390a25050505050565b6112048133612a9b565b6121198282612af4565b6000828152600260205260409020610d209082612b5f565b61213b8282612b74565b6000828152600260205260409020610d209082612bdb565b61215b612bf0565b603c805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60a780546001600160401b03831667ffffffffffffffff199091168117909155604080519182525133917f2f8e6689e76cebc7cf99a782594bd18a73b8d1a0fe640c99fc580dcd4de7cd1d919081900360200190a250565b607461220a828483613fc8565b50336001600160a01b03167ff765b68b6ff897de964353a0eb194e46ecea8772879eb880b4b0fd277124922c8383604051611c51929190614087565b600061225182611af8565b6001600160401b0316421192915050565b61226a611b74565b603c805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121883390565b60006114c58383612c39565b818101828110156107d157506000196107d1565b816001600160a01b0316836001600160a01b0316036123205760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610c7f565b6001600160a01b03838116600081815260086020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60606074805461239c90613b5f565b80601f01602080910402602001604051908101604052809291908181526020018280546123c890613b5f565b80156124155780601f106123ea57610100808354040283529160200191612415565b820191906000526020600020905b8154815290600101906020018083116123f857829003601f168201915b5050505050905090565b60606107d16001600160a01b0383166014612c63565b6060600061244283612dfe565b60010190506000816001600160401b03811115612461576124616136fc565b6040519080825280601f01601f19166020018201604052801561248b576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461249557509392505050565b60006107d1825490565b60006001600160e01b031982166380ac58cd60e01b148061250257506001600160e01b03198216635b5e139f60e01b145b806107d157506107d182612ed6565b6000805b82156125655750600082815260a860205260409020600401546001600160a01b03908116908416810361254c5760019150506107d1565b600092835260a860205260409092206001015491612515565b5060009392505050565b600061257a82611d4b565b905061258a816000846001612efb565b61259382611d4b565b600083815260076020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526006845282852080546000190190558785526005909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0382166126685760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610c7f565b6000818152600560205260409020546001600160a01b0316156126cd5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c7f565b6126db600083836001612efb565b6000818152600560205260409020546001600160a01b0316156127405760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c7f565b6001600160a01b038216600081815260066020908152604080832080546001019055848352600590915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b156128a157604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906127ef9033908990889088906004016140b6565b6020604051808303816000875af192505050801561282a575060408051601f3d908101601f19168201909252612827918101906140f3565b60015b612887573d808015612858576040519150601f19603f3d011682016040523d82523d6000602084013e61285d565b606091505b50805160000361287f5760405162461bcd60e51b8152600401610c7f90613f76565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506117e2565b506001949350505050565b6000806128b883611d4b565b9050806001600160a01b0316846001600160a01b031614806128ff57506001600160a01b0380821660009081526008602090815260408083209388168352929052205460ff165b806117e25750836001600160a01b031661291884610be4565b6001600160a01b031614949350505050565b826001600160a01b031661293d82611d4b565b6001600160a01b0316146129635760405162461bcd60e51b8152600401610c7f90614110565b6001600160a01b0382166129c55760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610c7f565b6129d28383836001612efb565b826001600160a01b03166129e582611d4b565b6001600160a01b031614612a0b5760405162461bcd60e51b8152600401610c7f90614110565b600081815260076020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260068552838620805460001901905590871680865283862080546001019055868652600590945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b612aa582826114cc565b6111e057612ab28161241f565b612abd836020612c63565b604051602001612ace929190614155565b60408051601f198184030181529082905262461bcd60e51b8252610c7f916004016136bf565b612afe82826114cc565b6111e05760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b60006114c5836001600160a01b038416612f07565b612b7e82826114cc565b156111e05760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006114c5836001600160a01b038416612f56565b603c5460ff16611bba5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c7f565b6000826000018281548110612c5057612c50613f10565b9060005260206000200154905092915050565b60606000612c728360026141ca565b612c7d9060026141e1565b6001600160401b03811115612c9457612c946136fc565b6040519080825280601f01601f191660200182016040528015612cbe576020820181803683370190505b509050600360fc1b81600081518110612cd957612cd9613f10565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612d0857612d08613f10565b60200101906001600160f81b031916908160001a9053506000612d2c8460026141ca565b612d379060016141e1565b90505b6001811115612daf576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612d6b57612d6b613f10565b1a60f81b828281518110612d8157612d81613f10565b60200101906001600160f81b031916908160001a90535060049490941c93612da8816141f4565b9050612d3a565b5083156114c55760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c7f565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310612e3d5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612e69576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612e8757662386f26fc10000830492506010015b6305f5e1008310612e9f576305f5e100830492506008015b6127108310612eb357612710830492506004015b60648310612ec5576064830492506002015b600a83106107d15760010192915050565b60006001600160e01b03198216635a05180f60e01b14806107d157506107d182613049565b6110a48484848461307e565b6000818152600183016020526040812054612f4e575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556107d1565b5060006107d1565b6000818152600183016020526040812054801561303f576000612f7a60018361420b565b8554909150600090612f8e9060019061420b565b9050818114612ff3576000866000018281548110612fae57612fae613f10565b9060005260206000200154905080876000018481548110612fd157612fd1613f10565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806130045761300461421e565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506107d1565b60009150506107d1565b60006001600160e01b03198216637965db0b60e01b14806107d157506301ffc9a760e01b6001600160e01b03198316146107d1565b61308a848484846131be565b60018111156130f95760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b6064820152608401610c7f565b816001600160a01b0385166131555761315081603f80546000838152604060208190528120829055600182018355919091527fc03004e3ce0784bf68186394306849f9b7b1200073105cd9aeb554a1802b58fd0155565b613178565b836001600160a01b0316856001600160a01b031614613178576131788582613231565b6001600160a01b0384166131945761318f816132ce565b6131b7565b846001600160a01b0316846001600160a01b0316146131b7576131b7848261337d565b5050505050565b6131ca848484846133c1565b603c5460ff16156110a45760405162461bcd60e51b815260206004820152602b60248201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760448201526a1a1a5b19481c185d5cd95960aa1b6064820152608401610c7f565b6000600161323e84611407565b613248919061420b565b6000838152603e602052604090205490915080821461329b576001600160a01b0384166000908152603d602090815260408083208584528252808320548484528184208190558352603e90915290208190555b506000918252603e602090815260408084208490556001600160a01b039094168352603d81528383209183525290812055565b603f546000906132e09060019061420b565b600083815260406020819052812054603f805493945090928490811061330857613308613f10565b9060005260206000200154905080603f838154811061332957613329613f10565b600091825260208083209091019290925582815260409182905281812084905585815290812055603f8054806133615761336161421e565b6001900381819060005260206000200160009055905550505050565b600061338883611407565b6001600160a01b039093166000908152603d602090815260408083208684528252808320859055938252603e9052919091209190915550565b815b6133cd82846141e1565b81101561343257600081815260096020526040812080549091906133f090614234565b918290555060405182907fcc2c68164f9f7f0c063ba98bcf89498c0f3f5e3acc32bf4ab46195ecb489c13b90600090a38061342a81614234565b9150506133c3565b506110a4565b604051806040016040528061346a6040518060600160405280600060ff16815260200160008152602001606081525090565b81526040805160808101825260008082526020828101829052928201819052606082015291015290565b6001600160e01b03198116811461120457600080fd5b6000602082840312156134bc57600080fd5b81356114c581613494565b6000602082840312156134d957600080fd5b5035919050565b60005b838110156134fb5781810151838201526020016134e3565b50506000910152565b6000815180845261351c8160208601602086016134e0565b601f01601f19169290920160200192915050565b805160a0808452815160ff1690840152602081015160c084015260400151606060e0840152600090613566610100850182613504565b9050602083015160018060a01b03808251166020870152806020830151166040870152506001600160401b036040820151166060860152606081015115156080860152508091505092915050565b6020815260006114c56020830184613530565b60008083601f8401126135d957600080fd5b5081356001600160401b038111156135f057600080fd5b60208301915083602082850101111561360857600080fd5b9250929050565b80356001600160a01b038116811461362657600080fd5b919050565b80356001600160401b038116811461362657600080fd5b60008060008060008060a0878903121561365b57600080fd5b8635955060208701356001600160401b0381111561367857600080fd5b61368489828a016135c7565b909650945061369790506040880161360f565b92506136a56060880161360f565b91506136b36080880161362b565b90509295509295509295565b6020815260006114c56020830184613504565b600080604083850312156136e557600080fd5b6136ee8361360f565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b038084111561372c5761372c6136fc565b604051601f8501601f19908116603f01168101908282118183101715613754576137546136fc565b8160405280935085815286868601111561376d57600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561379957600080fd5b81356001600160401b038111156137af57600080fd5b8201601f810184136137c057600080fd5b6117e284823560208401613712565b600080600083850360c08112156137e557600080fd5b84359350602085013592506080603f198201121561380257600080fd5b506040840190509250925092565b60008060006060848603121561382557600080fd5b61382e8461360f565b925061383c6020850161360f565b9150604084013590509250925092565b6000806040838503121561385f57600080fd5b8235915061386f6020840161360f565b90509250929050565b6000806040838503121561388b57600080fd5b8235915061386f6020840161362b565b6000602082840312156138ad57600080fd5b6114c58261362b565b600080602083850312156138c957600080fd5b82356001600160401b038111156138df57600080fd5b6138eb858286016135c7565b90969095509350505050565b60006020828403121561390957600080fd5b6114c58261360f565b6000806040838503121561392557600080fd5b50508035926020909101359150565b8035801515811461362657600080fd5b6000806040838503121561395757600080fd5b6139608361360f565b915061386f60208401613934565b600080600080600080600060c0888a03121561398957600080fd5b6139928861360f565b96506139a06020890161360f565b95506139ae6040890161360f565b94506139bc6060890161360f565b93506139ca6080890161362b565b925060a08801356001600160401b038111156139e557600080fd5b6139f18a828b016135c7565b989b979a50959850939692959293505050565b60008060008060808587031215613a1a57600080fd5b613a238561360f565b9350613a316020860161360f565b92506040850135915060608501356001600160401b03811115613a5357600080fd5b8501601f81018713613a6457600080fd5b613a7387823560208401613712565b91505092959194509250565b60008060408385031215613a9257600080fd5b613a9b8361360f565b915061386f6020840161360f565b600080600060408486031215613abe57600080fd5b83356001600160401b0380821115613ad557600080fd5b818601915086601f830112613ae957600080fd5b813581811115613af857600080fd5b8760208260051b8501011115613b0d57600080fd5b602092830195509350613b239186019050613934565b90509250925092565b600080600060608486031215613b4157600080fd5b613b4a8461360f565b95602085013595506040909401359392505050565b600181811c90821680613b7357607f821691505b602082108103610d7757634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60ff81811683821601908111156107d1576107d1613b93565b601f821115610d2057600081815260208120601f850160051c81016020861015613be95750805b601f850160051c820191505b81811015613c0857828155600101613bf5565b505050505050565b81516001600160401b03811115613c2957613c296136fc565b613c3d81613c378454613b5f565b84613bc2565b602080601f831160018114613c725760008415613c5a5750858301515b600019600386901b1c1916600185901b178555613c08565b600085815260208120601f198616915b82811015613ca157888601518255948401946001909101908401613c82565b5085821015613cbf5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8281526040602082015260006117e26040830184613530565b6060815260a0606082015260ff845416610100820152600060018086015461012084015260028601606061014085015260008154613d2581613b5f565b8061016088015261018085831660008114613d475760018114613d6157613d92565b60ff1984168983015282151560051b890182019450613d92565b8560005260208060002060005b85811015613d895781548c8201860152908901908201613d6e565b8b018401965050505b50505050613de26080860160038a0180546001600160a01b03908116835260019190910154908116602083015260a081901c6001600160401b0316604083015260e01c60ff161515606090910152565b602085019690965250505060400152919050565b600083516020613e0982858389016134e0565b8184019150601760f91b8252600160008654613e2481613b5f565b8184168015613e3a5760018114613e5357613e83565b60ff198316878601528115158202870185019350613e83565b896000528560002060005b83811015613e79578154898201880152908601908701613e5e565b5050848288010193505b50919998505050505050505050565b634e487b7160e01b600052602160045260246000fd5b600060208284031215613eba57600080fd5b6114c582613934565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60008451613f388184602089016134e0565b845190830190613f4c8183602089016134e0565b602f60f81b91019081528351613f698160018401602088016134e0565b0160010195945050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160401b03831115613fdf57613fdf6136fc565b613ff383613fed8354613b5f565b83613bc2565b6000601f841160018114614027576000851561400f5750838201355b600019600387901b1c1916600186901b1783556131b7565b600083815260209020601f19861690835b828110156140585786850135825560209485019460019092019101614038565b50868210156140755760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906140e990830184613504565b9695505050505050565b60006020828403121561410557600080fd5b81516114c581613494565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161418d8160178501602088016134e0565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516141be8160288401602088016134e0565b01602801949350505050565b80820281158282048414176107d1576107d1613b93565b808201808211156107d1576107d1613b93565b60008161420357614203613b93565b506000190190565b818103818111156107d1576107d1613b93565b634e487b7160e01b600052603160045260246000fd5b60006001820161424657614246613b93565b506001019056fe1c440effe366cd7c439a4890f8be2342fcaca9b4a192ce8cf2b0e76511b36eba9e4a939112df4627ab5078e49dd57d2c45b4cffd9ae0b912f9fc355e5b1080387b765e0e932d348852a6f810bfa1ab891e259123f02db8cdcde614c57022335765d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862aa26469706673582212204db3ed4679558e8429254be43180048fcce7532decc01b27a22e7276258a69e364736f6c63430008150033", "chainId": 2021, "contractName": "RNSUnified", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102f15760003560e01c806355a5133b1161019d578063abfaf005116100e9578063dbd18388116100a2578063ec63b01f1161007c578063ec63b01f1461072b578063f1e379081461073e578063fc284d1114610765578063fd3fa9191461077857600080fd5b8063dbd18388146106c9578063e63ab1e9146106da578063e985e9c5146106ef57600080fd5b8063abfaf0051461065c578063b88d4fde1461066f578063b967169014610682578063c87b56dd14610690578063ca15c873146106a3578063d547741f146106b657600080fd5b80639010d07c1161015657806396e494e81161013057806396e494e814610626578063a217fddf14610639578063a22cb46514610641578063a2309ff81461065457600080fd5b80639010d07c146105e157806391d14854146105f457806395d89b411461060757600080fd5b806355a5133b1461058257806355f804b3146105955780635c975abb146105a85780636352211e146105b357806370a08231146105c65780638456cb59146105d957600080fd5b80631cfa6ec01161025c57806333855d9f1161021557806342842e0e116101ef57806342842e0e1461051e57806342966c68146105315780634f6ccce7146105445780635569f33d1461055757600080fd5b806333855d9f146104ee57806336568abe146105035780633f4ba83a1461051657600080fd5b80631cfa6ec01461046b57806323b872dd1461047e578063248a9ca31461049157806328ed4f6c146104b55780632f2ff15d146104c85780632f745c59146104db57600080fd5b8063095ea7b3116102ae578063095ea7b3146103f5578063098799621461040a578063131a7e241461041d578063141a468c1461043057806318160ddd146104505780631a7a98e21461045857600080fd5b806301ffc9a7146102f657806303e9e6091461031e5780630570891f1461033e57806306fdde0314610370578063081812fc146103a7578063092c5b3b146103d2575b600080fd5b61030961030436600461345a565b6107ab565b60405190151581526020015b60405180910390f35b61033161032c366004613477565b6107d7565b6040516103159190613564565b61035161034c3660046135f2565b61092d565b604080516001600160401b039093168352602083019190915201610315565b604080518082019091526012815271526f6e696e204e616d65205365727669636560701b60208201525b604051610315919061366f565b6103ba6103b5366004613477565b610bba565b6040516001600160a01b039091168152602001610315565b6103e760008051602061423e83398151915281565b604051908152602001610315565b610408610403366004613682565b610be1565b005b6103e7610418366004613737565b610cfb565b61039a61042b366004613477565b610d06565b6103e761043e366004613477565b60096020526000908152604090205481565b603f546103e7565b61039a610466366004613477565b610d53565b61040861047936600461377f565b610e5f565b61040861048c3660046137c0565b610ff4565b6103e761049f366004613477565b6000908152600160208190526040909120015490565b6104086104c33660046137fc565b611026565b6104086104d63660046137fc565b611080565b6103e76104e9366004613682565b6110a6565b6103e760008051602061421e83398151915281565b6104086105113660046137fc565b61113c565b6104086111ba565b61040861052c3660046137c0565b6111dd565b61040861053f366004613477565b6111f8565b6103e7610552366004613477565b611226565b61056a610565366004613828565b6112b9565b6040516001600160401b039091168152602001610315565b61040861059036600461384b565b61137e565b6104086105a3366004613866565b6113a7565b603c5460ff16610309565b6103ba6105c1366004613477565b6113bc565b6103e76105d43660046138a7565b6113dd565b610408611463565b6103ba6105ef3660046138c2565b611483565b6103096106023660046137fc565b6114a2565b604080518082019091526003815262524e5360e81b602082015261039a565b610309610634366004613477565b6114cd565b6103e7600081565b61040861064f3660046138f4565b6114f8565b6073546103e7565b61040861066a36600461391e565b611503565b61040861067d3660046139b4565b61171b565b61056a6001600160401b0381565b61039a61069e366004613477565b61174d565b6103e76106b1366004613477565b6117c0565b6104086106c43660046137fc565b6117d7565b60a7546001600160401b031661056a565b6103e760008051602061425e83398151915281565b6103096106fd366004613a2f565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b610408610739366004613a59565b6117fd565b6103e77f87a2b33e0b98030e29c3d23d732aa654f29b298e3891758d5f02a8b01c4840b281565b610408610773366004613828565b611907565b61078b610786366004613adc565b611988565b6040805192151583526001600160e01b0319909116602083015201610315565b60006107b682611aba565b806107d157506001600160e01b03198216630106c78f60e21b145b92915050565b6107df6133e8565b600082815260a8602052604090819020815160a081018352815460ff1692810192835260018201546060820152600282018054919384929091849160808501919061082990613b0f565b80601f016020809104026020016040519081016040528092919081815260200182805461085590613b0f565b80156108a25780601f10610877576101008083540402835291602001916108a2565b820191906000526020600020905b81548152906001019060200180831161088557829003601f168201915b5050509190925250505081526040805160808101825260038401546001600160a01b039081168252600490940154938416602080830191909152600160a01b85046001600160401b031692820192909252600160e01b90930460ff16151560608401520152905061091282611adf565b60208201516001600160401b03909116604090910152919050565b600080610938611b5b565b6109423389611ba3565b61095e576040516282b42960e81b815260040160405180910390fd5b61099e8888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611bbf92505050565b90506109a9816114cd565b6109c65760405163a3b8915f60e01b815260040160405180910390fd5b6109cf81611bd5565b156109dd576109dd81611bf2565b6109e78482611c2e565b6109fc426001600160401b0380861690611c41565b9150610a088883611c77565b610a106133e8565b604080516080810182526001600160a01b03808916825287166020808301919091526001600160401b038616828401526000606080840182905285830193909352835192830184528c815260a890915291909120548190610a759060ff166001613b59565b60ff1681526020018a815260200189898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509390945250509183525082815260a8602090815260409182902083518051825460ff191660ff909116178255918201516001820155918101518392919082906002820190610b039082613bc0565b50505060209182015180516003830180546001600160a01b039283166001600160a01b031990911617905592810151600490920180546040808401516060909401511515600160e01b0260ff60e01b196001600160401b03909516600160a01b026001600160e01b031990931695909616949094171791909116929092179091555182906000805160206141fe83398151915290610ba690600019908590613c7f565b60405180910390a250965096945050505050565b6000610bc582611cbd565b506000908152600760205260409020546001600160a01b031690565b6000610bec82611d0d565b9050806001600160a01b0316836001600160a01b031603610c5e5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b0382161480610c7a5750610c7a81336106fd565b610cec5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610c55565b610cf68383611d6d565b505050565b60006107d182611ddb565b606081610d1281611cbd565b600083815260a8602090815260408083206009835292819020549051610d3b9392879101613c98565b60405160208183030381529060405291505b50919050565b606081600003610d7157505060408051602081019091526000815290565b600082815260a860205260409020600281018054610d8e90613b0f565b80601f0160208091040260200160405190810160405280929190818152602001828054610dba90613b0f565b8015610e075780601f10610ddc57610100808354040283529160200191610e07565b820191906000526020600020905b815481529060010190602001808311610dea57829003601f168201915b50505050509150806001015492505b8215610d4d5750600082815260a860209081526040918290209151610e42918491600285019101613da6565b604051602081830303815290604052915080600101549250610e16565b610e67611b5b565b8282610e738282611e4e565b610e7b6133e8565b600086815260a860205260409020600301610ea0610e996006611e6f565b8790611e91565b15610ee157610eb56080860160608701613e58565b6020830151901515606090910181905260018201805460ff60e01b1916600160e01b9092029190911790555b610eee610e996005611e6f565b15610f2457610f2487610f07606088016040890161384b565b60208501516001600160401b039091166040909101819052611e9d565b610f31610e996003611e6f565b15610f6757610f4360208601866138a7565b60208301516001600160a01b039091169081905281546001600160a01b0319161781555b866000805160206141fe8339815191528784604051610f87929190613c7f565b60405180910390a2610f9c610e996004611e6f565b15610feb57600087815260a8602090815260409182902060040154610feb926001600160a01b0390911691610fd59189019089016138a7565b8960405180602001604052806000815250611f76565b50505050505050565b610fff335b82611fa9565b61101b5760405162461bcd60e51b8152600401610c5590613e73565b610cf6838383611fcb565b61102e611b5b565b816110396004611e6f565b6110438282611e4e565b600084815260a86020908152604080832060040154815192830190915291815261107a916001600160a01b03169085908790611f76565b50505050565b6000828152600160208190526040909120015461109c816120c7565b610cf683836120d1565b60006110b1836113dd565b82106111135760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610c55565b506001600160a01b03919091166000908152603d60209081526040808320938352929052205490565b6001600160a01b03811633146111ac5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c55565b6111b682826120f3565b5050565b60008051602061425e8339815191526111d2816120c7565b6111da612115565b50565b610cf68383836040518060200160405280600081525061171b565b61120133610ff9565b61121d5760405162461bcd60e51b8152600401610c5590613e73565b6111da81611bf2565b6000611231603f5490565b82106112945760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610c55565b603f82815481106112a7576112a7613ec0565b90600052602060002001549050919050565b60006112c3611b5b565b60008051602061423e8339815191526112db816120c7565b6112e36133e8565b600085815260a86020526040902060040154611315906001600160401b03600160a01b90910481169086811690611c41565b6020820180516001600160401b0390921660409283015251015161133a908690611e9d565b6020810151604001519250846000805160206141fe83398151915261135f6005611e6f565b8360405161136e929190613c7f565b60405180910390a2505092915050565b611386611b5b565b60008051602061423e83398151915261139e816120c7565b6111b682612167565b60006113b2816120c7565b610cf683836121bf565b60006113c782612214565b156113d457506000919050565b6107d182611d0d565b60006001600160a01b0382166114475760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610c55565b506001600160a01b031660009081526006602052604090205490565b60008051602061425e83398151915261147b816120c7565b6111da612230565b600082815260026020526040812061149b908361226d565b9392505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60006114f06114db83611adf565b60a7546001600160401b039182169116612279565b421192915050565b6111b633838361228d565b600054610100900460ff16158080156115235750600054600160ff909116105b8061153d5750303b15801561153d575060005460ff166001145b6115a05760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610c55565b6000805460ff1916600117905580156115c3576000805461ff0019166101001790555b6115ce6000896120d1565b6115e660008051602061425e833981519152886120d1565b6115fe60008051602061423e833981519152876120d1565b61161660008051602061421e833981519152866120d1565b61162083836121bf565b61162984612167565b611634886000611c2e565b61163c6133e8565b6020808201516001600160401b03604090910152600080805260a89091527f89f57ae4d64764caecd045b845cfc13a5b86ba807e4a61f32108661671e72867805467ffffffffffffffff60a01b191667ffffffffffffffff60a01b1790556000805160206141fe8339815191526116b36005611e6f565b836040516116c2929190613c7f565b60405180910390a2508015611711576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050565b6117253383611fa9565b6117415760405162461bcd60e51b8152600401610c5590613e73565b61107a84848484611f76565b60608161175981611cbd565b600061176361235b565b9050600081511161178357604051806020016040528060008152506117b8565b8061178d306123ed565b61179686612403565b6040516020016117a893929190613ed6565b6040516020818303038152906040525b949350505050565b60008181526002602052604081206107d190612495565b600082815260016020819052604090912001546117f3816120c7565b610cf683836120f3565b60008051602061421e833981519152611815816120c7565b60006118216006611e6f565b9050600061182d6133e8565b602081015185151560609091015260005b868110156117115787878281811061185857611858613ec0565b90506020020135925061186a83611bd5565b611887576040516304a3dbd560e51b815260040160405180910390fd5b600083815260a8602052604090206004015460ff600160e01b909104161515861515146118ff57600083815260a8602052604090819020600401805460ff60e01b1916600160e01b891515021790555183906000805160206141fe833981519152906118f69087908690613c7f565b60405180910390a25b60010161183e565b61190f611b5b565b60008051602061423e833981519152611927816120c7565b61192f6133e8565b60208101516001600160401b0384166040909101819052611951908590611e9d565b836000805160206141fe83398151915261196b6005611e6f565b8360405161197a929190613c7f565b60405180910390a250505050565b600080611996836007611e91565b156119ad57506000905063da698a4d60e01b611ab2565b6119b684611bd5565b6119cc5750600090506304a3dbd560e51b611ab2565b6119e06119d96006611e6f565b8490611e91565b8015611a0157506119ff60008051602061421e833981519152866114a2565b155b15611a1857506000905063c24b0f3f60e01b611ab2565b6000611a3260008051602061423e833981519152876114a2565b9050611a48611a416005611e6f565b8590611e91565b8015611a52575080155b15611a6b57506000915063ed4b948760e01b9050611ab2565b611a76846018611e91565b8015611a9057508080611a8e5750611a8e8686611ba3565b155b15611aa85750600091506282b42960e81b9050611ab2565b5060019150600090505b935093915050565b60006001600160e01b0319821663780e9d6360e01b14806107d157506107d18261249f565b600081815260056020526040812054611b22907f87a2b33e0b98030e29c3d23d732aa654f29b298e3891758d5f02a8b01c4840b2906001600160a01b03166114a2565b15611b3557506001600160401b03919050565b50600090815260a86020526040902060040154600160a01b90046001600160401b031690565b603c5460ff1615611ba15760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c55565b565b6000611baf8383611fa9565b8061149b575061149b83836124df565b6000918252805160209182012090526040902090565b6000908152600560205260409020546001600160a01b0316151590565b611bfb8161253d565b600090815260a8602052604090206003810180546001600160a01b031916905560040180546001600160e81b0319169055565b6073805460010190556111b682826125e0565b600081841180611c5057508183115b15611c5c57508061149b565b611c668484612279565b90508181111561149b575092915050565b600082815260a860205260409020600401546001600160401b03600160a01b909104811690821611156111b65760405163da87d84960e01b815260040160405180910390fd5b611cc681611bd5565b6111da5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610c55565b6000818152600560205260408120546001600160a01b0316806107d15760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610c55565b600081815260076020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611da282611d0d565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600081518015611e445760006020840160018303810160008052805b828110611e3f57828114602e600183035160f81c1480821715611e3457600186848603030180842060205260406000206000526001810187019650505b505060001901611df7565b505050505b5050600051919050565b600080611e5c338585611988565b915091508161107a578060005260046000fd5b6000816006811115611e8357611e83613e42565b60ff166001901b9050919050565b6000828216151561149b565b600082815260a86020526040902060010154611eb99082611c77565b611ec2826114cd565b15611ee057604051631395a92360e01b815260040160405180910390fd5b600082815260a860205260409020600401546001600160401b03600160a01b909104811690821611611f2557604051631c21962760e11b815260040160405180910390fd5b611f2d6133e8565b6020908101516001600160401b03929092166040928301819052600093845260a89091529120600401805467ffffffffffffffff60a01b1916600160a01b909202919091179055565b611f81848484611fcb565b611f8d8484848461275b565b61107a5760405162461bcd60e51b8152600401610c5590613f26565b6000611fb482612214565b15611fc1575060006107d1565b61149b838361285c565b611fd68383836128da565b611fde6133e8565b6000611fea6004611e6f565b6020838101516001600160a01b038716908201819052600086815260a8909252604090912060040180546001600160a01b0319169091179055905061203d60008051602061421e833981519152336114a2565b1580156120625750600083815260a86020526040902060040154600160e01b900460ff165b1561209857600083815260a860205260409020600401805460ff60e01b19169055612095816120916006611e6f565b1790565b90505b826000805160206141fe83398151915282846040516120b8929190613c7f565b60405180910390a25050505050565b6111da8133612a4b565b6120db8282612aa4565b6000828152600260205260409020610cf69082612b0f565b6120fd8282612b24565b6000828152600260205260409020610cf69082612b8b565b61211d612ba0565b603c805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60a780546001600160401b03831667ffffffffffffffff199091168117909155604080519182525133917f2f8e6689e76cebc7cf99a782594bd18a73b8d1a0fe640c99fc580dcd4de7cd1d919081900360200190a250565b60746121cc828483613f78565b50336001600160a01b03167ff765b68b6ff897de964353a0eb194e46ecea8772879eb880b4b0fd277124922c8383604051612208929190614037565b60405180910390a25050565b600061221f82611adf565b6001600160401b0316421192915050565b612238611b5b565b603c805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861214a3390565b600061149b8383612be9565b818101828110156107d157506000196107d1565b816001600160a01b0316836001600160a01b0316036122ee5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610c55565b6001600160a01b03838116600081815260086020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60606074805461236a90613b0f565b80601f016020809104026020016040519081016040528092919081815260200182805461239690613b0f565b80156123e35780601f106123b8576101008083540402835291602001916123e3565b820191906000526020600020905b8154815290600101906020018083116123c657829003601f168201915b5050505050905090565b60606107d16001600160a01b0383166014612c13565b6060600061241083612dae565b60010190506000816001600160401b0381111561242f5761242f6136ac565b6040519080825280601f01601f191660200182016040528015612459576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461246357509392505050565b60006107d1825490565b60006001600160e01b031982166380ac58cd60e01b14806124d057506001600160e01b03198216635b5e139f60e01b145b806107d157506107d182612e86565b6000805b82156125335750600082815260a860205260409020600401546001600160a01b03908116908416810361251a5760019150506107d1565b600092835260a8602052604090922060010154916124e3565b5060009392505050565b600061254882611d0d565b9050612558816000846001612eab565b61256182611d0d565b600083815260076020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526006845282852080546000190190558785526005909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0382166126365760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610c55565b61263f81611bd5565b1561268c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c55565b61269a600083836001612eab565b6126a381611bd5565b156126f05760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c55565b6001600160a01b038216600081815260066020908152604080832080546001019055848352600590915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b1561285157604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061279f903390899088908890600401614066565b6020604051808303816000875af19250505080156127da575060408051601f3d908101601f191682019092526127d7918101906140a3565b60015b612837573d808015612808576040519150601f19603f3d011682016040523d82523d6000602084013e61280d565b606091505b50805160000361282f5760405162461bcd60e51b8152600401610c5590613f26565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506117b8565b506001949350505050565b60008061286883611d0d565b9050806001600160a01b0316846001600160a01b031614806128af57506001600160a01b0380821660009081526008602090815260408083209388168352929052205460ff165b806117b85750836001600160a01b03166128c884610bba565b6001600160a01b031614949350505050565b826001600160a01b03166128ed82611d0d565b6001600160a01b0316146129135760405162461bcd60e51b8152600401610c55906140c0565b6001600160a01b0382166129755760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610c55565b6129828383836001612eab565b826001600160a01b031661299582611d0d565b6001600160a01b0316146129bb5760405162461bcd60e51b8152600401610c55906140c0565b600081815260076020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260068552838620805460001901905590871680865283862080546001019055868652600590945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b612a5582826114a2565b6111b657612a62816123ed565b612a6d836020612c13565b604051602001612a7e929190614105565b60408051601f198184030181529082905262461bcd60e51b8252610c559160040161366f565b612aae82826114a2565b6111b65760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b600061149b836001600160a01b038416612eb7565b612b2e82826114a2565b156111b65760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061149b836001600160a01b038416612f06565b603c5460ff16611ba15760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c55565b6000826000018281548110612c0057612c00613ec0565b9060005260206000200154905092915050565b60606000612c2283600261417a565b612c2d906002614191565b6001600160401b03811115612c4457612c446136ac565b6040519080825280601f01601f191660200182016040528015612c6e576020820181803683370190505b509050600360fc1b81600081518110612c8957612c89613ec0565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612cb857612cb8613ec0565b60200101906001600160f81b031916908160001a9053506000612cdc84600261417a565b612ce7906001614191565b90505b6001811115612d5f576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612d1b57612d1b613ec0565b1a60f81b828281518110612d3157612d31613ec0565b60200101906001600160f81b031916908160001a90535060049490941c93612d58816141a4565b9050612cea565b50831561149b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c55565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310612ded5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612e19576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612e3757662386f26fc10000830492506010015b6305f5e1008310612e4f576305f5e100830492506008015b6127108310612e6357612710830492506004015b60648310612e75576064830492506002015b600a83106107d15760010192915050565b60006001600160e01b03198216635a05180f60e01b14806107d157506107d182612ff9565b61107a8484848461302e565b6000818152600183016020526040812054612efe575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556107d1565b5060006107d1565b60008181526001830160205260408120548015612fef576000612f2a6001836141bb565b8554909150600090612f3e906001906141bb565b9050818114612fa3576000866000018281548110612f5e57612f5e613ec0565b9060005260206000200154905080876000018481548110612f8157612f81613ec0565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612fb457612fb46141ce565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506107d1565b60009150506107d1565b60006001600160e01b03198216637965db0b60e01b14806107d157506301ffc9a760e01b6001600160e01b03198316146107d1565b61303a8484848461316e565b60018111156130a95760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b6064820152608401610c55565b816001600160a01b0385166131055761310081603f80546000838152604060208190528120829055600182018355919091527fc03004e3ce0784bf68186394306849f9b7b1200073105cd9aeb554a1802b58fd0155565b613128565b836001600160a01b0316856001600160a01b0316146131285761312885826131e1565b6001600160a01b0384166131445761313f8161327e565b613167565b846001600160a01b0316846001600160a01b03161461316757613167848261332d565b5050505050565b61317a84848484613371565b603c5460ff161561107a5760405162461bcd60e51b815260206004820152602b60248201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760448201526a1a1a5b19481c185d5cd95960aa1b6064820152608401610c55565b600060016131ee846113dd565b6131f891906141bb565b6000838152603e602052604090205490915080821461324b576001600160a01b0384166000908152603d602090815260408083208584528252808320548484528184208190558352603e90915290208190555b506000918252603e602090815260408084208490556001600160a01b039094168352603d81528383209183525290812055565b603f54600090613290906001906141bb565b600083815260406020819052812054603f80549394509092849081106132b8576132b8613ec0565b9060005260206000200154905080603f83815481106132d9576132d9613ec0565b600091825260208083209091019290925582815260409182905281812084905585815290812055603f805480613311576133116141ce565b6001900381819060005260206000200160009055905550505050565b6000613338836113dd565b6001600160a01b039093166000908152603d602090815260408083208684528252808320859055938252603e9052919091209190915550565b815b61337d8284614191565b8110156133e257600081815260096020526040812080549091906133a0906141e4565b918290555060405182907fcc2c68164f9f7f0c063ba98bcf89498c0f3f5e3acc32bf4ab46195ecb489c13b90600090a3806133da816141e4565b915050613373565b5061107a565b604051806040016040528061341a6040518060600160405280600060ff16815260200160008152602001606081525090565b81526040805160808101825260008082526020828101829052928201819052606082015291015290565b6001600160e01b0319811681146111da57600080fd5b60006020828403121561346c57600080fd5b813561149b81613444565b60006020828403121561348957600080fd5b5035919050565b60005b838110156134ab578181015183820152602001613493565b50506000910152565b600081518084526134cc816020860160208601613490565b601f01601f19169290920160200192915050565b805160a0808452815160ff1690840152602081015160c084015260400151606060e08401526000906135166101008501826134b4565b9050602083015160018060a01b03808251166020870152806020830151166040870152506001600160401b036040820151166060860152606081015115156080860152508091505092915050565b60208152600061149b60208301846134e0565b60008083601f84011261358957600080fd5b5081356001600160401b038111156135a057600080fd5b6020830191508360208285010111156135b857600080fd5b9250929050565b80356001600160a01b03811681146135d657600080fd5b919050565b80356001600160401b03811681146135d657600080fd5b60008060008060008060a0878903121561360b57600080fd5b8635955060208701356001600160401b0381111561362857600080fd5b61363489828a01613577565b90965094506136479050604088016135bf565b9250613655606088016135bf565b9150613663608088016135db565b90509295509295509295565b60208152600061149b60208301846134b4565b6000806040838503121561369557600080fd5b61369e836135bf565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b03808411156136dc576136dc6136ac565b604051601f8501601f19908116603f01168101908282118183101715613704576137046136ac565b8160405280935085815286868601111561371d57600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561374957600080fd5b81356001600160401b0381111561375f57600080fd5b8201601f8101841361377057600080fd5b6117b8848235602084016136c2565b600080600083850360c081121561379557600080fd5b84359350602085013592506080603f19820112156137b257600080fd5b506040840190509250925092565b6000806000606084860312156137d557600080fd5b6137de846135bf565b92506137ec602085016135bf565b9150604084013590509250925092565b6000806040838503121561380f57600080fd5b8235915061381f602084016135bf565b90509250929050565b6000806040838503121561383b57600080fd5b8235915061381f602084016135db565b60006020828403121561385d57600080fd5b61149b826135db565b6000806020838503121561387957600080fd5b82356001600160401b0381111561388f57600080fd5b61389b85828601613577565b90969095509350505050565b6000602082840312156138b957600080fd5b61149b826135bf565b600080604083850312156138d557600080fd5b50508035926020909101359150565b803580151581146135d657600080fd5b6000806040838503121561390757600080fd5b613910836135bf565b915061381f602084016138e4565b600080600080600080600060c0888a03121561393957600080fd5b613942886135bf565b9650613950602089016135bf565b955061395e604089016135bf565b945061396c606089016135bf565b935061397a608089016135db565b925060a08801356001600160401b0381111561399557600080fd5b6139a18a828b01613577565b989b979a50959850939692959293505050565b600080600080608085870312156139ca57600080fd5b6139d3856135bf565b93506139e1602086016135bf565b92506040850135915060608501356001600160401b03811115613a0357600080fd5b8501601f81018713613a1457600080fd5b613a23878235602084016136c2565b91505092959194509250565b60008060408385031215613a4257600080fd5b613a4b836135bf565b915061381f602084016135bf565b600080600060408486031215613a6e57600080fd5b83356001600160401b0380821115613a8557600080fd5b818601915086601f830112613a9957600080fd5b813581811115613aa857600080fd5b8760208260051b8501011115613abd57600080fd5b602092830195509350613ad391860190506138e4565b90509250925092565b600080600060608486031215613af157600080fd5b613afa846135bf565b95602085013595506040909401359392505050565b600181811c90821680613b2357607f821691505b602082108103610d4d57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60ff81811683821601908111156107d1576107d1613b43565b601f821115610cf657600081815260208120601f850160051c81016020861015613b995750805b601f850160051c820191505b81811015613bb857828155600101613ba5565b505050505050565b81516001600160401b03811115613bd957613bd96136ac565b613bed81613be78454613b0f565b84613b72565b602080601f831160018114613c225760008415613c0a5750858301515b600019600386901b1c1916600185901b178555613bb8565b600085815260208120601f198616915b82811015613c5157888601518255948401946001909101908401613c32565b5085821015613c6f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8281526040602082015260006117b860408301846134e0565b6060815260a0606082015260ff845416610100820152600060018086015461012084015260028601606061014085015260008154613cd581613b0f565b8061016088015261018085831660008114613cf75760018114613d1157613d42565b60ff1984168983015282151560051b890182019450613d42565b8560005260208060002060005b85811015613d395781548c8201860152908901908201613d1e565b8b018401965050505b50505050613d926080860160038a0180546001600160a01b03908116835260019190910154908116602083015260a081901c6001600160401b0316604083015260e01c60ff161515606090910152565b602085019690965250505060400152919050565b600083516020613db98285838901613490565b8184019150601760f91b8252600160008654613dd481613b0f565b8184168015613dea5760018114613e0357613e33565b60ff198316878601528115158202870185019350613e33565b896000528560002060005b83811015613e29578154898201880152908601908701613e0e565b5050848288010193505b50919998505050505050505050565b634e487b7160e01b600052602160045260246000fd5b600060208284031215613e6a57600080fd5b61149b826138e4565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60008451613ee8818460208901613490565b845190830190613efc818360208901613490565b602f60f81b91019081528351613f19816001840160208801613490565b0160010195945050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160401b03831115613f8f57613f8f6136ac565b613fa383613f9d8354613b0f565b83613b72565b6000601f841160018114613fd75760008515613fbf5750838201355b600019600387901b1c1916600186901b178355613167565b600083815260209020601f19861690835b828110156140085786850135825560209485019460019092019101613fe8565b50868210156140255760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614099908301846134b4565b9695505050505050565b6000602082840312156140b557600080fd5b815161149b81613444565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161413d816017850160208801613490565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161416e816028840160208801613490565b01602801949350505050565b80820281158282048414176107d1576107d1613b43565b808201808211156107d1576107d1613b43565b6000816141b3576141b3613b43565b506000190190565b818103818111156107d1576107d1613b43565b634e487b7160e01b600052603160045260246000fd5b6000600182016141f6576141f6613b43565b506001019056fe1c440effe366cd7c439a4890f8be2342fcaca9b4a192ce8cf2b0e76511b36eba9e4a939112df4627ab5078e49dd57d2c45b4cffd9ae0b912f9fc355e5b1080387b765e0e932d348852a6f810bfa1ab891e259123f02db8cdcde614c57022335765d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862aa2646970667358221220301f6572af699c777a4ce459646815492b8048541c5752ac22e91ffe87e5b23064736f6c63430008150033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102f15760003560e01c806355a5133b1161019d578063abfaf005116100e9578063dbd18388116100a2578063ec63b01f1161007c578063ec63b01f1461072b578063f1e379081461073e578063fc284d1114610765578063fd3fa9191461077857600080fd5b8063dbd18388146106c9578063e63ab1e9146106da578063e985e9c5146106ef57600080fd5b8063abfaf0051461065c578063b88d4fde1461066f578063b967169014610682578063c87b56dd14610690578063ca15c873146106a3578063d547741f146106b657600080fd5b80639010d07c1161015657806396e494e81161013057806396e494e814610626578063a217fddf14610639578063a22cb46514610641578063a2309ff81461065457600080fd5b80639010d07c146105e157806391d14854146105f457806395d89b411461060757600080fd5b806355a5133b1461058257806355f804b3146105955780635c975abb146105a85780636352211e146105b357806370a08231146105c65780638456cb59146105d957600080fd5b80631cfa6ec01161025c57806333855d9f1161021557806342842e0e116101ef57806342842e0e1461051e57806342966c68146105315780634f6ccce7146105445780635569f33d1461055757600080fd5b806333855d9f146104ee57806336568abe146105035780633f4ba83a1461051657600080fd5b80631cfa6ec01461046b57806323b872dd1461047e578063248a9ca31461049157806328ed4f6c146104b55780632f2ff15d146104c85780632f745c59146104db57600080fd5b8063095ea7b3116102ae578063095ea7b3146103f5578063098799621461040a578063131a7e241461041d578063141a468c1461043057806318160ddd146104505780631a7a98e21461045857600080fd5b806301ffc9a7146102f657806303e9e6091461031e5780630570891f1461033e57806306fdde0314610370578063081812fc146103a7578063092c5b3b146103d2575b600080fd5b6103096103043660046134aa565b6107ab565b60405190151581526020015b60405180910390f35b61033161032c3660046134c7565b6107d7565b60405161031591906135b4565b61035161034c366004613642565b61092d565b604080516001600160401b039093168352602083019190915201610315565b604080518082019091526012815271526f6e696e204e616d65205365727669636560701b60208201525b60405161031591906136bf565b6103ba6103b53660046134c7565b610be4565b6040516001600160a01b039091168152602001610315565b6103e760008051602061428e83398151915281565b604051908152602001610315565b6104086104033660046136d2565b610c0b565b005b6103e7610418366004613787565b610d25565b61039a61042b3660046134c7565b610d30565b6103e761043e3660046134c7565b60096020526000908152604090205481565b603f546103e7565b61039a6104663660046134c7565b610d7d565b6104086104793660046137cf565b610e89565b61040861048c366004613810565b61101e565b6103e761049f3660046134c7565b6000908152600160208190526040909120015490565b6104086104c336600461384c565b611050565b6104086104d636600461384c565b6110aa565b6103e76104e93660046136d2565b6110d0565b6103e760008051602061426e83398151915281565b61040861051136600461384c565b611166565b6104086111e4565b61040861052c366004613810565b611207565b61040861053f3660046134c7565b611222565b6103e76105523660046134c7565b611250565b61056a610565366004613878565b6112e3565b6040516001600160401b039091168152602001610315565b61040861059036600461389b565b6113a8565b6104086105a33660046138b6565b6113d1565b603c5460ff16610309565b6103ba6105c13660046134c7565b6113e6565b6103e76105d43660046138f7565b611407565b61040861148d565b6103ba6105ef366004613912565b6114ad565b61030961060236600461384c565b6114cc565b604080518082019091526003815262524e5360e81b602082015261039a565b6103096106343660046134c7565b6114f7565b6103e7600081565b61040861064f366004613944565b611522565b6073546103e7565b61040861066a36600461396e565b61152d565b61040861067d366004613a04565b611745565b61056a6001600160401b0381565b61039a61069e3660046134c7565b611777565b6103e76106b13660046134c7565b6117ea565b6104086106c436600461384c565b611801565b60a7546001600160401b031661056a565b6103e76000805160206142ae83398151915281565b6103096106fd366004613a7f565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b610408610739366004613aa9565b611827565b6103e77f87a2b33e0b98030e29c3d23d732aa654f29b298e3891758d5f02a8b01c4840b281565b610408610773366004613878565b611911565b61078b610786366004613b2c565b611992565b6040805192151583526001600160e01b0319909116602083015201610315565b60006107b682611ad3565b806107d157506001600160e01b03198216630106c78f60e21b145b92915050565b6107df613438565b600082815260a8602052604090819020815160a081018352815460ff1692810192835260018201546060820152600282018054919384929091849160808501919061082990613b5f565b80601f016020809104026020016040519081016040528092919081815260200182805461085590613b5f565b80156108a25780601f10610877576101008083540402835291602001916108a2565b820191906000526020600020905b81548152906001019060200180831161088557829003601f168201915b5050509190925250505081526040805160808101825260038401546001600160a01b039081168252600490940154938416602080830191909152600160a01b85046001600160401b031692820192909252600160e01b90930460ff16151560608401520152905061091282611af8565b60208201516001600160401b03909116604090910152919050565b600080610938611b74565b6109423389611bbc565b61095e576040516282b42960e81b815260040160405180910390fd5b61099e8888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611bd892505050565b90506109a9816114f7565b6109c65760405163a3b8915f60e01b815260040160405180910390fd5b6000818152600560205260409020546001600160a01b0316156109ec576109ec81611bee565b6109f68482611c5d565b610a0b426001600160401b0380861690611c70565b9150610a178883611ca6565b610a1f613438565b604080516080810182526001600160a01b03808916825287166020808301919091526001600160401b03861682840152600085815260a88083528482206004015460ff600160e01b9091048116151560608087019190915287850195909552855194850186528e83529252929092205490918291610a9f91166001613ba9565b60ff1681526020018a815260200189898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509390945250509183525082815260a8602090815260409182902083518051825460ff191660ff909116178255918201516001820155918101518392919082906002820190610b2d9082613c10565b50505060209182015180516003830180546001600160a01b039283166001600160a01b031990911617905592810151600490920180546040808401516060909401511515600160e01b0260ff60e01b196001600160401b03909516600160a01b026001600160e01b0319909316959096169490941717919091169290921790915551829060008051602061424e83398151915290610bd090600019908590613ccf565b60405180910390a250965096945050505050565b6000610bef82611cec565b506000908152600760205260409020546001600160a01b031690565b6000610c1682611d4b565b9050806001600160a01b0316836001600160a01b031603610c885760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b0382161480610ca45750610ca481336106fd565b610d165760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610c7f565b610d208383611dab565b505050565b60006107d182611e19565b606081610d3c81611cec565b600083815260a8602090815260408083206009835292819020549051610d659392879101613ce8565b60405160208183030381529060405291505b50919050565b606081600003610d9b57505060408051602081019091526000815290565b600082815260a860205260409020600281018054610db890613b5f565b80601f0160208091040260200160405190810160405280929190818152602001828054610de490613b5f565b8015610e315780601f10610e0657610100808354040283529160200191610e31565b820191906000526020600020905b815481529060010190602001808311610e1457829003601f168201915b50505050509150806001015492505b8215610d775750600082815260a860209081526040918290209151610e6c918491600285019101613df6565b604051602081830303815290604052915080600101549250610e40565b610e91611b74565b8282610e9d8282611e8c565b610ea5613438565b600086815260a860205260409020600301610eca610ec36006611ead565b8790611ecf565b15610f0b57610edf6080860160608701613ea8565b6020830151901515606090910181905260018201805460ff60e01b1916600160e01b9092029190911790555b610f18610ec36005611ead565b15610f4e57610f4e87610f31606088016040890161389b565b60208501516001600160401b039091166040909101819052611edb565b610f5b610ec36003611ead565b15610f9157610f6d60208601866138f7565b60208301516001600160a01b039091169081905281546001600160a01b0319161781555b8660008051602061424e8339815191528784604051610fb1929190613ccf565b60405180910390a2610fc6610ec36004611ead565b1561101557600087815260a8602090815260409182902060040154611015926001600160a01b0390911691610fff9189019089016138f7565b8960405180602001604052806000815250611fb4565b50505050505050565b611029335b82611fe7565b6110455760405162461bcd60e51b8152600401610c7f90613ec3565b610d20838383612009565b611058611b74565b816110636004611ead565b61106d8282611e8c565b600084815260a8602090815260408083206004015481519283019091529181526110a4916001600160a01b03169085908790611fb4565b50505050565b600082815260016020819052604090912001546110c681612105565b610d20838361210f565b60006110db83611407565b821061113d5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610c7f565b506001600160a01b03919091166000908152603d60209081526040808320938352929052205490565b6001600160a01b03811633146111d65760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c7f565b6111e08282612131565b5050565b6000805160206142ae8339815191526111fc81612105565b611204612153565b50565b610d2083838360405180602001604052806000815250611745565b61122b33611023565b6112475760405162461bcd60e51b8152600401610c7f90613ec3565b61120481611bee565b600061125b603f5490565b82106112be5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610c7f565b603f82815481106112d1576112d1613f10565b90600052602060002001549050919050565b60006112ed611b74565b60008051602061428e83398151915261130581612105565b61130d613438565b600085815260a8602052604090206004015461133f906001600160401b03600160a01b90910481169086811690611c70565b6020820180516001600160401b03909216604092830152510151611364908690611edb565b60208101516040015192508460008051602061424e8339815191526113896005611ead565b83604051611398929190613ccf565b60405180910390a2505092915050565b6113b0611b74565b60008051602061428e8339815191526113c881612105565b6111e0826121a5565b60006113dc81612105565b610d2083836121fd565b60006113f182612246565b156113fe57506000919050565b6107d182611d4b565b60006001600160a01b0382166114715760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610c7f565b506001600160a01b031660009081526006602052604090205490565b6000805160206142ae8339815191526114a581612105565b611204612262565b60008281526002602052604081206114c5908361229f565b9392505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600061151a61150583611af8565b60a7546001600160401b0391821691166122ab565b421192915050565b6111e03383836122bf565b600054610100900460ff161580801561154d5750600054600160ff909116105b806115675750303b158015611567575060005460ff166001145b6115ca5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610c7f565b6000805460ff1916600117905580156115ed576000805461ff0019166101001790555b6115f860008961210f565b6116106000805160206142ae8339815191528861210f565b61162860008051602061428e8339815191528761210f565b61164060008051602061426e8339815191528661210f565b61164a83836121fd565b611653846121a5565b61165e886000611c5d565b611666613438565b6020808201516001600160401b03604090910152600080805260a89091527f89f57ae4d64764caecd045b845cfc13a5b86ba807e4a61f32108661671e72867805467ffffffffffffffff60a01b191667ffffffffffffffff60a01b17905560008051602061424e8339815191526116dd6005611ead565b836040516116ec929190613ccf565b60405180910390a250801561173b576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050565b61174f3383611fe7565b61176b5760405162461bcd60e51b8152600401610c7f90613ec3565b6110a484848484611fb4565b60608161178381611cec565b600061178d61238d565b905060008151116117ad57604051806020016040528060008152506117e2565b806117b73061241f565b6117c086612435565b6040516020016117d293929190613f26565b6040516020818303038152906040525b949350505050565b60008181526002602052604081206107d1906124c7565b6000828152600160208190526040909120015461181d81612105565b610d208383612131565b60008051602061426e83398151915261183f81612105565b600061184b6006611ead565b90506000611857613438565b602081015185151560609091015260005b8681101561173b5787878281811061188257611882613f10565b60209081029290920135600081815260a89093526040909220600401549194505060ff600160e01b9091041615158615151461190957600083815260a8602052604090819020600401805460ff60e01b1916600160e01b8915150217905551839060008051602061424e833981519152906119009087908690613ccf565b60405180910390a25b600101611868565b611919611b74565b60008051602061428e83398151915261193181612105565b611939613438565b60208101516001600160401b038416604090910181905261195b908590611edb565b8360008051602061424e8339815191526119756005611ead565b83604051611984929190613ccf565b60405180910390a250505050565b6000806119a0836007611ecf565b156119b757506000905063da698a4d60e01b611acb565b6000848152600560205260409020546001600160a01b03166119e55750600090506304a3dbd560e51b611acb565b6119f96119f26006611ead565b8490611ecf565b8015611a1a5750611a1860008051602061426e833981519152866114cc565b155b15611a3157506000905063c24b0f3f60e01b611acb565b6000611a4b60008051602061428e833981519152876114cc565b9050611a61611a5a6005611ead565b8590611ecf565b8015611a6b575080155b15611a8457506000915063ed4b948760e01b9050611acb565b611a8f846018611ecf565b8015611aa957508080611aa75750611aa78686611bbc565b155b15611ac15750600091506282b42960e81b9050611acb565b5060019150600090505b935093915050565b60006001600160e01b0319821663780e9d6360e01b14806107d157506107d1826124d1565b600081815260056020526040812054611b3b907f87a2b33e0b98030e29c3d23d732aa654f29b298e3891758d5f02a8b01c4840b2906001600160a01b03166114cc565b15611b4e57506001600160401b03919050565b50600090815260a86020526040902060040154600160a01b90046001600160401b031690565b603c5460ff1615611bba5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c7f565b565b6000611bc88383611fe7565b806114c557506114c58383612511565b6000918252805160209182012090526040902090565b611bf78161256f565b600081815260a8602052604090206003810180546001600160a01b031916905560040180546001600160e81b0319169055611c30613438565b8160008051602061424e833981519152601883604051611c51929190613ccf565b60405180910390a25050565b6073805460010190556111e08282612612565b600081841180611c7f57508183115b15611c8b5750806114c5565b611c9584846122ab565b9050818111156114c5575092915050565b600082815260a860205260409020600401546001600160401b03600160a01b909104811690821611156111e05760405163da87d84960e01b815260040160405180910390fd5b6000818152600560205260409020546001600160a01b03166112045760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610c7f565b6000818152600560205260408120546001600160a01b0316806107d15760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610c7f565b600081815260076020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611de082611d4b565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600081518015611e825760006020840160018303810160008052805b828110611e7d57828114602e600183035160f81c1480821715611e7257600186848603030180842060205260406000206000526001810187019650505b505060001901611e35565b505050505b5050600051919050565b600080611e9a338585611992565b91509150816110a4578060005260046000fd5b6000816006811115611ec157611ec1613e92565b60ff166001901b9050919050565b600082821615156114c5565b600082815260a86020526040902060010154611ef79082611ca6565b611f00826114f7565b15611f1e57604051631395a92360e01b815260040160405180910390fd5b600082815260a860205260409020600401546001600160401b03600160a01b909104811690821611611f6357604051631c21962760e11b815260040160405180910390fd5b611f6b613438565b6020908101516001600160401b03929092166040928301819052600093845260a89091529120600401805467ffffffffffffffff60a01b1916600160a01b909202919091179055565b611fbf848484612009565b611fcb848484846127ab565b6110a45760405162461bcd60e51b8152600401610c7f90613f76565b6000611ff282612246565b15611fff575060006107d1565b6114c583836128ac565b61201483838361292a565b61201c613438565b60006120286004611ead565b6020838101516001600160a01b038716908201819052600086815260a8909252604090912060040180546001600160a01b0319169091179055905061207b60008051602061426e833981519152336114cc565b1580156120a05750600083815260a86020526040902060040154600160e01b900460ff165b156120d657600083815260a860205260409020600401805460ff60e01b191690556120d3816120cf6006611ead565b1790565b90505b8260008051602061424e83398151915282846040516120f6929190613ccf565b60405180910390a25050505050565b6112048133612a9b565b6121198282612af4565b6000828152600260205260409020610d209082612b5f565b61213b8282612b74565b6000828152600260205260409020610d209082612bdb565b61215b612bf0565b603c805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60a780546001600160401b03831667ffffffffffffffff199091168117909155604080519182525133917f2f8e6689e76cebc7cf99a782594bd18a73b8d1a0fe640c99fc580dcd4de7cd1d919081900360200190a250565b607461220a828483613fc8565b50336001600160a01b03167ff765b68b6ff897de964353a0eb194e46ecea8772879eb880b4b0fd277124922c8383604051611c51929190614087565b600061225182611af8565b6001600160401b0316421192915050565b61226a611b74565b603c805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121883390565b60006114c58383612c39565b818101828110156107d157506000196107d1565b816001600160a01b0316836001600160a01b0316036123205760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610c7f565b6001600160a01b03838116600081815260086020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60606074805461239c90613b5f565b80601f01602080910402602001604051908101604052809291908181526020018280546123c890613b5f565b80156124155780601f106123ea57610100808354040283529160200191612415565b820191906000526020600020905b8154815290600101906020018083116123f857829003601f168201915b5050505050905090565b60606107d16001600160a01b0383166014612c63565b6060600061244283612dfe565b60010190506000816001600160401b03811115612461576124616136fc565b6040519080825280601f01601f19166020018201604052801561248b576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461249557509392505050565b60006107d1825490565b60006001600160e01b031982166380ac58cd60e01b148061250257506001600160e01b03198216635b5e139f60e01b145b806107d157506107d182612ed6565b6000805b82156125655750600082815260a860205260409020600401546001600160a01b03908116908416810361254c5760019150506107d1565b600092835260a860205260409092206001015491612515565b5060009392505050565b600061257a82611d4b565b905061258a816000846001612efb565b61259382611d4b565b600083815260076020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526006845282852080546000190190558785526005909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0382166126685760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610c7f565b6000818152600560205260409020546001600160a01b0316156126cd5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c7f565b6126db600083836001612efb565b6000818152600560205260409020546001600160a01b0316156127405760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c7f565b6001600160a01b038216600081815260066020908152604080832080546001019055848352600590915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b156128a157604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906127ef9033908990889088906004016140b6565b6020604051808303816000875af192505050801561282a575060408051601f3d908101601f19168201909252612827918101906140f3565b60015b612887573d808015612858576040519150601f19603f3d011682016040523d82523d6000602084013e61285d565b606091505b50805160000361287f5760405162461bcd60e51b8152600401610c7f90613f76565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506117e2565b506001949350505050565b6000806128b883611d4b565b9050806001600160a01b0316846001600160a01b031614806128ff57506001600160a01b0380821660009081526008602090815260408083209388168352929052205460ff165b806117e25750836001600160a01b031661291884610be4565b6001600160a01b031614949350505050565b826001600160a01b031661293d82611d4b565b6001600160a01b0316146129635760405162461bcd60e51b8152600401610c7f90614110565b6001600160a01b0382166129c55760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610c7f565b6129d28383836001612efb565b826001600160a01b03166129e582611d4b565b6001600160a01b031614612a0b5760405162461bcd60e51b8152600401610c7f90614110565b600081815260076020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260068552838620805460001901905590871680865283862080546001019055868652600590945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b612aa582826114cc565b6111e057612ab28161241f565b612abd836020612c63565b604051602001612ace929190614155565b60408051601f198184030181529082905262461bcd60e51b8252610c7f916004016136bf565b612afe82826114cc565b6111e05760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b60006114c5836001600160a01b038416612f07565b612b7e82826114cc565b156111e05760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006114c5836001600160a01b038416612f56565b603c5460ff16611bba5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c7f565b6000826000018281548110612c5057612c50613f10565b9060005260206000200154905092915050565b60606000612c728360026141ca565b612c7d9060026141e1565b6001600160401b03811115612c9457612c946136fc565b6040519080825280601f01601f191660200182016040528015612cbe576020820181803683370190505b509050600360fc1b81600081518110612cd957612cd9613f10565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612d0857612d08613f10565b60200101906001600160f81b031916908160001a9053506000612d2c8460026141ca565b612d379060016141e1565b90505b6001811115612daf576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612d6b57612d6b613f10565b1a60f81b828281518110612d8157612d81613f10565b60200101906001600160f81b031916908160001a90535060049490941c93612da8816141f4565b9050612d3a565b5083156114c55760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c7f565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310612e3d5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612e69576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612e8757662386f26fc10000830492506010015b6305f5e1008310612e9f576305f5e100830492506008015b6127108310612eb357612710830492506004015b60648310612ec5576064830492506002015b600a83106107d15760010192915050565b60006001600160e01b03198216635a05180f60e01b14806107d157506107d182613049565b6110a48484848461307e565b6000818152600183016020526040812054612f4e575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556107d1565b5060006107d1565b6000818152600183016020526040812054801561303f576000612f7a60018361420b565b8554909150600090612f8e9060019061420b565b9050818114612ff3576000866000018281548110612fae57612fae613f10565b9060005260206000200154905080876000018481548110612fd157612fd1613f10565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806130045761300461421e565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506107d1565b60009150506107d1565b60006001600160e01b03198216637965db0b60e01b14806107d157506301ffc9a760e01b6001600160e01b03198316146107d1565b61308a848484846131be565b60018111156130f95760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b6064820152608401610c7f565b816001600160a01b0385166131555761315081603f80546000838152604060208190528120829055600182018355919091527fc03004e3ce0784bf68186394306849f9b7b1200073105cd9aeb554a1802b58fd0155565b613178565b836001600160a01b0316856001600160a01b031614613178576131788582613231565b6001600160a01b0384166131945761318f816132ce565b6131b7565b846001600160a01b0316846001600160a01b0316146131b7576131b7848261337d565b5050505050565b6131ca848484846133c1565b603c5460ff16156110a45760405162461bcd60e51b815260206004820152602b60248201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760448201526a1a1a5b19481c185d5cd95960aa1b6064820152608401610c7f565b6000600161323e84611407565b613248919061420b565b6000838152603e602052604090205490915080821461329b576001600160a01b0384166000908152603d602090815260408083208584528252808320548484528184208190558352603e90915290208190555b506000918252603e602090815260408084208490556001600160a01b039094168352603d81528383209183525290812055565b603f546000906132e09060019061420b565b600083815260406020819052812054603f805493945090928490811061330857613308613f10565b9060005260206000200154905080603f838154811061332957613329613f10565b600091825260208083209091019290925582815260409182905281812084905585815290812055603f8054806133615761336161421e565b6001900381819060005260206000200160009055905550505050565b600061338883611407565b6001600160a01b039093166000908152603d602090815260408083208684528252808320859055938252603e9052919091209190915550565b815b6133cd82846141e1565b81101561343257600081815260096020526040812080549091906133f090614234565b918290555060405182907fcc2c68164f9f7f0c063ba98bcf89498c0f3f5e3acc32bf4ab46195ecb489c13b90600090a38061342a81614234565b9150506133c3565b506110a4565b604051806040016040528061346a6040518060600160405280600060ff16815260200160008152602001606081525090565b81526040805160808101825260008082526020828101829052928201819052606082015291015290565b6001600160e01b03198116811461120457600080fd5b6000602082840312156134bc57600080fd5b81356114c581613494565b6000602082840312156134d957600080fd5b5035919050565b60005b838110156134fb5781810151838201526020016134e3565b50506000910152565b6000815180845261351c8160208601602086016134e0565b601f01601f19169290920160200192915050565b805160a0808452815160ff1690840152602081015160c084015260400151606060e0840152600090613566610100850182613504565b9050602083015160018060a01b03808251166020870152806020830151166040870152506001600160401b036040820151166060860152606081015115156080860152508091505092915050565b6020815260006114c56020830184613530565b60008083601f8401126135d957600080fd5b5081356001600160401b038111156135f057600080fd5b60208301915083602082850101111561360857600080fd5b9250929050565b80356001600160a01b038116811461362657600080fd5b919050565b80356001600160401b038116811461362657600080fd5b60008060008060008060a0878903121561365b57600080fd5b8635955060208701356001600160401b0381111561367857600080fd5b61368489828a016135c7565b909650945061369790506040880161360f565b92506136a56060880161360f565b91506136b36080880161362b565b90509295509295509295565b6020815260006114c56020830184613504565b600080604083850312156136e557600080fd5b6136ee8361360f565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b038084111561372c5761372c6136fc565b604051601f8501601f19908116603f01168101908282118183101715613754576137546136fc565b8160405280935085815286868601111561376d57600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561379957600080fd5b81356001600160401b038111156137af57600080fd5b8201601f810184136137c057600080fd5b6117e284823560208401613712565b600080600083850360c08112156137e557600080fd5b84359350602085013592506080603f198201121561380257600080fd5b506040840190509250925092565b60008060006060848603121561382557600080fd5b61382e8461360f565b925061383c6020850161360f565b9150604084013590509250925092565b6000806040838503121561385f57600080fd5b8235915061386f6020840161360f565b90509250929050565b6000806040838503121561388b57600080fd5b8235915061386f6020840161362b565b6000602082840312156138ad57600080fd5b6114c58261362b565b600080602083850312156138c957600080fd5b82356001600160401b038111156138df57600080fd5b6138eb858286016135c7565b90969095509350505050565b60006020828403121561390957600080fd5b6114c58261360f565b6000806040838503121561392557600080fd5b50508035926020909101359150565b8035801515811461362657600080fd5b6000806040838503121561395757600080fd5b6139608361360f565b915061386f60208401613934565b600080600080600080600060c0888a03121561398957600080fd5b6139928861360f565b96506139a06020890161360f565b95506139ae6040890161360f565b94506139bc6060890161360f565b93506139ca6080890161362b565b925060a08801356001600160401b038111156139e557600080fd5b6139f18a828b016135c7565b989b979a50959850939692959293505050565b60008060008060808587031215613a1a57600080fd5b613a238561360f565b9350613a316020860161360f565b92506040850135915060608501356001600160401b03811115613a5357600080fd5b8501601f81018713613a6457600080fd5b613a7387823560208401613712565b91505092959194509250565b60008060408385031215613a9257600080fd5b613a9b8361360f565b915061386f6020840161360f565b600080600060408486031215613abe57600080fd5b83356001600160401b0380821115613ad557600080fd5b818601915086601f830112613ae957600080fd5b813581811115613af857600080fd5b8760208260051b8501011115613b0d57600080fd5b602092830195509350613b239186019050613934565b90509250925092565b600080600060608486031215613b4157600080fd5b613b4a8461360f565b95602085013595506040909401359392505050565b600181811c90821680613b7357607f821691505b602082108103610d7757634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60ff81811683821601908111156107d1576107d1613b93565b601f821115610d2057600081815260208120601f850160051c81016020861015613be95750805b601f850160051c820191505b81811015613c0857828155600101613bf5565b505050505050565b81516001600160401b03811115613c2957613c296136fc565b613c3d81613c378454613b5f565b84613bc2565b602080601f831160018114613c725760008415613c5a5750858301515b600019600386901b1c1916600185901b178555613c08565b600085815260208120601f198616915b82811015613ca157888601518255948401946001909101908401613c82565b5085821015613cbf5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8281526040602082015260006117e26040830184613530565b6060815260a0606082015260ff845416610100820152600060018086015461012084015260028601606061014085015260008154613d2581613b5f565b8061016088015261018085831660008114613d475760018114613d6157613d92565b60ff1984168983015282151560051b890182019450613d92565b8560005260208060002060005b85811015613d895781548c8201860152908901908201613d6e565b8b018401965050505b50505050613de26080860160038a0180546001600160a01b03908116835260019190910154908116602083015260a081901c6001600160401b0316604083015260e01c60ff161515606090910152565b602085019690965250505060400152919050565b600083516020613e0982858389016134e0565b8184019150601760f91b8252600160008654613e2481613b5f565b8184168015613e3a5760018114613e5357613e83565b60ff198316878601528115158202870185019350613e83565b896000528560002060005b83811015613e79578154898201880152908601908701613e5e565b5050848288010193505b50919998505050505050505050565b634e487b7160e01b600052602160045260246000fd5b600060208284031215613eba57600080fd5b6114c582613934565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60008451613f388184602089016134e0565b845190830190613f4c8183602089016134e0565b602f60f81b91019081528351613f698160018401602088016134e0565b0160010195945050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160401b03831115613fdf57613fdf6136fc565b613ff383613fed8354613b5f565b83613bc2565b6000601f841160018114614027576000851561400f5750838201355b600019600387901b1c1916600186901b1783556131b7565b600083815260209020601f19861690835b828110156140585786850135825560209485019460019092019101614038565b50868210156140755760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906140e990830184613504565b9695505050505050565b60006020828403121561410557600080fd5b81516114c581613494565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161418d8160178501602088016134e0565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516141be8160288401602088016134e0565b01602801949350505050565b80820281158282048414176107d1576107d1613b93565b808201808211156107d1576107d1613b93565b60008161420357614203613b93565b506000190190565b818103818111156107d1576107d1613b93565b634e487b7160e01b600052603160045260246000fd5b60006001820161424657614246613b93565b506001019056fe1c440effe366cd7c439a4890f8be2342fcaca9b4a192ce8cf2b0e76511b36eba9e4a939112df4627ab5078e49dd57d2c45b4cffd9ae0b912f9fc355e5b1080387b765e0e932d348852a6f810bfa1ab891e259123f02db8cdcde614c57022335765d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862aa26469706673582212204db3ed4679558e8429254be43180048fcce7532decc01b27a22e7276258a69e364736f6c63430008150033", "deployer": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", "devdoc": { "version": 1, @@ -1651,13 +18057,13 @@ } }, "isFoundry": true, - "metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CannotSetImmutableField\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ExceedParentExpiry\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Expired\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ExpiryTimeMustBeLargerThanTheOldOne\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MissingControllerRole\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MissingProtectedSettlerRole\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NameMustBeRegisteredOrInGracePeriod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Unavailable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Unexists\",\"type\":\"error\"},{\"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\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"newURI\",\"type\":\"string\"}],\"name\":\"BaseURIUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"newGracePeriod\",\"type\":\"uint64\"}],\"name\":\"GracePeriodUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"NonceUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"node\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"ModifyingIndicator\",\"name\":\"indicator\",\"type\":\"uint256\"},{\"components\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"depth\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"parentId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"label\",\"type\":\"string\"}],\"internalType\":\"struct INSUnified.ImmutableRecord\",\"name\":\"immut\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"resolver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"expiry\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"protected\",\"type\":\"bool\"}],\"internalType\":\"struct INSUnified.MutableRecord\",\"name\":\"mut\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct INSUnified.Record\",\"name\":\"record\",\"type\":\"tuple\"}],\"name\":\"RecordUpdated\",\"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\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"CONTROLLER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_EXPIRY\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PROTECTED_SETTLER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RESERVATION_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"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\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"available\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"protected\",\"type\":\"bool\"}],\"name\":\"bulkSetProtected\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"ModifyingIndicator\",\"name\":\"indicator\",\"type\":\"uint256\"}],\"name\":\"canSetRecord\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"},{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"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\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getDomain\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"domain\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGracePeriod\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getRecord\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"depth\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"parentId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"label\",\"type\":\"string\"}],\"internalType\":\"struct INSUnified.ImmutableRecord\",\"name\":\"immut\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"resolver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"expiry\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"protected\",\"type\":\"bool\"}],\"internalType\":\"struct INSUnified.MutableRecord\",\"name\":\"mut\",\"type\":\"tuple\"}],\"internalType\":\"struct INSUnified.Record\",\"name\":\"record\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"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\":\"admin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"pauser\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"controller\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"protectedSettler\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"gracePeriod\",\"type\":\"uint64\"},{\"internalType\":\"string\",\"name\":\"baseTokenURI\",\"type\":\"string\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"uint256\",\"name\":\"parentId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"label\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"resolver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"duration\",\"type\":\"uint64\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"expiryTime\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"str\",\"type\":\"string\"}],\"name\":\"namehash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashed\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"reclaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"duration\",\"type\":\"uint64\"}],\"name\":\"renew\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"expiry\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"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\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"baseTokenURI\",\"type\":\"string\"}],\"name\":\"setBaseURI\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"expiry\",\"type\":\"uint64\"}],\"name\":\"setExpiry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"gracePeriod\",\"type\":\"uint64\"}],\"name\":\"setGracePeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"ModifyingIndicator\",\"name\":\"indicator\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"resolver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"expiry\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"protected\",\"type\":\"bool\"}],\"internalType\":\"struct INSUnified.MutableRecord\",\"name\":\"mutRecord\",\"type\":\"tuple\"}],\"name\":\"setRecord\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"stateOf\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"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\":[{\"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\":\"totalMinted\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"CannotSetImmutableField()\":[{\"details\":\"Error: Attempting to set an immutable field, which cannot be modified.\"}],\"ExceedParentExpiry()\":[{\"details\":\"Error: The provided id expiry is greater than parent id expiry.\"}],\"Expired()\":[{\"details\":\"Error: The provided token id is expired.\"}],\"ExpiryTimeMustBeLargerThanTheOldOne()\":[{\"details\":\"Error: Attempting to set an expiry time that is not larger than the previous one.\"}],\"MissingControllerRole()\":[{\"details\":\"Error: Missing controller role required for modification.\"}],\"MissingProtectedSettlerRole()\":[{\"details\":\"Error: Missing protected settler role required for modification.\"}],\"NameMustBeRegisteredOrInGracePeriod()\":[{\"details\":\"Error: The provided name must be registered or is in a grace period.\"}],\"Unauthorized()\":[{\"details\":\"Error: The sender lacks the necessary permissions.\"}],\"Unavailable()\":[{\"details\":\"Error: The provided name is unavailable for registration.\"}],\"Unexists()\":[{\"details\":\"Error: The provided token id is unexists.\"}]},\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when `owner` enables `approved` to manage the `tokenId` token.\"},\"ApprovalForAll(address,address,bool)\":{\"details\":\"Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\"},\"BaseURIUpdated(address,string)\":{\"details\":\"Emitted when a base URI is updated.\"},\"GracePeriodUpdated(address,uint64)\":{\"details\":\"Emitted when the grace period for all domain is updated.\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"NonceUpdated(uint256,uint256)\":{\"details\":\"Emitted when the token nonce is updated\"},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"RecordUpdated(uint256,uint256,((uint8,uint256,string),(address,address,uint64,bool)))\":{\"details\":\"Emitted when the record of node is updated.\",\"params\":{\"indicator\":\"The binary index of updated fields. Eg, 0b10101011 means fields at position 1, 2, 4, 6, 8 (right to left) needs to be updated.\",\"record\":\"The updated fields.\"}},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"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._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"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`)\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `tokenId` token is transferred from `from` to `to`.\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"}},\"kind\":\"dev\",\"methods\":{\"approve(address,uint256)\":{\"details\":\"See {IERC721-approve}.\"},\"available(uint256)\":{\"details\":\"Returns true if the specified name is available for registration. Note: Only available after passing the grace period.\"},\"balanceOf(address)\":{\"details\":\"See {IERC721-balanceOf}.\"},\"bulkSetProtected(uint256[],bool)\":{\"details\":\"Sets the protected status of a list of ids. Update operation for {Record.mut.protected}. Requirements: - The method caller must have protected setter role. Emits events {RecordUpdated}.\"},\"burn(uint256)\":{\"details\":\"Burns `tokenId`. See {ERC721-_burn}. Requirements: - The caller must own `tokenId` or be an approved operator.\"},\"canSetRecord(address,uint256,uint256)\":{\"details\":\"Returns whether the requester is able to modify the record based on the updated index. Note: This method strictly follows the permission of struct {MutableRecord}.\"},\"getApproved(uint256)\":{\"details\":\"See {IERC721-getApproved}.\"},\"getDomain(uint256)\":{\"details\":\"Returns the domain name of id.\"},\"getGracePeriod()\":{\"details\":\"Returns the grace period in second(s). Note: This period affects the availability of the domain.\"},\"getRecord(uint256)\":{\"details\":\"Returns all record of a domain. Reverts if the token is non existent.\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"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.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"isApprovedForAll(address,address)\":{\"details\":\"See {IERC721-isApprovedForAll}.\"},\"mint(uint256,string,address,address,uint64)\":{\"details\":\"Mints token for subnode. Requirements: - The token must be available. - The method caller must be (parent) owner or approved spender. See struct {MutableRecord}. Emits an event {RecordUpdated}.\",\"params\":{\"duration\":\"Duration in second(s) to expire. Leave 0 to set as parent.\",\"label\":\"The domain label. Eg, label is duke for domain duke.ron.\",\"owner\":\"The token owner.\",\"parentId\":\"The parent node to mint or create subnode.\",\"resolver\":\"The resolver address.\"}},\"name()\":{\"details\":\"Override {IERC721Metadata-name}.\"},\"namehash(string)\":{\"details\":\"Returns the name hash output of a domain.\"},\"ownerOf(uint256)\":{\"details\":\"Override {ERC721-ownerOf}.\"},\"pause()\":{\"details\":\"Pauses all token transfers. See {ERC721Pausable} and {Pausable-_pause}. Requirements: - the caller must have the `PAUSER_ROLE`.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"reclaim(uint256,address)\":{\"details\":\"Reclaims ownership. Update operation for {Record.mut.owner}. Requirements: - The method caller should have controller role. - The method caller should be (parent) owner or approved spender. See struct {MutableRecord}. Emits an event {RecordUpdated}.\"},\"renew(uint256,uint64)\":{\"details\":\"Renews token. Update operation for {Record.mut.expiry}. Requirements: - The method caller should have controller role. Emits an event {RecordUpdated}.\"},\"renounceRole(bytes32,address)\":{\"details\":\"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.\"},\"revokeRole(bytes32,address)\":{\"details\":\"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.\"},\"safeTransferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"safeTransferFrom(address,address,uint256,bytes)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"setApprovalForAll(address,bool)\":{\"details\":\"See {IERC721-setApprovalForAll}.\"},\"setBaseURI(string)\":{\"details\":\"Sets the base uri. Requirements: - The method caller must be contract owner.\"},\"setExpiry(uint256,uint64)\":{\"details\":\"Sets expiry time for a token. Update operation for {Record.mut.expiry}. Requirements: - The method caller must have controller role. Emits an event {RecordUpdated}.\"},\"setGracePeriod(uint64)\":{\"details\":\"Sets the grace period in second(s). Requirements: - The method caller must have controller role. Note: This period affects the availability of the domain.\"},\"setRecord(uint256,uint256,(address,address,uint64,bool))\":{\"details\":\"Sets record of existing token. Update operation for {Record.mut}. Requirements: - The method caller must have role based on the corresponding `indicator`. See struct {MutableRecord}. Emits an event {RecordUpdated}.\"},\"stateOf(uint256)\":{\"details\":\"Returns the state of the `_tokenId` ERC721. Requirements: - The token exists.\"},\"supportsInterface(bytes4)\":{\"details\":\"Override {ERC165-supportsInterface}.\"},\"symbol()\":{\"details\":\"Override {IERC721Metadata-symbol}.\"},\"tokenByIndex(uint256)\":{\"details\":\"See {IERC721Enumerable-tokenByIndex}.\"},\"tokenOfOwnerByIndex(address,uint256)\":{\"details\":\"See {IERC721Enumerable-tokenOfOwnerByIndex}.\"},\"tokenURI(uint256)\":{\"details\":\"Override {IERC721Metadata-tokenURI}.\"},\"totalMinted()\":{\"details\":\"Returns the total minted ids. Note: Burning id will not affect `totalMinted`.\"},\"totalSupply()\":{\"details\":\"See {IERC721Enumerable-totalSupply}.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-transferFrom}.\"},\"unpause()\":{\"details\":\"Unpauses all token transfers. See {ERC721Pausable} and {Pausable-_unpause}. Requirements: - the caller must have the `PAUSER_ROLE`.\"}},\"stateVariables\":{\"CONTROLLER_ROLE\":{\"details\":\"Returns the controller role.\"},\"MAX_EXPIRY\":{\"details\":\"Returns the max expiry value.\"},\"PROTECTED_SETTLER_ROLE\":{\"details\":\"Returns the protected setter role.\"},\"RESERVATION_ROLE\":{\"details\":\"Returns the reservation role.\"},\"____gap\":{\"details\":\"Gap for upgradeability.\"},\"_recordOf\":{\"details\":\"Mapping from token id => record\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"CONTROLLER_ROLE()\":{\"notice\":\"Can set all fields {Record.mut} in token record, excepting {Record.mut.protected}.\"},\"PROTECTED_SETTLER_ROLE()\":{\"notice\":\"Can set field {Record.mut.protected} in token record by using method `bulkSetProtected`.\"},\"RESERVATION_ROLE()\":{\"notice\":\"Never expire for token owner has this role.\"},\"stateOf(uint256)\":{\"notice\":\"The token state presents the properties of a token at a certain point in time, it should be unique. The token state helps other contracts can verify the token properties without getting and selecting properties from the base contract. For example: ```solidity contract Kitty { function stateOf(uint256 _tokenId) external view returns (bytes memory) { return abi.encodePacked(ownerOf(_tokenId), genesOf(_tokenId), levelOf(_tokenId)); } } interface Exchange { // Buy NFT with the specificed state of `_tokenId`. function buy(uint256 _tokenId, uint256 _price, bytes calldata _kittyState) external; } ```\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/RNSUnified.sol\":\"RNSUnified\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@ensdomains/buffer/=lib/buffer/\",\":@ensdomains/ens-contracts/=lib/ens-contracts/contracts/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@pythnetwork/=lib/pyth-sdk-solidity/\",\":@rns-contracts/=src/\",\":buffer/=lib/buffer/contracts/\",\":contract-template/=lib/contract-template/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":ens-contracts/=lib/ens-contracts/contracts/\",\":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/script/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/openzeppelin-contracts/contracts/\",\":pyth-sdk-solidity/=lib/pyth-sdk-solidity/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/contract-template/src/refs/ERC721Nonce.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC721/ERC721.sol\\\";\\n\\n/**\\n * @title ERC721Nonce\\n * @dev This contract provides a nonce that will be increased whenever the token is tranferred.\\n */\\nabstract contract ERC721Nonce is ERC721 {\\n /// @dev Emitted when the token nonce is updated\\n event NonceUpdated(uint256 indexed _tokenId, uint256 indexed _nonce);\\n\\n /// @dev Mapping from token id => token nonce\\n mapping(uint256 => uint256) public nonces;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n */\\n uint256[50] private ______gap;\\n\\n /**\\n * @dev Override `ERC721-_beforeTokenTransfer`.\\n */\\n function _beforeTokenTransfer(address _from, address _to, uint256 _firstTokenId, uint256 _batchSize)\\n internal\\n virtual\\n override\\n {\\n for (uint256 _tokenId = _firstTokenId; _tokenId < _firstTokenId + _batchSize; _tokenId++) {\\n emit NonceUpdated(_tokenId, ++nonces[_tokenId]);\\n }\\n super._beforeTokenTransfer(_from, _to, _firstTokenId, _batchSize);\\n }\\n}\\n\",\"keccak256\":\"0xc5695e9c5ae6a3c24c612cc970bd69c456d06e285ca8a95c2795d864ae478c9a\",\"license\":\"MIT\"},\"lib/contract-template/src/refs/IERC721State.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.0;\\n\\ninterface IERC721State {\\n /**\\n * @dev Returns the state of the `_tokenId` ERC721.\\n *\\n * Requirements:\\n *\\n * - The token exists.\\n *\\n * @notice The token state presents the properties of a token at a certain point in time, it should be unique.\\n * The token state helps other contracts can verify the token properties without getting and selecting properties from the base contract.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract Kitty {\\n * function stateOf(uint256 _tokenId) external view returns (bytes memory) {\\n * return abi.encodePacked(ownerOf(_tokenId), genesOf(_tokenId), levelOf(_tokenId));\\n * }\\n * }\\n *\\n * interface Exchange {\\n * // Buy NFT with the specificed state of `_tokenId`.\\n * function buy(uint256 _tokenId, uint256 _price, bytes calldata _kittyState) external;\\n * }\\n * ```\\n */\\n function stateOf(uint256 _tokenId) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0x462e648b1de6597ea496fbe91da2d28061cbef49612cd39288d64985f087de7d\",\"license\":\"UNLICENSED\"},\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Strings.sol\\\";\\nimport \\\"../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```solidity\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```solidity\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\\n * to enforce additional security measures for this role.\\n */\\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\\n struct RoleData {\\n mapping(address => bool) members;\\n bytes32 adminRole;\\n }\\n\\n mapping(bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(account),\\n \\\" is missing role \\\",\\n Strings.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * May emit a {RoleGranted} event.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n *\\n * NOTE: This function is deprecated in favor of {_grantRole}.\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0dd6e52cb394d7f5abe5dca2d4908a6be40417914720932de757de34a99ab87f\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerable.sol\\\";\\nimport \\\"./AccessControl.sol\\\";\\nimport \\\"../utils/structs/EnumerableSet.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {\\n return _roleMembers[role].at(index);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n}\\n\",\"keccak256\":\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerable is IAccessControl {\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x3d6069be9b4c01fb81840fb9c2c4dc58dd6a6a4aafaa2c6837de8699574d84c6\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/security/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract Pausable is Context {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n constructor() {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n}\\n\",\"keccak256\":\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/ERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC721.sol\\\";\\nimport \\\"./IERC721Receiver.sol\\\";\\nimport \\\"./extensions/IERC721Metadata.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/Strings.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\\n * {ERC721Enumerable}.\\n */\\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata {\\n using Address for address;\\n using Strings for uint256;\\n\\n // Token name\\n string private _name;\\n\\n // Token symbol\\n string private _symbol;\\n\\n // Mapping from token ID to owner address\\n mapping(uint256 => address) private _owners;\\n\\n // Mapping owner address to token count\\n mapping(address => uint256) private _balances;\\n\\n // Mapping from token ID to approved address\\n mapping(uint256 => address) private _tokenApprovals;\\n\\n // Mapping from owner to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n /**\\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC721).interfaceId ||\\n interfaceId == type(IERC721Metadata).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC721-balanceOf}.\\n */\\n function balanceOf(address owner) public view virtual override returns (uint256) {\\n require(owner != address(0), \\\"ERC721: address zero is not a valid owner\\\");\\n return _balances[owner];\\n }\\n\\n /**\\n * @dev See {IERC721-ownerOf}.\\n */\\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\\n address owner = _ownerOf(tokenId);\\n require(owner != address(0), \\\"ERC721: invalid token ID\\\");\\n return owner;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-name}.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-symbol}.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-tokenURI}.\\n */\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n _requireMinted(tokenId);\\n\\n string memory baseURI = _baseURI();\\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \\\"\\\";\\n }\\n\\n /**\\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\\n * by default, can be overridden in child contracts.\\n */\\n function _baseURI() internal view virtual returns (string memory) {\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev See {IERC721-approve}.\\n */\\n function approve(address to, uint256 tokenId) public virtual override {\\n address owner = ERC721.ownerOf(tokenId);\\n require(to != owner, \\\"ERC721: approval to current owner\\\");\\n\\n require(\\n _msgSender() == owner || isApprovedForAll(owner, _msgSender()),\\n \\\"ERC721: approve caller is not token owner or approved for all\\\"\\n );\\n\\n _approve(to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-getApproved}.\\n */\\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\\n _requireMinted(tokenId);\\n\\n return _tokenApprovals[tokenId];\\n }\\n\\n /**\\n * @dev See {IERC721-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC721-isApprovedForAll}.\\n */\\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[owner][operator];\\n }\\n\\n /**\\n * @dev See {IERC721-transferFrom}.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) public virtual override {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n\\n _transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n _safeTransfer(from, to, tokenId, data);\\n }\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * `data` is additional data, it has no specified format and it is sent in call to `to`.\\n *\\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\\n * implement alternative mechanisms to perform token transfer, such as signature-based.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {\\n _transfer(from, to, tokenId);\\n require(_checkOnERC721Received(from, to, tokenId, data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n }\\n\\n /**\\n * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist\\n */\\n function _ownerOf(uint256 tokenId) internal view virtual returns (address) {\\n return _owners[tokenId];\\n }\\n\\n /**\\n * @dev Returns whether `tokenId` exists.\\n *\\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\\n *\\n * Tokens start existing when they are minted (`_mint`),\\n * and stop existing when they are burned (`_burn`).\\n */\\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\\n return _ownerOf(tokenId) != address(0);\\n }\\n\\n /**\\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\\n address owner = ERC721.ownerOf(tokenId);\\n return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);\\n }\\n\\n /**\\n * @dev Safely mints `tokenId` and transfers it to `to`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeMint(address to, uint256 tokenId) internal virtual {\\n _safeMint(to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\\n */\\n function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual {\\n _mint(to, tokenId);\\n require(\\n _checkOnERC721Received(address(0), to, tokenId, data),\\n \\\"ERC721: transfer to non ERC721Receiver implementer\\\"\\n );\\n }\\n\\n /**\\n * @dev Mints `tokenId` and transfers it to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - `to` cannot be the zero address.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _mint(address to, uint256 tokenId) internal virtual {\\n require(to != address(0), \\\"ERC721: mint to the zero address\\\");\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n _beforeTokenTransfer(address(0), to, tokenId, 1);\\n\\n // Check that tokenId was not minted by `_beforeTokenTransfer` hook\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n unchecked {\\n // Will not overflow unless all 2**256 token ids are minted to the same owner.\\n // Given that tokens are minted one by one, it is impossible in practice that\\n // this ever happens. Might change if we allow batch minting.\\n // The ERC fails to describe this case.\\n _balances[to] += 1;\\n }\\n\\n _owners[tokenId] = to;\\n\\n emit Transfer(address(0), to, tokenId);\\n\\n _afterTokenTransfer(address(0), to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\n * This is an internal function that does not check if the sender is authorized to operate on the token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _burn(uint256 tokenId) internal virtual {\\n address owner = ERC721.ownerOf(tokenId);\\n\\n _beforeTokenTransfer(owner, address(0), tokenId, 1);\\n\\n // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook\\n owner = ERC721.ownerOf(tokenId);\\n\\n // Clear approvals\\n delete _tokenApprovals[tokenId];\\n\\n unchecked {\\n // Cannot overflow, as that would require more tokens to be burned/transferred\\n // out than the owner initially received through minting and transferring in.\\n _balances[owner] -= 1;\\n }\\n delete _owners[tokenId];\\n\\n emit Transfer(owner, address(0), tokenId);\\n\\n _afterTokenTransfer(owner, address(0), tokenId, 1);\\n }\\n\\n /**\\n * @dev Transfers `tokenId` from `from` to `to`.\\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _transfer(address from, address to, uint256 tokenId) internal virtual {\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n require(to != address(0), \\\"ERC721: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, tokenId, 1);\\n\\n // Check that tokenId was not transferred by `_beforeTokenTransfer` hook\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n\\n // Clear approvals from the previous owner\\n delete _tokenApprovals[tokenId];\\n\\n unchecked {\\n // `_balances[from]` cannot overflow for the same reason as described in `_burn`:\\n // `from`'s balance is the number of token held, which is at least one before the current\\n // transfer.\\n // `_balances[to]` could overflow in the conditions described in `_mint`. That would require\\n // all 2**256 token ids to be minted, which in practice is impossible.\\n _balances[from] -= 1;\\n _balances[to] += 1;\\n }\\n _owners[tokenId] = to;\\n\\n emit Transfer(from, to, tokenId);\\n\\n _afterTokenTransfer(from, to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Approve `to` to operate on `tokenId`\\n *\\n * Emits an {Approval} event.\\n */\\n function _approve(address to, uint256 tokenId) internal virtual {\\n _tokenApprovals[tokenId] = to;\\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId);\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\\n require(owner != operator, \\\"ERC721: approve to caller\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Reverts if the `tokenId` has not been minted yet.\\n */\\n function _requireMinted(uint256 tokenId) internal view virtual {\\n require(_exists(tokenId), \\\"ERC721: invalid token ID\\\");\\n }\\n\\n /**\\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\\n * The call is not executed if the target address is not a contract.\\n *\\n * @param from address representing the previous owner of the given token ID\\n * @param to target address that will receive the tokens\\n * @param tokenId uint256 ID of the token to be transferred\\n * @param data bytes optional data to send along with the call\\n * @return bool whether the call correctly returned the expected magic value\\n */\\n function _checkOnERC721Received(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes memory data\\n ) private returns (bool) {\\n if (to.isContract()) {\\n try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\\n return retval == IERC721Receiver.onERC721Received.selector;\\n } catch (bytes memory reason) {\\n if (reason.length == 0) {\\n revert(\\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n } else {\\n /// @solidity memory-safe-assembly\\n assembly {\\n revert(add(32, reason), mload(reason))\\n }\\n }\\n }\\n } else {\\n return true;\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is\\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.\\n * - When `from` is zero, the tokens will be minted for `to`.\\n * - When `to` is zero, ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n * - `batchSize` is non-zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is\\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.\\n * - When `from` is zero, the tokens were minted for `to`.\\n * - When `to` is zero, ``from``'s tokens were burned.\\n * - `from` and `to` are never both zero.\\n * - `batchSize` is non-zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Unsafe write access to the balances, used by extensions that \\\"mint\\\" tokens using an {ownerOf} override.\\n *\\n * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant\\n * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such\\n * that `ownerOf(tokenId)` is `a`.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function __unsafe_increaseBalance(address account, uint256 amount) internal {\\n _balances[account] += amount;\\n }\\n}\\n\",\"keccak256\":\"0x2c309e7df9e05e6ce15bedfe74f3c61b467fc37e0fae9eab496acf5ea0bbd7ff\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x5bce51e11f7d194b79ea59fe00c9e8de9fa2c5530124960f29a24d4c740a3266\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/IERC721Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title ERC721 token receiver interface\\n * @dev Interface for any contract that wants to support safeTransfers\\n * from ERC721 asset contracts.\\n */\\ninterface IERC721Receiver {\\n /**\\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\\n * by `operator` from `from`, this function is called.\\n *\\n * It must return its Solidity selector to confirm the token transfer.\\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\\n *\\n * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.\\n */\\n function onERC721Received(\\n address operator,\\n address from,\\n uint256 tokenId,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xa82b58eca1ee256be466e536706850163d2ec7821945abd6b4778cfb3bee37da\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/extensions/ERC721Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC721.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @title ERC721 Burnable Token\\n * @dev ERC721 Token that can be burned (destroyed).\\n */\\nabstract contract ERC721Burnable is Context, ERC721 {\\n /**\\n * @dev Burns `tokenId`. See {ERC721-_burn}.\\n *\\n * Requirements:\\n *\\n * - The caller must own `tokenId` or be an approved operator.\\n */\\n function burn(uint256 tokenId) public virtual {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n _burn(tokenId);\\n }\\n}\\n\",\"keccak256\":\"0x52da94e59d870f54ca0eb4f485c3d9602011f668ba34d72c88124a1496ebaab1\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/extensions/ERC721Enumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Enumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC721.sol\\\";\\nimport \\\"./IERC721Enumerable.sol\\\";\\n\\n/**\\n * @dev This implements an optional extension of {ERC721} defined in the EIP that adds\\n * enumerability of all the token ids in the contract as well as all token ids owned by each\\n * account.\\n */\\nabstract contract ERC721Enumerable is ERC721, IERC721Enumerable {\\n // Mapping from owner to list of owned token IDs\\n mapping(address => mapping(uint256 => uint256)) private _ownedTokens;\\n\\n // Mapping from token ID to index of the owner tokens list\\n mapping(uint256 => uint256) private _ownedTokensIndex;\\n\\n // Array with all token ids, used for enumeration\\n uint256[] private _allTokens;\\n\\n // Mapping from token id to position in the allTokens array\\n mapping(uint256 => uint256) private _allTokensIndex;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {\\n return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\\n */\\n function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {\\n require(index < ERC721.balanceOf(owner), \\\"ERC721Enumerable: owner index out of bounds\\\");\\n return _ownedTokens[owner][index];\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _allTokens.length;\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenByIndex}.\\n */\\n function tokenByIndex(uint256 index) public view virtual override returns (uint256) {\\n require(index < ERC721Enumerable.totalSupply(), \\\"ERC721Enumerable: global index out of bounds\\\");\\n return _allTokens[index];\\n }\\n\\n /**\\n * @dev See {ERC721-_beforeTokenTransfer}.\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 firstTokenId,\\n uint256 batchSize\\n ) internal virtual override {\\n super._beforeTokenTransfer(from, to, firstTokenId, batchSize);\\n\\n if (batchSize > 1) {\\n // Will only trigger during construction. Batch transferring (minting) is not available afterwards.\\n revert(\\\"ERC721Enumerable: consecutive transfers not supported\\\");\\n }\\n\\n uint256 tokenId = firstTokenId;\\n\\n if (from == address(0)) {\\n _addTokenToAllTokensEnumeration(tokenId);\\n } else if (from != to) {\\n _removeTokenFromOwnerEnumeration(from, tokenId);\\n }\\n if (to == address(0)) {\\n _removeTokenFromAllTokensEnumeration(tokenId);\\n } else if (to != from) {\\n _addTokenToOwnerEnumeration(to, tokenId);\\n }\\n }\\n\\n /**\\n * @dev Private function to add a token to this extension's ownership-tracking data structures.\\n * @param to address representing the new owner of the given token ID\\n * @param tokenId uint256 ID of the token to be added to the tokens list of the given address\\n */\\n function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {\\n uint256 length = ERC721.balanceOf(to);\\n _ownedTokens[to][length] = tokenId;\\n _ownedTokensIndex[tokenId] = length;\\n }\\n\\n /**\\n * @dev Private function to add a token to this extension's token tracking data structures.\\n * @param tokenId uint256 ID of the token to be added to the tokens list\\n */\\n function _addTokenToAllTokensEnumeration(uint256 tokenId) private {\\n _allTokensIndex[tokenId] = _allTokens.length;\\n _allTokens.push(tokenId);\\n }\\n\\n /**\\n * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that\\n * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for\\n * gas optimizations e.g. when performing a transfer operation (avoiding double writes).\\n * This has O(1) time complexity, but alters the order of the _ownedTokens array.\\n * @param from address representing the previous owner of the given token ID\\n * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address\\n */\\n function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {\\n // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and\\n // then delete the last slot (swap and pop).\\n\\n uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;\\n uint256 tokenIndex = _ownedTokensIndex[tokenId];\\n\\n // When the token to delete is the last token, the swap operation is unnecessary\\n if (tokenIndex != lastTokenIndex) {\\n uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];\\n\\n _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\\n _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\\n }\\n\\n // This also deletes the contents at the last position of the array\\n delete _ownedTokensIndex[tokenId];\\n delete _ownedTokens[from][lastTokenIndex];\\n }\\n\\n /**\\n * @dev Private function to remove a token from this extension's token tracking data structures.\\n * This has O(1) time complexity, but alters the order of the _allTokens array.\\n * @param tokenId uint256 ID of the token to be removed from the tokens list\\n */\\n function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {\\n // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and\\n // then delete the last slot (swap and pop).\\n\\n uint256 lastTokenIndex = _allTokens.length - 1;\\n uint256 tokenIndex = _allTokensIndex[tokenId];\\n\\n // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so\\n // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding\\n // an 'if' statement (like in _removeTokenFromOwnerEnumeration)\\n uint256 lastTokenId = _allTokens[lastTokenIndex];\\n\\n _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\\n _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\\n\\n // This also deletes the contents at the last position of the array\\n delete _allTokensIndex[tokenId];\\n _allTokens.pop();\\n }\\n}\\n\",\"keccak256\":\"0xa8796bd16014cefb8c26449413981a49c510f92a98d6828494f5fd046223ced3\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/extensions/ERC721Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.2) (token/ERC721/extensions/ERC721Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC721.sol\\\";\\nimport \\\"../../../security/Pausable.sol\\\";\\n\\n/**\\n * @dev ERC721 token with pausable token transfers, minting and burning.\\n *\\n * Useful for scenarios such as preventing trades until the end of an evaluation\\n * period, or having an emergency switch for freezing all token transfers in the\\n * event of a large bug.\\n *\\n * IMPORTANT: This contract does not include public pause and unpause functions. In\\n * addition to inheriting this contract, you must define both functions, invoking the\\n * {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate\\n * access control, e.g. using {AccessControl} or {Ownable}. Not doing so will\\n * make the contract unpausable.\\n */\\nabstract contract ERC721Pausable is ERC721, Pausable {\\n /**\\n * @dev See {ERC721-_beforeTokenTransfer}.\\n *\\n * Requirements:\\n *\\n * - the contract must not be paused.\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 firstTokenId,\\n uint256 batchSize\\n ) internal virtual override {\\n super._beforeTokenTransfer(from, to, firstTokenId, batchSize);\\n\\n require(!paused(), \\\"ERC721Pausable: token transfer while paused\\\");\\n }\\n}\\n\",\"keccak256\":\"0x645230d3afe28f9108eef658e77bb6ac72cea51ac091b40951977c88f7044142\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Enumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Enumerable is IERC721 {\\n /**\\n * @dev Returns the total amount of tokens stored by the contract.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns a token ID owned by `owner` at a given `index` of its token list.\\n * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.\\n */\\n function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);\\n\\n /**\\n * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.\\n * Use along with {totalSupply} to enumerate all tokens.\\n */\\n function tokenByIndex(uint256 index) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xd1556954440b31c97a142c6ba07d5cade45f96fafd52091d33a14ebe365aecbf\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Metadata is IERC721 {\\n /**\\n * @dev Returns the token collection name.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the token collection symbol.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\\n */\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x75b829ff2f26c14355d1cba20e16fe7b29ca58eb5fef665ede48bc0f9c6c74b9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"src/RNSToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nimport { IERC165, AccessControlEnumerable } from \\\"@openzeppelin/contracts/access/AccessControlEnumerable.sol\\\";\\nimport { IERC721Metadata, IERC721, ERC721 } from \\\"@openzeppelin/contracts/token/ERC721/ERC721.sol\\\";\\nimport { ERC721Burnable } from \\\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol\\\";\\nimport { ERC721Pausable } from \\\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol\\\";\\nimport { ERC721Enumerable } from \\\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol\\\";\\nimport { ERC721Nonce } from \\\"contract-template/refs/ERC721Nonce.sol\\\";\\nimport { INSUnified } from \\\"./interfaces/INSUnified.sol\\\";\\nimport { IERC721State } from \\\"contract-template/refs/IERC721State.sol\\\";\\nimport { Strings } from \\\"@openzeppelin/contracts/utils/Strings.sol\\\";\\n\\nabstract contract RNSToken is\\n AccessControlEnumerable,\\n ERC721Nonce,\\n ERC721Burnable,\\n ERC721Pausable,\\n ERC721Enumerable,\\n IERC721State,\\n INSUnified\\n{\\n using Strings for *;\\n\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n\\n /// @dev Gap for upgradeability.\\n uint256[50] private ____gap;\\n\\n uint256 internal _idCounter;\\n string internal _baseTokenURI;\\n\\n modifier onlyMinted(uint256 tokenId) {\\n _requireMinted(tokenId);\\n _;\\n }\\n\\n /// @inheritdoc INSUnified\\n function setBaseURI(string calldata baseTokenURI) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _setBaseURI(baseTokenURI);\\n }\\n\\n /**\\n * @dev Pauses all token transfers.\\n *\\n * See {ERC721Pausable} and {Pausable-_pause}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `PAUSER_ROLE`.\\n */\\n function pause() external virtual onlyRole(PAUSER_ROLE) {\\n _pause();\\n }\\n\\n /**\\n * @dev Unpauses all token transfers.\\n *\\n * See {ERC721Pausable} and {Pausable-_unpause}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `PAUSER_ROLE`.\\n */\\n function unpause() external virtual onlyRole(PAUSER_ROLE) {\\n _unpause();\\n }\\n\\n /// @dev Override {IERC721Metadata-name}.\\n function name() public view virtual override(ERC721, IERC721Metadata) returns (string memory) {\\n return \\\"Ronin Name Service\\\";\\n }\\n\\n /// @dev Override {IERC721Metadata-symbol}.\\n function symbol() public view virtual override(ERC721, IERC721Metadata) returns (string memory) {\\n return \\\"RNS\\\";\\n }\\n\\n /// @inheritdoc INSUnified\\n function totalMinted() external view virtual returns (uint256) {\\n return _idCounter;\\n }\\n\\n /// @dev Override {IERC721Metadata-tokenURI}.\\n function tokenURI(uint256 tokenId)\\n public\\n view\\n virtual\\n override(ERC721, IERC721Metadata)\\n onlyMinted(tokenId)\\n returns (string memory)\\n {\\n string memory baseURI = _baseURI();\\n return bytes(baseURI).length > 0 ? string.concat(baseURI, address(this).toHexString(), \\\"/\\\", tokenId.toString()) : \\\"\\\";\\n }\\n\\n /// @dev Override {ERC165-supportsInterface}.\\n function supportsInterface(bytes4 interfaceId)\\n public\\n view\\n virtual\\n override(ERC721, AccessControlEnumerable, ERC721Enumerable, IERC165)\\n returns (bool)\\n {\\n return super.supportsInterface(interfaceId) || interfaceId == type(INSUnified).interfaceId;\\n }\\n\\n /// @dev Override {ERC721-_mint}.\\n function _mint(address to, uint256 tokenId) internal virtual override {\\n unchecked {\\n ++_idCounter;\\n }\\n super._mint(to, tokenId);\\n }\\n\\n /**\\n * @dev Helper method to set base uri.\\n */\\n function _setBaseURI(string calldata baseTokenURI) internal virtual {\\n _baseTokenURI = baseTokenURI;\\n emit BaseURIUpdated(_msgSender(), baseTokenURI);\\n }\\n\\n /// @dev Override {ERC721-_beforeTokenTransfer}.\\n function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize)\\n internal\\n virtual\\n override(ERC721, ERC721Nonce, ERC721Enumerable, ERC721Pausable)\\n {\\n super._beforeTokenTransfer(from, to, firstTokenId, batchSize);\\n }\\n\\n /// @dev Override {ERC721-_baseURI}.\\n function _baseURI() internal view virtual override returns (string memory) {\\n return _baseTokenURI;\\n }\\n}\\n\",\"keccak256\":\"0x329a95b72af71faddd0ecf15fe610e42f02ea417864e58d1ff604a7496912360\",\"license\":\"MIT\"},\"src/RNSUnified.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport { IERC721State, IERC721, ERC721, INSUnified, RNSToken } from \\\"./RNSToken.sol\\\";\\nimport { LibRNSDomain } from \\\"./libraries/LibRNSDomain.sol\\\";\\nimport { LibSafeRange } from \\\"./libraries/math/LibSafeRange.sol\\\";\\nimport { ModifyingField, LibModifyingField } from \\\"./libraries/LibModifyingField.sol\\\";\\nimport {\\n ALL_FIELDS_INDICATOR,\\n IMMUTABLE_FIELDS_INDICATOR,\\n USER_FIELDS_INDICATOR,\\n ModifyingIndicator\\n} from \\\"./types/ModifyingIndicator.sol\\\";\\n\\ncontract RNSUnified is Initializable, RNSToken {\\n using LibRNSDomain for string;\\n using LibModifyingField for ModifyingField;\\n\\n bytes32 public constant CONTROLLER_ROLE = keccak256(\\\"CONTROLLER_ROLE\\\");\\n bytes32 public constant RESERVATION_ROLE = keccak256(\\\"RESERVATION_ROLE\\\");\\n bytes32 public constant PROTECTED_SETTLER_ROLE = keccak256(\\\"PROTECTED_SETTLER_ROLE\\\");\\n uint64 public constant MAX_EXPIRY = type(uint64).max;\\n\\n /// @dev Gap for upgradeability.\\n uint256[50] private ____gap;\\n\\n uint64 internal _gracePeriod;\\n /// @dev Mapping from token id => record\\n mapping(uint256 => Record) internal _recordOf;\\n\\n modifier onlyAuthorized(uint256 id, ModifyingIndicator indicator) {\\n _requireAuthorized(id, indicator);\\n _;\\n }\\n\\n constructor() payable ERC721(\\\"\\\", \\\"\\\") {\\n _disableInitializers();\\n }\\n\\n function initialize(\\n address admin,\\n address pauser,\\n address controller,\\n address protectedSettler,\\n uint64 gracePeriod,\\n string calldata baseTokenURI\\n ) external initializer {\\n _grantRole(DEFAULT_ADMIN_ROLE, admin);\\n _grantRole(PAUSER_ROLE, pauser);\\n _grantRole(CONTROLLER_ROLE, controller);\\n _grantRole(PROTECTED_SETTLER_ROLE, protectedSettler);\\n\\n _setBaseURI(baseTokenURI);\\n _setGracePeriod(gracePeriod);\\n\\n _mint(admin, 0x0);\\n Record memory record;\\n _recordOf[0x0].mut.expiry = record.mut.expiry = MAX_EXPIRY;\\n emit RecordUpdated(0x0, ModifyingField.Expiry.indicator(), record);\\n }\\n\\n /// @inheritdoc INSUnified\\n function available(uint256 id) public view returns (bool) {\\n return block.timestamp > LibSafeRange.add(_expiry(id), _gracePeriod);\\n }\\n\\n /// @inheritdoc INSUnified\\n function getGracePeriod() external view returns (uint64) {\\n return _gracePeriod;\\n }\\n\\n /// @inheritdoc INSUnified\\n function setGracePeriod(uint64 gracePeriod) external whenNotPaused onlyRole(CONTROLLER_ROLE) {\\n _setGracePeriod(gracePeriod);\\n }\\n\\n /// @inheritdoc INSUnified\\n function mint(uint256 parentId, string calldata label, address resolver, address owner, uint64 duration)\\n external\\n whenNotPaused\\n returns (uint64 expiryTime, uint256 id)\\n {\\n if (!_checkOwnerRules(_msgSender(), parentId)) revert Unauthorized();\\n id = LibRNSDomain.toId(parentId, label);\\n if (!available(id)) revert Unavailable();\\n\\n if (_exists(id)) _burn(id);\\n _mint(owner, id);\\n\\n expiryTime = uint64(LibSafeRange.addWithUpperbound(block.timestamp, duration, MAX_EXPIRY));\\n _requireValidExpiry(parentId, expiryTime);\\n Record memory record;\\n record.mut = MutableRecord({ resolver: resolver, owner: owner, expiry: expiryTime, protected: false });\\n record.immut = ImmutableRecord({ depth: _recordOf[parentId].immut.depth + 1, parentId: parentId, label: label });\\n\\n _recordOf[id] = record;\\n emit RecordUpdated(id, ALL_FIELDS_INDICATOR, record);\\n }\\n\\n /// @inheritdoc INSUnified\\n function namehash(string memory str) public pure returns (bytes32 hashed) {\\n hashed = str.namehash();\\n }\\n\\n /// @inheritdoc INSUnified\\n function getRecord(uint256 id) external view returns (Record memory record) {\\n record = _recordOf[id];\\n record.mut.expiry = _expiry(id);\\n }\\n\\n /// @inheritdoc INSUnified\\n function getDomain(uint256 id) external view returns (string memory domain) {\\n if (id == 0) return \\\"\\\";\\n\\n ImmutableRecord storage sRecord = _recordOf[id].immut;\\n domain = sRecord.label;\\n id = sRecord.parentId;\\n while (id != 0) {\\n sRecord = _recordOf[id].immut;\\n domain = string.concat(domain, \\\".\\\", sRecord.label);\\n id = sRecord.parentId;\\n }\\n }\\n\\n /// @inheritdoc INSUnified\\n function reclaim(uint256 id, address owner)\\n external\\n whenNotPaused\\n onlyAuthorized(id, ModifyingField.Owner.indicator())\\n {\\n _safeTransfer(_recordOf[id].mut.owner, owner, id, \\\"\\\");\\n }\\n\\n /// @inheritdoc INSUnified\\n function renew(uint256 id, uint64 duration) external whenNotPaused onlyRole(CONTROLLER_ROLE) returns (uint64 expiry) {\\n Record memory record;\\n record.mut.expiry = uint64(LibSafeRange.addWithUpperbound(_recordOf[id].mut.expiry, duration, MAX_EXPIRY));\\n _setExpiry(id, record.mut.expiry);\\n expiry = record.mut.expiry;\\n emit RecordUpdated(id, ModifyingField.Expiry.indicator(), record);\\n }\\n\\n /// @inheritdoc INSUnified\\n function setExpiry(uint256 id, uint64 expiry) external whenNotPaused onlyRole(CONTROLLER_ROLE) {\\n Record memory record;\\n _setExpiry(id, record.mut.expiry = expiry);\\n emit RecordUpdated(id, ModifyingField.Expiry.indicator(), record);\\n }\\n\\n /// @inheritdoc INSUnified\\n function bulkSetProtected(uint256[] calldata ids, bool protected) external onlyRole(PROTECTED_SETTLER_ROLE) {\\n ModifyingIndicator indicator = ModifyingField.Protected.indicator();\\n uint256 id;\\n Record memory record;\\n record.mut.protected = protected;\\n\\n for (uint256 i; i < ids.length;) {\\n id = ids[i];\\n if (!_exists(id)) revert Unexists();\\n if (_recordOf[id].mut.protected != protected) {\\n _recordOf[id].mut.protected = protected;\\n emit RecordUpdated(id, indicator, record);\\n }\\n\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @inheritdoc INSUnified\\n function setRecord(uint256 id, ModifyingIndicator indicator, MutableRecord calldata mutRecord)\\n external\\n whenNotPaused\\n onlyAuthorized(id, indicator)\\n {\\n Record memory record;\\n MutableRecord storage sMutRecord = _recordOf[id].mut;\\n\\n if (indicator.hasAny(ModifyingField.Protected.indicator())) {\\n sMutRecord.protected = record.mut.protected = mutRecord.protected;\\n }\\n if (indicator.hasAny(ModifyingField.Expiry.indicator())) {\\n _setExpiry(id, record.mut.expiry = mutRecord.expiry);\\n }\\n if (indicator.hasAny(ModifyingField.Resolver.indicator())) {\\n sMutRecord.resolver = record.mut.resolver = mutRecord.resolver;\\n }\\n emit RecordUpdated(id, indicator, record);\\n\\n // Updating owner might emit more {RecordUpdated} events. See method {_transfer}.\\n if (indicator.hasAny(ModifyingField.Owner.indicator())) {\\n _safeTransfer(_recordOf[id].mut.owner, mutRecord.owner, id, \\\"\\\");\\n }\\n }\\n\\n /**\\n * @inheritdoc IERC721State\\n */\\n function stateOf(uint256 tokenId) external view virtual override onlyMinted(tokenId) returns (bytes memory) {\\n return abi.encode(_recordOf[tokenId], nonces[tokenId], tokenId);\\n }\\n\\n /// @inheritdoc INSUnified\\n function canSetRecord(address requester, uint256 id, ModifyingIndicator indicator)\\n public\\n view\\n returns (bool allowed, bytes4)\\n {\\n if (indicator.hasAny(IMMUTABLE_FIELDS_INDICATOR)) {\\n return (false, CannotSetImmutableField.selector);\\n }\\n if (!_exists(id)) return (false, Unexists.selector);\\n if (indicator.hasAny(ModifyingField.Protected.indicator()) && !hasRole(PROTECTED_SETTLER_ROLE, requester)) {\\n return (false, MissingProtectedSettlerRole.selector);\\n }\\n bool hasControllerRole = hasRole(CONTROLLER_ROLE, requester);\\n if (indicator.hasAny(ModifyingField.Expiry.indicator()) && !hasControllerRole) {\\n return (false, MissingControllerRole.selector);\\n }\\n if (indicator.hasAny(USER_FIELDS_INDICATOR) && !(hasControllerRole || _checkOwnerRules(requester, id))) {\\n return (false, Unauthorized.selector);\\n }\\n\\n return (true, 0x0);\\n }\\n\\n /// @dev Override {ERC721-ownerOf}.\\n function ownerOf(uint256 tokenId) public view override(ERC721, IERC721) returns (address) {\\n if (_isExpired(tokenId)) return address(0x0);\\n return super.ownerOf(tokenId);\\n }\\n\\n /// @dev Override {ERC721-_isApprovedOrOwner}.\\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual override returns (bool) {\\n if (_isExpired(tokenId)) return false;\\n return super._isApprovedOrOwner(spender, tokenId);\\n }\\n\\n /**\\n * @dev Helper method to check whether the id is expired.\\n */\\n function _isExpired(uint256 id) internal view returns (bool) {\\n return block.timestamp > _expiry(id);\\n }\\n\\n /**\\n * @dev Helper method to calculate expiry time for specific id.\\n */\\n function _expiry(uint256 id) internal view returns (uint64) {\\n if (hasRole(RESERVATION_ROLE, _ownerOf(id))) return MAX_EXPIRY;\\n return _recordOf[id].mut.expiry;\\n }\\n\\n /**\\n * @dev Helper method to check whether the address is owner of parent token.\\n */\\n function _isHierarchyOwner(address spender, uint256 id) internal view returns (bool) {\\n address owner;\\n\\n while (id != 0) {\\n owner = _recordOf[id].mut.owner;\\n if (owner == spender) return true;\\n id = _recordOf[id].immut.parentId;\\n }\\n\\n return false;\\n }\\n\\n /**\\n * @dev Returns whether the owner rules is satisfied.\\n * Returns true only if the spender is owner, or approved spender, or owner of parent token.\\n */\\n function _checkOwnerRules(address spender, uint256 id) internal view returns (bool) {\\n return _isApprovedOrOwner(spender, id) || _isHierarchyOwner(spender, id);\\n }\\n\\n /**\\n * @dev Helper method to ensure msg.sender is authorized to modify record of the token id.\\n */\\n function _requireAuthorized(uint256 id, ModifyingIndicator indicator) internal view {\\n (bool allowed, bytes4 errorCode) = canSetRecord(_msgSender(), id, indicator);\\n if (!allowed) {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x0, errorCode)\\n revert(0x0, 0x04)\\n }\\n }\\n }\\n\\n /**\\n * @dev Helper method to ensure expiry of an id is lower or equal expiry of parent id.\\n */\\n function _requireValidExpiry(uint256 parentId, uint64 expiry) internal view {\\n if (expiry > _recordOf[parentId].mut.expiry) revert ExceedParentExpiry();\\n }\\n\\n /**\\n * @dev Helper method to set expiry time of a token.\\n *\\n * Requirement:\\n * - The token must be registered or in grace period.\\n * - Expiry time must be larger than the old one.\\n *\\n * Emits an event {RecordUpdated}.\\n */\\n function _setExpiry(uint256 id, uint64 expiry) internal {\\n _requireValidExpiry(_recordOf[id].immut.parentId, expiry);\\n if (available(id)) revert NameMustBeRegisteredOrInGracePeriod();\\n if (expiry <= _recordOf[id].mut.expiry) revert ExpiryTimeMustBeLargerThanTheOldOne();\\n\\n Record memory record;\\n _recordOf[id].mut.expiry = record.mut.expiry = expiry;\\n }\\n\\n /**\\n * @dev Helper method to set grace period.\\n *\\n * Emits an event {GracePeriodUpdated}.\\n */\\n function _setGracePeriod(uint64 gracePeriod) internal {\\n _gracePeriod = gracePeriod;\\n emit GracePeriodUpdated(_msgSender(), gracePeriod);\\n }\\n\\n /// @dev Override {ERC721-_transfer}.\\n function _transfer(address from, address to, uint256 id) internal override {\\n super._transfer(from, to, id);\\n\\n Record memory record;\\n ModifyingIndicator indicator = ModifyingField.Owner.indicator();\\n\\n _recordOf[id].mut.owner = record.mut.owner = to;\\n if (!hasRole(PROTECTED_SETTLER_ROLE, _msgSender()) && _recordOf[id].mut.protected) {\\n _recordOf[id].mut.protected = false;\\n indicator = indicator | ModifyingField.Protected.indicator();\\n }\\n emit RecordUpdated(id, indicator, record);\\n }\\n\\n /// @dev Override {ERC721-_burn}.\\n function _burn(uint256 id) internal override {\\n super._burn(id);\\n delete _recordOf[id].mut;\\n }\\n}\\n\",\"keccak256\":\"0x3734a16c9b2007b12110825e9588ae0c42d7b0db0cabbc305d5012a19fca5c99\",\"license\":\"MIT\"},\"src/interfaces/INSUnified.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nimport { IERC721Metadata } from \\\"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol\\\";\\nimport { IAccessControlEnumerable } from \\\"@openzeppelin/contracts/access/IAccessControlEnumerable.sol\\\";\\nimport { ModifyingIndicator } from \\\"../types/ModifyingIndicator.sol\\\";\\n\\ninterface INSUnified is IAccessControlEnumerable, IERC721Metadata {\\n /// @dev Error: The provided token id is expired.\\n error Expired();\\n /// @dev Error: The provided token id is unexists.\\n error Unexists();\\n /// @dev Error: The provided id expiry is greater than parent id expiry.\\n error ExceedParentExpiry();\\n /// @dev Error: The provided name is unavailable for registration.\\n error Unavailable();\\n /// @dev Error: The sender lacks the necessary permissions.\\n error Unauthorized();\\n /// @dev Error: Missing controller role required for modification.\\n error MissingControllerRole();\\n /// @dev Error: Attempting to set an immutable field, which cannot be modified.\\n error CannotSetImmutableField();\\n /// @dev Error: Missing protected settler role required for modification.\\n error MissingProtectedSettlerRole();\\n /// @dev Error: Attempting to set an expiry time that is not larger than the previous one.\\n error ExpiryTimeMustBeLargerThanTheOldOne();\\n /// @dev Error: The provided name must be registered or is in a grace period.\\n error NameMustBeRegisteredOrInGracePeriod();\\n\\n /**\\n * | Fields\\\\Idc | Modifying Indicator |\\n * | ---------- | ------------------- |\\n * | depth | 0b00000001 |\\n * | parentId | 0b00000010 |\\n * | label | 0b00000100 |\\n */\\n struct ImmutableRecord {\\n // The level-th of a domain.\\n uint8 depth;\\n // The node of parent token. Eg, parent node of vip.duke.ron equals to namehash('duke.ron')\\n uint256 parentId;\\n // The label of a domain. Eg, label is vip for domain vip.duke.ron\\n string label;\\n }\\n\\n /**\\n * | Fields\\\\Idc,Roles | Modifying Indicator | Controller | Protected setter | (Parent) Owner/Spender |\\n * | ---------------- | ------------------- | ---------- | ---------------- | ---------------------- |\\n * | resolver | 0b00001000 | x | | x |\\n * | owner | 0b00010000 | x | | x |\\n * | expiry | 0b00100000 | x | | |\\n * | protected | 0b01000000 | | x | |\\n * Note: (Parent) Owner/Spender means parent owner or current owner or current token spender.\\n */\\n struct MutableRecord {\\n // The resolver address.\\n address resolver;\\n // The record owner. This field must equal to the owner of token.\\n address owner;\\n // Expiry timestamp.\\n uint64 expiry;\\n // Flag indicating whether the token is protected or not.\\n bool protected;\\n }\\n\\n struct Record {\\n ImmutableRecord immut;\\n MutableRecord mut;\\n }\\n\\n /// @dev Emitted when a base URI is updated.\\n event BaseURIUpdated(address indexed operator, string newURI);\\n /// @dev Emitted when the grace period for all domain is updated.\\n event GracePeriodUpdated(address indexed operator, uint64 newGracePeriod);\\n\\n /**\\n * @dev Emitted when the record of node is updated.\\n * @param indicator The binary index of updated fields. Eg, 0b10101011 means fields at position 1, 2, 4, 6, 8 (right\\n * to left) needs to be updated.\\n * @param record The updated fields.\\n */\\n event RecordUpdated(uint256 indexed node, ModifyingIndicator indicator, Record record);\\n\\n /**\\n * @dev Returns the controller role.\\n * @notice Can set all fields {Record.mut} in token record, excepting {Record.mut.protected}.\\n */\\n function CONTROLLER_ROLE() external pure returns (bytes32);\\n\\n /**\\n * @dev Returns the protected setter role.\\n * @notice Can set field {Record.mut.protected} in token record by using method `bulkSetProtected`.\\n */\\n function PROTECTED_SETTLER_ROLE() external pure returns (bytes32);\\n\\n /**\\n * @dev Returns the reservation role.\\n * @notice Never expire for token owner has this role.\\n */\\n function RESERVATION_ROLE() external pure returns (bytes32);\\n\\n /**\\n * @dev Returns the max expiry value.\\n */\\n function MAX_EXPIRY() external pure returns (uint64);\\n\\n /**\\n * @dev Returns the name hash output of a domain.\\n */\\n function namehash(string memory domain) external pure returns (bytes32 node);\\n\\n /**\\n * @dev Returns true if the specified name is available for registration.\\n * Note: Only available after passing the grace period.\\n */\\n function available(uint256 id) external view returns (bool);\\n\\n /**\\n * @dev Returns the grace period in second(s).\\n * Note: This period affects the availability of the domain.\\n */\\n function getGracePeriod() external view returns (uint64);\\n\\n /**\\n * @dev Returns the total minted ids.\\n * Note: Burning id will not affect `totalMinted`.\\n */\\n function totalMinted() external view returns (uint256);\\n\\n /**\\n * @dev Sets the grace period in second(s).\\n *\\n * Requirements:\\n * - The method caller must have controller role.\\n *\\n * Note: This period affects the availability of the domain.\\n */\\n function setGracePeriod(uint64) external;\\n\\n /**\\n * @dev Sets the base uri.\\n *\\n * Requirements:\\n * - The method caller must be contract owner.\\n *\\n */\\n function setBaseURI(string calldata baseTokenURI) external;\\n\\n /**\\n * @dev Mints token for subnode.\\n *\\n * Requirements:\\n * - The token must be available.\\n * - The method caller must be (parent) owner or approved spender. See struct {MutableRecord}.\\n *\\n * Emits an event {RecordUpdated}.\\n *\\n * @param parentId The parent node to mint or create subnode.\\n * @param label The domain label. Eg, label is duke for domain duke.ron.\\n * @param resolver The resolver address.\\n * @param owner The token owner.\\n * @param duration Duration in second(s) to expire. Leave 0 to set as parent.\\n */\\n function mint(uint256 parentId, string calldata label, address resolver, address owner, uint64 duration)\\n external\\n returns (uint64 expiryTime, uint256 id);\\n\\n /**\\n * @dev Returns all record of a domain.\\n * Reverts if the token is non existent.\\n */\\n function getRecord(uint256 id) external view returns (Record memory record);\\n\\n /**\\n * @dev Returns the domain name of id.\\n */\\n function getDomain(uint256 id) external view returns (string memory domain);\\n\\n /**\\n * @dev Returns whether the requester is able to modify the record based on the updated index.\\n * Note: This method strictly follows the permission of struct {MutableRecord}.\\n */\\n function canSetRecord(address requester, uint256 id, ModifyingIndicator indicator)\\n external\\n view\\n returns (bool, bytes4 error);\\n\\n /**\\n * @dev Sets record of existing token. Update operation for {Record.mut}.\\n *\\n * Requirements:\\n * - The method caller must have role based on the corresponding `indicator`. See struct {MutableRecord}.\\n *\\n * Emits an event {RecordUpdated}.\\n */\\n function setRecord(uint256 id, ModifyingIndicator indicator, MutableRecord calldata record) external;\\n\\n /**\\n * @dev Reclaims ownership. Update operation for {Record.mut.owner}.\\n *\\n * Requirements:\\n * - The method caller should have controller role.\\n * - The method caller should be (parent) owner or approved spender. See struct {MutableRecord}.\\n *\\n * Emits an event {RecordUpdated}.\\n */\\n function reclaim(uint256 id, address owner) external;\\n\\n /**\\n * @dev Renews token. Update operation for {Record.mut.expiry}.\\n *\\n * Requirements:\\n * - The method caller should have controller role.\\n *\\n * Emits an event {RecordUpdated}.\\n */\\n function renew(uint256 id, uint64 duration) external returns (uint64 expiry);\\n\\n /**\\n * @dev Sets expiry time for a token. Update operation for {Record.mut.expiry}.\\n *\\n * Requirements:\\n * - The method caller must have controller role.\\n *\\n * Emits an event {RecordUpdated}.\\n */\\n function setExpiry(uint256 id, uint64 expiry) external;\\n\\n /**\\n * @dev Sets the protected status of a list of ids. Update operation for {Record.mut.protected}.\\n *\\n * Requirements:\\n * - The method caller must have protected setter role.\\n *\\n * Emits events {RecordUpdated}.\\n */\\n function bulkSetProtected(uint256[] calldata ids, bool protected) external;\\n}\\n\",\"keccak256\":\"0xaef1c58bb7c8688d6677a1c2739c0dc9e645ca5c64dd875be2f2b7a318a11406\",\"license\":\"MIT\"},\"src/libraries/LibModifyingField.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nimport { ModifyingIndicator } from \\\"../types/ModifyingIndicator.sol\\\";\\n\\nenum ModifyingField {\\n Depth,\\n ParentId,\\n Label,\\n Resolver,\\n Owner,\\n Expiry,\\n Protected\\n}\\n\\nlibrary LibModifyingField {\\n function indicator(ModifyingField opt) internal pure returns (ModifyingIndicator) {\\n return ModifyingIndicator.wrap(1 << uint8(opt));\\n }\\n}\\n\",\"keccak256\":\"0xa3a752a56545a4beff2784a42b295c3c4af6f70cbe1a18fd32479686e1a06c41\",\"license\":\"MIT\"},\"src/libraries/LibRNSDomain.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nlibrary LibRNSDomain {\\n /// @dev Value equals to namehash('ron')\\n uint256 internal constant RON_ID = 0xba69923fa107dbf5a25a073a10b7c9216ae39fbadc95dc891d460d9ae315d688;\\n /// @dev Value equals to namehash('addr.reverse')\\n uint256 internal constant ADDR_REVERSE_ID = 0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2;\\n\\n /**\\n * @dev Calculate the corresponding id given parentId and label.\\n */\\n function toId(uint256 parentId, string memory label) internal pure returns (uint256 id) {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x0, parentId)\\n mstore(0x20, keccak256(add(label, 32), mload(label)))\\n id := keccak256(0x0, 64)\\n }\\n }\\n\\n /**\\n * @dev Calculates the hash of the label.\\n */\\n function hashLabel(string memory label) internal pure returns (bytes32 hashed) {\\n assembly (\\\"memory-safe\\\") {\\n hashed := keccak256(add(label, 32), mload(label))\\n }\\n }\\n\\n /**\\n * @dev Calculate the RNS namehash of a str.\\n */\\n function namehash(string memory str) internal pure returns (bytes32 hashed) {\\n // notice: this method is case-sensitive, ensure the string is lowercased before calling this method\\n assembly (\\\"memory-safe\\\") {\\n // load str length\\n let len := mload(str)\\n // returns bytes32(0x0) if length is zero\\n if iszero(iszero(len)) {\\n let hashedLen\\n // compute pointer to str[0]\\n let head := add(str, 32)\\n // compute pointer to str[length - 1]\\n let tail := add(head, sub(len, 1))\\n // cleanup dirty bytes if contains any\\n mstore(0x0, 0)\\n // loop backwards from `tail` to `head`\\n for { let i := tail } iszero(lt(i, head)) { i := sub(i, 1) } {\\n // check if `i` is `head`\\n let isHead := eq(i, head)\\n // check if `str[i-1]` is \\\".\\\"\\n // `0x2e` == bytes1(\\\".\\\")\\n let isDotNext := eq(shr(248, mload(sub(i, 1))), 0x2e)\\n if or(isHead, isDotNext) {\\n // size = distance(length, i) - hashedLength + 1\\n let size := add(sub(sub(tail, i), hashedLen), 1)\\n mstore(0x20, keccak256(i, size))\\n mstore(0x0, keccak256(0x0, 64))\\n // skip \\\".\\\" thereby + 1\\n hashedLen := add(hashedLen, add(size, 1))\\n }\\n }\\n }\\n hashed := mload(0x0)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x715029b2b420c6ec00bc1f939b837acf45d247fde8426089575b0e7b5e84518b\",\"license\":\"MIT\"},\"src/libraries/math/LibSafeRange.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nlibrary LibSafeRange {\\n function add(uint256 a, uint256 b) internal pure returns (uint256 c) {\\n unchecked {\\n c = a + b;\\n if (c < a) return type(uint256).max;\\n }\\n }\\n\\n /**\\n * @dev Returns value of a + b; in case result is larger than upperbound, upperbound is returned.\\n */\\n function addWithUpperbound(uint256 a, uint256 b, uint256 ceil) internal pure returns (uint256 c) {\\n if (a > ceil || b > ceil) return ceil;\\n c = add(a, b);\\n if (c > ceil) return ceil;\\n }\\n}\\n\",\"keccak256\":\"0x12cf5f592a2d80b9c1b0ea11b8fe2b3ed42fc6d62303ba667edc56464baa8810\",\"license\":\"MIT\"},\"src/types/ModifyingIndicator.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\ntype ModifyingIndicator is uint256;\\n\\nusing { hasAny } for ModifyingIndicator global;\\nusing { or as | } for ModifyingIndicator global;\\nusing { and as & } for ModifyingIndicator global;\\nusing { eq as == } for ModifyingIndicator global;\\nusing { not as ~ } for ModifyingIndicator global;\\nusing { neq as != } for ModifyingIndicator global;\\n\\n/// @dev Indicator for modifying immutable fields: Depth, ParentId, Label. See struct {INSUnified.ImmutableRecord}.\\nModifyingIndicator constant IMMUTABLE_FIELDS_INDICATOR = ModifyingIndicator.wrap(0x7);\\n\\n/// @dev Indicator for modifying user fields: Resolver, Owner. See struct {INSUnified.MutableRecord}.\\nModifyingIndicator constant USER_FIELDS_INDICATOR = ModifyingIndicator.wrap(0x18);\\n\\n/// @dev Indicator when modifying all of the fields in {ModifyingField}.\\nModifyingIndicator constant ALL_FIELDS_INDICATOR = ModifyingIndicator.wrap(type(uint256).max);\\n\\nfunction eq(ModifyingIndicator self, ModifyingIndicator other) pure returns (bool) {\\n return ModifyingIndicator.unwrap(self) == ModifyingIndicator.unwrap(other);\\n}\\n\\nfunction neq(ModifyingIndicator self, ModifyingIndicator other) pure returns (bool) {\\n return !eq(self, other);\\n}\\n\\nfunction not(ModifyingIndicator self) pure returns (ModifyingIndicator) {\\n return ModifyingIndicator.wrap(~ModifyingIndicator.unwrap(self));\\n}\\n\\nfunction or(ModifyingIndicator self, ModifyingIndicator other) pure returns (ModifyingIndicator) {\\n return ModifyingIndicator.wrap(ModifyingIndicator.unwrap(self) | ModifyingIndicator.unwrap(other));\\n}\\n\\nfunction and(ModifyingIndicator self, ModifyingIndicator other) pure returns (ModifyingIndicator) {\\n return ModifyingIndicator.wrap(ModifyingIndicator.unwrap(self) & ModifyingIndicator.unwrap(other));\\n}\\n\\nfunction hasAny(ModifyingIndicator self, ModifyingIndicator other) pure returns (bool) {\\n return self & other != ModifyingIndicator.wrap(0);\\n}\\n\",\"keccak256\":\"0xe364b4d2e480a7f3e392a40f792303c0febf79c1a623eb4c2278f652210e2e6c\",\"license\":\"MIT\"}},\"version\":1}", - "nonce": 182495, - "numDeployments": 1, + "metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CannotSetImmutableField\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ExceedParentExpiry\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Expired\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ExpiryTimeMustBeLargerThanTheOldOne\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MissingControllerRole\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MissingProtectedSettlerRole\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NameMustBeRegisteredOrInGracePeriod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Unavailable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Unexists\",\"type\":\"error\"},{\"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\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"newURI\",\"type\":\"string\"}],\"name\":\"BaseURIUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"newGracePeriod\",\"type\":\"uint64\"}],\"name\":\"GracePeriodUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"NonceUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"node\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"ModifyingIndicator\",\"name\":\"indicator\",\"type\":\"uint256\"},{\"components\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"depth\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"parentId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"label\",\"type\":\"string\"}],\"internalType\":\"struct INSUnified.ImmutableRecord\",\"name\":\"immut\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"resolver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"expiry\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"protected\",\"type\":\"bool\"}],\"internalType\":\"struct INSUnified.MutableRecord\",\"name\":\"mut\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct INSUnified.Record\",\"name\":\"record\",\"type\":\"tuple\"}],\"name\":\"RecordUpdated\",\"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\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"CONTROLLER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_EXPIRY\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PROTECTED_SETTLER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RESERVATION_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"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\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"available\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"protected\",\"type\":\"bool\"}],\"name\":\"bulkSetProtected\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"ModifyingIndicator\",\"name\":\"indicator\",\"type\":\"uint256\"}],\"name\":\"canSetRecord\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"},{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"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\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getDomain\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"domain\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGracePeriod\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getRecord\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"depth\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"parentId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"label\",\"type\":\"string\"}],\"internalType\":\"struct INSUnified.ImmutableRecord\",\"name\":\"immut\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"resolver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"expiry\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"protected\",\"type\":\"bool\"}],\"internalType\":\"struct INSUnified.MutableRecord\",\"name\":\"mut\",\"type\":\"tuple\"}],\"internalType\":\"struct INSUnified.Record\",\"name\":\"record\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"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\":\"admin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"pauser\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"controller\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"protectedSettler\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"gracePeriod\",\"type\":\"uint64\"},{\"internalType\":\"string\",\"name\":\"baseTokenURI\",\"type\":\"string\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"uint256\",\"name\":\"parentId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"label\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"resolver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"duration\",\"type\":\"uint64\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"expiryTime\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"str\",\"type\":\"string\"}],\"name\":\"namehash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashed\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"reclaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"duration\",\"type\":\"uint64\"}],\"name\":\"renew\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"expiry\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"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\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"baseTokenURI\",\"type\":\"string\"}],\"name\":\"setBaseURI\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"expiry\",\"type\":\"uint64\"}],\"name\":\"setExpiry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"gracePeriod\",\"type\":\"uint64\"}],\"name\":\"setGracePeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"ModifyingIndicator\",\"name\":\"indicator\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"resolver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"expiry\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"protected\",\"type\":\"bool\"}],\"internalType\":\"struct INSUnified.MutableRecord\",\"name\":\"mutRecord\",\"type\":\"tuple\"}],\"name\":\"setRecord\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"stateOf\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"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\":[{\"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\":\"totalMinted\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"CannotSetImmutableField()\":[{\"details\":\"Error: Attempting to set an immutable field, which cannot be modified.\"}],\"ExceedParentExpiry()\":[{\"details\":\"Error: The provided id expiry is greater than parent id expiry.\"}],\"Expired()\":[{\"details\":\"Error: The provided token id is expired.\"}],\"ExpiryTimeMustBeLargerThanTheOldOne()\":[{\"details\":\"Error: Attempting to set an expiry time that is not larger than the previous one.\"}],\"MissingControllerRole()\":[{\"details\":\"Error: Missing controller role required for modification.\"}],\"MissingProtectedSettlerRole()\":[{\"details\":\"Error: Missing protected settler role required for modification.\"}],\"NameMustBeRegisteredOrInGracePeriod()\":[{\"details\":\"Error: The provided name must be registered or is in a grace period.\"}],\"Unauthorized()\":[{\"details\":\"Error: The sender lacks the necessary permissions.\"}],\"Unavailable()\":[{\"details\":\"Error: The provided name is unavailable for registration.\"}],\"Unexists()\":[{\"details\":\"Error: The provided token id is unexists.\"}]},\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when `owner` enables `approved` to manage the `tokenId` token.\"},\"ApprovalForAll(address,address,bool)\":{\"details\":\"Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\"},\"BaseURIUpdated(address,string)\":{\"details\":\"Emitted when a base URI is updated.\"},\"GracePeriodUpdated(address,uint64)\":{\"details\":\"Emitted when the grace period for all domain is updated.\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"NonceUpdated(uint256,uint256)\":{\"details\":\"Emitted when the token nonce is updated\"},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"RecordUpdated(uint256,uint256,((uint8,uint256,string),(address,address,uint64,bool)))\":{\"details\":\"Emitted when the record of node is updated.\",\"params\":{\"indicator\":\"The binary index of updated fields. Eg, 0b10101011 means fields at position 1, 2, 4, 6, 8 (right to left) needs to be updated.\",\"record\":\"The updated fields.\"}},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"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._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"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`)\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `tokenId` token is transferred from `from` to `to`.\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"}},\"kind\":\"dev\",\"methods\":{\"approve(address,uint256)\":{\"details\":\"See {IERC721-approve}.\"},\"available(uint256)\":{\"details\":\"Returns true if the specified name is available for registration. Note: Only available after passing the grace period.\"},\"balanceOf(address)\":{\"details\":\"See {IERC721-balanceOf}.\"},\"bulkSetProtected(uint256[],bool)\":{\"details\":\"Sets the protected status of a list of ids. Update operation for {Record.mut.protected}. Requirements: - The method caller must have protected setter role. Emits events {RecordUpdated}.\"},\"burn(uint256)\":{\"details\":\"Burns `tokenId`. See {ERC721-_burn}. Requirements: - The caller must own `tokenId` or be an approved operator.\"},\"canSetRecord(address,uint256,uint256)\":{\"details\":\"Returns whether the requester is able to modify the record based on the updated index. Note: This method strictly follows the permission of struct {MutableRecord}.\"},\"getApproved(uint256)\":{\"details\":\"See {IERC721-getApproved}.\"},\"getDomain(uint256)\":{\"details\":\"Returns the domain name of id.\"},\"getGracePeriod()\":{\"details\":\"Returns the grace period in second(s). Note: This period affects the availability of the domain.\"},\"getRecord(uint256)\":{\"details\":\"Returns all record of a domain. Reverts if the token is non existent.\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"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.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"isApprovedForAll(address,address)\":{\"details\":\"See {IERC721-isApprovedForAll}.\"},\"mint(uint256,string,address,address,uint64)\":{\"details\":\"Mints token for subnode. Requirements: - The token must be available. - The method caller must be (parent) owner or approved spender. See struct {MutableRecord}. Emits an event {RecordUpdated}.\",\"params\":{\"duration\":\"Duration in second(s) to expire. Leave 0 to set as parent.\",\"label\":\"The domain label. Eg, label is duke for domain duke.ron.\",\"owner\":\"The token owner.\",\"parentId\":\"The parent node to mint or create subnode.\",\"resolver\":\"The resolver address.\"}},\"name()\":{\"details\":\"Override {IERC721Metadata-name}.\"},\"namehash(string)\":{\"details\":\"Returns the name hash output of a domain.\"},\"ownerOf(uint256)\":{\"details\":\"Override {ERC721-ownerOf}.\"},\"pause()\":{\"details\":\"Pauses all token transfers. See {ERC721Pausable} and {Pausable-_pause}. Requirements: - the caller must have the `PAUSER_ROLE`.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"reclaim(uint256,address)\":{\"details\":\"Reclaims ownership. Update operation for {Record.mut.owner}. Requirements: - The method caller should have controller role. - The method caller should be (parent) owner or approved spender. See struct {MutableRecord}. Emits an event {RecordUpdated}.\"},\"renew(uint256,uint64)\":{\"details\":\"Renews token. Update operation for {Record.mut.expiry}. Requirements: - The method caller should have controller role. Emits an event {RecordUpdated}.\"},\"renounceRole(bytes32,address)\":{\"details\":\"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.\"},\"revokeRole(bytes32,address)\":{\"details\":\"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.\"},\"safeTransferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"safeTransferFrom(address,address,uint256,bytes)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"setApprovalForAll(address,bool)\":{\"details\":\"See {IERC721-setApprovalForAll}.\"},\"setBaseURI(string)\":{\"details\":\"Sets the base uri. Requirements: - The method caller must be contract owner.\"},\"setExpiry(uint256,uint64)\":{\"details\":\"Sets expiry time for a token. Update operation for {Record.mut.expiry}. Requirements: - The method caller must have controller role. Emits an event {RecordUpdated}.\"},\"setGracePeriod(uint64)\":{\"details\":\"Sets the grace period in second(s). Requirements: - The method caller must have controller role. Note: This period affects the availability of the domain.\"},\"setRecord(uint256,uint256,(address,address,uint64,bool))\":{\"details\":\"Sets record of existing token. Update operation for {Record.mut}. Requirements: - The method caller must have role based on the corresponding `indicator`. See struct {MutableRecord}. Emits an event {RecordUpdated}.\"},\"stateOf(uint256)\":{\"details\":\"Returns the state of the `_tokenId` ERC721. Requirements: - The token exists.\"},\"supportsInterface(bytes4)\":{\"details\":\"Override {ERC165-supportsInterface}.\"},\"symbol()\":{\"details\":\"Override {IERC721Metadata-symbol}.\"},\"tokenByIndex(uint256)\":{\"details\":\"See {IERC721Enumerable-tokenByIndex}.\"},\"tokenOfOwnerByIndex(address,uint256)\":{\"details\":\"See {IERC721Enumerable-tokenOfOwnerByIndex}.\"},\"tokenURI(uint256)\":{\"details\":\"Override {IERC721Metadata-tokenURI}.\"},\"totalMinted()\":{\"details\":\"Returns the total minted ids. Note: Burning id will not affect `totalMinted`.\"},\"totalSupply()\":{\"details\":\"See {IERC721Enumerable-totalSupply}.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-transferFrom}.\"},\"unpause()\":{\"details\":\"Unpauses all token transfers. See {ERC721Pausable} and {Pausable-_unpause}. Requirements: - the caller must have the `PAUSER_ROLE`.\"}},\"stateVariables\":{\"CONTROLLER_ROLE\":{\"details\":\"Returns the controller role.\"},\"MAX_EXPIRY\":{\"details\":\"Returns the max expiry value.\"},\"PROTECTED_SETTLER_ROLE\":{\"details\":\"Returns the protected setter role.\"},\"RESERVATION_ROLE\":{\"details\":\"Returns the reservation role.\"},\"____gap\":{\"details\":\"Gap for upgradeability.\"},\"_recordOf\":{\"details\":\"Mapping from token id => record\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"CONTROLLER_ROLE()\":{\"notice\":\"Can set all fields {Record.mut} in token record, excepting {Record.mut.protected}.\"},\"PROTECTED_SETTLER_ROLE()\":{\"notice\":\"Can set field {Record.mut.protected} in token record by using method `bulkSetProtected`.\"},\"RESERVATION_ROLE()\":{\"notice\":\"Never expire for token owner has this role.\"},\"stateOf(uint256)\":{\"notice\":\"The token state presents the properties of a token at a certain point in time, it should be unique. The token state helps other contracts can verify the token properties without getting and selecting properties from the base contract. For example: ```solidity contract Kitty { function stateOf(uint256 _tokenId) external view returns (bytes memory) { return abi.encodePacked(ownerOf(_tokenId), genesOf(_tokenId), levelOf(_tokenId)); } } interface Exchange { // Buy NFT with the specificed state of `_tokenId`. function buy(uint256 _tokenId, uint256 _price, bytes calldata _kittyState) external; } ```\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/RNSUnified.sol\":\"RNSUnified\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@ensdomains/buffer/=lib/buffer/\",\":@ensdomains/ens-contracts/=lib/ens-contracts/contracts/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@pythnetwork/=lib/pyth-sdk-solidity/\",\":@rns-contracts/=src/\",\":buffer/=lib/buffer/contracts/\",\":contract-template/=lib/contract-template/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":ens-contracts/=lib/ens-contracts/contracts/\",\":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/script/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/openzeppelin-contracts/contracts/\",\":pyth-sdk-solidity/=lib/pyth-sdk-solidity/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/contract-template/src/refs/ERC721Nonce.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC721/ERC721.sol\\\";\\n\\n/**\\n * @title ERC721Nonce\\n * @dev This contract provides a nonce that will be increased whenever the token is tranferred.\\n */\\nabstract contract ERC721Nonce is ERC721 {\\n /// @dev Emitted when the token nonce is updated\\n event NonceUpdated(uint256 indexed _tokenId, uint256 indexed _nonce);\\n\\n /// @dev Mapping from token id => token nonce\\n mapping(uint256 => uint256) public nonces;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n */\\n uint256[50] private ______gap;\\n\\n /**\\n * @dev Override `ERC721-_beforeTokenTransfer`.\\n */\\n function _beforeTokenTransfer(address _from, address _to, uint256 _firstTokenId, uint256 _batchSize)\\n internal\\n virtual\\n override\\n {\\n for (uint256 _tokenId = _firstTokenId; _tokenId < _firstTokenId + _batchSize; _tokenId++) {\\n emit NonceUpdated(_tokenId, ++nonces[_tokenId]);\\n }\\n super._beforeTokenTransfer(_from, _to, _firstTokenId, _batchSize);\\n }\\n}\\n\",\"keccak256\":\"0xc5695e9c5ae6a3c24c612cc970bd69c456d06e285ca8a95c2795d864ae478c9a\",\"license\":\"MIT\"},\"lib/contract-template/src/refs/IERC721State.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.0;\\n\\ninterface IERC721State {\\n /**\\n * @dev Returns the state of the `_tokenId` ERC721.\\n *\\n * Requirements:\\n *\\n * - The token exists.\\n *\\n * @notice The token state presents the properties of a token at a certain point in time, it should be unique.\\n * The token state helps other contracts can verify the token properties without getting and selecting properties from the base contract.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract Kitty {\\n * function stateOf(uint256 _tokenId) external view returns (bytes memory) {\\n * return abi.encodePacked(ownerOf(_tokenId), genesOf(_tokenId), levelOf(_tokenId));\\n * }\\n * }\\n *\\n * interface Exchange {\\n * // Buy NFT with the specificed state of `_tokenId`.\\n * function buy(uint256 _tokenId, uint256 _price, bytes calldata _kittyState) external;\\n * }\\n * ```\\n */\\n function stateOf(uint256 _tokenId) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0x462e648b1de6597ea496fbe91da2d28061cbef49612cd39288d64985f087de7d\",\"license\":\"UNLICENSED\"},\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Strings.sol\\\";\\nimport \\\"../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```solidity\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```solidity\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\\n * to enforce additional security measures for this role.\\n */\\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\\n struct RoleData {\\n mapping(address => bool) members;\\n bytes32 adminRole;\\n }\\n\\n mapping(bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(account),\\n \\\" is missing role \\\",\\n Strings.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * May emit a {RoleGranted} event.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n *\\n * NOTE: This function is deprecated in favor of {_grantRole}.\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0dd6e52cb394d7f5abe5dca2d4908a6be40417914720932de757de34a99ab87f\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerable.sol\\\";\\nimport \\\"./AccessControl.sol\\\";\\nimport \\\"../utils/structs/EnumerableSet.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {\\n return _roleMembers[role].at(index);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n}\\n\",\"keccak256\":\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerable is IAccessControl {\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x3d6069be9b4c01fb81840fb9c2c4dc58dd6a6a4aafaa2c6837de8699574d84c6\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/security/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract Pausable is Context {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n constructor() {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n}\\n\",\"keccak256\":\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/ERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC721.sol\\\";\\nimport \\\"./IERC721Receiver.sol\\\";\\nimport \\\"./extensions/IERC721Metadata.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/Strings.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\\n * {ERC721Enumerable}.\\n */\\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata {\\n using Address for address;\\n using Strings for uint256;\\n\\n // Token name\\n string private _name;\\n\\n // Token symbol\\n string private _symbol;\\n\\n // Mapping from token ID to owner address\\n mapping(uint256 => address) private _owners;\\n\\n // Mapping owner address to token count\\n mapping(address => uint256) private _balances;\\n\\n // Mapping from token ID to approved address\\n mapping(uint256 => address) private _tokenApprovals;\\n\\n // Mapping from owner to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n /**\\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC721).interfaceId ||\\n interfaceId == type(IERC721Metadata).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC721-balanceOf}.\\n */\\n function balanceOf(address owner) public view virtual override returns (uint256) {\\n require(owner != address(0), \\\"ERC721: address zero is not a valid owner\\\");\\n return _balances[owner];\\n }\\n\\n /**\\n * @dev See {IERC721-ownerOf}.\\n */\\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\\n address owner = _ownerOf(tokenId);\\n require(owner != address(0), \\\"ERC721: invalid token ID\\\");\\n return owner;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-name}.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-symbol}.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-tokenURI}.\\n */\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n _requireMinted(tokenId);\\n\\n string memory baseURI = _baseURI();\\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \\\"\\\";\\n }\\n\\n /**\\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\\n * by default, can be overridden in child contracts.\\n */\\n function _baseURI() internal view virtual returns (string memory) {\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev See {IERC721-approve}.\\n */\\n function approve(address to, uint256 tokenId) public virtual override {\\n address owner = ERC721.ownerOf(tokenId);\\n require(to != owner, \\\"ERC721: approval to current owner\\\");\\n\\n require(\\n _msgSender() == owner || isApprovedForAll(owner, _msgSender()),\\n \\\"ERC721: approve caller is not token owner or approved for all\\\"\\n );\\n\\n _approve(to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-getApproved}.\\n */\\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\\n _requireMinted(tokenId);\\n\\n return _tokenApprovals[tokenId];\\n }\\n\\n /**\\n * @dev See {IERC721-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC721-isApprovedForAll}.\\n */\\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[owner][operator];\\n }\\n\\n /**\\n * @dev See {IERC721-transferFrom}.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) public virtual override {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n\\n _transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n _safeTransfer(from, to, tokenId, data);\\n }\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * `data` is additional data, it has no specified format and it is sent in call to `to`.\\n *\\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\\n * implement alternative mechanisms to perform token transfer, such as signature-based.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {\\n _transfer(from, to, tokenId);\\n require(_checkOnERC721Received(from, to, tokenId, data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n }\\n\\n /**\\n * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist\\n */\\n function _ownerOf(uint256 tokenId) internal view virtual returns (address) {\\n return _owners[tokenId];\\n }\\n\\n /**\\n * @dev Returns whether `tokenId` exists.\\n *\\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\\n *\\n * Tokens start existing when they are minted (`_mint`),\\n * and stop existing when they are burned (`_burn`).\\n */\\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\\n return _ownerOf(tokenId) != address(0);\\n }\\n\\n /**\\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\\n address owner = ERC721.ownerOf(tokenId);\\n return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);\\n }\\n\\n /**\\n * @dev Safely mints `tokenId` and transfers it to `to`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeMint(address to, uint256 tokenId) internal virtual {\\n _safeMint(to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\\n */\\n function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual {\\n _mint(to, tokenId);\\n require(\\n _checkOnERC721Received(address(0), to, tokenId, data),\\n \\\"ERC721: transfer to non ERC721Receiver implementer\\\"\\n );\\n }\\n\\n /**\\n * @dev Mints `tokenId` and transfers it to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - `to` cannot be the zero address.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _mint(address to, uint256 tokenId) internal virtual {\\n require(to != address(0), \\\"ERC721: mint to the zero address\\\");\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n _beforeTokenTransfer(address(0), to, tokenId, 1);\\n\\n // Check that tokenId was not minted by `_beforeTokenTransfer` hook\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n unchecked {\\n // Will not overflow unless all 2**256 token ids are minted to the same owner.\\n // Given that tokens are minted one by one, it is impossible in practice that\\n // this ever happens. Might change if we allow batch minting.\\n // The ERC fails to describe this case.\\n _balances[to] += 1;\\n }\\n\\n _owners[tokenId] = to;\\n\\n emit Transfer(address(0), to, tokenId);\\n\\n _afterTokenTransfer(address(0), to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\n * This is an internal function that does not check if the sender is authorized to operate on the token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _burn(uint256 tokenId) internal virtual {\\n address owner = ERC721.ownerOf(tokenId);\\n\\n _beforeTokenTransfer(owner, address(0), tokenId, 1);\\n\\n // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook\\n owner = ERC721.ownerOf(tokenId);\\n\\n // Clear approvals\\n delete _tokenApprovals[tokenId];\\n\\n unchecked {\\n // Cannot overflow, as that would require more tokens to be burned/transferred\\n // out than the owner initially received through minting and transferring in.\\n _balances[owner] -= 1;\\n }\\n delete _owners[tokenId];\\n\\n emit Transfer(owner, address(0), tokenId);\\n\\n _afterTokenTransfer(owner, address(0), tokenId, 1);\\n }\\n\\n /**\\n * @dev Transfers `tokenId` from `from` to `to`.\\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _transfer(address from, address to, uint256 tokenId) internal virtual {\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n require(to != address(0), \\\"ERC721: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, tokenId, 1);\\n\\n // Check that tokenId was not transferred by `_beforeTokenTransfer` hook\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n\\n // Clear approvals from the previous owner\\n delete _tokenApprovals[tokenId];\\n\\n unchecked {\\n // `_balances[from]` cannot overflow for the same reason as described in `_burn`:\\n // `from`'s balance is the number of token held, which is at least one before the current\\n // transfer.\\n // `_balances[to]` could overflow in the conditions described in `_mint`. That would require\\n // all 2**256 token ids to be minted, which in practice is impossible.\\n _balances[from] -= 1;\\n _balances[to] += 1;\\n }\\n _owners[tokenId] = to;\\n\\n emit Transfer(from, to, tokenId);\\n\\n _afterTokenTransfer(from, to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Approve `to` to operate on `tokenId`\\n *\\n * Emits an {Approval} event.\\n */\\n function _approve(address to, uint256 tokenId) internal virtual {\\n _tokenApprovals[tokenId] = to;\\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId);\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\\n require(owner != operator, \\\"ERC721: approve to caller\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Reverts if the `tokenId` has not been minted yet.\\n */\\n function _requireMinted(uint256 tokenId) internal view virtual {\\n require(_exists(tokenId), \\\"ERC721: invalid token ID\\\");\\n }\\n\\n /**\\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\\n * The call is not executed if the target address is not a contract.\\n *\\n * @param from address representing the previous owner of the given token ID\\n * @param to target address that will receive the tokens\\n * @param tokenId uint256 ID of the token to be transferred\\n * @param data bytes optional data to send along with the call\\n * @return bool whether the call correctly returned the expected magic value\\n */\\n function _checkOnERC721Received(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes memory data\\n ) private returns (bool) {\\n if (to.isContract()) {\\n try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\\n return retval == IERC721Receiver.onERC721Received.selector;\\n } catch (bytes memory reason) {\\n if (reason.length == 0) {\\n revert(\\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n } else {\\n /// @solidity memory-safe-assembly\\n assembly {\\n revert(add(32, reason), mload(reason))\\n }\\n }\\n }\\n } else {\\n return true;\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is\\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.\\n * - When `from` is zero, the tokens will be minted for `to`.\\n * - When `to` is zero, ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n * - `batchSize` is non-zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is\\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.\\n * - When `from` is zero, the tokens were minted for `to`.\\n * - When `to` is zero, ``from``'s tokens were burned.\\n * - `from` and `to` are never both zero.\\n * - `batchSize` is non-zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Unsafe write access to the balances, used by extensions that \\\"mint\\\" tokens using an {ownerOf} override.\\n *\\n * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant\\n * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such\\n * that `ownerOf(tokenId)` is `a`.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function __unsafe_increaseBalance(address account, uint256 amount) internal {\\n _balances[account] += amount;\\n }\\n}\\n\",\"keccak256\":\"0x2c309e7df9e05e6ce15bedfe74f3c61b467fc37e0fae9eab496acf5ea0bbd7ff\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x5bce51e11f7d194b79ea59fe00c9e8de9fa2c5530124960f29a24d4c740a3266\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/IERC721Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title ERC721 token receiver interface\\n * @dev Interface for any contract that wants to support safeTransfers\\n * from ERC721 asset contracts.\\n */\\ninterface IERC721Receiver {\\n /**\\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\\n * by `operator` from `from`, this function is called.\\n *\\n * It must return its Solidity selector to confirm the token transfer.\\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\\n *\\n * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.\\n */\\n function onERC721Received(\\n address operator,\\n address from,\\n uint256 tokenId,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xa82b58eca1ee256be466e536706850163d2ec7821945abd6b4778cfb3bee37da\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/extensions/ERC721Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC721.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @title ERC721 Burnable Token\\n * @dev ERC721 Token that can be burned (destroyed).\\n */\\nabstract contract ERC721Burnable is Context, ERC721 {\\n /**\\n * @dev Burns `tokenId`. See {ERC721-_burn}.\\n *\\n * Requirements:\\n *\\n * - The caller must own `tokenId` or be an approved operator.\\n */\\n function burn(uint256 tokenId) public virtual {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n _burn(tokenId);\\n }\\n}\\n\",\"keccak256\":\"0x52da94e59d870f54ca0eb4f485c3d9602011f668ba34d72c88124a1496ebaab1\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/extensions/ERC721Enumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Enumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC721.sol\\\";\\nimport \\\"./IERC721Enumerable.sol\\\";\\n\\n/**\\n * @dev This implements an optional extension of {ERC721} defined in the EIP that adds\\n * enumerability of all the token ids in the contract as well as all token ids owned by each\\n * account.\\n */\\nabstract contract ERC721Enumerable is ERC721, IERC721Enumerable {\\n // Mapping from owner to list of owned token IDs\\n mapping(address => mapping(uint256 => uint256)) private _ownedTokens;\\n\\n // Mapping from token ID to index of the owner tokens list\\n mapping(uint256 => uint256) private _ownedTokensIndex;\\n\\n // Array with all token ids, used for enumeration\\n uint256[] private _allTokens;\\n\\n // Mapping from token id to position in the allTokens array\\n mapping(uint256 => uint256) private _allTokensIndex;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {\\n return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\\n */\\n function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {\\n require(index < ERC721.balanceOf(owner), \\\"ERC721Enumerable: owner index out of bounds\\\");\\n return _ownedTokens[owner][index];\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _allTokens.length;\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenByIndex}.\\n */\\n function tokenByIndex(uint256 index) public view virtual override returns (uint256) {\\n require(index < ERC721Enumerable.totalSupply(), \\\"ERC721Enumerable: global index out of bounds\\\");\\n return _allTokens[index];\\n }\\n\\n /**\\n * @dev See {ERC721-_beforeTokenTransfer}.\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 firstTokenId,\\n uint256 batchSize\\n ) internal virtual override {\\n super._beforeTokenTransfer(from, to, firstTokenId, batchSize);\\n\\n if (batchSize > 1) {\\n // Will only trigger during construction. Batch transferring (minting) is not available afterwards.\\n revert(\\\"ERC721Enumerable: consecutive transfers not supported\\\");\\n }\\n\\n uint256 tokenId = firstTokenId;\\n\\n if (from == address(0)) {\\n _addTokenToAllTokensEnumeration(tokenId);\\n } else if (from != to) {\\n _removeTokenFromOwnerEnumeration(from, tokenId);\\n }\\n if (to == address(0)) {\\n _removeTokenFromAllTokensEnumeration(tokenId);\\n } else if (to != from) {\\n _addTokenToOwnerEnumeration(to, tokenId);\\n }\\n }\\n\\n /**\\n * @dev Private function to add a token to this extension's ownership-tracking data structures.\\n * @param to address representing the new owner of the given token ID\\n * @param tokenId uint256 ID of the token to be added to the tokens list of the given address\\n */\\n function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {\\n uint256 length = ERC721.balanceOf(to);\\n _ownedTokens[to][length] = tokenId;\\n _ownedTokensIndex[tokenId] = length;\\n }\\n\\n /**\\n * @dev Private function to add a token to this extension's token tracking data structures.\\n * @param tokenId uint256 ID of the token to be added to the tokens list\\n */\\n function _addTokenToAllTokensEnumeration(uint256 tokenId) private {\\n _allTokensIndex[tokenId] = _allTokens.length;\\n _allTokens.push(tokenId);\\n }\\n\\n /**\\n * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that\\n * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for\\n * gas optimizations e.g. when performing a transfer operation (avoiding double writes).\\n * This has O(1) time complexity, but alters the order of the _ownedTokens array.\\n * @param from address representing the previous owner of the given token ID\\n * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address\\n */\\n function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {\\n // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and\\n // then delete the last slot (swap and pop).\\n\\n uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;\\n uint256 tokenIndex = _ownedTokensIndex[tokenId];\\n\\n // When the token to delete is the last token, the swap operation is unnecessary\\n if (tokenIndex != lastTokenIndex) {\\n uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];\\n\\n _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\\n _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\\n }\\n\\n // This also deletes the contents at the last position of the array\\n delete _ownedTokensIndex[tokenId];\\n delete _ownedTokens[from][lastTokenIndex];\\n }\\n\\n /**\\n * @dev Private function to remove a token from this extension's token tracking data structures.\\n * This has O(1) time complexity, but alters the order of the _allTokens array.\\n * @param tokenId uint256 ID of the token to be removed from the tokens list\\n */\\n function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {\\n // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and\\n // then delete the last slot (swap and pop).\\n\\n uint256 lastTokenIndex = _allTokens.length - 1;\\n uint256 tokenIndex = _allTokensIndex[tokenId];\\n\\n // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so\\n // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding\\n // an 'if' statement (like in _removeTokenFromOwnerEnumeration)\\n uint256 lastTokenId = _allTokens[lastTokenIndex];\\n\\n _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\\n _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\\n\\n // This also deletes the contents at the last position of the array\\n delete _allTokensIndex[tokenId];\\n _allTokens.pop();\\n }\\n}\\n\",\"keccak256\":\"0xa8796bd16014cefb8c26449413981a49c510f92a98d6828494f5fd046223ced3\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/extensions/ERC721Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.2) (token/ERC721/extensions/ERC721Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC721.sol\\\";\\nimport \\\"../../../security/Pausable.sol\\\";\\n\\n/**\\n * @dev ERC721 token with pausable token transfers, minting and burning.\\n *\\n * Useful for scenarios such as preventing trades until the end of an evaluation\\n * period, or having an emergency switch for freezing all token transfers in the\\n * event of a large bug.\\n *\\n * IMPORTANT: This contract does not include public pause and unpause functions. In\\n * addition to inheriting this contract, you must define both functions, invoking the\\n * {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate\\n * access control, e.g. using {AccessControl} or {Ownable}. Not doing so will\\n * make the contract unpausable.\\n */\\nabstract contract ERC721Pausable is ERC721, Pausable {\\n /**\\n * @dev See {ERC721-_beforeTokenTransfer}.\\n *\\n * Requirements:\\n *\\n * - the contract must not be paused.\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 firstTokenId,\\n uint256 batchSize\\n ) internal virtual override {\\n super._beforeTokenTransfer(from, to, firstTokenId, batchSize);\\n\\n require(!paused(), \\\"ERC721Pausable: token transfer while paused\\\");\\n }\\n}\\n\",\"keccak256\":\"0x645230d3afe28f9108eef658e77bb6ac72cea51ac091b40951977c88f7044142\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Enumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Enumerable is IERC721 {\\n /**\\n * @dev Returns the total amount of tokens stored by the contract.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns a token ID owned by `owner` at a given `index` of its token list.\\n * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.\\n */\\n function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);\\n\\n /**\\n * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.\\n * Use along with {totalSupply} to enumerate all tokens.\\n */\\n function tokenByIndex(uint256 index) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xd1556954440b31c97a142c6ba07d5cade45f96fafd52091d33a14ebe365aecbf\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Metadata is IERC721 {\\n /**\\n * @dev Returns the token collection name.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the token collection symbol.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\\n */\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x75b829ff2f26c14355d1cba20e16fe7b29ca58eb5fef665ede48bc0f9c6c74b9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"src/RNSToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nimport { IERC165, AccessControlEnumerable } from \\\"@openzeppelin/contracts/access/AccessControlEnumerable.sol\\\";\\nimport { IERC721Metadata, IERC721, ERC721 } from \\\"@openzeppelin/contracts/token/ERC721/ERC721.sol\\\";\\nimport { ERC721Burnable } from \\\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol\\\";\\nimport { ERC721Pausable } from \\\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol\\\";\\nimport { ERC721Enumerable } from \\\"@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol\\\";\\nimport { ERC721Nonce } from \\\"contract-template/refs/ERC721Nonce.sol\\\";\\nimport { INSUnified } from \\\"./interfaces/INSUnified.sol\\\";\\nimport { IERC721State } from \\\"contract-template/refs/IERC721State.sol\\\";\\nimport { Strings } from \\\"@openzeppelin/contracts/utils/Strings.sol\\\";\\n\\nabstract contract RNSToken is\\n AccessControlEnumerable,\\n ERC721Nonce,\\n ERC721Burnable,\\n ERC721Pausable,\\n ERC721Enumerable,\\n IERC721State,\\n INSUnified\\n{\\n using Strings for *;\\n\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n\\n /// @dev Gap for upgradeability.\\n uint256[50] private ____gap;\\n\\n uint256 internal _idCounter;\\n string internal _baseTokenURI;\\n\\n modifier onlyMinted(uint256 tokenId) {\\n _requireMinted(tokenId);\\n _;\\n }\\n\\n /// @inheritdoc INSUnified\\n function setBaseURI(string calldata baseTokenURI) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _setBaseURI(baseTokenURI);\\n }\\n\\n /**\\n * @dev Pauses all token transfers.\\n *\\n * See {ERC721Pausable} and {Pausable-_pause}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `PAUSER_ROLE`.\\n */\\n function pause() external virtual onlyRole(PAUSER_ROLE) {\\n _pause();\\n }\\n\\n /**\\n * @dev Unpauses all token transfers.\\n *\\n * See {ERC721Pausable} and {Pausable-_unpause}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `PAUSER_ROLE`.\\n */\\n function unpause() external virtual onlyRole(PAUSER_ROLE) {\\n _unpause();\\n }\\n\\n /// @dev Override {IERC721Metadata-name}.\\n function name() public view virtual override(ERC721, IERC721Metadata) returns (string memory) {\\n return \\\"Ronin Name Service\\\";\\n }\\n\\n /// @dev Override {IERC721Metadata-symbol}.\\n function symbol() public view virtual override(ERC721, IERC721Metadata) returns (string memory) {\\n return \\\"RNS\\\";\\n }\\n\\n /// @inheritdoc INSUnified\\n function totalMinted() external view virtual returns (uint256) {\\n return _idCounter;\\n }\\n\\n /// @dev Override {IERC721Metadata-tokenURI}.\\n function tokenURI(uint256 tokenId)\\n public\\n view\\n virtual\\n override(ERC721, IERC721Metadata)\\n onlyMinted(tokenId)\\n returns (string memory)\\n {\\n string memory baseURI = _baseURI();\\n return bytes(baseURI).length > 0 ? string.concat(baseURI, address(this).toHexString(), \\\"/\\\", tokenId.toString()) : \\\"\\\";\\n }\\n\\n /// @dev Override {ERC165-supportsInterface}.\\n function supportsInterface(bytes4 interfaceId)\\n public\\n view\\n virtual\\n override(ERC721, AccessControlEnumerable, ERC721Enumerable, IERC165)\\n returns (bool)\\n {\\n return super.supportsInterface(interfaceId) || interfaceId == type(INSUnified).interfaceId;\\n }\\n\\n /// @dev Override {ERC721-_mint}.\\n function _mint(address to, uint256 tokenId) internal virtual override {\\n unchecked {\\n ++_idCounter;\\n }\\n super._mint(to, tokenId);\\n }\\n\\n /**\\n * @dev Helper method to set base uri.\\n */\\n function _setBaseURI(string calldata baseTokenURI) internal virtual {\\n _baseTokenURI = baseTokenURI;\\n emit BaseURIUpdated(_msgSender(), baseTokenURI);\\n }\\n\\n /// @dev Override {ERC721-_beforeTokenTransfer}.\\n function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize)\\n internal\\n virtual\\n override(ERC721, ERC721Nonce, ERC721Enumerable, ERC721Pausable)\\n {\\n super._beforeTokenTransfer(from, to, firstTokenId, batchSize);\\n }\\n\\n /// @dev Override {ERC721-_baseURI}.\\n function _baseURI() internal view virtual override returns (string memory) {\\n return _baseTokenURI;\\n }\\n}\\n\",\"keccak256\":\"0x329a95b72af71faddd0ecf15fe610e42f02ea417864e58d1ff604a7496912360\",\"license\":\"MIT\"},\"src/RNSUnified.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport { IERC721State, IERC721, ERC721, INSUnified, RNSToken } from \\\"./RNSToken.sol\\\";\\nimport { LibRNSDomain } from \\\"./libraries/LibRNSDomain.sol\\\";\\nimport { LibSafeRange } from \\\"./libraries/math/LibSafeRange.sol\\\";\\nimport { ModifyingField, LibModifyingField } from \\\"./libraries/LibModifyingField.sol\\\";\\nimport {\\n ALL_FIELDS_INDICATOR,\\n IMMUTABLE_FIELDS_INDICATOR,\\n USER_FIELDS_INDICATOR,\\n ModifyingIndicator\\n} from \\\"./types/ModifyingIndicator.sol\\\";\\n\\ncontract RNSUnified is Initializable, RNSToken {\\n using LibRNSDomain for string;\\n using LibModifyingField for ModifyingField;\\n\\n bytes32 public constant CONTROLLER_ROLE = keccak256(\\\"CONTROLLER_ROLE\\\");\\n bytes32 public constant RESERVATION_ROLE = keccak256(\\\"RESERVATION_ROLE\\\");\\n bytes32 public constant PROTECTED_SETTLER_ROLE = keccak256(\\\"PROTECTED_SETTLER_ROLE\\\");\\n uint64 public constant MAX_EXPIRY = type(uint64).max;\\n\\n /// @dev Gap for upgradeability.\\n uint256[50] private ____gap;\\n\\n uint64 internal _gracePeriod;\\n /// @dev Mapping from token id => record\\n mapping(uint256 => Record) internal _recordOf;\\n\\n modifier onlyAuthorized(uint256 id, ModifyingIndicator indicator) {\\n _requireAuthorized(id, indicator);\\n _;\\n }\\n\\n constructor() payable ERC721(\\\"\\\", \\\"\\\") {\\n _disableInitializers();\\n }\\n\\n function initialize(\\n address admin,\\n address pauser,\\n address controller,\\n address protectedSettler,\\n uint64 gracePeriod,\\n string calldata baseTokenURI\\n ) external initializer {\\n _grantRole(DEFAULT_ADMIN_ROLE, admin);\\n _grantRole(PAUSER_ROLE, pauser);\\n _grantRole(CONTROLLER_ROLE, controller);\\n _grantRole(PROTECTED_SETTLER_ROLE, protectedSettler);\\n\\n _setBaseURI(baseTokenURI);\\n _setGracePeriod(gracePeriod);\\n\\n _mint(admin, 0x0);\\n Record memory record;\\n _recordOf[0x0].mut.expiry = record.mut.expiry = MAX_EXPIRY;\\n emit RecordUpdated(0x0, ModifyingField.Expiry.indicator(), record);\\n }\\n\\n /// @inheritdoc INSUnified\\n function available(uint256 id) public view returns (bool) {\\n return block.timestamp > LibSafeRange.add(_expiry(id), _gracePeriod);\\n }\\n\\n /// @inheritdoc INSUnified\\n function getGracePeriod() external view returns (uint64) {\\n return _gracePeriod;\\n }\\n\\n /// @inheritdoc INSUnified\\n function setGracePeriod(uint64 gracePeriod) external whenNotPaused onlyRole(CONTROLLER_ROLE) {\\n _setGracePeriod(gracePeriod);\\n }\\n\\n /// @inheritdoc INSUnified\\n function mint(uint256 parentId, string calldata label, address resolver, address owner, uint64 duration)\\n external\\n whenNotPaused\\n returns (uint64 expiryTime, uint256 id)\\n {\\n if (!_checkOwnerRules(_msgSender(), parentId)) revert Unauthorized();\\n id = LibRNSDomain.toId(parentId, label);\\n if (!available(id)) revert Unavailable();\\n\\n if (_exists(id)) _burn(id);\\n _mint(owner, id);\\n\\n expiryTime = uint64(LibSafeRange.addWithUpperbound(block.timestamp, duration, MAX_EXPIRY));\\n _requireValidExpiry(parentId, expiryTime);\\n Record memory record;\\n // Preserve previous state of the protected field\\n record.mut =\\n MutableRecord({ resolver: resolver, owner: owner, expiry: expiryTime, protected: _recordOf[id].mut.protected });\\n record.immut = ImmutableRecord({ depth: _recordOf[parentId].immut.depth + 1, parentId: parentId, label: label });\\n\\n _recordOf[id] = record;\\n emit RecordUpdated(id, ALL_FIELDS_INDICATOR, record);\\n }\\n\\n /// @inheritdoc INSUnified\\n function namehash(string memory str) public pure returns (bytes32 hashed) {\\n hashed = str.namehash();\\n }\\n\\n /// @inheritdoc INSUnified\\n function getRecord(uint256 id) external view returns (Record memory record) {\\n record = _recordOf[id];\\n record.mut.expiry = _expiry(id);\\n }\\n\\n /// @inheritdoc INSUnified\\n function getDomain(uint256 id) external view returns (string memory domain) {\\n if (id == 0) return \\\"\\\";\\n\\n ImmutableRecord storage sRecord = _recordOf[id].immut;\\n domain = sRecord.label;\\n id = sRecord.parentId;\\n while (id != 0) {\\n sRecord = _recordOf[id].immut;\\n domain = string.concat(domain, \\\".\\\", sRecord.label);\\n id = sRecord.parentId;\\n }\\n }\\n\\n /// @inheritdoc INSUnified\\n function reclaim(uint256 id, address owner)\\n external\\n whenNotPaused\\n onlyAuthorized(id, ModifyingField.Owner.indicator())\\n {\\n _safeTransfer(_recordOf[id].mut.owner, owner, id, \\\"\\\");\\n }\\n\\n /// @inheritdoc INSUnified\\n function renew(uint256 id, uint64 duration) external whenNotPaused onlyRole(CONTROLLER_ROLE) returns (uint64 expiry) {\\n Record memory record;\\n record.mut.expiry = uint64(LibSafeRange.addWithUpperbound(_recordOf[id].mut.expiry, duration, MAX_EXPIRY));\\n _setExpiry(id, record.mut.expiry);\\n expiry = record.mut.expiry;\\n emit RecordUpdated(id, ModifyingField.Expiry.indicator(), record);\\n }\\n\\n /// @inheritdoc INSUnified\\n function setExpiry(uint256 id, uint64 expiry) external whenNotPaused onlyRole(CONTROLLER_ROLE) {\\n Record memory record;\\n _setExpiry(id, record.mut.expiry = expiry);\\n emit RecordUpdated(id, ModifyingField.Expiry.indicator(), record);\\n }\\n\\n /// @inheritdoc INSUnified\\n function bulkSetProtected(uint256[] calldata ids, bool protected) external onlyRole(PROTECTED_SETTLER_ROLE) {\\n ModifyingIndicator indicator = ModifyingField.Protected.indicator();\\n uint256 id;\\n Record memory record;\\n record.mut.protected = protected;\\n\\n for (uint256 i; i < ids.length;) {\\n id = ids[i];\\n if (_recordOf[id].mut.protected != protected) {\\n _recordOf[id].mut.protected = protected;\\n emit RecordUpdated(id, indicator, record);\\n }\\n\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /// @inheritdoc INSUnified\\n function setRecord(uint256 id, ModifyingIndicator indicator, MutableRecord calldata mutRecord)\\n external\\n whenNotPaused\\n onlyAuthorized(id, indicator)\\n {\\n Record memory record;\\n MutableRecord storage sMutRecord = _recordOf[id].mut;\\n\\n if (indicator.hasAny(ModifyingField.Protected.indicator())) {\\n sMutRecord.protected = record.mut.protected = mutRecord.protected;\\n }\\n if (indicator.hasAny(ModifyingField.Expiry.indicator())) {\\n _setExpiry(id, record.mut.expiry = mutRecord.expiry);\\n }\\n if (indicator.hasAny(ModifyingField.Resolver.indicator())) {\\n sMutRecord.resolver = record.mut.resolver = mutRecord.resolver;\\n }\\n emit RecordUpdated(id, indicator, record);\\n\\n // Updating owner might emit more {RecordUpdated} events. See method {_transfer}.\\n if (indicator.hasAny(ModifyingField.Owner.indicator())) {\\n _safeTransfer(_recordOf[id].mut.owner, mutRecord.owner, id, \\\"\\\");\\n }\\n }\\n\\n /**\\n * @inheritdoc IERC721State\\n */\\n function stateOf(uint256 tokenId) external view virtual override onlyMinted(tokenId) returns (bytes memory) {\\n return abi.encode(_recordOf[tokenId], nonces[tokenId], tokenId);\\n }\\n\\n /// @inheritdoc INSUnified\\n function canSetRecord(address requester, uint256 id, ModifyingIndicator indicator)\\n public\\n view\\n returns (bool allowed, bytes4)\\n {\\n if (indicator.hasAny(IMMUTABLE_FIELDS_INDICATOR)) {\\n return (false, CannotSetImmutableField.selector);\\n }\\n if (!_exists(id)) return (false, Unexists.selector);\\n if (indicator.hasAny(ModifyingField.Protected.indicator()) && !hasRole(PROTECTED_SETTLER_ROLE, requester)) {\\n return (false, MissingProtectedSettlerRole.selector);\\n }\\n bool hasControllerRole = hasRole(CONTROLLER_ROLE, requester);\\n if (indicator.hasAny(ModifyingField.Expiry.indicator()) && !hasControllerRole) {\\n return (false, MissingControllerRole.selector);\\n }\\n if (indicator.hasAny(USER_FIELDS_INDICATOR) && !(hasControllerRole || _checkOwnerRules(requester, id))) {\\n return (false, Unauthorized.selector);\\n }\\n\\n return (true, 0x0);\\n }\\n\\n /// @dev Override {ERC721-ownerOf}.\\n function ownerOf(uint256 tokenId) public view override(ERC721, IERC721) returns (address) {\\n if (_isExpired(tokenId)) return address(0x0);\\n return super.ownerOf(tokenId);\\n }\\n\\n /// @dev Override {ERC721-_isApprovedOrOwner}.\\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual override returns (bool) {\\n if (_isExpired(tokenId)) return false;\\n return super._isApprovedOrOwner(spender, tokenId);\\n }\\n\\n /**\\n * @dev Helper method to check whether the id is expired.\\n */\\n function _isExpired(uint256 id) internal view returns (bool) {\\n return block.timestamp > _expiry(id);\\n }\\n\\n /**\\n * @dev Helper method to calculate expiry time for specific id.\\n */\\n function _expiry(uint256 id) internal view returns (uint64) {\\n if (hasRole(RESERVATION_ROLE, _ownerOf(id))) return MAX_EXPIRY;\\n return _recordOf[id].mut.expiry;\\n }\\n\\n /**\\n * @dev Helper method to check whether the address is owner of parent token.\\n */\\n function _isHierarchyOwner(address spender, uint256 id) internal view returns (bool) {\\n address owner;\\n\\n while (id != 0) {\\n owner = _recordOf[id].mut.owner;\\n if (owner == spender) return true;\\n id = _recordOf[id].immut.parentId;\\n }\\n\\n return false;\\n }\\n\\n /**\\n * @dev Returns whether the owner rules is satisfied.\\n * Returns true only if the spender is owner, or approved spender, or owner of parent token.\\n */\\n function _checkOwnerRules(address spender, uint256 id) internal view returns (bool) {\\n return _isApprovedOrOwner(spender, id) || _isHierarchyOwner(spender, id);\\n }\\n\\n /**\\n * @dev Helper method to ensure msg.sender is authorized to modify record of the token id.\\n */\\n function _requireAuthorized(uint256 id, ModifyingIndicator indicator) internal view {\\n (bool allowed, bytes4 errorCode) = canSetRecord(_msgSender(), id, indicator);\\n if (!allowed) {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x0, errorCode)\\n revert(0x0, 0x04)\\n }\\n }\\n }\\n\\n /**\\n * @dev Helper method to ensure expiry of an id is lower or equal expiry of parent id.\\n */\\n function _requireValidExpiry(uint256 parentId, uint64 expiry) internal view {\\n if (expiry > _recordOf[parentId].mut.expiry) revert ExceedParentExpiry();\\n }\\n\\n /**\\n * @dev Helper method to set expiry time of a token.\\n *\\n * Requirement:\\n * - The token must be registered or in grace period.\\n * - Expiry time must be larger than the old one.\\n *\\n * Emits an event {RecordUpdated}.\\n */\\n function _setExpiry(uint256 id, uint64 expiry) internal {\\n _requireValidExpiry(_recordOf[id].immut.parentId, expiry);\\n if (available(id)) revert NameMustBeRegisteredOrInGracePeriod();\\n if (expiry <= _recordOf[id].mut.expiry) revert ExpiryTimeMustBeLargerThanTheOldOne();\\n\\n Record memory record;\\n _recordOf[id].mut.expiry = record.mut.expiry = expiry;\\n }\\n\\n /**\\n * @dev Helper method to set grace period.\\n *\\n * Emits an event {GracePeriodUpdated}.\\n */\\n function _setGracePeriod(uint64 gracePeriod) internal {\\n _gracePeriod = gracePeriod;\\n emit GracePeriodUpdated(_msgSender(), gracePeriod);\\n }\\n\\n /// @dev Override {ERC721-_transfer}.\\n function _transfer(address from, address to, uint256 id) internal override {\\n super._transfer(from, to, id);\\n\\n Record memory record;\\n ModifyingIndicator indicator = ModifyingField.Owner.indicator();\\n\\n _recordOf[id].mut.owner = record.mut.owner = to;\\n if (!hasRole(PROTECTED_SETTLER_ROLE, _msgSender()) && _recordOf[id].mut.protected) {\\n _recordOf[id].mut.protected = false;\\n indicator = indicator | ModifyingField.Protected.indicator();\\n }\\n emit RecordUpdated(id, indicator, record);\\n }\\n\\n /// @dev Override {ERC721-_burn}.\\n function _burn(uint256 id) internal override {\\n super._burn(id);\\n delete _recordOf[id].mut;\\n Record memory record;\\n emit RecordUpdated(id, USER_FIELDS_INDICATOR, record);\\n }\\n}\\n\",\"keccak256\":\"0x58056664f7c7f981471c0ed9ed5b2caab3b09e48f2e6f8538b4b6e5d674d2791\",\"license\":\"MIT\"},\"src/interfaces/INSUnified.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nimport { IERC721Metadata } from \\\"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol\\\";\\nimport { IAccessControlEnumerable } from \\\"@openzeppelin/contracts/access/IAccessControlEnumerable.sol\\\";\\nimport { ModifyingIndicator } from \\\"../types/ModifyingIndicator.sol\\\";\\n\\ninterface INSUnified is IAccessControlEnumerable, IERC721Metadata {\\n /// @dev Error: The provided token id is expired.\\n error Expired();\\n /// @dev Error: The provided token id is unexists.\\n error Unexists();\\n /// @dev Error: The provided id expiry is greater than parent id expiry.\\n error ExceedParentExpiry();\\n /// @dev Error: The provided name is unavailable for registration.\\n error Unavailable();\\n /// @dev Error: The sender lacks the necessary permissions.\\n error Unauthorized();\\n /// @dev Error: Missing controller role required for modification.\\n error MissingControllerRole();\\n /// @dev Error: Attempting to set an immutable field, which cannot be modified.\\n error CannotSetImmutableField();\\n /// @dev Error: Missing protected settler role required for modification.\\n error MissingProtectedSettlerRole();\\n /// @dev Error: Attempting to set an expiry time that is not larger than the previous one.\\n error ExpiryTimeMustBeLargerThanTheOldOne();\\n /// @dev Error: The provided name must be registered or is in a grace period.\\n error NameMustBeRegisteredOrInGracePeriod();\\n\\n /**\\n * | Fields\\\\Idc | Modifying Indicator |\\n * | ---------- | ------------------- |\\n * | depth | 0b00000001 |\\n * | parentId | 0b00000010 |\\n * | label | 0b00000100 |\\n */\\n struct ImmutableRecord {\\n // The level-th of a domain.\\n uint8 depth;\\n // The node of parent token. Eg, parent node of vip.duke.ron equals to namehash('duke.ron')\\n uint256 parentId;\\n // The label of a domain. Eg, label is vip for domain vip.duke.ron\\n string label;\\n }\\n\\n /**\\n * | Fields\\\\Idc,Roles | Modifying Indicator | Controller | Protected setter | (Parent) Owner/Spender |\\n * | ---------------- | ------------------- | ---------- | ---------------- | ---------------------- |\\n * | resolver | 0b00001000 | x | | x |\\n * | owner | 0b00010000 | x | | x |\\n * | expiry | 0b00100000 | x | | |\\n * | protected | 0b01000000 | | x | |\\n * Note: (Parent) Owner/Spender means parent owner or current owner or current token spender.\\n */\\n struct MutableRecord {\\n // The resolver address.\\n address resolver;\\n // The record owner. This field must equal to the owner of token.\\n address owner;\\n // Expiry timestamp.\\n uint64 expiry;\\n // Flag indicating whether the token is protected or not.\\n bool protected;\\n }\\n\\n struct Record {\\n ImmutableRecord immut;\\n MutableRecord mut;\\n }\\n\\n /// @dev Emitted when a base URI is updated.\\n event BaseURIUpdated(address indexed operator, string newURI);\\n /// @dev Emitted when the grace period for all domain is updated.\\n event GracePeriodUpdated(address indexed operator, uint64 newGracePeriod);\\n\\n /**\\n * @dev Emitted when the record of node is updated.\\n * @param indicator The binary index of updated fields. Eg, 0b10101011 means fields at position 1, 2, 4, 6, 8 (right\\n * to left) needs to be updated.\\n * @param record The updated fields.\\n */\\n event RecordUpdated(uint256 indexed node, ModifyingIndicator indicator, Record record);\\n\\n /**\\n * @dev Returns the controller role.\\n * @notice Can set all fields {Record.mut} in token record, excepting {Record.mut.protected}.\\n */\\n function CONTROLLER_ROLE() external pure returns (bytes32);\\n\\n /**\\n * @dev Returns the protected setter role.\\n * @notice Can set field {Record.mut.protected} in token record by using method `bulkSetProtected`.\\n */\\n function PROTECTED_SETTLER_ROLE() external pure returns (bytes32);\\n\\n /**\\n * @dev Returns the reservation role.\\n * @notice Never expire for token owner has this role.\\n */\\n function RESERVATION_ROLE() external pure returns (bytes32);\\n\\n /**\\n * @dev Returns the max expiry value.\\n */\\n function MAX_EXPIRY() external pure returns (uint64);\\n\\n /**\\n * @dev Returns the name hash output of a domain.\\n */\\n function namehash(string memory domain) external pure returns (bytes32 node);\\n\\n /**\\n * @dev Returns true if the specified name is available for registration.\\n * Note: Only available after passing the grace period.\\n */\\n function available(uint256 id) external view returns (bool);\\n\\n /**\\n * @dev Returns the grace period in second(s).\\n * Note: This period affects the availability of the domain.\\n */\\n function getGracePeriod() external view returns (uint64);\\n\\n /**\\n * @dev Returns the total minted ids.\\n * Note: Burning id will not affect `totalMinted`.\\n */\\n function totalMinted() external view returns (uint256);\\n\\n /**\\n * @dev Sets the grace period in second(s).\\n *\\n * Requirements:\\n * - The method caller must have controller role.\\n *\\n * Note: This period affects the availability of the domain.\\n */\\n function setGracePeriod(uint64) external;\\n\\n /**\\n * @dev Sets the base uri.\\n *\\n * Requirements:\\n * - The method caller must be contract owner.\\n *\\n */\\n function setBaseURI(string calldata baseTokenURI) external;\\n\\n /**\\n * @dev Mints token for subnode.\\n *\\n * Requirements:\\n * - The token must be available.\\n * - The method caller must be (parent) owner or approved spender. See struct {MutableRecord}.\\n *\\n * Emits an event {RecordUpdated}.\\n *\\n * @param parentId The parent node to mint or create subnode.\\n * @param label The domain label. Eg, label is duke for domain duke.ron.\\n * @param resolver The resolver address.\\n * @param owner The token owner.\\n * @param duration Duration in second(s) to expire. Leave 0 to set as parent.\\n */\\n function mint(uint256 parentId, string calldata label, address resolver, address owner, uint64 duration)\\n external\\n returns (uint64 expiryTime, uint256 id);\\n\\n /**\\n * @dev Returns all record of a domain.\\n * Reverts if the token is non existent.\\n */\\n function getRecord(uint256 id) external view returns (Record memory record);\\n\\n /**\\n * @dev Returns the domain name of id.\\n */\\n function getDomain(uint256 id) external view returns (string memory domain);\\n\\n /**\\n * @dev Returns whether the requester is able to modify the record based on the updated index.\\n * Note: This method strictly follows the permission of struct {MutableRecord}.\\n */\\n function canSetRecord(address requester, uint256 id, ModifyingIndicator indicator)\\n external\\n view\\n returns (bool, bytes4 error);\\n\\n /**\\n * @dev Sets record of existing token. Update operation for {Record.mut}.\\n *\\n * Requirements:\\n * - The method caller must have role based on the corresponding `indicator`. See struct {MutableRecord}.\\n *\\n * Emits an event {RecordUpdated}.\\n */\\n function setRecord(uint256 id, ModifyingIndicator indicator, MutableRecord calldata record) external;\\n\\n /**\\n * @dev Reclaims ownership. Update operation for {Record.mut.owner}.\\n *\\n * Requirements:\\n * - The method caller should have controller role.\\n * - The method caller should be (parent) owner or approved spender. See struct {MutableRecord}.\\n *\\n * Emits an event {RecordUpdated}.\\n */\\n function reclaim(uint256 id, address owner) external;\\n\\n /**\\n * @dev Renews token. Update operation for {Record.mut.expiry}.\\n *\\n * Requirements:\\n * - The method caller should have controller role.\\n *\\n * Emits an event {RecordUpdated}.\\n */\\n function renew(uint256 id, uint64 duration) external returns (uint64 expiry);\\n\\n /**\\n * @dev Sets expiry time for a token. Update operation for {Record.mut.expiry}.\\n *\\n * Requirements:\\n * - The method caller must have controller role.\\n *\\n * Emits an event {RecordUpdated}.\\n */\\n function setExpiry(uint256 id, uint64 expiry) external;\\n\\n /**\\n * @dev Sets the protected status of a list of ids. Update operation for {Record.mut.protected}.\\n *\\n * Requirements:\\n * - The method caller must have protected setter role.\\n *\\n * Emits events {RecordUpdated}.\\n */\\n function bulkSetProtected(uint256[] calldata ids, bool protected) external;\\n}\\n\",\"keccak256\":\"0xaef1c58bb7c8688d6677a1c2739c0dc9e645ca5c64dd875be2f2b7a318a11406\",\"license\":\"MIT\"},\"src/libraries/LibModifyingField.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nimport { ModifyingIndicator } from \\\"../types/ModifyingIndicator.sol\\\";\\n\\nenum ModifyingField {\\n Depth,\\n ParentId,\\n Label,\\n Resolver,\\n Owner,\\n Expiry,\\n Protected\\n}\\n\\nlibrary LibModifyingField {\\n function indicator(ModifyingField opt) internal pure returns (ModifyingIndicator) {\\n return ModifyingIndicator.wrap(1 << uint8(opt));\\n }\\n}\\n\",\"keccak256\":\"0xa3a752a56545a4beff2784a42b295c3c4af6f70cbe1a18fd32479686e1a06c41\",\"license\":\"MIT\"},\"src/libraries/LibRNSDomain.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nlibrary LibRNSDomain {\\n /// @dev Value equals to namehash('ron')\\n uint256 internal constant RON_ID = 0xba69923fa107dbf5a25a073a10b7c9216ae39fbadc95dc891d460d9ae315d688;\\n /// @dev Value equals to namehash('addr.reverse')\\n uint256 internal constant ADDR_REVERSE_ID = 0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2;\\n\\n /**\\n * @dev Calculate the corresponding id given parentId and label.\\n */\\n function toId(uint256 parentId, string memory label) internal pure returns (uint256 id) {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x0, parentId)\\n mstore(0x20, keccak256(add(label, 32), mload(label)))\\n id := keccak256(0x0, 64)\\n }\\n }\\n\\n /**\\n * @dev Calculates the hash of the label.\\n */\\n function hashLabel(string memory label) internal pure returns (bytes32 hashed) {\\n assembly (\\\"memory-safe\\\") {\\n hashed := keccak256(add(label, 32), mload(label))\\n }\\n }\\n\\n /**\\n * @dev Calculate the RNS namehash of a str.\\n */\\n function namehash(string memory str) internal pure returns (bytes32 hashed) {\\n // notice: this method is case-sensitive, ensure the string is lowercased before calling this method\\n assembly (\\\"memory-safe\\\") {\\n // load str length\\n let len := mload(str)\\n // returns bytes32(0x0) if length is zero\\n if iszero(iszero(len)) {\\n let hashedLen\\n // compute pointer to str[0]\\n let head := add(str, 32)\\n // compute pointer to str[length - 1]\\n let tail := add(head, sub(len, 1))\\n // cleanup dirty bytes if contains any\\n mstore(0x0, 0)\\n // loop backwards from `tail` to `head`\\n for { let i := tail } iszero(lt(i, head)) { i := sub(i, 1) } {\\n // check if `i` is `head`\\n let isHead := eq(i, head)\\n // check if `str[i-1]` is \\\".\\\"\\n // `0x2e` == bytes1(\\\".\\\")\\n let isDotNext := eq(shr(248, mload(sub(i, 1))), 0x2e)\\n if or(isHead, isDotNext) {\\n // size = distance(length, i) - hashedLength + 1\\n let size := add(sub(sub(tail, i), hashedLen), 1)\\n mstore(0x20, keccak256(i, size))\\n mstore(0x0, keccak256(0x0, 64))\\n // skip \\\".\\\" thereby + 1\\n hashedLen := add(hashedLen, add(size, 1))\\n }\\n }\\n }\\n hashed := mload(0x0)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x715029b2b420c6ec00bc1f939b837acf45d247fde8426089575b0e7b5e84518b\",\"license\":\"MIT\"},\"src/libraries/math/LibSafeRange.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nlibrary LibSafeRange {\\n function add(uint256 a, uint256 b) internal pure returns (uint256 c) {\\n unchecked {\\n c = a + b;\\n if (c < a) return type(uint256).max;\\n }\\n }\\n\\n /**\\n * @dev Returns value of a + b; in case result is larger than upperbound, upperbound is returned.\\n */\\n function addWithUpperbound(uint256 a, uint256 b, uint256 ceil) internal pure returns (uint256 c) {\\n if (a > ceil || b > ceil) return ceil;\\n c = add(a, b);\\n if (c > ceil) return ceil;\\n }\\n}\\n\",\"keccak256\":\"0x12cf5f592a2d80b9c1b0ea11b8fe2b3ed42fc6d62303ba667edc56464baa8810\",\"license\":\"MIT\"},\"src/types/ModifyingIndicator.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\ntype ModifyingIndicator is uint256;\\n\\nusing { hasAny } for ModifyingIndicator global;\\nusing { or as | } for ModifyingIndicator global;\\nusing { and as & } for ModifyingIndicator global;\\nusing { eq as == } for ModifyingIndicator global;\\nusing { not as ~ } for ModifyingIndicator global;\\nusing { xor as ^ } for ModifyingIndicator global;\\nusing { neq as != } for ModifyingIndicator global;\\n\\n/// @dev Indicator for modifying immutable fields: Depth, ParentId, Label. See struct {INSUnified.ImmutableRecord}.\\nModifyingIndicator constant IMMUTABLE_FIELDS_INDICATOR = ModifyingIndicator.wrap(0x7);\\n\\n/// @dev Indicator for modifying user fields: Resolver, Owner. See struct {INSUnified.MutableRecord}.\\nModifyingIndicator constant USER_FIELDS_INDICATOR = ModifyingIndicator.wrap(0x18);\\n\\n/// @dev Indicator when modifying all of the fields in {ModifyingField}.\\nModifyingIndicator constant ALL_FIELDS_INDICATOR = ModifyingIndicator.wrap(type(uint256).max);\\n\\nfunction eq(ModifyingIndicator self, ModifyingIndicator other) pure returns (bool) {\\n return ModifyingIndicator.unwrap(self) == ModifyingIndicator.unwrap(other);\\n}\\n\\nfunction neq(ModifyingIndicator self, ModifyingIndicator other) pure returns (bool) {\\n return !eq(self, other);\\n}\\n\\nfunction xor(ModifyingIndicator self, ModifyingIndicator other) pure returns (ModifyingIndicator) {\\n return ModifyingIndicator.wrap(ModifyingIndicator.unwrap(self) ^ ModifyingIndicator.unwrap(other));\\n}\\n\\nfunction not(ModifyingIndicator self) pure returns (ModifyingIndicator) {\\n return ModifyingIndicator.wrap(~ModifyingIndicator.unwrap(self));\\n}\\n\\nfunction or(ModifyingIndicator self, ModifyingIndicator other) pure returns (ModifyingIndicator) {\\n return ModifyingIndicator.wrap(ModifyingIndicator.unwrap(self) | ModifyingIndicator.unwrap(other));\\n}\\n\\nfunction and(ModifyingIndicator self, ModifyingIndicator other) pure returns (ModifyingIndicator) {\\n return ModifyingIndicator.wrap(ModifyingIndicator.unwrap(self) & ModifyingIndicator.unwrap(other));\\n}\\n\\nfunction hasAny(ModifyingIndicator self, ModifyingIndicator other) pure returns (bool) {\\n return self & other != ModifyingIndicator.wrap(0);\\n}\\n\",\"keccak256\":\"0x2e42fbba358c470ff6b57268367d248f0e2fcf8d7142d762688f7aef5efae7ee\",\"license\":\"MIT\"}},\"version\":1}", + "nonce": 182560, + "numDeployments": 2, "storageLayout": { "storage": [ { - "astId": 50000, + "astId": 50078, "contract": "src/RNSUnified.sol:RNSUnified", "label": "_initialized", "offset": 0, @@ -1665,7 +18071,7 @@ "type": "t_uint8" }, { - "astId": 50003, + "astId": 50081, "contract": "src/RNSUnified.sol:RNSUnified", "label": "_initializing", "offset": 1, @@ -1673,23 +18079,23 @@ "type": "t_bool" }, { - "astId": 48473, + "astId": 48551, "contract": "src/RNSUnified.sol:RNSUnified", "label": "_roles", "offset": 0, "slot": "1", - "type": "t_mapping(t_bytes32,t_struct(RoleData)48468_storage)" + "type": "t_mapping(t_bytes32,t_struct(RoleData)48546_storage)" }, { - "astId": 48783, + "astId": 48861, "contract": "src/RNSUnified.sol:RNSUnified", "label": "_roleMembers", "offset": 0, "slot": "2", - "type": "t_mapping(t_bytes32,t_struct(AddressSet)54352_storage)" + "type": "t_mapping(t_bytes32,t_struct(AddressSet)54430_storage)" }, { - "astId": 50361, + "astId": 50439, "contract": "src/RNSUnified.sol:RNSUnified", "label": "_name", "offset": 0, @@ -1697,7 +18103,7 @@ "type": "t_string_storage" }, { - "astId": 50363, + "astId": 50441, "contract": "src/RNSUnified.sol:RNSUnified", "label": "_symbol", "offset": 0, @@ -1705,7 +18111,7 @@ "type": "t_string_storage" }, { - "astId": 50367, + "astId": 50445, "contract": "src/RNSUnified.sol:RNSUnified", "label": "_owners", "offset": 0, @@ -1713,7 +18119,7 @@ "type": "t_mapping(t_uint256,t_address)" }, { - "astId": 50371, + "astId": 50449, "contract": "src/RNSUnified.sol:RNSUnified", "label": "_balances", "offset": 0, @@ -1721,7 +18127,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 50375, + "astId": 50453, "contract": "src/RNSUnified.sol:RNSUnified", "label": "_tokenApprovals", "offset": 0, @@ -1729,7 +18135,7 @@ "type": "t_mapping(t_uint256,t_address)" }, { - "astId": 50381, + "astId": 50459, "contract": "src/RNSUnified.sol:RNSUnified", "label": "_operatorApprovals", "offset": 0, @@ -1753,7 +18159,7 @@ "type": "t_array(t_uint256)50_storage" }, { - "astId": 50180, + "astId": 50258, "contract": "src/RNSUnified.sol:RNSUnified", "label": "_paused", "offset": 0, @@ -1761,7 +18167,7 @@ "type": "t_bool" }, { - "astId": 51441, + "astId": 51519, "contract": "src/RNSUnified.sol:RNSUnified", "label": "_ownedTokens", "offset": 0, @@ -1769,7 +18175,7 @@ "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))" }, { - "astId": 51445, + "astId": 51523, "contract": "src/RNSUnified.sol:RNSUnified", "label": "_ownedTokensIndex", "offset": 0, @@ -1777,7 +18183,7 @@ "type": "t_mapping(t_uint256,t_uint256)" }, { - "astId": 51448, + "astId": 51526, "contract": "src/RNSUnified.sol:RNSUnified", "label": "_allTokens", "offset": 0, @@ -1785,7 +18191,7 @@ "type": "t_array(t_uint256)dyn_storage" }, { - "astId": 51452, + "astId": 51530, "contract": "src/RNSUnified.sol:RNSUnified", "label": "_allTokensIndex", "offset": 0, @@ -1793,7 +18199,7 @@ "type": "t_mapping(t_uint256,t_uint256)" }, { - "astId": 61456, + "astId": 61643, "contract": "src/RNSUnified.sol:RNSUnified", "label": "____gap", "offset": 0, @@ -1801,7 +18207,7 @@ "type": "t_array(t_uint256)50_storage" }, { - "astId": 61458, + "astId": 61645, "contract": "src/RNSUnified.sol:RNSUnified", "label": "_idCounter", "offset": 0, @@ -1809,7 +18215,7 @@ "type": "t_uint256" }, { - "astId": 61460, + "astId": 61647, "contract": "src/RNSUnified.sol:RNSUnified", "label": "_baseTokenURI", "offset": 0, @@ -1817,7 +18223,7 @@ "type": "t_string_storage" }, { - "astId": 61746, + "astId": 61933, "contract": "src/RNSUnified.sol:RNSUnified", "label": "____gap", "offset": 0, @@ -1825,7 +18231,7 @@ "type": "t_array(t_uint256)50_storage" }, { - "astId": 61748, + "astId": 61935, "contract": "src/RNSUnified.sol:RNSUnified", "label": "_gracePeriod", "offset": 0, @@ -1833,12 +18239,12 @@ "type": "t_uint64" }, { - "astId": 61754, + "astId": 61941, "contract": "src/RNSUnified.sol:RNSUnified", "label": "_recordOf", "offset": 0, "slot": "168", - "type": "t_mapping(t_uint256,t_struct(Record)64941_storage)" + "type": "t_mapping(t_uint256,t_struct(Record)65134_storage)" } ], "types": { @@ -1903,19 +18309,19 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_mapping(t_bytes32,t_struct(AddressSet)54352_storage)": { + "t_mapping(t_bytes32,t_struct(AddressSet)54430_storage)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => struct EnumerableSet.AddressSet)", "numberOfBytes": "32", - "value": "t_struct(AddressSet)54352_storage" + "value": "t_struct(AddressSet)54430_storage" }, - "t_mapping(t_bytes32,t_struct(RoleData)48468_storage)": { + "t_mapping(t_bytes32,t_struct(RoleData)48546_storage)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => struct AccessControl.RoleData)", "numberOfBytes": "32", - "value": "t_struct(RoleData)48468_storage" + "value": "t_struct(RoleData)48546_storage" }, "t_mapping(t_bytes32,t_uint256)": { "encoding": "mapping", @@ -1931,12 +18337,12 @@ "numberOfBytes": "32", "value": "t_address" }, - "t_mapping(t_uint256,t_struct(Record)64941_storage)": { + "t_mapping(t_uint256,t_struct(Record)65134_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct INSUnified.Record)", "numberOfBytes": "32", - "value": "t_struct(Record)64941_storage" + "value": "t_struct(Record)65134_storage" }, "t_mapping(t_uint256,t_uint256)": { "encoding": "mapping", @@ -1950,28 +18356,28 @@ "label": "string", "numberOfBytes": "32" }, - "t_struct(AddressSet)54352_storage": { + "t_struct(AddressSet)54430_storage": { "encoding": "inplace", "label": "struct EnumerableSet.AddressSet", "numberOfBytes": "64", "members": [ { - "astId": 54351, + "astId": 54429, "contract": "src/RNSUnified.sol:RNSUnified", "label": "_inner", "offset": 0, "slot": "0", - "type": "t_struct(Set)54037_storage" + "type": "t_struct(Set)54115_storage" } ] }, - "t_struct(ImmutableRecord)64924_storage": { + "t_struct(ImmutableRecord)65117_storage": { "encoding": "inplace", "label": "struct INSUnified.ImmutableRecord", "numberOfBytes": "96", "members": [ { - "astId": 64919, + "astId": 65112, "contract": "src/RNSUnified.sol:RNSUnified", "label": "depth", "offset": 0, @@ -1979,7 +18385,7 @@ "type": "t_uint8" }, { - "astId": 64921, + "astId": 65114, "contract": "src/RNSUnified.sol:RNSUnified", "label": "parentId", "offset": 0, @@ -1987,7 +18393,7 @@ "type": "t_uint256" }, { - "astId": 64923, + "astId": 65116, "contract": "src/RNSUnified.sol:RNSUnified", "label": "label", "offset": 0, @@ -1996,13 +18402,13 @@ } ] }, - "t_struct(MutableRecord)64934_storage": { + "t_struct(MutableRecord)65127_storage": { "encoding": "inplace", "label": "struct INSUnified.MutableRecord", "numberOfBytes": "64", "members": [ { - "astId": 64927, + "astId": 65120, "contract": "src/RNSUnified.sol:RNSUnified", "label": "resolver", "offset": 0, @@ -2010,7 +18416,7 @@ "type": "t_address" }, { - "astId": 64929, + "astId": 65122, "contract": "src/RNSUnified.sol:RNSUnified", "label": "owner", "offset": 0, @@ -2018,7 +18424,7 @@ "type": "t_address" }, { - "astId": 64931, + "astId": 65124, "contract": "src/RNSUnified.sol:RNSUnified", "label": "expiry", "offset": 20, @@ -2026,7 +18432,7 @@ "type": "t_uint64" }, { - "astId": 64933, + "astId": 65126, "contract": "src/RNSUnified.sol:RNSUnified", "label": "protected", "offset": 28, @@ -2035,36 +18441,36 @@ } ] }, - "t_struct(Record)64941_storage": { + "t_struct(Record)65134_storage": { "encoding": "inplace", "label": "struct INSUnified.Record", "numberOfBytes": "160", "members": [ { - "astId": 64937, + "astId": 65130, "contract": "src/RNSUnified.sol:RNSUnified", "label": "immut", "offset": 0, "slot": "0", - "type": "t_struct(ImmutableRecord)64924_storage" + "type": "t_struct(ImmutableRecord)65117_storage" }, { - "astId": 64940, + "astId": 65133, "contract": "src/RNSUnified.sol:RNSUnified", "label": "mut", "offset": 0, "slot": "3", - "type": "t_struct(MutableRecord)64934_storage" + "type": "t_struct(MutableRecord)65127_storage" } ] }, - "t_struct(RoleData)48468_storage": { + "t_struct(RoleData)48546_storage": { "encoding": "inplace", "label": "struct AccessControl.RoleData", "numberOfBytes": "64", "members": [ { - "astId": 48465, + "astId": 48543, "contract": "src/RNSUnified.sol:RNSUnified", "label": "members", "offset": 0, @@ -2072,7 +18478,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 48467, + "astId": 48545, "contract": "src/RNSUnified.sol:RNSUnified", "label": "adminRole", "offset": 0, @@ -2081,13 +18487,13 @@ } ] }, - "t_struct(Set)54037_storage": { + "t_struct(Set)54115_storage": { "encoding": "inplace", "label": "struct EnumerableSet.Set", "numberOfBytes": "64", "members": [ { - "astId": 54032, + "astId": 54110, "contract": "src/RNSUnified.sol:RNSUnified", "label": "_values", "offset": 0, @@ -2095,7 +18501,7 @@ "type": "t_array(t_bytes32)dyn_storage" }, { - "astId": 54036, + "astId": 54114, "contract": "src/RNSUnified.sol:RNSUnified", "label": "_indexes", "offset": 0, @@ -2121,7 +18527,7 @@ } } }, - "timestamp": 1697372891, + "timestamp": 1697784620, "userdoc": { "version": 1, "kind": "user", From f7ba28f2fe48873259bd45bb869be8e60fda7fc4 Mon Sep 17 00:00:00 2001 From: Huy Ngo Date: Mon, 23 Oct 2023 16:45:14 +0700 Subject: [PATCH 15/27] feature/enhnace pipeline for avoiding looping --- .github/workflows/create-PR-release.yml | 211 ++---------------------- 1 file changed, 12 insertions(+), 199 deletions(-) diff --git a/.github/workflows/create-PR-release.yml b/.github/workflows/create-PR-release.yml index 4d33c322..85cd5727 100644 --- a/.github/workflows/create-PR-release.yml +++ b/.github/workflows/create-PR-release.yml @@ -2,8 +2,9 @@ name: Create Pull Request From Release to Feature on: push: branches: - - 'release/*' - - 'release*/*' + # - 'release/*' + # - 'release*/*' + - feature/enhance-pipeline-for-avoiding-looping concurrency: group: ${{ github.workflow }}-${{ github.ref || github.run_id }} @@ -13,15 +14,19 @@ env: HEAD_BRANCH: ${{ github.head_ref || github.ref_name }} jobs: - mergeRelease2FeatureRnsUnified: + mergeRelease2FeatureRepo: runs-on: ubuntu-latest + strategy: + matrix: + # branch_name: [feature/rns-unified, feature/controller, feature/domain-price, feature/auction, feature/public-resolver, feature/ci, feature/reverse-registrar] + branch_name: [feature/rns-unified-test, feature/controller-test], steps: - name: Set env run: | - echo "PR_BRANCH=merge/${HEAD_BRANCH}-feature/rns-unified" >> $GITHUB_ENV + echo "PR_BRANCH=merge/${HEAD_BRANCH}-${{matrix.branch_name}}" >> $GITHUB_ENV - uses: actions/checkout@v3 with: - ref: feature/rns-unified + ref: ${{matrix.branch_name}} - name: Reset promotion branch run: | git fetch origin ${HEAD_BRANCH}:${HEAD_BRANCH} @@ -34,205 +39,13 @@ jobs: template: .github/template/create-pull-request.md vars: | fromBranch: ${{env.HEAD_BRANCH}} - toBranch: feature/rns-unified + toBranch: ${{matrix.branch_name}} - name: Create Pull Request uses: peter-evans/create-pull-request@v5 with: labels: automated PR delete-branch: true - title: 'chore(rns-unified): merge from `${{env.HEAD_BRANCH}}`' - body: ${{ steps.template.outputs.result }} - branch: ${{env.PR_BRANCH}} - - mergeRelease2FeatureController: - runs-on: ubuntu-latest - steps: - - name: Set env - run: | - echo "PR_BRANCH=merge/${HEAD_BRANCH}-feature/controller" >> $GITHUB_ENV - - uses: actions/checkout@v3 - with: - ref: feature/controller - - name: Reset promotion branch - run: | - git fetch origin ${HEAD_BRANCH}:${HEAD_BRANCH} - git reset --hard ${HEAD_BRANCH} - - - name: Render template - id: template - uses: chuhlomin/render-template@v1.4 - with: - template: .github/template/create-pull-request.md - vars: | - fromBranch: ${{env.HEAD_BRANCH}} - toBranch: feature/controller - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v5 - with: - labels: automated PR - delete-branch: true - title: 'chore(controller): merge from `${{env.HEAD_BRANCH}}`' - body: ${{ steps.template.outputs.result }} - branch: ${{env.PR_BRANCH}} - - mergeRelease2FeatureDomainPrice: - runs-on: ubuntu-latest - steps: - - name: Set env - run: | - echo "PR_BRANCH=merge/${HEAD_BRANCH}-feature/domain-price" >> $GITHUB_ENV - - uses: actions/checkout@v3 - with: - ref: feature/domain-price - - name: Reset promotion branch - run: | - git fetch origin ${HEAD_BRANCH}:${HEAD_BRANCH} - git reset --hard ${HEAD_BRANCH} - - - name: Render template - id: template - uses: chuhlomin/render-template@v1.4 - with: - template: .github/template/create-pull-request.md - vars: | - fromBranch: ${{env.HEAD_BRANCH}} - toBranch: feature/domain-price - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v5 - with: - labels: automated PR - delete-branch: true - title: 'chore(domain-price): merge from `${{env.HEAD_BRANCH}}`' - body: ${{ steps.template.outputs.result }} - branch: ${{env.PR_BRANCH}} - - mergeRelease2FeatureAuction: - runs-on: ubuntu-latest - steps: - - name: Set env - run: | - echo "PR_BRANCH=merge/${HEAD_BRANCH}-feature/auction" >> $GITHUB_ENV - - uses: actions/checkout@v3 - with: - ref: feature/auction - - name: Reset promotion branch - run: | - git fetch origin ${HEAD_BRANCH}:${HEAD_BRANCH} - git reset --hard ${HEAD_BRANCH} - - - name: Render template - id: template - uses: chuhlomin/render-template@v1.4 - with: - template: .github/template/create-pull-request.md - vars: | - fromBranch: ${{env.HEAD_BRANCH}} - toBranch: feature/auction - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v5 - with: - labels: automated PR - delete-branch: true - title: 'chore(auction): merge from `${{env.HEAD_BRANCH}}`' - body: ${{ steps.template.outputs.result }} - branch: ${{env.PR_BRANCH}} - - mergeRelease2FeaturePublicResolver: - runs-on: ubuntu-latest - steps: - - name: Set env - run: | - echo "PR_BRANCH=merge/${HEAD_BRANCH}-feature/public-resolver" >> $GITHUB_ENV - - uses: actions/checkout@v3 - with: - ref: feature/public-resolver - - name: Reset promotion branch - run: | - git fetch origin ${HEAD_BRANCH}:${HEAD_BRANCH} - git reset --hard ${HEAD_BRANCH} - - - name: Render template - id: template - uses: chuhlomin/render-template@v1.4 - with: - template: .github/template/create-pull-request.md - vars: | - fromBranch: ${{env.HEAD_BRANCH}} - toBranch: feature/public-resolver - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v5 - with: - labels: automated PR - delete-branch: true - title: 'chore(public-resolver): merge from `${{env.HEAD_BRANCH}}`' - body: ${{ steps.template.outputs.result }} - branch: ${{env.PR_BRANCH}} - - mergeRelease2FeatureCI: - runs-on: ubuntu-latest - steps: - - name: Set env - run: | - echo "PR_BRANCH=merge/${HEAD_BRANCH}-feature/ci" >> $GITHUB_ENV - - uses: actions/checkout@v3 - with: - ref: feature/ci - - name: Reset promotion branch - run: | - git fetch origin ${HEAD_BRANCH}:${HEAD_BRANCH} - git reset --hard ${HEAD_BRANCH} - - - name: Render template - id: template - uses: chuhlomin/render-template@v1.4 - with: - template: .github/template/create-pull-request.md - vars: | - fromBranch: ${{env.HEAD_BRANCH}} - toBranch: feature/ci - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v5 - with: - labels: automated PR - delete-branch: true - title: 'chore(ci): merge from `${{env.HEAD_BRANCH}}`' - body: ${{ steps.template.outputs.result }} - branch: ${{env.PR_BRANCH}} - - mergeRelease2FeatureReverseRegistrar: - runs-on: ubuntu-latest - steps: - - name: Set env - run: | - echo "PR_BRANCH=merge/${HEAD_BRANCH}-feature/reverse-registrar" >> $GITHUB_ENV - - uses: actions/checkout@v3 - with: - ref: feature/reverse-registrar - - name: Reset promotion branch - run: | - git fetch origin ${HEAD_BRANCH}:${HEAD_BRANCH} - git reset --hard ${HEAD_BRANCH} - - - name: Render template - id: template - uses: chuhlomin/render-template@v1.4 - with: - template: .github/template/create-pull-request.md - vars: | - fromBranch: ${{env.HEAD_BRANCH}} - toBranch: feature/reverse-registrar - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v5 - with: - labels: automated PR - delete-branch: true - title: 'chore(reverse-registrar): merge from `${{env.HEAD_BRANCH}}`' + title: 'chore(`${{matrix.branch_name}}`): merge from `${{env.HEAD_BRANCH}}`' body: ${{ steps.template.outputs.result }} branch: ${{env.PR_BRANCH}} From a19a38047643dc86a21eb6175be577697b853dc4 Mon Sep 17 00:00:00 2001 From: Huy Ngo Date: Mon, 23 Oct 2023 17:02:04 +0700 Subject: [PATCH 16/27] Fix syntax --- .github/workflows/create-PR-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create-PR-release.yml b/.github/workflows/create-PR-release.yml index 85cd5727..e73c9941 100644 --- a/.github/workflows/create-PR-release.yml +++ b/.github/workflows/create-PR-release.yml @@ -19,7 +19,7 @@ jobs: strategy: matrix: # branch_name: [feature/rns-unified, feature/controller, feature/domain-price, feature/auction, feature/public-resolver, feature/ci, feature/reverse-registrar] - branch_name: [feature/rns-unified-test, feature/controller-test], + branch_name: [feature/rns-unified-test, feature/controller-test] steps: - name: Set env run: | From c861a00a37bc778f53602777306b24f8ea633440 Mon Sep 17 00:00:00 2001 From: Huy Ngo Date: Mon, 23 Oct 2023 17:10:18 +0700 Subject: [PATCH 17/27] Update the correct branch name --- .github/workflows/create-PR-release.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/create-PR-release.yml b/.github/workflows/create-PR-release.yml index e73c9941..fb0684f3 100644 --- a/.github/workflows/create-PR-release.yml +++ b/.github/workflows/create-PR-release.yml @@ -2,9 +2,8 @@ name: Create Pull Request From Release to Feature on: push: branches: - # - 'release/*' - # - 'release*/*' - - feature/enhance-pipeline-for-avoiding-looping + - 'release/*' + - 'release*/*' concurrency: group: ${{ github.workflow }}-${{ github.ref || github.run_id }} @@ -18,8 +17,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - # branch_name: [feature/rns-unified, feature/controller, feature/domain-price, feature/auction, feature/public-resolver, feature/ci, feature/reverse-registrar] - branch_name: [feature/rns-unified-test, feature/controller-test] + branch_name: [feature/rns-unified, feature/controller, feature/domain-price, feature/auction, feature/public-resolver, feature/ci, feature/reverse-registrar] + # branch_name: [feature/rns-unified-test, feature/controller-test] steps: - name: Set env run: | From e128e70c9cf305f1382b1d51c8ab533d2a00c15c Mon Sep 17 00:00:00 2001 From: "Duke.ron" Date: Mon, 23 Oct 2023 17:23:49 +0700 Subject: [PATCH 18/27] Update .github/workflows/create-PR-release.yml --- .github/workflows/create-PR-release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/create-PR-release.yml b/.github/workflows/create-PR-release.yml index fb0684f3..6e82a0b8 100644 --- a/.github/workflows/create-PR-release.yml +++ b/.github/workflows/create-PR-release.yml @@ -18,7 +18,6 @@ jobs: strategy: matrix: branch_name: [feature/rns-unified, feature/controller, feature/domain-price, feature/auction, feature/public-resolver, feature/ci, feature/reverse-registrar] - # branch_name: [feature/rns-unified-test, feature/controller-test] steps: - name: Set env run: | From 70322e29d29248f7a57eda1eac5a7aa3f86b32f5 Mon Sep 17 00:00:00 2001 From: "Duke.ron" Date: Mon, 23 Oct 2023 22:25:29 +0700 Subject: [PATCH 19/27] chore: update PR title --- .github/workflows/create-PR-release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/create-PR-release.yml b/.github/workflows/create-PR-release.yml index 6e82a0b8..e095f0f4 100644 --- a/.github/workflows/create-PR-release.yml +++ b/.github/workflows/create-PR-release.yml @@ -22,6 +22,7 @@ jobs: - name: Set env run: | echo "PR_BRANCH=merge/${HEAD_BRANCH}-${{matrix.branch_name}}" >> $GITHUB_ENV + echo "FEATURE_NAME=$(echo ${{matrix.branch_name}} | cut -d'/' -f2)" >> $GITHUB_ENV - uses: actions/checkout@v3 with: ref: ${{matrix.branch_name}} @@ -44,6 +45,6 @@ jobs: with: labels: automated PR delete-branch: true - title: 'chore(`${{matrix.branch_name}}`): merge from `${{env.HEAD_BRANCH}}`' + title: 'chore(`${{env.FEATURE_NAME}}`): merge from `${{env.HEAD_BRANCH}}`' body: ${{ steps.template.outputs.result }} branch: ${{env.PR_BRANCH}} From 345a4907d052501b19cab0c10bc1979e25ad23bc Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Tue, 24 Oct 2023 11:31:16 +0700 Subject: [PATCH 20/27] feat: forbid contract bidder --- src/RNSAuction.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RNSAuction.sol b/src/RNSAuction.sol index e8b25d2f..3ce1938a 100644 --- a/src/RNSAuction.sol +++ b/src/RNSAuction.sol @@ -191,7 +191,7 @@ contract RNSAuction is Initializable, AccessControlEnumerable, INSAuction { if (msg.value < beatPrice) revert InsufficientAmount(); address payable bidder = payable(_msgSender()); // check whether the bidder can receive RON - if (!RONTransferHelper.send(bidder, 0)) revert BidderCannotReceiveRON(); + if (bidder != tx.origin) revert BidderCannotReceiveRON(); address payable prvBidder = auction.bid.bidder; uint256 prvPrice = auction.bid.price; From b23f0c9d7446ad5637cc75b415bef007c9af9770 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Tue, 24 Oct 2023 11:36:49 +0700 Subject: [PATCH 21/27] feat: update migration script --- ...ol => 20231021_UpgradeDomainPriceAndAuction.s.sol} | 0 .../20231024_UpgradeAuction.s.sol | 11 +++++++++++ script/Debug.s.sol | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) rename script/20231021-upgrade-domain-price-and-auction/{20231021_UpgradeDomainPriceAndAuction.s..sol => 20231021_UpgradeDomainPriceAndAuction.s.sol} (100%) create mode 100644 script/20231024-upgrade-auction/20231024_UpgradeAuction.s.sol diff --git a/script/20231021-upgrade-domain-price-and-auction/20231021_UpgradeDomainPriceAndAuction.s..sol b/script/20231021-upgrade-domain-price-and-auction/20231021_UpgradeDomainPriceAndAuction.s.sol similarity index 100% rename from script/20231021-upgrade-domain-price-and-auction/20231021_UpgradeDomainPriceAndAuction.s..sol rename to script/20231021-upgrade-domain-price-and-auction/20231021_UpgradeDomainPriceAndAuction.s.sol diff --git a/script/20231024-upgrade-auction/20231024_UpgradeAuction.s.sol b/script/20231024-upgrade-auction/20231024_UpgradeAuction.s.sol new file mode 100644 index 00000000..196b1c5f --- /dev/null +++ b/script/20231024-upgrade-auction/20231024_UpgradeAuction.s.sol @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { ContractKey } from "foundry-deployment-kit/configs/ContractConfig.sol"; +import { RNSDeploy } from "script/RNSDeploy.s.sol"; + +contract Migration__20231021_UpgradeAuction is RNSDeploy { + function run() public trySetUp { + _upgradeProxy(ContractKey.RNSAuction, EMPTY_ARGS); + } +} diff --git a/script/Debug.s.sol b/script/Debug.s.sol index 141560f2..811e6082 100644 --- a/script/Debug.s.sol +++ b/script/Debug.s.sol @@ -9,7 +9,7 @@ contract Debug is RNSDeploy { function debug(uint256 forkBlock, address from, address to, uint256 value, bytes calldata callData) external { if (forkBlock != 0) { - vm.rollFork(forkBlock); + vm.rollFork(forkBlock); } vm.prank(from); (bool success, bytes memory returnOrRevertData) = to.call{ value: value }(callData); From d596a17a217e788b231924b2479df802e89387d5 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Tue, 24 Oct 2023 11:39:11 +0700 Subject: [PATCH 22/27] format: rename script --- script/20231024-upgrade-auction/20231024_UpgradeAuction.s.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/20231024-upgrade-auction/20231024_UpgradeAuction.s.sol b/script/20231024-upgrade-auction/20231024_UpgradeAuction.s.sol index 196b1c5f..ec80d3ea 100644 --- a/script/20231024-upgrade-auction/20231024_UpgradeAuction.s.sol +++ b/script/20231024-upgrade-auction/20231024_UpgradeAuction.s.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.19; import { ContractKey } from "foundry-deployment-kit/configs/ContractConfig.sol"; import { RNSDeploy } from "script/RNSDeploy.s.sol"; -contract Migration__20231021_UpgradeAuction is RNSDeploy { +contract Migration__20231024_UpgradeAuction is RNSDeploy { function run() public trySetUp { _upgradeProxy(ContractKey.RNSAuction, EMPTY_ARGS); } From 9ecc86f880e76427095f573f5ccda6feb137e246 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Tue, 24 Oct 2023 11:46:13 +0700 Subject: [PATCH 23/27] format: rename outdated error --- src/RNSAuction.sol | 2 +- src/interfaces/INSAuction.sol | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/RNSAuction.sol b/src/RNSAuction.sol index 3ce1938a..585d68db 100644 --- a/src/RNSAuction.sol +++ b/src/RNSAuction.sol @@ -191,7 +191,7 @@ contract RNSAuction is Initializable, AccessControlEnumerable, INSAuction { if (msg.value < beatPrice) revert InsufficientAmount(); address payable bidder = payable(_msgSender()); // check whether the bidder can receive RON - if (bidder != tx.origin) revert BidderCannotReceiveRON(); + if (bidder != tx.origin) revert ContractBidderIsForbidden(); address payable prvBidder = auction.bid.bidder; uint256 prvPrice = auction.bid.price; diff --git a/src/interfaces/INSAuction.sol b/src/interfaces/INSAuction.sol index 53c9c5b2..e01d3a7d 100644 --- a/src/interfaces/INSAuction.sol +++ b/src/interfaces/INSAuction.sol @@ -15,7 +15,7 @@ interface INSAuction { error QueryIsNotInPeriod(); error InsufficientAmount(); error InvalidArrayLength(); - error BidderCannotReceiveRON(); + error ContractBidderIsForbidden(); error EventIsNotCreatedOrAlreadyStarted(); struct Bid { From 929b66055a5a8acdaa44c55097af8bc7021d8160 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Tue, 24 Oct 2023 13:36:26 +0700 Subject: [PATCH 24/27] feat: add upload-sig script --- upload-sig.sh | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100755 upload-sig.sh diff --git a/upload-sig.sh b/upload-sig.sh new file mode 100755 index 00000000..3d0894d2 --- /dev/null +++ b/upload-sig.sh @@ -0,0 +1,71 @@ +# Default network value +networkName="ronin-testnet" +# Function to print usage and exit +usage() { + echo "Usage: $0 -c " + echo " -c: Specify the network (ronin-testnet or ronin-mainnet)" + exit 1 +} +# Parse command-line options +while getopts "c:" opt; do + case $opt in + c) + case "$OPTARG" in + ronin-testnet) + child_folder="ronin-testnet" + networkName="ronin-testnet" + ;; + ronin-mainnet) + child_folder="ronin-mainnet" + networkName="ronin-mainnet" + ;; + *) + echo "Unknown network specified: $OPTARG" + usage + ;; + esac + ;; + *) + usage + ;; + esac +done +# Shift the processed options out of the argument list +shift $((OPTIND - 1)) +# Define the deployments folder by concatenating it with the child folder +folder="deployments/$child_folder" +# Check if the specified folder exists +if [ ! -d "$folder" ]; then + echo "Error: The specified folder does not exist for the selected network." + exit 1 +fi +for file in "$folder"/*.json; do + # Check if the file exists and is a regular file + if [ -f "$file" ] && [ "$(basename "$file")" != ".chainId" ]; then + # Extract contractName and address from the JSON file + contractName=$(jq -r '.contractName' "$file") + # Check if contractName and address are not empty + if [ -n "$contractName" ]; then + # Initialize arrays to store events and errors keys + events_keys=() + errors_keys=() + # Get events and errors JSON data + events=$(forge inspect $contractName events) + errors=$(forge inspect $contractName errors) + # Extract keys and populate the arrays + while read -r key; do + events_keys+=("\"event $key\"") + done <<<"$(echo "$events" | jq -r 'keys[]')" + while read -r key; do + errors_keys+=("\"$key\"") + done <<<"$(echo "$errors" | jq -r 'keys[]')" + # Combine keys from events and errors + all_keys=("${events_keys[@]}" "${errors_keys[@]}") + # Call cast upload-signature + cast upload-signature "${all_keys[@]}" + else + echo "Error: Missing contractName or address in $file" + fi + fi +done +forge selectors upload --all From 09726ffb86ef24f5ca5e54c1ee633506f12e6b39 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Tue, 24 Oct 2023 14:40:29 +0700 Subject: [PATCH 25/27] feat: add OVERRIDER_ROLE and migration scripts --- .../20231024_Config.s.sol | 17 ++++++++++++++ .../20231024_UpgradeDomainPrice.s.sol | 23 +++++++++++++++++++ script/RNSDeploy.s.sol | 1 + src/RNSDomainPrice.sol | 4 +++- src/interfaces/INSDomainPrice.sol | 5 ++++ 5 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 script/20231024-upgrade-domain-price/20231024_Config.s.sol create mode 100644 script/20231024-upgrade-domain-price/20231024_UpgradeDomainPrice.s.sol diff --git a/script/20231024-upgrade-domain-price/20231024_Config.s.sol b/script/20231024-upgrade-domain-price/20231024_Config.s.sol new file mode 100644 index 00000000..51ef33f6 --- /dev/null +++ b/script/20231024-upgrade-domain-price/20231024_Config.s.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { Network, RNSDeploy } from "script/RNSDeploy.s.sol"; + +abstract contract Config__20231024 is RNSDeploy { + function _buildMigrationConfig() internal view virtual override returns (Config memory config) { + config = super._buildMigrationConfig(); + if (_network == Network.RoninTestnet) { + config.overrider = config.operator; + } else if (_network == Network.RoninMainnet) { + revert("Missing config"); + } else { + revert("Missing config"); + } + } +} diff --git a/script/20231024-upgrade-domain-price/20231024_UpgradeDomainPrice.s.sol b/script/20231024-upgrade-domain-price/20231024_UpgradeDomainPrice.s.sol new file mode 100644 index 00000000..030a984e --- /dev/null +++ b/script/20231024-upgrade-domain-price/20231024_UpgradeDomainPrice.s.sol @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 } from "forge-std/console2.sol"; +import { ContractKey } from "foundry-deployment-kit/configs/ContractConfig.sol"; +import { RNSDomainPrice } from "@rns-contracts/RNSDomainPrice.sol"; +import { Config__20231024 } from "./20231024_Config.s.sol"; + +contract Migration__20231024_UpgradeDomainPrice is Config__20231024 { + function run() public trySetUp { + Config memory config = getConfig(); + _upgradeProxy(ContractKey.RNSDomainPrice, EMPTY_ARGS); + + console2.log("operator", config.operator); + console2.log("overrider", config.overrider); + + RNSDomainPrice domainPrice = RNSDomainPrice(_config.getAddressFromCurrentNetwork(ContractKey.RNSDomainPrice)); + address admin = domainPrice.getRoleMember(0x00, 0); + bytes32 overriderRole = domainPrice.OVERRIDER_ROLE(); + vm.broadcast(admin); + domainPrice.grantRole(overriderRole, config.overrider); + } +} diff --git a/script/RNSDeploy.s.sol b/script/RNSDeploy.s.sol index c65f4b45..beaab181 100644 --- a/script/RNSDeploy.s.sol +++ b/script/RNSDeploy.s.sol @@ -9,6 +9,7 @@ abstract contract RNSDeploy is BaseDeploy { IPyth pyth; address admin; address pauser; + address overrider; address controller; uint8 minWord; uint8 maxWord; diff --git a/src/RNSDomainPrice.sol b/src/RNSDomainPrice.sol index 7cb8fcbd..e4cde42e 100644 --- a/src/RNSDomainPrice.sol +++ b/src/RNSDomainPrice.sol @@ -27,6 +27,8 @@ contract RNSDomainPrice is Initializable, AccessControlEnumerable, INSDomainPric uint64 public constant MAX_PERCENTAGE = 100_00; /// @inheritdoc INSDomainPrice bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); + /// @inheritdoc INSDomainPrice + bytes32 public constant OVERRIDER_ROLE = keccak256("OPERATOR_ROLE"); /// @dev Gap for upgradeability. uint256[50] private ____gap; @@ -170,7 +172,7 @@ contract RNSDomainPrice is Initializable, AccessControlEnumerable, INSDomainPric */ function bulkOverrideRenewalFees(bytes32[] calldata lbHashes, uint256[] calldata usdPrices) external - onlyRole(OPERATOR_ROLE) + onlyRole(OVERRIDER_ROLE) { uint256 length = lbHashes.length; if (length == 0 || length != usdPrices.length) revert InvalidArrayLength(); diff --git a/src/interfaces/INSDomainPrice.sol b/src/interfaces/INSDomainPrice.sol index b4fc0c6e..376284fe 100644 --- a/src/interfaces/INSDomainPrice.sol +++ b/src/interfaces/INSDomainPrice.sol @@ -199,6 +199,11 @@ interface INSDomainPrice { */ function OPERATOR_ROLE() external pure returns (bytes32); + /** + * @dev Returns the overrider role. + */ + function OVERRIDER_ROLE() external pure returns (bytes32); + /** * @dev Max percentage 100%. Values [0; 100_00] reflexes [0; 100%] */ From b58214e4700c2b982f856877ab430f08578a18e2 Mon Sep 17 00:00:00 2001 From: "Duke.ron" Date: Tue, 24 Oct 2023 14:41:49 +0700 Subject: [PATCH 26/27] Update src/RNSDomainPrice.sol --- src/RNSDomainPrice.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RNSDomainPrice.sol b/src/RNSDomainPrice.sol index e4cde42e..2eac7289 100644 --- a/src/RNSDomainPrice.sol +++ b/src/RNSDomainPrice.sol @@ -28,7 +28,7 @@ contract RNSDomainPrice is Initializable, AccessControlEnumerable, INSDomainPric /// @inheritdoc INSDomainPrice bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); /// @inheritdoc INSDomainPrice - bytes32 public constant OVERRIDER_ROLE = keccak256("OPERATOR_ROLE"); + bytes32 public constant OVERRIDER_ROLE = keccak256("OVERRIDER_ROLE"); /// @dev Gap for upgradeability. uint256[50] private ____gap; From f35ddbdfd2be864f941d51aacb36478cb48b9722 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Tue, 24 Oct 2023 14:43:23 +0700 Subject: [PATCH 27/27] feat: use overrider role for bulkSetDomainPrice --- src/RNSDomainPrice.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RNSDomainPrice.sol b/src/RNSDomainPrice.sol index 2eac7289..0187f2a6 100644 --- a/src/RNSDomainPrice.sol +++ b/src/RNSDomainPrice.sol @@ -220,7 +220,7 @@ contract RNSDomainPrice is Initializable, AccessControlEnumerable, INSDomainPric uint256[] calldata ronPrices, bytes32[] calldata proofHashes, uint256[] calldata setTypes - ) external onlyRole(OPERATOR_ROLE) { + ) external onlyRole(OVERRIDER_ROLE) { uint256 length = _requireBulkSetDomainPriceArgumentsValid(lbHashes, ronPrices, proofHashes, setTypes); address operator = _msgSender();